A method for urban street space analysis based on extreme gradient boosting algorithm

Through the extreme gradient enhancement algorithm combined with the graph structure analysis of road network and POI data, the high cost and inefficiency problem of urban public space definition is solved, and the efficient and automatic identification of the location and scope of urban street space is achieved.

CN120256751BActive Publication Date: 2025-08-19SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510714076.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-19
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

The prior art has problems of high cost and low efficiency in the definition of urban public space scope, especially when processing large-scale data and high-dimensional features, it is difficult to automatically identify the street space scope.

Method used

The extreme gradient enhancement algorithm is adopted to transform the road network and POI data into a graph structure containing equidistant road network nodes, and calculate the road center, business structure complexity and the number of POI paths that can reach. Combined with the shortest path algorithm and heuristic algorithm, the urban street space recognition model is trained to automatically identify urban street space.

Benefits of technology

It significantly improves the efficiency and reliability of urban street space analysis, and can automatically identify the location and scope of urban street space on a large scale, which greatly improves efficiency compared with traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256751B_ABST
    Figure CN120256751B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for urban street space analysis based on an extreme gradient boosting algorithm, which belongs to the technical field of urban space analysis. The method first converts the road network vector data of the target analysis area into a graph structure containing equidistant road network nodes, and assigns POIs to the nearest road network nodes based on the shortest path algorithm. Then, a heuristic algorithm is used to calculate the proximity centrality and betweenness centrality of the road network nodes, the complexity index of the business structure, and the target POI path reachable number used to measure the spatial distribution characteristics of the business format. The reference set graph structure of these quantitative information is input into an urban street space recognition model pre-trained using an extreme gradient boosting algorithm; the urban street space point set of the target analysis area is obtained; and finally, boundary post-processing is performed to obtain the urban street space range and boundary. The present invention has high recognition efficiency and robustness, and is of great significance for large-scale automatic recognition of the location and range of urban street space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intersectional technology of urban design and artificial intelligence, and in particular to an urban street space analysis method based on an extreme gradient boosting algorithm. Background Art

[0002] Urban public spaces refer to open areas accessible to the general public, primarily used for daily life and social activities. They include outdoor spaces such as city squares, streets, and parks. The core of urban public space evaluation lies in its public character. Criteria for determining the public character of public space generally include institutional and organizational factors (i.e., whether ownership and management are public), accessibility (whether it is open to all, whether it can accommodate diverse activities, and whether it has good physical and symbolic accessibility), and social value.

[0003] Urban public spaces are complex, multidimensional, and dynamic, making effective definition of their scope crucial and fundamental for further research. However, defining the spatial scope of urban public spaces has long been challenging. Existing methods often rely on subjective manual judgments, often based on planning documents combined with extensive on-site surveys, resulting in high costs and low efficiency.

[0004] Streets are the most important component of urban public spaces. On a plan view, the morphological characteristics of streets and roads are highly similar, making them the type of public spaces whose spatial boundaries are the most difficult to automatically identify.

[0005] With the continuous development of machine learning algorithms, many classifiers have been widely used in various practical problems, such as support vector machines (SVMs), random forests, and traditional gradient boosted decision trees (GBDTs). Although these methods perform well in different scenarios, they still have some limitations, especially in processing large-scale data, high-dimensional features, and training efficiency. Summary of the Invention

[0006] The purpose of this invention is to provide a method for analyzing urban street space based on the extreme gradient boosting algorithm. This method can significantly improve the efficiency and reliability of urban street space analysis. The technical solution adopted by this invention is as follows.

[0007] In one aspect, the present invention provides a method for analyzing urban street space based on an extreme gradient boosting algorithm, comprising:

[0008] Obtain road network vector data and POI (Point of Interest) vector data of the target parsing area;

[0009] Based on the road network vector data, converting the road network into a graph structure containing equidistant road network nodes according to road levels;

[0010] Based on the POI vector data and the graph structure containing equidistant road network nodes, the POI is assigned to the nearest road node to obtain a graph structure containing POI information and equidistant road network nodes;

[0011] Based on the graph structure containing POI information and equidistant road network nodes, obtain a centrality index of each node for measuring road centrality, a business structure complexity index for measuring the complexity of business structure, and a target POI path reachable number for measuring the spatial distribution characteristics of business formats;

[0012] The longitude and latitude coordinates, closeness centrality, betweenness centrality, weighted Hill diversity index, and the number of path reachable along the road distance of each node are input into the urban street space recognition model pre-trained by the extreme gradient boosting algorithm to obtain the urban street point set in the target analysis area;

