CN-121980032-A - Geographic entity representation method based on neighborhood relation
Abstract
Aiming at a geographic entity data set containing names and positions, searching all adjacent entities in a spatial neighborhood of each target entity serving as a center based on a preset neighborhood distance threshold T; generating a text sequence, namely a pseudo sentence, through the names of a target entity and the names of adjacent entities, adopting a compound bi-directional encoder to encode the pseudo sentence to obtain an input vector, inputting the input vector into an encoding layer of the compound bi-directional encoder to perform forward calculation, obtaining the output embedding of each word element in the pseudo sentence, performing aggregation operation to generate a space perception vector representation, inputting the space perception vector representation into a Softmax classification pre-measuring head to obtain the probability distribution of the category, and realizing the identification of the geographic entity type. The application integrates multi-source geographic data, supports space computing application and provides a new direction for space intelligence.
Inventors
- YANG MINGRUI
- WANG YONG
Assignees
- 中国地质大学(武汉)
Dates
- Publication Date
- 20260505
- Application Date
- 20251230
Claims (8)
- 1. A geographical entity representation method based on neighborhood relations, the method comprising the steps of: Step S1, for each target entity serving as a center, searching all adjacent entities in a spatial neighborhood of the target entity based on a preset neighborhood distance threshold T aiming at a geographic entity data set containing names and positions; arranging the names of the target entities and the names of the adjacent entities in ascending order according to the spatial distance between the adjacent entities and the target entities, and linearly splicing the names into a text sequence serving as a pseudo sentence for representing the spatial context of the target entities; s2, encoding the pseudo sentences by adopting a compound bi-directional encoder to obtain input vectors; Step S3, inputting an input vector into a coding layer of the compound bi-directional encoder for forward computation to acquire output embedment of each word element in a pseudo sentence, and performing aggregation operation on the output embedments of all word elements corresponding to a target entity name to generate a space perception vector representation of a fixed dimension of the target entity; and S4, representing the space perception vector, inputting an additional Softmax classification pre-measurement head, outputting probability distribution of the category to which the entity belongs, and realizing geographic entity type identification.
- 2. The method for representing a geographical entity based on a neighborhood relation of claim 1, wherein step S1 comprises: And rapidly searching for an adjacent entity which is within a threshold T from the target entity by using a Geohash spatial index algorithm, and calculating Euclidean distance between the adjacent entity and the target entity to realize ascending arrangement.
- 3. The method for representing a geographical entity based on a neighborhood relation of claim 1, wherein step S2 comprises: Summing each word element in the pseudo sentence, embedding the word element, embedding the position of the word element in the sequence and embedding the space coordinate to obtain a fused input vector, wherein the space coordinate embedding is calculated based on normalized relative coordinates corresponding to each geographic entity and is used for accurately representing the two-dimensional space relation between a target entity and an adjacent entity; The calculation process of the space coordinate embedding specifically comprises the following steps: Substep S21 for target entity And any neighboring entities thereof Calculating normalized relative abscissa distance Distance from the ordinate The calculation formula is as follows: Wherein, the And The original coordinates of the target entity and the adjacent entity are respectively, Z is a normalization factor, and the Z is an absolute value of the maximum distance between all entity pairs in the data set; Substep S22 of normalizing the distance And Respectively inputting a continuous embedded layer, wherein the layer adopts a combination of sine and cosine functions to map scalar distance values into high-dimensional continuous vectors; in the substep S23, all the sub-tokens of the same geographic entity name share the same spatial coordinate embedding vector.
- 4. The method for representing a geographical entity based on a neighborhood relation of claim 1, wherein step S3 comprises: the composite bi-directional encoder is trained by a pre-training task comprising spatial context modeling, the pre-training task comprising: masking language modeling, namely randomly masking the word elements of part of geographic entity names in pseudo sentences, and embedding the model into the word elements to be masked according to the rest word elements and the space coordinates thereof; And a second pre-training task, namely predicting a masking entity, randomly masking all the words of a certain complete geographic entity in the pseudo sentence, and embedding a model only according to the spatial relation between the masked entity and surrounding entities to predict the name of the masked entity.
- 5. The method for representing a geographical entity based on a neighborhood relationship of claim 4, wherein step S3 further comprises: In the pre-training stage, the second pre-training task is mixed with the mask language modeling task at a masking rate of 15%, and the sequence position embedding and the space coordinate embedding are not masked all the time in the training process.
- 6. The method for representing a geographical entity based on a neighborhood relation of claim 1, wherein step S5 comprises: The aggregation operation is average pooling, namely, the output of all the word elements corresponding to the target entity name is embedded and averaged to be used as the space perception vector representation of the target entity.
- 7. An electronic device comprising a processor, a memory, a user interface, and a network interface, the memory for storing instructions, the user interface and the network interface for communicating to other devices, the processor for executing the instructions stored in the memory to cause the electronic device to perform the neighborhood relationship-based geographic entity representation method of any of claims 1-6.
- 8. A computer readable storage medium storing instructions which, when executed by a computer, perform the neighborhood relation based representation of geographical entities of any one of claims 1-6.
Description
Geographic entity representation method based on neighborhood relation Technical Field The application relates to the field of natural language processing, in particular to a geographic entity representation method based on neighborhood relations. Background Geographic entities refer to physical objects in real or virtual space with definite spatial locations (coordinates, geometric forms), geographic attributes (categories, names, descriptions, etc.), and semantic information, and are used in applications such as geographic intelligence, map understanding, movement behavior detection, point of interest recommendation, air quality prediction, traffic prediction, etc. Geographical entity representation refers to a computing process that encodes semantic features (including names, types) and spatial contexts of named geographical entities into low-dimensional vectors, with the core being capturing the "spatially varying semantics" of the entities, i.e., the same entity may have different meanings in different spatial environments. The prior art faces significant challenges in handling geographic entities, and currently mainstream pre-trained language models have inherent limitations when applied to geographic entities. First, geographic entities exist in the physical world with spatial relationships (e.g., distance and direction) that do not have fixed structures, meaning that it is difficult for conventional methods to directly capture these complex, unstructured spatial associations. Secondly, the existing method usually performs pre-training on a general corpus, and when the method is directly applied to geographic entity names, the method can encounter field drift, namely, the phenomenon that data distribution or task semantics are obviously changed in a training stage and an actual application stage of a machine learning model, so that the performance of the model in a target field is obviously reduced is caused. This results in a model that requires extensive fine tuning to adapt to the specific naming convention and semantic characteristics of the geographic entity, reducing its immediate usability in the geographic information field. Accurate capture of the semantics of the spatial variation of a geographic entity is critical to identifying and analyzing geospatial concepts. For example, even if two identical-name gas stations are identical in type, their spatial locations are different, and the surrounding environments are different, resulting in a difference in their semantics. Existing models have difficulty distinguishing such subtle spatial semantic changes, which limits their effectiveness in integrating multiple geographic data sources, implementing geographic entity landings, and supporting a wide range of spatial computing applications. Therefore, developing a model that can effectively capture the spatial context of a geographic entity and generate a generic representation thereof is a critical problem to be solved in the current technical field. Disclosure of Invention The invention aims to solve the problems that the existing language model based on the general corpus pre-training is difficult to effectively capture the spatial neighborhood relation of geographic entities and has field drift, so that the generated geographic entity representation lacks spatial discrimination, and provides a geographic entity representation method based on the neighborhood relation. The above object of the present application is achieved by the following technical solutions: Step S1, for each target entity serving as a center, searching all adjacent entities in a spatial neighborhood of the target entity based on a preset neighborhood distance threshold T aiming at a geographic entity data set containing names and positions; arranging the names of the target entities and the names of the adjacent entities in ascending order according to the spatial distance between the adjacent entities and the target entities, and linearly splicing the names into a text sequence serving as a pseudo sentence for representing the spatial context of the target entities; s2, encoding the pseudo sentences by adopting a compound bi-directional encoder to obtain input vectors; Step S3, inputting an input vector into a coding layer of the compound bi-directional encoder for forward computation to acquire output embedment of each word element in a pseudo sentence, and performing aggregation operation on the output embedments of all word elements corresponding to a target entity name to generate a space perception vector representation of a fixed dimension of the target entity; and S4, representing the space perception vector, inputting an additional Softmax classification pre-measurement head, outputting probability distribution of the category to which the entity belongs, and realizing geographic entity type identification. Optionally, step S1 includes: And rapidly searching for an adjacent entity which is within a threshold T fro