Spatial knowledge graph completion method based on topological relation
Through the spatial knowledge graph completion method based on topological relationships, the topological relationship embedding and structural embedding of spatial entities are calculated and integrated, and the problems of large spatial feature loss and resource consumption in the existing methods are solved, and efficient and accurate spatial knowledge graph completion is achieved.
Patent Information
- Application Number
- CN202510292957.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing spatial knowledge graph completion method simplifies the informative spatial modality to latitude and longitude points, resulting in a large loss of spatial features, increasing the difficulty of completing the missing triplets of spatial knowledge graphs. Using multiple embeddings and pre-trained models simultaneously increases resource consumption.
The spatial knowledge graph completion method based on topological relationships is adopted. By calculating the topological relationship between spatial entities, the topological relationship knowledge graph is constructed, and the topological relationship embedding of spatial entities is learned, and topological relationship embedding and structural embedding are integrated to build a completion model, reducing resource consumption and improving completion accuracy.
Effectively utilizing the spatial modal information of the spatial knowledge graph improves the spatial feature utilization rate of spatial entities, reduces model resource consumption, and significantly improves the accuracy of spatial knowledge graph completion.
Smart Images

Figure CN119808929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of spatial knowledge graph technology, and in particular to a spatial knowledge graph completion method based on topological relationships. Background Art
[0002] A spatial knowledge graph is a domain-specific knowledge graph that connects locations on the earth with related knowledge. Despite the continuous improvement of the database over a long period of time, its incompleteness remains an unsolved problem. In recent years, the study of spatial knowledge graph completion has attracted a lot of research attention. Existing methods such as SSLP [Mann, G., Dsouza, A., Yu, R., & Demidova, E. (2023, October). Spatial Link Prediction with Spatial and Semantic Embeddings. In International Semantic Web Conference (pp. 179-196). Cham: Springer Nature Switzerland.] aim to complete the spatial relationships between missing geographic entities in the predicted knowledge graph through link prediction. SSLP uniformly converts the spatial information (points, lines, and surfaces) of spatial entities into longitude and latitude points and embeds them into multi-dimensional vectors as the position encoding of spatial entities. It uses the fastText word embedding model to embed the names of entities into multi-dimensional vectors as name encodings. It concatenates the relationships and entities related to spatial entities into sentences and uses SentenceBERT to embed them into multi-dimensional vectors as dynamic embeddings. It uses a multi-head attention mechanism to fuse input features such as position encoding, name encoding, and dynamic embeddings, and scores the completed candidate triples through HAKE to complete the knowledge graph completion task.
[0003] In the existing method SSLP, the information-rich spatial modality is simplified to longitude and latitude points. In this process, the spatial features unique to the spatial knowledge graph are largely lost, and the boundary features of the spatial entity are completely lost, which increases the difficulty of completing the missing triples in the spatial knowledge graph. In addition, the use of multiple embeddings and a large number of pre-trained models will increase resource consumption, such as memory, computing power, and time. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a spatial knowledge graph completion method based on topological relationships, which can not only fully utilize the spatial modal information of the spatial knowledge graph, but also save resource consumption without reducing the completion accuracy.
[0005] A spatial knowledge graph completion method based on topological relations includes the following steps:
[0006] Step 1: Calculate the topological relationship between spatial entities; Step 2: Construct the topological relationship into a topological relationship knowledge graph; Specifically: topological relationships and associated spatial entities are stored in the form of triples and constructed into a topological relationship knowledge graph; Step 3: Take the relationship prediction task as the downstream task of spatial entity embedding learning, learn the topological relationship embedding of spatial entities, and build a topological relationship prediction model; use the topological relationship knowledge graph obtained in step 2 to train the topological relationship prediction model, and train the topological relationship prediction model; The input of the topological relationship prediction model is the spatial entity, and the output is the topological relationship. The knowledge of the topological relationship knowledge graph is embedded into the topological relationship embedding of the spatial entity through the relationship prediction model, and the embedding vector of the topological relationship is obtained at the same time; the topological relationship embedding of the spatial entity and the embedding of the topological relationship will be used as the input of the spatial knowledge graph completion model; Step 4: Build a spatial knowledge graph completion model that integrates the topological relationship embedding of spatial entities and the spatial knowledge graph structure embedding; The spatial knowledge graph completion model uses adjacent splicing coupled topological relationship embedding and structural embedding; the input of the spatial knowledge graph completion model is spatial entity, topological relationship embedding of spatial entity and embedding of topological relationship, and the output is spatial entity; Step 5: Train the spatial knowledge graph completion model; train the completion model in the spatial knowledge graph, calculate the confidence of the triples, and take the triples with the highest confidence as supplementary knowledge.
[0007] The training completion model in the spatial knowledge graph consists of four modules: a topological relationship module, a structure encoder, an encoding fusion module and a confidence discriminator.
[0008] The topological relationship module is used to learn the representation of spatial entities with topological relationship awareness by embedding the topological features and topological relationships of spatial entities into multidimensional vectors, where the topological relationship calculation formula between spatial entities is as follows: rτ h,t = R wkt ( wkt ( h ), wkt ( t )) in, wkt ( ) The spatial characteristics of spatial entities, R wkt ( ) Calculate spatial entities h and spatial entities t The topological relationship between rτ h,t ; After calculating the topological relationships between all entities, we get the topological relationship knowledge graph, and use the topological relationship prediction model to learn the topological relationship embedding of spatial entities and the embedding of topological relationships: ( τ h,t , τ rτ )= KGE ( h , rτ , t ) in, KGE ( ) is the topological relationship prediction model, τ h,t For spatial entities h and spatial entities t The topological relationship embedding h , t are the head entity and the tail entity in the triple, τ rτ For topological relationships rτ The topological relationship embedding of ; the optimization function of the topological relationship prediction model is: f ( h , rτ , t )=| τ h + τ rτ - τ t | in, τ h For spatial entities h The topological relationship embedding τ t For spatial entities t Topological relationship embedding; The entity topology embedding and structure embedding are fused into the complete embedding of the entity as the entity input of the knowledge graph completion model. The relationship embedding of the spatial knowledge graph is a random initialization vector, and the encoding fuser is: e = Concat ( s , τ ) in e is the complete embedding of the entity, Concat To concatenate vectors; s Encode the structure from the structure encoder: f se ( h , r ,t )=|| s h s r - s t || in, s h , s t is the structural embedding of the spatial entity, s r Embedding of relations for spatial knowledge graphs; The confidence discriminator selects the triple with the highest confidence to complete the link prediction; the input of the confidence discriminator is the complete embedding of the spatial entity and the relationship embedding, and the output is the confidence of the triple: Score ( h , r , t )=|| e h e r - e t || in, h , t is a spatial entity, r is the relationship of the spatial knowledge graph, e h , e t is the complete embedding of the spatial entity, e r is the embedding of the relations in the spatial knowledge graph, is the dot product; Finally, the triplet with the highest confidence is taken as supplementary knowledge.
[0009] The beneficial effects of adopting the above technical solution are: The present invention provides a spatial knowledge graph completion method based on topological relationships. The present invention uses two-dimensional spatial topological relationships to model the spatial relationships between spatial entities in a spatial knowledge graph, and uses topological relationships to describe the spatial relationships between spatial entities to achieve the purpose of utilizing the spatial features of spatial entities. In combination with the knowledge triples of the spatial knowledge graph, the purpose of fast and accurate spatial knowledge graph completion is achieved. Compared with existing methods, the technical solution proposed by the present invention improves the utilization rate of spatial features of spatial entities, reduces the resources consumed by the model, and significantly improves the accuracy of spatial knowledge graph completion; BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is an overall flow chart of a spatial knowledge graph completion method based on topological relationships of the present invention; Figure 2 It is a schematic diagram of the structure of the spatial knowledge graph completion model of the present invention. DETAILED DESCRIPTION
[0011] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0012] A spatial knowledge graph completion method based on topological relations, such as Figure 1 As shown, the following steps are included: Step 1: Calculate the topological relationship between spatial entities; The topological relationship specifically includes the following topological relationships: intersecting, disjoining, circumscribing, containing and inscribing, contained and tangent, overlapping, equal, containing, contained, crossing, and adjacent; Step 2: Construct the topological relationship into a topological relationship knowledge graph; Specifically: topological relationships and associated spatial entities are stored in the form of triples and constructed into a topological relationship knowledge graph; Step 3: Take the relationship prediction task as the downstream task of spatial entity embedding learning, learn the topological relationship embedding of spatial entities, and build a topological relationship prediction model; use the topological relationship knowledge graph obtained in step 2 to train the topological relationship prediction model, and train the topological relationship prediction model to verify the effectiveness of the model; The input of the topological relationship prediction model is the spatial entity, and the output is the topological relationship. The knowledge of the topological relationship knowledge graph is embedded into the topological relationship embedding of the spatial entity through the relationship prediction model, and the embedding vector of the topological relationship is obtained at the same time; the topological relationship embedding of the spatial entity and the embedding of the topological relationship will be used as the input of the spatial knowledge graph completion model; Step 4: Build a spatial knowledge graph completion model that integrates the topological relationship embedding of spatial entities and the spatial knowledge graph structure embedding; The spatial knowledge graph completion model uses adjacent splicing coupled topological relationship embedding and structural embedding; the input of the spatial knowledge graph completion model is spatial entity, topological relationship embedding of spatial entity and embedding of topological relationship, and the output is spatial entity; Step 5: Train the spatial knowledge graph completion model; train the completion model in the spatial knowledge graph and verify the effectiveness of the spatial knowledge graph completion model.
[0013] In this embodiment, the topological relationship prediction model in step 3 and the spatial knowledge graph completion model training in step 5 are performed separately, which not only makes the embedding learning more specific, but also speeds up the model training. In step 3, after completing the training of the relationship prediction model, the best entity topological relationship embedding and topological relationship embedding are saved, and these embeddings will be used as the initial parameters of the completion model in step 5.
[0014] like Figure 2 Shown is a structural diagram of the spatial knowledge graph completion model. The training completion model in the spatial knowledge graph consists of four modules: topological relationship module, structure encoder, encoding fusion and confidence discriminator.
[0015] The topological relationship module is used to learn the representation of spatial entities with topological relationship perception, by embedding the topological features and topological relationships of spatial entities into multidimensional vectors, so as to achieve the purpose of converting entities described in natural language into representations that can be understood by computers; the topological relationship calculation formula between spatial entities is as follows: rτ h,t = R wkt ( wkt ( h ), wkt ( t )) in, wkt ( ) The spatial characteristics of spatial entities, R wkt ( ) Calculate spatial entities h and spatial entities t The topological relationship between rτ h,t ; After calculating the topological relationships between all entities, we get the topological relationship knowledge graph, and use the topological relationship prediction model to learn the topological relationship embedding of spatial entities and the embedding of topological relationships: ( τ h,t , τ rτ )= KGE ( h , rτ , t ) in, KGE ( ) is the topological relationship prediction model, τ h,t For spatial entities h and spatial entities t The topological relationship embedding h , t are the head entity and the tail entity in the triple, τ rτ For topological relationships rτThe topological relationship embedding of ; the optimization function of the topological relationship prediction model is: f ( h , rτ , t )=| τ h + τ rτ - τ t | in, τ h For spatial entities h The topological relationship embedding τ t For spatial entities t The topological relationship embedding of the entity is fused with the structural embedding to form the complete embedding of the entity as the entity input of the knowledge graph completion model. The relationship embedding of the spatial knowledge graph is a random initialization vector. The encoding fusion is: e = Concat ( s , τ ) in e is the complete embedding of the entity, Concat To concatenate vectors; s The structural encoding comes from the structural encoder, which is used to learn the structural information of the spatial knowledge graph. τ Encoding for topology includes τ h and τ t ; The optimization function of the structure encoder is: f se ( h , r , t )=|| s h s r - s t || in, s h , s t is the structural embedding of the spatial entity, s r Embedding of relations for spatial knowledge graphs; The confidence discriminator selects the triple with the highest confidence to complete the link prediction; the input of the confidence discriminator is the complete embedding of the spatial entity and the relationship embedding, and the output is the confidence of the triple: Score ( h , r , t )=|| e h e r - e t || in, h , t is a spatial entity, r is the relationship of the spatial knowledge graph, e h , e t is the complete embedding of the spatial entity, e r is the embedding of the relations in the spatial knowledge graph, is the dot product.
[0016] Finally, the triplet with the highest confidence is taken as supplementary knowledge.
[0017] In this embodiment, the existing method SSLP is compared with the technical solution of the present invention, and the spatial knowledge graphs GST and TD1 are used for experimental comparison. The results are shown in the following table: Table 1 data GST TD1 Model Accuracy Average ranking last Accuracy Average ranking last SSLP 0.132 0.183 0.823 0.894 This method 0.326 0.382 0.872 0.912 The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure to form a technical solution.
Claims
1. A spatial knowledge graph completion method based on topological relations, characterized in that: The following steps are involved: Step 1: Calculate the topological relationship between spatial entities; Step 2: Construct the topological relationship into a topological relationship knowledge graph; Step 3: Take the relationship prediction task as the downstream task of spatial entity embedding learning, learn the topological relationship embedding of spatial entities, and build a topological relationship prediction model; use the topological relationship knowledge graph obtained in step 2 to train the topological relationship prediction model, and train the topological relationship prediction model; Step 4: Build a spatial knowledge graph completion model that integrates the topological relationship embedding of spatial entities and the spatial knowledge graph structure embedding; Step 5: Train the spatial knowledge graph completion model; The completion model is trained in the spatial knowledge graph, and the confidence of the triples is calculated, and the triples with the highest confidence are taken as supplementary knowledge.
2. According to the method for completing a spatial knowledge graph based on topological relationships according to claim 1, it is characterized in that: The topological relationship described in step 1 specifically includes the following topological relationships: intersecting, disjoint, circumscribing, containing and inscribing, contained and tangent, overlapping, equal, containing, contained, crossing, and adjacent.
3. According to the method for completing a spatial knowledge graph based on topological relationships in claim 1, it is characterized in that: The step 2 is specifically as follows: storing the topological relationship and the associated spatial entities in the form of triples, and constructing a topological relationship knowledge graph.
4. According to the method for completing a spatial knowledge graph based on topological relationships according to claim 1, it is characterized in that: The input of the topological relationship prediction model described in step 3 is the spatial entity, and the output is the topological relationship. The knowledge of the topological relationship knowledge graph is embedded into the topological relationship embedding of the spatial entity through the relationship prediction model, and the embedding vector of the topological relationship is obtained at the same time; the topological relationship embedding of the spatial entity and the embedding of the topological relationship will be used as the input of the spatial knowledge graph completion model.
5. According to the method for completing a spatial knowledge graph based on topological relationships in claim 1, it is characterized in that: The spatial knowledge graph completion model described in step 4 uses adjacent splicing coupled topological relationship embedding and structural embedding; the input of the spatial knowledge graph completion model is spatial entities, topological relationship embedding of spatial entities and embedding of topological relationships, and the output is spatial entities.
6. According to the method for completing a spatial knowledge graph based on topological relationships in claim 1, it is characterized in that: The training completion model in the spatial knowledge graph described in step 5 consists of four modules: a topological relationship module, a structure encoder, an encoding fusion module, and a confidence discriminator.
7. A spatial knowledge graph completion method based on topological relationships according to claim 6, characterized in that: The topological relationship module is used to learn the representation of spatial entities with topological relationship awareness by embedding the topological features and topological relationships of spatial entities into multidimensional vectors, where the topological relationship calculation formula between spatial entities is as follows: rτ h,t = R wkt ( wkt ( h ), wkt ( t ));in, wkt ( ) The spatial characteristics of spatial entities, R wkt ( ) Calculate spatial entities h and spatial entities t The topological relationship between rτ h,t ; After calculating the topological relationships between all entities, we get the topological relationship knowledge graph, and use the topological relationship prediction model to learn the topological relationship embedding of spatial entities and the topological relationship embedding: τ h,t , τ rτ )= KGE ( h , rτ , t );in, KGE ( ) is the topological relationship prediction model, τ h,t For spatial entities h and spatial entities t The topological relationship embedding h , t are the head entity and the tail entity in the triple, τ rτ For topological relationships rτ Topological relationship embedding; The optimization function of the topological relationship prediction model is: f ( h , rτ , t )=| τ h + τ rτ - τ t |; Among them, τ h For spatial entities h The topological relationship embedding τ t For spatial entities t Topological relationship embedding; The entity topology embedding and structure embedding are fused into the complete embedding of the entity as the entity input of the knowledge graph completion model. The relationship embedding of the spatial knowledge graph is a random initialization vector, and the encoding fuser is: e = Concat ( s , τ );in e is the complete embedding of the entity, Concat To concatenate vectors; s Encode the structure from the structure encoder: f se ( h , r , t )=|| s h s r - s t ||; Among them, s h , s t is the structural embedding of spatial entities, s r Embedding of relations for spatial knowledge graphs; The confidence discriminator selects the triple with the highest confidence to complete the link prediction; the input of the confidence discriminator is the complete embedding of the spatial entity and the relationship embedding, and the output is the confidence of the triple: Score ( h , r , t )=|| e h e r - e t ||; Among them, h , t is a spatial entity, r is the relationship of the spatial knowledge graph, e h , e t is the complete embedding of the spatial entity, e r is the embedding of the relations in the spatial knowledge graph, is the dot product.
Citation Information
Cited By
Knowledge graph completion method based on dynamic routing and dual-channel reasoning
CN122287828A
Knowledge graph completion method based on dynamic routing and double-channel reasoning
CN122287828B