[0013] Based on the urban street point set and in accordance with the road grade and building outline data in the road network vector data of the target parsing area, an urban street space with boundaries in the target parsing area is obtained.

[0014] Optionally, based on the road network vector data, converting the road network into a graph structure containing equidistant road network nodes according to road levels includes:

[0015] Generate road network Shapefile based on road network vector data;

[0016] Use the read_file function in the Python geopandas library to convert the road network vector data into the df_streets variable of the GeoDataFrame object;

[0017] Convert the road network GeoDataFrame to the MultiGraph data structure of the NetworkX library and define it as the clipped_momepy variable;

[0018] In the MultiGraph data structure of the road network, road intersections and road segmentation points are used as network nodes, and road entities are used as connecting edges to generate a graph structure containing equidistant road network nodes.

[0019] The road segmentation points are obtained by dividing the road between any two adjacent road intersections into equal sections if the length exceeds a set segment length threshold to obtain corresponding road segmentation points.

[0020] The above technical solutions can fully preserve the geometric connectivity characteristics and multiple edge features of the original road network, providing a data basis for the reliability of subsequent analysis.

[0021] Optionally, the source of the road network vector data includes road network data from the open source map website OpenStreetMap and commercial road network information from the Baidu Map Developer Platform;

[0022] The step of converting the road network into a graph structure containing equidistant road network nodes further includes: after converting the road network vector data into the df_streets variable of a GeoDataFrame object, calling the to_crs method to align the coordinate systems of the data from different sources to UTM Zone 50N. This implementation ensures projection consistency of multi-source road network vector data during spatial analysis, significantly improving the computational accuracy of subsequent quantitative analysis while maintaining the topological integrity of the road network.

[0023] Optionally, allocating the POI to the nearest road node includes:

[0024] Use the read_file function of the Python geopandas library to convert the Shapefile file data of the POI vector data into the data_gdf variable of the GeoDataFrame object, and perform preprocessing operations including projection normalization and outlier filtering;

[0025] Based on the road network MultiGraph data structure, for each POI, it is assigned to the two nearest road network nodes according to the closest road edge. This results in a graph structure containing POI information and equidistant road network nodes, as well as a POI data_gdf variable containing adjacent street information.

[0026] In this graph structure, each node includes road network node information and POI brief information assigned to the road network node. The POI brief information can be mapped to the POI vector data in the data_gdf variable.

[0027] In the POI data_gdf variable containing adjacent street information, each POI also records brief information of the road network node to which the POI is assigned.

[0028] Optionally, based on the graph structure containing POI information and equidistant road network nodes, obtaining a centrality index of each node for measuring road centrality includes:

[0029] Convert the clipped_momepy variable data in the MultiGraph data structure into the data structure required for network analysis: the nodes_gdf variable in GeoDataFrame format for node data, the edges_gdf variable in GeoDataFrame format for edge data, and the network_structure variable that describes the topological relationship. The network_structure variable is used to record the topological relationship information between road network nodes and POIs.

[0030] Conduct road centrality analysis: traverse each node in the graph structure, take each node as the center, delineate the local window network boundary within the preset walking distance threshold, and calculate the closeness centrality and betweenness centrality of the central node of the local window network as the centrality index;

[0031] The calculation formula for closeness centrality is:

[0032]

[0033] Where, Representation node The closeness centrality, n is the total number of nodes in the local window network, is a node in the local window network and nodes the distance between them;

[0034] The calculation formula for betweenness centrality is:

[0035]

[0036] Where, is a node The betweenness centrality, is the midpoint of the local window network and point The number of shortest paths between Yes and point passing point The number of shortest paths.

[0037] In the above technical solutions, closeness centrality measures the proximity between points based on the shortest path distance. Betweenness centrality measures the extent to which a point controls the connections between other points. By defining a local window network to calculate the centrality of each node, the network range associated with the current node is dynamically defined, avoiding the city boundary effect while improving computational efficiency.

[0038] Optionally, delineating the local window network boundary within a preset walking distance threshold range includes: for each node, taking the node as the center, delineating the local window network boundary within multiple preset walking distance threshold ranges;

[0039] The method of obtaining the centrality index of each node for measuring the road centrality further includes: for each node, respectively calculating its proximity centrality and betweenness centrality in multiple local window networks corresponding to different walking distance threshold ranges, to obtain multiple sets of centrality index data.

[0040] The above scheme sets multiple distance thresholds to ensure that window division can cover different spatial scales while maintaining data integrity, and can balance calculation accuracy and performance.

[0041] Optionally, based on the graph structure containing POI information and equidistant road network nodes, a business structure complexity index for measuring the complexity of the business structure is obtained, including:

