Town spatial form identification and classification method based on graph neural network
By constructing a town topology structure perception graph neural network model and combining it with direction perception and structure guidance mechanisms, the shortcomings of existing methods in town space identification are addressed, higher classification accuracy and result interpretability are achieved, and urban planning and management are supported.
Patent Information
- Application Number
- CN202510861395.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing urban space recognition methods based on graph neural networks have shortcomings in reflecting spatial sequence information such as road directions and building cluster arrangement directions, modeling the differences in node information propagation, and model interpretability, making it difficult to accurately depict the complex topological structure and evolutionary characteristics of urban space.
A neural network model of town topology structure perception graph is constructed. By introducing the direction-aware attention propagation mechanism and the structure-guided embedding mechanism, multi-source spatial data is combined to build a spatial graph structure. Physical adjacency, road connectivity and line-of-sight relationships are used to extract node attributes and edge attributes, perform multi-scale structure aggregation and classification reasoning, and generate a visual explanatory graph.
It improves the spatial structure expression ability and classification accuracy, enhances the interpretability of the results, and can better support urban planning and management.
Smart Images

Figure CN120747770A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban space intelligent recognition, and in particular to a method for urban space morphology recognition and classification based on graph neural networks. Background Art
[0002] With the development of remote sensing image processing, geographic information systems, and urban big data technologies, the identification and classification of urban spatial morphology has become a key task in urban planning, land use management, and intelligent decision support. Existing technologies widely employ traditional machine learning methods, convolutional neural networks (CNNs), and their variants to extract and classify spatial features from urban imagery, building outlines, and land use labels. These methods typically rely on regular grids or image pixel grids, focusing on local texture, edge features, and geometric morphology. These methods ignore the widespread non-Euclidean structural characteristics of urban space, particularly the spatial adjacency between building units, road network structures, and the distribution pattern of boundary elements.
[0003] To model the graph structure of urban geographic space, some studies have begun to use graph neural networks (GNNs) to model the relationships between spatial entities. This type of method generally uses buildings and road nodes as nodes in the graph, and the setting of edges mainly depends on physical distance or spatial proximity. The cross-node information propagation is achieved through the graph convolution mechanism, thereby improving the representation ability of spatial entities. However, most existing spatial recognition methods based on graph neural networks use general graph convolutional networks (GCNs) or graph attention networks (GATs), which have limitations in structural representation ability, directional sensitivity, and spatial interpretability, making it difficult to accurately depict the complex topological structure and evolutionary characteristics within urban space.
[0004] First, existing methods generally ignore the directional modeling of edges in spatial graphs, failing to effectively reflect spatial sequence information closely related to urban structure, such as road orientation and building cluster orientation. Second, information propagation between nodes lacks modeling of differences in structural types or functional attributes, failing to introduce guiding structural embedding features, resulting in limited spatial morphological classification accuracy. Third, regarding the interpretability of model inference results, most methods lack mechanisms to link classification outputs with graph structural propagation paths, making it difficult to provide planners or managers with structurally informed auxiliary analysis results. Furthermore, existing graph models have limited ability to integrate the multidimensional features of heterogeneous spatial entities (such as buildings, roads, and land use boundaries), failing to uniformly construct an urban spatial graph structure with structural hierarchy, semantic diversity, and directional awareness.
[0005] Therefore, how to provide a method for urban spatial morphology recognition and classification based on graph neural networks is an urgent problem that technicians in this field need to solve. Summary of the Invention
[0006] One purpose of the present invention is to propose a method for identifying and classifying urban spatial morphology based on graph neural networks. The present invention constructs a spatial graph structure for urban geographic spatial data, designs an urban topology structure-aware graph neural network model with a direction-aware attention propagation mechanism and a structure-guided embedding mechanism, and describes in detail the entire process from standardized spatial entity modeling, spatial graph construction, input feature generation, graph structure reasoning to morphological classification and structural interpretation. It has the advantages of strong spatial structure expression ability, high classification accuracy and good result interpretability.
[0007] According to an embodiment of the present invention, a method for identifying and classifying urban spatial forms based on a graph neural network includes the following steps:
[0008] S1. Collect and process multi-source spatial data of the area to be analyzed to obtain a standardized spatial entity set;
[0009] S2. Build a spatial graph structure based on a standardized set of spatial entities. Each spatial unit is treated as a node in the graph structure. An edge set is established based on physical adjacency, road connectivity, and line-of-sight relationships. Each edge is assigned a direction attribute and a spatial distance attribute.
[0010] S3, extracting the node attribute set from the spatial graph structure, constructing the structure-guided feature set, and obtaining the original input features;
[0011] S4. Construct a town topology structure perception graph neural network model, including an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer, to obtain a multi-scale spatial graph feature set;
[0012] S5. Input the multi-scale spatial graph feature set into the classification module, perform graph neural network classification reasoning, and obtain a set of spatial morphology classification results;
[0013] S6. Visualize the spatial morphology classification result set and generate a set of urban structure explanation graphs by combining the attention propagation results and structure-guided embedding results in the urban topology structure perception graph neural network model;
[0014] S7. Use labeled samples to construct supervised learning tasks, jointly construct a loss function based on classification accuracy and structure preservation performance, and train the urban topology structure perception graph neural network model.
[0015] Optionally, the standardized spatial entity set includes a building unit set, a road network set, a land use type layer, and a boundary area set extracted from remote sensing images;
[0016] The building unit set includes the boundary outline, center coordinates and area parameters of each building; the road network set includes road centerline, intersection location, road grade and road direction information; the land use type layer includes reclassified functional type label information; the boundary area set includes boundary vector information of green spaces, water bodies and open spaces extracted from remote sensing images.
[0017] Optionally, the S2 specifically includes:
[0018] S21. Using the building units, road nodes, and land use units in the standardized spatial entity set as nodes in a graph structure, a node set is constructed;
[0019] S22. Based on the physical contact relationship between building units, the road connectivity relationship between building units and roads, and the line of sight relationship between spatial units, construct an edge set. Each edge e(i, j) represents a connection from node i to node j. Each edge in the edge set contains a connection type, a spatial direction attribute, and a spatial distance attribute.
[0020] S23. Calculate the direction attribute for each edge e(i, j) in the edge set E. The direction attribute includes two components: one is the spatial orientation angle from node i to node j, and the other is the Euclidean distance between node i and node j;
[0021] S24. Specify the connection type identifier t for each edge e(i,j) ij , the connection type identifier is defined as t ij ∈{1,2,3}, where 1 represents physical adjacency, 2 represents road connectivity, and 3 represents line-of-sight accessibility;
[0022] S25. Combine the node set V, the edge set E, the node attribute set X, the edge weight set W, and the edge direction set R to construct a spatial graph structure G = (V, E, X, W, R).
[0023] Optionally, the S3 specifically includes:
[0024] S31. For each node v of the node set V in the spatial graph structure G i , extract the geometric features of the node, which include building area, boundary perimeter, aspect ratio and compactness, and set it as the geometric feature vector g i ;
[0025] S32. Calculate the spatial location features based on the geographical location coordinates of the node. The spatial location features include the coordinates of the node center point, the normalized relative position and the distance from the city center, and set it as the spatial location feature vector p i ;
[0026] S33, based on the superposition relationship of multi-source spatial layers, extract functional type features, the functional type features represent the land use category corresponding to the node, and use one-hot encoding to construct the land function label vector f i ;
[0027] S34. Calculate structural guidance features, including building density index, road intersection density, spatial location gradient, and historical area type identification, and construct a structural guidance vector s. i ;
[0028] S35, the geometric morphological feature vector g i , spatial position feature vector p i , land function label vector f i With the structure guide vector s i Perform the splicing operation to obtain the original input features.
[0029] Optionally, the S4 specifically includes:
[0030] S41. Construct a town topology structure perception graph neural network model, wherein the town topology structure perception graph neural network model includes an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer;
[0031] S42. In the input fusion layer, linear mapping, dimension unification conversion, and nonlinear activation processing are performed based on the original input features to generate a standardized model input feature set;
[0032] S43. In the spatial topology attention propagation layer, for each node v in the node set V in the spatial graph structure G, i , utilizes the adjacent node features and the direction attributes of the edges to perform direction-aware attention propagation operations;
[0033] S44. In the structure-guided embedding layer, each node feature representation output by the spatial topological attention propagation layer is jointly encoded with the corresponding structure-guided feature, and a residual fusion mechanism and projection mapping method are used to generate a structure-aware enhanced node representation;
[0034] S45. In the multi-scale structure aggregation layer, perform graph structure aggregation operations, perform sub-graph division and hierarchical aggregation on the node feature representation according to the spatial adjacency relationship, classify nodes that are spatially close and structurally similar into the same block or district unit, and generate a multi-scale spatial graph feature set.
[0035] Optionally, the S43 specifically includes:
[0036] S431. For each target node in the spatial graph structure, extract a set of adjacent nodes, obtain input feature representations of each adjacent node and directional attribute information of the connecting edge, and generate a set of adjacent node features and directional attributes;
[0037] S432: Input the input feature representation of the target node, the features of the adjacent nodes, and the directional attribute set into the attention coefficient generation module, perform feature splicing, directional attribute embedding, and weight calculation operations, and obtain a directional perception attention coefficient set;
[0038] S433: Perform a weighted superposition operation based on the direction-aware attention coefficient set and the adjacent node feature set to generate an aggregated feature representation of the target node, input the aggregated feature representation into a nonlinear activation function, and output an updated feature representation set of the target node;
[0039] S434. Summarize the results of updating each node in the feature representation set into a graph structure node update feature set.
[0040] Optionally, the S44 specifically includes:
[0041] S441, receiving the graph structure node update feature set output by the direction-aware attention propagation layer and the structure guidance feature set corresponding to the node, and constructing a node joint input pair set, wherein the structure guidance feature set consists of shape indicators, boundary complexity, neighboring component distribution, and geographic relationship encoding of the spatial entity;
[0042] S442. For each node joint input pair, perform feature alignment and dimension unification operations to generate a structured fusion input representation;
[0043] S443: Input the structure fusion input representation into the embedding mapping module, first perform a residual fusion operation to preserve the difference between the original graph structure information and the structure-guided features, and then complete the spatial embedding projection through the fully connected mapping structure to generate a structure-aware enhanced node representation;
[0044] S444. Combining all structure-aware enhanced node representations into a structure-guided embedding feature set.
[0045] Optionally, the S5 specifically includes:
[0046] S51, inputting the structure-guided embedded feature set into the morphological classification reasoning module to construct a node-level classification input matrix, where each row in the matrix corresponds to a structure-aware enhanced feature vector of a spatial entity node;
[0047] S52. In the morphological classification reasoning module, several layers of fully connected neural network structures are sequentially used, each layer including linear transformation, batch normalization and nonlinear activation operations to extract high-order structural combination features;
[0048] S53. In the output layer, the Softmax function is used to normalize the final output feature vector of each spatial entity node to generate the corresponding morphological category prediction probability distribution;
[0049] S54. Based on the predicted category probability distribution of all nodes, the category label corresponding to the maximum probability is selected as the classification result of the spatial entity, and the category labels of all nodes are summarized to generate a set of urban spatial morphology recognition results.
[0050] Optionally, the S6 specifically includes:
[0051] S61, performing an index mapping operation on the urban spatial form recognition result set and the structure-guided embedding feature set to obtain a spatial entity node classification-structure feature correspondence table;
[0052] S62, extracting the attention weight distribution set corresponding to each node output by the direction-aware attention propagation layer, and generating a node attention aggregation relationship set;
[0053] S63. Construct a structural explanation vector for each node based on the spatial entity node classification-structural feature correspondence table and the node attention aggregation relationship set, and generate a node structure explanation vector set;
[0054] S64. Fuse the node structure explanation vector set with the spatial graph structure topological relationship to output a town structure explanation graph set.
[0055] Optionally, the S7 specifically includes:
[0056] S71. Construct a training sample set, where the training sample set consists of a set of historically annotated standardized spatial entities, corresponding spatial graph structures, morphological classification labels, and structural interpretation information to generate a supervised training dataset.
[0057] S72. Input the supervised training data set into the constructed town topology structure perception graph neural network model, perform a forward propagation operation, and output a set of morphological classification results and a set of node structure interpretation results predicted by the model;
[0058] S73. Define a multi-objective joint loss function, where the joint loss function is composed of morphological classification loss, structural consistency loss, and attention distribution guidance loss;
[0059] S74. Calculate the gradient based on the multi-objective joint loss function and update the parameters of each layer in the model through the back-propagation mechanism, including the input fusion layer parameters, the direction perception attention propagation layer parameters, the structure guidance embedding layer parameters, and the morphological classification reasoning module parameters, to form an optimized parameter set of the town topology structure perception graph neural network model;
[0060] S75. Apply the updated model parameter set to new unlabeled spatial entity data, continuously optimize the recognition accuracy and structural interpretation effect, and form an evolving and updated urban spatial morphology recognition model.
[0061] The beneficial effects of the present invention are:
[0062] This paper constructs a topology-aware graph neural network model for urban topology, featuring a direction-aware attention propagation mechanism and a structure-guided embedding mechanism. This model significantly improves spatial structure representation and recognition accuracy compared to existing technologies. During the spatial graph construction phase, the paper introduces a standardized set of spatial entities, integrating multiple spatial elements such as building units, road networks, land use layers, and remote sensing boundary areas to form a graph structure representation with complete spatial topology and attributes, providing a unified data foundation for subsequent graph neural network modeling.
[0063] In terms of feature modeling, by constructing original node feature vectors and structure-guided feature vectors, and combining them with the model input fusion layer to perform feature normalization and joint encoding operations, each node is equipped with input features that express its spatial position, type attributes, and structural associations. Subsequently, during the propagation phase of the graph neural network, a direction-aware attention mechanism is introduced to implement feature updates based on adjacent directions. This is combined with structure-guided embedding operations to construct enhanced node representations, improving the model's classification and discrimination capabilities and structural generalization capabilities in complex spatial patterns.
[0064] During the output phase, the present invention further combines the attention weight distribution and embedding features from the model inference process to generate a set of urban structural interpretation graphs with structural interpretation capabilities, providing visual support for urban planning, management, and auxiliary analysis. Overall, the present invention achieves integrated optimization in spatial entity modeling, graph structure representation, graph neural network design, and classification interpretation mechanisms. This approach offers benefits such as high modeling integrity, strong structural perception capabilities, and interpretable recognition results. It can effectively support the automatic recognition and intelligent classification of urban spatial forms. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0066] Figure 1 This is a flowchart of a method for identifying and classifying urban spatial morphology based on graph neural networks proposed in this invention;
[0067] Figure 2 This is a structural framework diagram of the urban topology structure perception graph neural network model in the urban spatial morphology recognition and classification method based on graph neural network proposed in the present invention;
[0068] Figure 3 This is a schematic diagram of the collaborative reasoning of the direction-aware attention propagation operation and the structure-guided embedding mechanism in the urban spatial morphology recognition and classification method based on graph neural network proposed in this invention. DETAILED DESCRIPTION
[0069] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0070] refer to Figure 1-3 , a method for urban spatial morphology recognition and classification based on graph neural network, including the following steps:
[0071] S1. Collect and process multi-source spatial data of the area to be analyzed to obtain a standardized spatial entity set;
[0072] S2. Build a spatial graph structure based on a standardized set of spatial entities. Each spatial unit is treated as a node in the graph structure. An edge set is established based on physical adjacency, road connectivity, and line-of-sight relationships. Each edge is assigned a direction attribute and a spatial distance attribute.
[0073] S3, extracting the node attribute set from the spatial graph structure, constructing the structure-guided feature set, and obtaining the original input features;
[0074] S4. Construct a town topology structure perception graph neural network model, including an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer, to obtain a multi-scale spatial graph feature set;
[0075] S5. Input the multi-scale spatial graph feature set into the classification module, perform graph neural network classification reasoning, and obtain a set of spatial morphology classification results;
[0076] S6. Visualize the spatial morphology classification result set and generate a set of urban structure explanation graphs by combining the attention propagation results and structure-guided embedding results in the urban topology structure perception graph neural network model;
[0077] S7. Use labeled samples to construct supervised learning tasks, jointly construct a loss function based on classification accuracy and structure preservation performance, and train the urban topology structure perception graph neural network model.
[0078] The present invention proposes a method for identifying and classifying urban spatial morphology based on graph neural networks. By constructing a spatial graph structure that includes spatial adjacency, road connectivity, and line of sight accessibility, it realizes structured modeling of multi-source spatial data. The introduction of direction-aware attention propagation and structure-guided embedding mechanisms can accurately capture the topological differences and semantic connections between urban spatial units, and effectively improve the accuracy and boundary clarity of spatial morphology classification. The multi-scale structure aggregation module supports the hierarchical expression of complex blocks and enhances the structural preservation ability of the model. In experimental verification, this method is superior to existing technologies in terms of accuracy, structural consistency, and classification stability, and has good practical value and promotion prospects.
[0079] In this embodiment, the standardized spatial entity set includes a building unit set, a road network set, a land use type layer, and a boundary area set extracted from remote sensing images;
[0080] The building unit set includes the boundary outline, center coordinates and area parameters of each building; the road network set includes road centerline, intersection location, road grade and road direction information; the land use type layer includes reclassified functional type label information; the boundary area set includes boundary vector information of green spaces, water bodies and open spaces extracted from remote sensing images.
[0081] This method achieves efficient fusion and structural representation of multi-source spatial data by constructing a standardized set of spatial entities that integrates building units, road networks, land use types, and boundary area information. This set not only preserves the geometric form and attribute information of spatial objects but also enhances the integrity and accuracy of graph structure modeling. This provides a high-quality input foundation for subsequent spatial form recognition, significantly improving recognition accuracy and the model's adaptability to complex spatial structures.
[0082] In this embodiment, S2 specifically includes:
[0083] S21. Using the building units, road nodes, and land use units in the standardized spatial entity set as nodes in a graph structure, a node set is constructed;
[0084] S22. Based on the physical contact relationship between building units, the road connectivity relationship between building units and roads, and the line of sight relationship between spatial units, construct an edge set. Each edge e(i, j) represents a connection from node i to node j. Each edge in the edge set contains a connection type, a spatial direction attribute, and a spatial distance attribute.
[0085] S23. Calculate the direction attribute for each edge e(i, j) in the edge set E. The direction attribute includes two components: one is the spatial orientation angle from node i to node j, which is used to represent the angle information of the node connection direction in two-dimensional space; the other is the Euclidean distance between node i and node j, which is used to represent the spatial straight-line distance between the center points of the nodes;
[0086] S24. Specify the connection type identifier t for each edge e(i,j) ij , the connection type identifier is defined as t ij ∈{1,2,3}, where 1 represents physical adjacency, 2 represents road connectivity, and 3 represents line-of-sight accessibility;
[0087] S25. Combine the node set V, edge set E, node attribute set X, edge weight set W, and edge direction set R to construct a spatial graph structure G = (V, E, X, W, R):
[0088] Among them, the node attribute set X contains the geometric shape, spatial position and functional type characteristics of each node, the edge weight set W represents the connection strength or relationship strength, and the edge direction set R represents the direction attribute set of all edges; the spatial graph structure G serves as the input graph structure of the urban topology structure perception graph neural network model.
[0089] This paper achieves multidimensional modeling of urban spatial relationships by constructing a spatial graph structure comprising building units, road nodes, and land use units. By introducing three types of connectivity—physical adjacency, road connectivity, and line of sight—and combining spatial direction attributes with Euclidean distance information, it comprehensively characterizes the structural and spatial connections between nodes. Node attributes encompass geometric form, spatial location, and functional type, while edge attributes cover connection strength and directional characteristics, providing rich structured input for graph neural networks. While maintaining spatial semantic integrity, it effectively enhances the model's ability to express complex urban structures and its reasoning accuracy.
[0090] In this embodiment, S3 specifically includes:
[0091] S31. For each node v of the node set V in the spatial graph structure G i , extract the geometric features of the node, which include building area, boundary perimeter, aspect ratio and compactness, and set it as the geometric feature vector g i ;
[0092] S32. Calculate the spatial location features based on the geographical location coordinates of the node. The spatial location features include the coordinates of the node center point, the normalized relative position and the distance from the city center, and set it as the spatial location feature vector p i ;
[0093] S33, based on the superposition relationship of multi-source spatial layers, extract functional type features, the functional type features represent the land use category corresponding to the node, and use one-hot encoding to construct the land function label vector f i ;
[0094] S34. Calculate structural guidance features, including building density index, road intersection density, spatial location gradient, and historical area type identification, and construct a structural guidance vector s. i ,in:
[0095] The building density index is the number of buildings per unit area, the road intersection density is the ratio of the number of road intersections in the node neighborhood to the area covered by the node, the spatial position gradient represents the relative progression of the node from the edge to the core of the city, and the historical area type identifier is the classification code value derived from the urban zoning plan;
[0096] S35, the geometric morphological feature vector g i , spatial position feature vector p i , land function label vector f i With the structure guide vector s i Perform the splicing operation to obtain the original input features.
[0097] This method constructs an information-rich set of raw input features by extracting the geometric form, spatial position, land function, and structural guidance features of each node in the spatial graph structure. Geometric features reflect the scale and shape of buildings, spatial position features reflect the relative relationship of nodes in urban space, land function labels provide clear functional classification, and structural guidance vectors integrate urban planning and spatial structure information to enhance the model's perception of macrostructures. The input vector after feature splicing provides multi-dimensional semantic support for graph neural networks, significantly improving the expression ability and recognition accuracy of spatial form features in classification tasks.
[0098] In this embodiment, the S4 specifically includes:
[0099] S41. Construct a town topology structure perception graph neural network model, wherein the town topology structure perception graph neural network model includes an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer;
[0100] S42. In the input fusion layer, based on the original input features, linear mapping, dimension unification conversion, and nonlinear activation processing are performed to generate a standardized model input feature set as the starting representation of information propagation in the graph neural network;
[0101] S43. In the spatial topology attention propagation layer, for each node v in the node set V in the spatial graph structure G, i, utilizes the adjacent node features and the direction attributes of the edges to perform direction-aware attention propagation operations;
[0102] S44. In the structure-guided embedding layer, each node feature representation output by the spatial topological attention propagation layer is jointly encoded with the corresponding structure-guided feature, and a residual fusion mechanism and projection mapping method are used to generate a structure-aware enhanced node representation;
[0103] S45. In the multi-scale structure aggregation layer, perform graph structure aggregation operations, perform sub-graph division and hierarchical aggregation on the node feature representation according to the spatial adjacency relationship, classify nodes that are spatially close and structurally similar into the same block or district unit, and generate a multi-scale spatial graph feature set.
[0104] This paper constructs a neural network model for town topology perception graphs, achieving a deep fusion of spatial structure and semantic information. The model uses an input fusion layer to uniformly process multi-source features, improving the standardization of input data. The spatial topology attention propagation layer introduces directional attributes, enhancing the model's ability to perceive the directional nature of spatial associations between nodes. The structure-guided embedding layer integrates external structural knowledge, improving the structural integrity of node representations. The multi-scale structure aggregation layer aggregates spatial units at different levels, enhancing the model's adaptability to block and district-level spatial morphology, thereby improving the accuracy and stability of classification results.
[0105] In this embodiment, the S43 specifically includes:
[0106] S431. For each target node in the spatial graph structure, extract a set of adjacent nodes, obtain input feature representations of each adjacent node and directional attribute information of the connecting edge, and generate a set of adjacent node features and directional attributes. The directional attribute information includes a spatial orientation and an inter-node Euclidean distance, which is used to describe the spatial topological directional relationship between the nodes.
[0107] S432: Input the input feature representation of the target node, the features of the adjacent nodes, and the directional attribute set into the attention coefficient generation module, perform feature splicing, directional attribute embedding, and weight calculation operations to obtain a set of direction-aware attention coefficients. The set of direction-aware attention coefficients is normalized to form an attention weight distribution, which is used to characterize the degree of structural influence of each adjacent node on the target node.
[0108] S433. Perform a weighted superposition operation based on the direction-aware attention coefficient set and the adjacent node feature set to generate an aggregated feature representation of the target node. Input the aggregated feature representation into a nonlinear activation function and output an updated feature representation set of the target node. The updated feature representation set is used to characterize the structural perception representation capability of the node in the propagation layer.
[0109] S434. Summarize the results of updating each node in the feature representation set into a graph structure node update feature set, which serves as the input feature set of the structure-guided embedding layer to complete the connection operation between the direction-aware attention propagation layer and the subsequent embedding layer.
[0110] The present invention achieves spatial topology-sensitive aggregation of node features in a graph structure by designing a direction-aware attention propagation mechanism. This mechanism fully utilizes the input features of adjacent nodes and the directional attribute information of connecting edges to construct a set of direction-aware attention coefficients, accurately characterizing the degree of structural influence of adjacent nodes on the target node. Through weighted weighting and nonlinear activation operations, node update features with directionality are generated, improving the model's feature representation capabilities under complex spatial relationships. The resulting graph structure node update feature set provides high-quality input for subsequent structure-guided embedding, effectively enhancing classification accuracy and model generalization capabilities.
[0111] In this embodiment, the S44 specifically includes:
[0112] S441, receiving the graph structure node update feature set output by the direction-aware attention propagation layer and the structure guidance feature set corresponding to the node, and constructing a node joint input pair set, wherein the structure guidance feature set consists of shape indicators, boundary complexity, neighboring component distribution, and geographic relationship encoding of the spatial entity;
[0113] S442. For each node joint input pair, perform feature alignment and dimension unification operations to generate a structure fusion input representation, where the structure fusion input representation includes a mapping relationship between the graph structure propagation feature and the structure guidance feature in the same encoding space;
[0114] S443: Input the structure fusion input representation into the embedding mapping module, first perform a residual fusion operation to preserve the difference between the original graph structure information and the structure-guided features, and then complete the spatial embedding projection through the fully connected mapping structure to generate a structure-aware enhanced node representation;
[0115] S444. Combining all structure-aware enhanced node representations into a structure-guided embedding feature set as an input feature set for a subsequent morphological classification reasoning module.
[0116] This paper introduces a structure-guided embedding mechanism to achieve a deep fusion of graph structure propagation features and spatial structure prior knowledge. This mechanism combines the graph structure update features of the node with the structure-guided features as a joint input. After feature alignment and residual fusion processing, it preserves the differences between the original spatial graph propagation information and structural attributes, improving the model's adaptability to heterogeneous spatial information. The resulting structure-aware enhanced node representation has stronger structural differentiation and semantic expression capabilities, providing a high-dimensional, highly semantic input foundation for subsequent morphological classification, significantly enhancing the stability and inference accuracy of the classification model.
[0117] In this embodiment, the S5 specifically includes:
[0118] S51, inputting the structure-guided embedded feature set into the morphological classification reasoning module to construct a node-level classification input matrix, where each row in the matrix corresponds to a structure-aware enhanced feature vector of a spatial entity node;
[0119] S52. In the morphological classification reasoning module, several layers of fully connected neural network structures are sequentially used, each layer including linear transformation, batch normalization and nonlinear activation operations to extract high-order structural combination features;
[0120] S53. In the output layer, the Softmax function is used to normalize the final output feature vector of each spatial entity node to generate the corresponding morphological category prediction probability distribution;
[0121] S54. Based on the predicted category probability distribution of all nodes, the category label corresponding to the maximum probability is selected as the classification result of the spatial entity, and the category labels of all nodes are summarized to generate a set of urban spatial morphology recognition results.
[0122] This paper constructs a morphological classification inference module to achieve refined classification of spatial entities based on a structure-guided embedded feature set. This module utilizes a fully connected network to extract high-order structural combination features and outputs node category predictions through normalization and probabilistic calculations, ensuring robustness and accuracy of the classification process. The resulting set of urban spatial morphological recognition results exhibits high resolution and structural consistency, providing precise support for urban spatial modeling and planning analysis.
[0123] In this embodiment, S6 specifically includes:
[0124] S61, performing an index mapping operation on the urban spatial form recognition result set and the structure-guided embedding feature set to obtain a spatial entity node classification-structure feature correspondence table;
[0125] S62, extracting the attention weight distribution set corresponding to each node output by the direction-aware attention propagation layer, and generating a node attention aggregation relationship set, which is used to represent the influence degree of each adjacent node in the structure propagation process;
[0126] S63. Based on the spatial entity node classification-structural feature correspondence table and the node attention aggregation relationship set, a structural explanation vector is constructed for each node to generate a set of node structural explanation vectors. The structural explanation vector combines the node's classification label, structural perception feature, and adjacency direction contribution weight to reflect the node's structural source and propagation mechanism;
[0127] S64. Fusing the node structure explanation vector set with the spatial graph structure topological relationship, outputting a town structure explanation graph set, wherein the town structure explanation graph set is used to visually display the classification results of each node, the structure embedding source path, and the aggregation path of the direction perception attention mechanism.
[0128] This paper constructs a set of node structure explanation vectors, integrating classification results, structural perception features, and the propagation path of the directional attention mechanism to form a set of town structure explanation maps. These explanation maps intuitively display the classification basis of spatial entities and the source of their structural embeddings, helping to understand the model's discriminant logic and spatial topological relationships, thereby improving the interpretability of the results and transparency in practical applications.
[0129] In this embodiment, the S7 specifically includes:
[0130] S71. Construct a training sample set, where the training sample set consists of a set of historically annotated standardized spatial entities, corresponding spatial graph structures, morphological classification labels, and structural interpretation information to generate a supervised training dataset.
[0131] S72. Input the supervised training data set into the constructed town topology structure perception graph neural network model, perform a forward propagation operation, and output a set of morphological classification results and a set of node structure interpretation results predicted by the model;
[0132] S73. Define a multi-objective joint loss function, where the joint loss function consists of a morphological classification loss, a structural consistency loss, and an attention distribution guidance loss. The morphological classification loss is used to measure the difference between the predicted label and the true label. The structural consistency loss is used to constrain the representation consistency between the structural guidance feature and the spatial topology embedding feature. The attention distribution guidance loss is used to enhance the interpretability of direction-aware attention.
[0133] S74. Calculate the gradient based on the multi-objective joint loss function and update the parameters of each layer in the model through the back-propagation mechanism, including the input fusion layer parameters, the direction perception attention propagation layer parameters, the structure guidance embedding layer parameters, and the morphological classification reasoning module parameters, to form an optimized parameter set of the town topology structure perception graph neural network model;
[0134] S75. Apply the updated model parameter set to new unlabeled spatial entity data, continuously optimize the recognition accuracy and structural interpretation effect, and form an evolving and updated urban spatial morphology recognition model.
[0135] This paper improves the stability and generalization capabilities of the model during training by constructing a multi-objective joint loss function to comprehensively optimize morphological classification accuracy, structural consistency, and attention distribution interpretability. During parameter optimization, the input fusion layer, the direction-aware attention propagation layer, and the structure-guided embedding layer are coordinated to enhance the model's recognition adaptability when processing complex spatial structures. The resulting evolutionary update model possesses higher recognition accuracy and structural interpretability, which is beneficial for enhancing the practical effectiveness of intelligent urban spatial analysis and planning support.
[0136] Example 1:
[0137] In order to verify the feasibility of the present invention in implementation, the present invention was applied to the task of intelligent spatial morphology recognition in a typical urban community area. The area has complex topography, large differences in building density and road topology, and contains a variety of typical spatial morphological structures, such as centralized residential clusters, mixed-function blocks, low-density industrial areas and traditional open street units. In this context, traditional methods based on remote sensing image classification or artificial rule modeling cannot effectively characterize the topological correlation and evolution trend between spatial structures, and are difficult to adapt to the morphological discrimination needs of highly heterogeneous urban environments, resulting in poor consistency in classification results and blurred boundary recognition.
[0138] In practical applications, building vector outlines, road centerlines, land use type layers, and water and green space boundaries are first collected synchronously from remote sensing imagery, geographic information system (GIS) databases, and planning base maps to form a multi-source spatial entity data set. This data is then normalized and standardized using pre-set parsing scripts to construct a unified, standardized set of spatial entities, from which a spatial graph structure is generated. During the mapping process, each building unit, road node, and functional land unit is modeled as a graph node. Edges are defined based on physical adjacency, road connectivity, and line of sight, with direction and distance information encoded into edge attributes.
[0139] Once the graph structure is established, it sequentially performs structure-guided feature extraction, node attribute encoding, direction-aware attention propagation, and structural embedding aggregation. Finally, the system spatially categorizes all graph nodes based on the trained urban topology-aware graph neural network model and outputs classification labels and spatial distribution heatmaps for each node type. Combining attention propagation weights with embedding weights, it outputs a structural interpretation map, identifying high-impact nodes and areas with blurred boundaries, assisting urban planners in assessing and developing intervention recommendations for complex areas.
[0140] To validate the performance of our model, we conducted comparative experiments with mainstream methods, using evaluation metrics including classification accuracy, neighborhood consistency score, boundary clarity score, and average processing time. These comparisons included a traditional support vector machine-based spatial classification model, a convolutional neural network-based image classification method, and a general graph neural network classification model. The experiments were conducted using a unified dataset and environment, and the results are shown in the table below.
[0141] Table 1 Comparative experimental results of urban spatial morphology recognition
[0142]
[0143]
[0144] As can be seen from the above table, the present invention demonstrates significant advantages over existing mainstream methods in multiple key performance indicators for urban spatial morphology recognition tasks. First, in terms of classification accuracy, the spatial morphology recognition method based on the urban topology structure perception graph neural network proposed in this invention reaches 91.2%. This is an improvement of 18.4 percentage points, 11.8 percentage points, and 7.5 percentage points, respectively, compared to the 72.8% of the traditional SVM classification method, the 79.4% of the CNN-based image classification model, and the 83.7% of the standard GCN model, demonstrating stronger structural perception capabilities and classification accuracy.
[0145] Secondly, in terms of neighborhood consistency, our method achieved a score of 0.86, significantly higher than the 0.61 of the SVM method, the 0.68 of the CNN method, and the 0.73 of the GCN method. This result demonstrates that our method can more effectively maintain the continuity of local topological structures within the urban spatial graph structure, resulting in more consistent classification results for adjacent spatial units, which contributes to the accurate representation of the overall shape of blocks in actual urban planning.
[0146] Furthermore, the proposed model achieved a high score of 0.78 for boundary clarity, significantly outperforming other comparison methods (including the GCN model, which scored 0.66). This result demonstrates that when faced with high-density building boundaries or mixed-functional area boundaries, the proposed model, leveraging structural guidance features and directional perception propagation mechanisms, can effectively depict complex boundary areas, thereby avoiding the fuzzy judgment issues common in traditional models and improving the clarity and stability of boundary recognition.
[0147] Finally, despite incorporating a multi-level embedding mechanism and a complex attention propagation structure, the proposed method achieved an average inference time of only 2.91 seconds, maintaining similar operational efficiency to the standard GCN model and significantly outperforming the SVM approach. This improvement in accuracy was achieved without sacrificing processing speed, demonstrating excellent algorithm deployment efficiency and engineering practicality. In summary, the proposed method excels in accuracy, structure preservation, boundary recognition, and real-time performance, providing reliable technical support for the intelligent identification and classification of large-scale urban spaces.
[0148] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for urban spatial morphology recognition and classification based on graph neural network, characterized by: The steps include: S1. Collect and process multi-source spatial data of the urban area to be analyzed to obtain a standardized spatial entity set; S2. Build a spatial graph structure based on a standardized set of spatial entities. Each spatial unit is treated as a node in the graph structure. An edge set is established based on physical adjacency, road connectivity, and line-of-sight relationships. Each edge is assigned a direction attribute and a spatial distance attribute. S3, extracting the node attribute set from the spatial graph structure, constructing the structure-guided feature set, and obtaining the original input features; S4. Construct a town topology structure perception graph neural network model, including an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer, to obtain a multi-scale spatial graph feature set; S5. Input the multi-scale spatial graph feature set into the classification module, perform graph neural network classification reasoning, and obtain a set of spatial morphology classification results; S6. Visualize the spatial morphology classification result set and generate a set of urban structure explanation graphs by combining the attention propagation results and structure-guided embedding results in the urban topology structure perception graph neural network model; S7. Use labeled samples to construct supervised learning tasks, jointly construct a loss function based on classification accuracy and structure preservation performance, and train the urban topology structure perception graph neural network model.
2. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The standardized spatial entity set includes a building unit set, a road network set, a land use type layer, and a boundary area set extracted from remote sensing images; The building unit set includes the boundary outline, center coordinates and area parameters of each building; the road network set includes road centerline, intersection location, road grade and road direction information; the land use type layer includes reclassified functional type label information; the boundary area set includes boundary vector information of green spaces, water bodies and open spaces extracted from remote sensing images.
3. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S2 specifically includes: S21. Using the building units, road nodes, and land use units in the standardized spatial entity set as nodes in a graph structure, a node set is constructed; S22. Based on the physical contact relationship between building units, the road connectivity relationship between building units and roads, and the line of sight relationship between spatial units, construct an edge set. Each edge e(i, j) represents a connection from node i to node j. Each edge in the edge set contains a connection type, a spatial direction attribute, and a spatial distance attribute. S23. Calculate the direction attribute for each edge e(i, j) in the edge set E. The direction attribute includes two components: one is the spatial orientation angle from node i to node j, and the other is the Euclidean distance between node i and node j; S24. Specify the connection type identifier t for each edge e(i,j) ij , the connection type identifier is defined as t ij ∈{1,2,3}, where 1 represents physical adjacency, 2 represents road connectivity, and 3 represents line-of-sight accessibility; S25. Combine the node set V, the edge set E, the node attribute set X, the edge weight set W, and the edge direction set R to construct a spatial graph structure G = (V, E, X, W, R).
4. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S3 specifically includes: S31. For each node v of the node set V in the spatial graph structure G i , extract the geometric features of the node, which include building area, boundary perimeter, aspect ratio and compactness, and set it as the geometric feature vector g i ; S32. Calculate the spatial location features based on the geographical location coordinates of the node. The spatial location features include the coordinates of the node center point, the normalized relative position and the distance from the city center, and set it as the spatial location feature vector p i ; S33, based on the superposition relationship of multi-source spatial layers, extract functional type features, the functional type features represent the land use category corresponding to the node, and use one-hot encoding to construct the land function label vector f i ; S34. Calculate structural guidance features, including building density index, road intersection density, spatial location gradient, and historical area type identification, and construct a structural guidance vector s. i ; S35, the geometric morphological feature vector g i , spatial position feature vector p i , land function label vector f i With the structure guide vector s i Perform the splicing operation to obtain the original input features.
5. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S4 specifically includes: S41. Construct a town topology structure perception graph neural network model, wherein the town topology structure perception graph neural network model includes an input fusion layer, a spatial topology attention propagation layer, a structure-guided embedding layer, and a multi-scale structure aggregation layer; S42. In the input fusion layer, linear mapping, dimension unification conversion, and nonlinear activation processing are performed based on the original input features to generate a standardized model input feature set; S43. In the spatial topology attention propagation layer, for each node v in the node set V in the spatial graph structure G, i , utilizes the adjacent node features and the direction attributes of the edges to perform direction-aware attention propagation operations; S44. In the structure-guided embedding layer, each node feature representation output by the spatial topological attention propagation layer is jointly encoded with the corresponding structure-guided feature, and a residual fusion mechanism and projection mapping method are used to generate a structure-aware enhanced node representation; S45. In the multi-scale structure aggregation layer, perform graph structure aggregation operations, perform sub-graph division and hierarchical aggregation on the node feature representation according to the spatial adjacency relationship, classify nodes that are spatially close and structurally similar into the same block or district unit, and generate a multi-scale spatial graph feature set.
6. The urban spatial morphology recognition and classification method based on graph neural network according to claim 5 is characterized in that: The S43 specifically includes: S431. For each target node in the spatial graph structure, extract a set of adjacent nodes, obtain input feature representations of each adjacent node and directional attribute information of the connecting edge, and generate a set of adjacent node features and directional attributes; S432: Input the input feature representation of the target node, the features of the adjacent nodes, and the directional attribute set into the attention coefficient generation module, perform feature splicing, directional attribute embedding, and weight calculation operations, and obtain a directional perception attention coefficient set; S433: Perform a weighted superposition operation based on the direction-aware attention coefficient set and the adjacent node feature set to generate an aggregated feature representation of the target node, input the aggregated feature representation into a nonlinear activation function, and output an updated feature representation set of the target node; S434. Summarize the results of updating each node in the feature representation set into a graph structure node update feature set.
7. The urban spatial morphology recognition and classification method based on graph neural network according to claim 5 is characterized in that: The S44 specifically includes: S441, receiving the graph structure node update feature set output by the direction-aware attention propagation layer and the structure guidance feature set corresponding to the node, and constructing a node joint input pair set, wherein the structure guidance feature set consists of shape indicators, boundary complexity, neighboring component distribution, and geographic relationship encoding of the spatial entity; S442. For each node joint input pair, perform feature alignment and dimension unification operations to generate a structured fusion input representation; S443: Input the structure fusion input representation into the embedding mapping module, first perform a residual fusion operation to preserve the difference between the original graph structure information and the structure-guided features, and then complete the spatial embedding projection through the fully connected mapping structure to generate a structure-aware enhanced node representation; S444. Combining all structure-aware enhanced node representations into a structure-guided embedding feature set.
8. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S5 specifically includes: S51, inputting the structure-guided embedded feature set into the morphological classification reasoning module to construct a node-level classification input matrix, where each row in the matrix corresponds to a structure-aware enhanced feature vector of a spatial entity node; S52. In the morphological classification reasoning module, several layers of fully connected neural network structures are sequentially used, each layer including linear transformation, batch normalization and nonlinear activation operations to extract high-order structural combination features; S53. In the output layer, the Softmax function is used to normalize the final output feature vector of each spatial entity node to generate the corresponding morphological category prediction probability distribution; S54. Based on the predicted category probability distribution of all nodes, the category label corresponding to the maximum probability is selected as the classification result of the spatial entity, and the category labels of all nodes are summarized to generate a set of urban spatial morphology recognition results.
9. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S6 specifically includes: S61, performing an index mapping operation on the urban spatial form recognition result set and the structure-guided embedding feature set to obtain a spatial entity node classification-structure feature correspondence table; S62, extracting the attention weight distribution set corresponding to each node output by the direction-aware attention propagation layer, and generating a node attention aggregation relationship set; S63. Construct a structural explanation vector for each node based on the spatial entity node classification-structural feature correspondence table and the node attention aggregation relationship set, and generate a node structure explanation vector set; S64. Fuse the node structure explanation vector set with the spatial graph structure topological relationship to output a town structure explanation graph set.
10. The urban spatial morphology recognition and classification method based on graph neural network according to claim 1 is characterized in that: The S7 specifically includes: S71. Construct a training sample set, where the training sample set consists of a set of historically annotated standardized spatial entities, corresponding spatial graph structures, morphological classification labels, and structural interpretation information to generate a supervised training dataset. S72. Input the supervised training data set into the constructed town topology structure perception graph neural network model, perform a forward propagation operation, and output a set of morphological classification results and a set of node structure interpretation results predicted by the model; S73. Define a multi-objective joint loss function, where the joint loss function is composed of morphological classification loss, structural consistency loss, and attention distribution guidance loss; S74. Calculate the gradient based on the multi-objective joint loss function and update the parameters of each layer in the model through the back-propagation mechanism, including the input fusion layer parameters, the direction perception attention propagation layer parameters, the structure guidance embedding layer parameters, and the morphological classification reasoning module parameters, to form an optimized parameter set of the town topology structure perception graph neural network model; S75. Apply the updated model parameter set to new unlabeled spatial entity data, continuously optimize the recognition accuracy and structural interpretation effect, and form an evolving and updated urban spatial morphology recognition model.