[0042] Based on the POI data_gdf variable containing adjacent street information and the network_structure variable containing street adjacent POI information, for each road network node, the weighted Hill diversity index is calculated as follows:

[0043]

[0044] in:

[0045]

[0046]

[0047] Where: Represents a road network node The weighted Hill diversity index; and Represents the nodes assigned to the road network No. POI type and POI types; Represents assigned to road network nodes The total number of POI types; Represents assigned to road network nodes No. The number of POIs of each POI type; Indicates that the node Pedestrians walk to the The decay weight of each POI, Indicates the The mean of the attenuation weights corresponding to all POIs under a POI type; The parameter is used to control the emphasis on POI type richness and POI type balance; e is a natural constant, Road network nodes To POI node distance, is the preset walking distance threshold.

[0048] Optionally, the target POI path reachable number used to measure the spatial distribution characteristics of business formats is, for each road network node, the number of path instances that can reach a specified POI type along the road within a set distance threshold.

[0049] Optionally, based on the urban street point set and according to the road grade and building outline data in the road network vector data of the target parsing area, obtaining the urban street space with boundaries in the target parsing area includes:

[0050] According to the node ID field of the point element in the urban street point set, a topological connection is established with the start and end point IDs of the road segment in the road network to reconstruct the street network of the target parsing area;

[0051] A preset buffer radius is mapped based on the road grade field in the target parsing area vector data. Spatial difference calculation is performed between the buffer zone and the building polygon data to remove the area encroached by roadside buildings. The street spatial domain set is output and stored in Shapefile format to obtain the final street spatial location and range.

[0052] In a second aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the urban street space analysis method based on the extreme gradient boosting algorithm as described in the first aspect are implemented.

[0053] Beneficial effects

[0054] The present invention converts road network and POI data into a graph structure containing POI information and equidistant road network nodes, thereby realizing the correlation modeling between urban road network characteristics and business space distribution characteristics, and achieving a research idea of quantifying business by calculating the distance along the road extension direction. Based on the constructed graph structure, the key influencing factors of urban street space, including road centrality, business space distribution characteristics and business structure complexity, are quantitatively analyzed, and the extreme gradient boosting algorithm is used to train the automatic recognition model to locate the urban street space based on the quantified key influencing factors, and further determine the scope and boundaries of the urban street space, thereby realizing the intelligent determination of the urban street space location and scope. This is of great significance for the large-scale automatic identification of the location and scope of urban street space, and its efficiency is greatly improved compared with traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a schematic diagram of a flow chart of an embodiment of the present invention;

[0056] Figure 2 This is a visualization diagram of the graph structure after the road network in a certain area of Nanjing City is converted to a refined distance of 10 meters in an embodiment of the present invention.

[0057] Figure 3 It is a schematic diagram of the position and range of the urban street space obtained by analyzing the target analysis area in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following is a further description with reference to the accompanying drawings and specific embodiments.

[0059] eXtreme Gradient Boosting (XGBoost) is an efficient and powerful machine learning algorithm that extends the gradient boosting decision tree algorithm. It builds a strong learner by combining multiple weak decision trees (typically regression trees). It is widely used in classification, regression, and ranking tasks, and is characterized by efficiency, flexibility, and convenience.

[0060] Considering the complex, multidimensional and dynamic characteristics of urban public spaces, this paper selects the extreme gradient boosting algorithm as the training algorithm for the urban street space recognition model to achieve automatic recognition of urban street spaces. Compared with other machine learning classifier algorithms such as the random forest algorithm, the extreme gradient boosting algorithm has higher accuracy, precision, recall rate and F1 score, and can overcome the limitations of existing classification algorithms in processing large-scale data, high-dimensional features and training efficiency.

[0061] On a plan, streets and roads have highly similar morphological characteristics. Their primary difference lies in their prominent enclosed nature and slow traffic patterns, and their tendency to carry complex functions, encompassing a series of interconnected spaces for people to stay and interact. Key criteria for distinguishing between streets and roads are traffic flow characteristics, the nature of the land on either side of the road, and the primary service users. Therefore, the present invention utilizes heuristic algorithms and shortest path algorithms, combined with machine learning classifiers, to achieve automated identification of urban street spaces.

[0062] Example 1

[0063] This example introduces a method for analyzing urban street space based on the extreme gradient boosting algorithm. The key to this technical solution lies in modeling the correlation between urban road network characteristics and the spatial distribution characteristics of business formats, quantifying these characteristics into a data structure that can be processed by machine learning, and reversely converting the recognition results output by the algorithm into street space vector data. The method includes:

[0064] Obtain road network vector data and POI (Point of Interest) vector data of the target parsing area;

[0065] Based on the road network vector data, converting the road network into a graph structure containing equidistant road network nodes according to road levels;

[0066] Based on the POI vector data and the graph structure containing equidistant road network nodes, the POI is assigned to the nearest road node to obtain a graph structure containing POI information and equidistant road network nodes;

[0067] Based on the graph structure containing POI information and equidistant road network nodes, obtain a centrality index of each node for measuring road centrality, a business structure complexity index for measuring the complexity of business structure, and a target POI path reachable number for measuring the spatial distribution characteristics of business formats;

[0068] The closeness centrality and betweenness centrality of each node, the weighted Hill diversity index, and the number of path reachable along the road distance are input into the urban street space recognition model pre-trained by the extreme gradient boosting algorithm to obtain the urban street point set of the target analysis area;

[0069] Based on the urban street point set and in accordance with the road grade and building outline data in the road network vector data of the target parsing area, an urban street space with boundaries in the target parsing area is obtained.

[0070] The specific implementation of the above technical solution involves the following aspects.

[0071] It should be noted here that the extreme gradient boosting algorithm is used to pre-train the urban street space recognition model. It is based on the already marked urban street coordinate points, the proximity centrality and betweenness centrality of each node in the training area, the weighted Hill diversity index, and the path reachability data along the road distance. The following is a unified introduction to the data processing content involved in the training process and the actual detection process.

[0072] 1. Road network data and POI data processing

[0073] In this embodiment, the road network vector data can be downloaded from an open source map website, and the road network can be converted into a graph structure containing equidistant road network nodes according to the road level. Specifically:

[0074] To train the model, we obtained vector road network data for the training sample area from OpenStreetMap, an open-source map website. This data was supplemented with commercial road network information from the Baidu Maps developer platform to generate a Shapefile file. We used the read_file function in the geopandas library to convert the road network vector data into the df_streets variable of a GeoDataFrame object.

[0075] To ensure projection consistency for spatial analysis, the to_crs method is called to convert the coordinate system of the road network vector data to UTM Zone 50N (EPSG:32650). The road network GeoDataFrame is then converted to a NetworkX library MultiGraph data structure, defined as the variable clipped_momepy. This structure supports the representation of undirected polygonal networks. Specifically, it uses road intersections as network nodes and road entities as connecting edges, generating a graph structure with equidistant road network nodes, preserving the geometric connectivity and multi-edge characteristics of the original road network.

[0076] To eliminate the scale effect of uneven node density in the original road network on the subsequent calculation of centrality metrics, this embodiment employs a refined road network segmentation algorithm when generating a graph structure containing equidistant road network nodes. Specifically, if the length of a road between any two adjacent road intersections exceeds a set segment length threshold, the road is segmented into equidistant segments to obtain the corresponding road segmentation points. The segment length threshold can be set as needed, such as 10 meters as the maximum segment length threshold. Road edges exceeding this length are segmented into equidistant segments to generate a graph structure containing equidistant road network nodes. This operation maintains the topological integrity of the road network while significantly improving the computational accuracy of subsequent quantitative analysis.

[0077] For the POI data required for model training, we first download the POI vector dataset of the training sample area from the open source map website, and perform data preprocessing operations including filtering outliers and filling missing values. POI stands for Point of Interest, which covers multiple urban functional elements such as residential areas, commercial facilities, and transportation stations. Based on the preprocessed data, this embodiment loads the POI Shapefile data into the data_gdf variable of the GeoDataFrame object through the read_file function of the geopandas library, and performs a projection normalization operation to unify the data to the EPSG:32650 coordinate system.

[0078] For the area of urban street space to be analyzed, refer to the above process to obtain the road network vector data and POI vector data of the corresponding area, and perform corresponding processing.

[0079] 2. Association Processing of Road Network Vector Data and POI Data

[0080] In this section, this example uses a shortest path algorithm to assign POI data to the two closest road network nodes based on the nearest adjacent street edges, resulting in an equidistant node graph structure for POI data along the road. This assignment mechanism simulates the directional characteristics of POI accessibility from a pedestrian's perspective, facilitating subsequent precise quantitative analysis.

[0081] In this embodiment, allocating a POI to the nearest road node specifically includes the following operations:

[0082] Based on the road network MultiGraph data structure, for each POI, it is assigned to the two nearest road network nodes according to the closest road edge, resulting in a graph structure containing POI information and equidistant road network nodes, which is still the clipped_momepy variable here, as well as the POI data_gdf variable containing adjacent street information.

[0083] In the graph structure containing POI information and equidistant road network nodes, each node includes road network node information and brief information about the POI assigned to that road network node. This brief POI information can be mapped to the POI vector data in the data_gdf variable, which can be used to find the specific detailed information stored in data_gdf. In the POIdata_gdf variable containing adjacent street information, each POI also records brief information about the road network node to which it is assigned.

[0084] At this point, the clipped_momepy data can be converted into the three structures required for network analysis: the GeoDataFrame format nodes_gdf for road network node data, the GeoDataFrame format edges_gdf for edge data, and the network_structure variable that describes the topological relationship for subsequent calculations. The network_structure variable is used to record the topological relationship information between road network nodes and POIs.

[0085] The principles of the association processing methods for the training sample data and the data in the area to be analyzed are the same.

[0086] 3. Feature Parameter Extraction

[0087] To effectively improve the efficiency of urban street space analysis, this paper employs neural network technology and an extreme gradient boosting algorithm to train a neural network model based on the feature parameter extraction results of the training sample area and the labeling of known urban street space points. These feature parameters include the node centrality index for each road network node, which measures road centrality; the business structure complexity index, which measures the complexity of the business structure; and the number of target POI paths that can be reached, which measures the spatial distribution characteristics of the business. The extraction method for each feature parameter is as follows.

[0088] 3.1) Extraction of centrality index

[0089] This embodiment uses a heuristic algorithm to calculate the closeness centrality and betweenness centrality of each road network node on a graph structure containing equidistant road network nodes, which are used to measure road centrality.

[0090] In the road centrality analysis, this embodiment adopts a spatial analysis method based on a "moving window": traversing each node in the network, taking the current node as the center, demarcating the network boundary within a preset range of multiple walking distance thresholds, such as 50m, 100m, 200m, 400m, etc., and calculating the centrality of the network within the local window.

[0091] Based on the aforementioned road network node data in GeoDataFrame format nodes_gdf, the edge data in GeoDataFrame format edges_gdf, and the network_structure that describes the topological relationship, road centrality analysis is performed. Specifically:

[0092] Traversing each node in the graph structure, taking each node as the center, demarcating the local window network boundary within a preset range of multiple walking distance thresholds, and calculating the closeness centrality and betweenness centrality of the central node of the local window network as the centrality index;

[0093] The calculation formula for closeness centrality is:

[0094]

[0095] Where, Representation node The closeness centrality, n is the total number of nodes in the local window network, is a node in the local window network and nodes the distance between them;

[0096] The calculation formula for betweenness centrality is:

[0097]

[0098] Where, is a node The betweenness centrality, Yes and point The number of shortest paths between Yes and point passing point The number of shortest paths.

[0099] After the above processing, a set of multiple closeness centrality and betweenness centrality characteristic parameters are obtained for each node in the graph structure, which serve as part of the neural network model input. This implementation dynamically defines the network range associated with the current node by setting multiple distance thresholds. This ensures that window partitioning covers different spatial scales while maintaining data integrity. This improves computational efficiency while avoiding city boundary effects, and balances computational accuracy and reliability.

[0100] 3.2 Extraction of business structure complexity indicators

[0101] This example calculates a weighted Hill Diversity Index (HDI) for the road network node graph containing POI information to measure the complexity of the business structure. Specifically, it uses data_gdf (which contains adjacent street information) and the network_structure (which contains adjacent POI information) to calculate the complexity of the business structure and the spatial distribution characteristics of the business types. The aforementioned "moving window" spatial analysis method is also used in calculating the complexity of the business structure and the spatial distribution characteristics of the business types.

[0102] Considering that pedestrians’ willingness to walk to POI decreases as the distance increases, a negative exponential decay function is used to simulate spatial impedance. Pedestrians walk to the The attenuation weight of a POI is:

[0103]

[0104] When calculating the complexity of business structure, the weighted Hill diversity index is used, and the road network nodes The weighted Hill diversity index is expressed as:

[0105]

[0106] For road network nodes The assigned The corresponding average attenuation weight for each POI type is expressed as:

[0107]

[0108] Where: Represents a road network node The weighted Hill diversity index; Represents assigned to road network nodes No. POI types; Represents assigned to road network nodes The total number of POI types; Represents assigned to road network nodes No. The number of POIs of each POI type and the number of POIs assigned to road network nodes The ratio of the total number of POIs; The parameter is used to control the emphasis on POI type richness and POI type balance, which can be set according to experience and needs; e is a natural constant, Road network nodes To POI node distance, The walking distance threshold is preset. To optimize the operation speed and ensure data integrity, the distance threshold can be selected as 50m, 100m, 200m and 400m.

[0109] 3.3 Extraction of spatial distribution characteristics of business formats

[0110] This embodiment uses the reachable quantity index to calculate the spatial distribution characteristics of business formats. , represents the number of path instances along the road that can reach the specified POI type within the specified distance threshold for the corresponding road network node.

[0111] IV. Training of Urban Street Space Recognition Model

[0112] Based on the node coordinates and feature parameters of the training samples extracted above, that is, the information of network nodes nodes_gdf, connection edges edges_gdf, network structure network_structure, etc. is read to form a reference set graph structure, which is divided into two parts: training set and validation set. The boundaries of urban street space are manually marked as supervision labels. The longitude and latitude coordinates of road network nodes, closeness centrality and betweenness centrality, negative exponential weighted Hill coefficient and reachable distance in the former graph structure are used as input data, and the extreme gradient boosting algorithm is used to train the urban street space recognition model.

[0113] The prediction accuracy, precision, recall rate, and F1 score of the model were verified using the validation set to determine the quality of the model. Finally, the parameters of the extreme gradient boosting algorithm were adjusted to achieve better results, and a high-scoring urban street space recognition model was obtained based on these parameters.

[0114] 5. Urban Street Space Identification in the Area to be Analyzed

[0115] When identifying the area of the urban street space to be analyzed, the node longitude and latitude coordinates and feature parameter data of the quantitative preprocessed target area graph structure are input into the urban street space recognition model to obtain the target area urban street space point set goal_nodes_gdf output by the model.

[0116] 6. Data Post-Processing

[0117] Based on the urban street point set obtained in the fifth step, the urban street space with boundaries in the target parsing area is obtained according to the road grade and building outline data in the road network vector data of the target parsing area. Specifically:

[0118] Based on the node ID field of the goal_nodes_gdf point feature in the urban street point set data, a topological connection is established with the start and end point IDs of the road segment in the road network to reconstruct the street network of the target parsing area;

[0119] A preset buffer radius is mapped based on the road grade field in the target parsing area vector data. Spatial difference calculation is performed between the buffer zone and the building polygon data to remove the area encroached by roadside buildings. The street spatial domain set is output and stored in Shapefile format to obtain the final street spatial location and range.

[0120] Example 2

[0121] This example uses Nanjing's Gulou District as a reference set and Nanjing's main urban area excluding Gulou District as a target set to illustrate a method for automatically identifying urban street spaces using the extreme gradient boosting algorithm.

[0122] First, the vector road network data of the target area in Nanjing is obtained from the open source map website OpenStreetMap, and supplemented with the commercial road network information of the Baidu Map Developer Platform to finally generate the training area road network Shapefile file. The road network vector data is converted into a GeoDataFrame object (variable df_streets) through the read_file function of the geopandas library, and then the to_crs method is called to convert its coordinate system to UTM Zone 50N (EPSG:32650) to ensure the projection consistency of spatial analysis. The road network GeoDataFrame is converted into the MultiGraph data structure of the NetworkX library (supporting undirected polygonal network expression): road intersections are used as network nodes, and road entities are used as connecting edges, fully retaining the geometric connectivity characteristics and multiple edge features of the original road network. In order to eliminate the scale effect of the uneven density of the original road network nodes on the calculation of the centrality index, the road network segmentation algorithm is used for refinement. Set 10 meters as the maximum segmentation threshold, and divide the road edges that exceed the length into equidistant segments to generate a graph structure containing equidistant road network nodes (variable clipped_momepy), as shown below Figure 2 This operation not only maintains the topological integrity of the road network but also significantly improves the computational accuracy of subsequent quantitative analysis.

[0123] A POI vector dataset for the target area of Nanjing was obtained from an open-source map website. This dataset covers diverse urban functional elements, including residential areas, commercial facilities, and transportation stations. The POI Shapefile data was loaded into a GeoDataFrame object (variable data_gdf) using the read_file function in the geopandas library. Preprocessing operations, such as projection normalization (EPSG:32650) and outlier filtering, were performed. A refined road network MultiGraph model (variable clipped_momepy) constructed using the NetworkX library was then used. Using a bidirectional neighbor node assignment algorithm, POI information was assigned to the two closest road network nodes based on the nearest adjacent street edges, resulting in an equidistant node graph structure for POI data along the road. This assignment mechanism simulates the directional characteristics of POI accessibility from a pedestrian's perspective, facilitating subsequent precise quantitative analysis.

[0124] Convert clipped_momepy into the GeoDataFrame format nodes_gdf of the network nodes, the GeoDataFrame format edges_gdf of the connection edges, and the network structure network_structure for subsequent calculations. In the process of calculating the road centrality, a "moving window" spatial analysis method is adopted, that is, each node in the network is visited in turn, and the network is isolated within the specified walking distance threshold range of the currently selected node, and then the road centrality can be calculated for the local windowed environment. Its advantage is that it can clearly and consistently define the network boundary related to the current analysis point, thereby optimizing the calculation speed and avoiding a series of problems such as the precise definition of the city boundary. In order to accurately divide the "moving window" and optimize the operation speed and ensure data integrity as much as possible, the distance threshold is selected as 50m, 100m, 200m and 400m. Calculate the road centrality index, namely: close centrality, which is used to measure the closeness between points based on the distance of the shortest path; and betweenness centrality, which is used to measure the extent to which a point controls the connection between other points. For specific formulas, refer to Example 1

[0125] The data_gdf file, containing information about adjacent streets, and the network_structure file, containing information about adjacent POIs, are used to calculate the structural complexity and spatial distribution characteristics of business formats. The aforementioned "moving window" spatial analysis method is also used in this calculation. To optimize computational speed and ensure data integrity, distance thresholds of 50m, 100m, 200m, and 400m are selected. Given that pedestrians' willingness to walk to POIs decreases with increasing distance, a negative exponential decay function is used to simulate spatial impedance. A weighted Hill diversity metric is then used to calculate structural complexity of business formats.

[0126] When calculating the spatial distribution characteristics of business formats, the reachable quantity index is used , represents the number of reachable instances of a given POI type (within a specified distance threshold) from the corresponding road network node.

[0127] The network nodes (nodes_gdf), edges (edges_gdf), and network structure (network_structure) are read to form the reference graph structure. The reference graph structure is randomly divided into a training set and a validation set. The longitude and latitude coordinates, closeness and betweenness centrality, negative exponentially weighted Hill coefficient, and reachable distance of the road network nodes in the training set are fed into the extreme gradient boosting algorithm. The automatic recognition model is trained using manually labeled urban street spatial boundaries in the training set as supervisory labels. The validation set is used to verify the model's prediction accuracy, precision, recall, and F1 score to determine its performance. Ultimately, the extreme gradient boosting algorithm parameters are adjusted to achieve optimal results, such as a maximum tree depth of 20, a learning rate of 0.01, and 2000 training rounds. These parameters are then used to train an automatic recognition model with a high score.

[0128] Experiments have shown that the urban street space analysis algorithm of the present invention is compared with other existing machine learning classifier algorithms, such as the random forest algorithm. The urban street space recognition model trained using the extreme gradient boosting algorithm has higher accuracy, precision, recall, and F1 score, as shown in the following table:

[0129]

[0130] The target area's road network and POI vector data were quantitatively preprocessed using the aforementioned method to obtain the target area graph structure. The latitude and longitude coordinates, closeness and betweenness centrality, negative exponentially weighted Hill coefficient, and reachable distance of the road network nodes in the target area graph structure were input into the automatic recognition model to obtain the urban street point set goal_nodes_gdf for Nanjing's Gulou District.

[0131] Use the urban street point set goal_nodes_gdf to import it back into the target area road network to intercept the road network, refer to the road level in the target area vector data to generate a buffer zone, and remove the building outlines on both sides of the road to generate a surface set. Save it as a Shapefile file, which is the location and range of the urban street space in the target area of Nanjing Gulou District obtained by parsing, as shown in the following example: Figure 3 shown.

[0132] Example 3

[0133] Based on the same inventive concept as Example 1, this embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the urban street space analysis method based on the extreme gradient boosting algorithm as described in Example 1 is implemented.

[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0135] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0136] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0138] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.

Claims

1. A method for urban street space analysis based on extreme gradient boosting algorithm, characterized by: include: Obtain road network vector data and POI vector data of the target parsing area; Based on the road network vector data, converting the road network into a graph structure containing equidistant road network nodes according to road levels; Based on the POI vector data and the graph structure containing equidistant road network nodes, the POI is assigned to the nearest road node to obtain a graph structure containing POI information and equidistant road network nodes; Based on the graph structure containing POI information and equidistant road network nodes, obtain the centrality index of each node for measuring road centrality, the business structure complexity index for measuring the complexity of the business structure, and the number of target POI paths reachable for measuring the spatial distribution characteristics of the business, including: Convert the clipped_momepy variable data in the MultiGraph data structure into the data structure required for network analysis: the nodes_gdf variable in GeoDataFrame format for node data, the edges_gdf variable in GeoDataFrame format for edge data, and the network_structure variable that describes the topological relationship. The network_structure variable is used to record the topological relationship information between road network nodes and POIs. Conduct road centrality analysis: traverse each node in the graph structure, take each node as the center, delineate the local window network boundary within the preset walking distance threshold, and calculate the closeness centrality and betweenness centrality of the central node of the local window network as the centrality index; The calculation formula for closeness centrality is: , Where, Representation node The closeness centrality, n is the total number of nodes in the local window network, is a node in the local window network and nodes the distance between them; The calculation formula for betweenness centrality is: , Where, is a node The betweenness centrality, Yes and point The number of shortest paths between Yes and point passing point The number of shortest paths; Based on the POI data_gdf variable containing adjacent street information and the network_structure variable containing street adjacent POI information, for each road network node, the weighted Hill diversity index is calculated as follows: , in: , , Where: Represents a road network node The weighted Hill diversity index; and Represents the nodes assigned to the road network No. POI type and POI types; Represents assigned to road network nodes The total number of POI types; Represents assigned to road network nodes No. The number of POIs of each POI type; Indicates that the node Pedestrians walk to the The decay weight of each POI, Indicates the The mean of the attenuation weights corresponding to all POIs under a POI type; The parameter is used to control the emphasis on POI type richness and POI type balance; e is a natural constant, Road network nodes To POI node distance, is the preset walking distance threshold; The target POI path reachability number used to measure the spatial distribution characteristics of business formats is the number of path instances along the road that can reach a specified POI type within a set distance threshold for each road network node; The longitude and latitude coordinates, closeness centrality, betweenness centrality, weighted Hill diversity index, and the number of path reachable along the road distance of each node are input into the urban street space recognition model pre-trained by the extreme gradient boosting algorithm to obtain the urban street point set in the target analysis area; Based on the urban street point set, according to the road grade and building outline data in the road network vector data of the target parsing area, an urban street space with boundaries in the target parsing area is obtained, including: establishing a topological connection with the start and end point IDs of the road section in the road network according to the node ID field of the point element in the urban street point set, and reconstructing the street network of the target parsing area; mapping a preset buffer radius according to the road grade field in the road network vector data of the target parsing area, performing spatial difference operation on the buffer zone and the building polygon data, and removing the area occupied by roadside buildings; outputting the street space domain set and storing it in Shapefile format to obtain the final street space position and range.

2. The method according to claim 1, wherein: Based on the road network vector data, the road network is converted into a graph structure containing equidistant road network nodes according to the road level, including: Generate road network Shapefile based on road network vector data; Use the read_file function in the Python geopandas library to convert the road network vector data into the df_streets variable of the GeoDataFrame object; Convert the road network GeoDataFrame to the MultiGraph data structure of the NetworkX library and define it as the clipped_momepy variable; In the MultiGraph data structure of the road network, road intersections and road segmentation points are used as network nodes, and road entities are used as connecting edges to generate a graph structure containing equidistant road network nodes. The road segmentation points are obtained by dividing the road between any two adjacent road intersections into equal sections if the length exceeds a set segment length threshold to obtain corresponding road segmentation points.

3. The method according to claim 2, wherein: The sources of the road network vector data include road network data from the open source map website OpenStreetMap and commercial road network information from the Baidu Map Developer Platform; The step of converting the road network into a graph structure containing equidistant road network nodes further includes: after converting the road network vector data into the df_streets variable of the GeoDataFrame object, calling the to_crs method to convert the coordinate systems of data from different sources to UTM Zone 50N.

4. The method according to claim 2, wherein: The allocating the POI to the nearest road node includes: Use the read_file function of the Python geopandas library to convert the Shapefile file data of the POI vector data into the data_gdf variable of the GeoDataFrame object, and perform preprocessing operations including projection normalization and outlier filtering; Based on the road network MultiGraph data structure, for each POI, it is assigned to the two nearest road network nodes according to the closest road edge. This results in a graph structure containing POI information and equidistant road network nodes, as well as a POI data_gdf variable containing adjacent street information. In the graph structure containing POI information and equidistant road network nodes, each node includes road network node information and brief information of the POI assigned to the road network node; In the POI data_gdf variable containing adjacent street information, each POI also records brief information of the road network node to which the POI is assigned.

5. The method according to claim 1, wherein: Defining the local window network boundary within the preset walking distance threshold range includes: for each node, taking the node as the center, demarcating the local window network boundary within multiple preset walking distance threshold ranges; The method of obtaining the centrality index of each node for measuring the road centrality further includes: for each node, respectively calculating its proximity centrality and betweenness centrality in multiple local window networks corresponding to different walking distance threshold ranges, to obtain multiple sets of centrality index data.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the urban street space analysis method based on the extreme gradient boosting algorithm as claimed in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Rural network node radiation domain-oriented rural residential area renovation zoning method

    CN103971312A

  • Urban business district boundary identification method and system, computer equipment and storage medium

    CN112766718A