A spatial accessibility measurement method based on DBSCAN clustering algorithm
Patent Information
- Application Number
- CN202310184765.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-03-01
AI Technical Summary
[0004]现有的技术缺陷主要包括:POI的地址不规范且有冗余信息,且存在离群点
[0045]Compared with existing technologies, this invention has the following advantages: It identifies residential POI datasets using the DBSCAN clustering algorithm to determine the clustering range of park and green space service targets, rather than simply defining buffer zones. This results in a more concentrated service target population, providing valuable insights for urban planning. Furthermore, it searches websites to obtain concurrent query results for parks, green spaces, and their surrounding POIs, using these results as weight parameters to calculate the spatial accessibility of parks and green spaces. This replaces the traditional, crude method of using parameters such as building area as weights to calculate spatial accessibility.
Smart Images

Figure CN116150178B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spatial accessibility technology, and in particular to a spatial accessibility measurement method based on the DBSCAN clustering algorithm. Background Technology
[0002] Spatial clustering algorithms can extract clusters from dense datasets of arbitrary shapes according to standards, ensuring greater differentiation within each cluster and effectively suppressing noise points, thus more accurately analyzing the cluster distribution and spatial characteristics of POI data. Spatial clustering algorithms mainly include: (1) grid-based methods, which cluster data by constructing a network structure through spatial quantization; (2) customer-provided model-based methods, which cluster data by optimizing the relationship between data and mathematical models; and (3) density-based methods, which segment datasets through clusters. The DBSCAN (Density-based Spatial Clustering of Application with Noise) algorithm is a density-based method. Spatial clustering algorithms have different applications and developments in different fields.
[0003] The quality of urban parks and green spaces, and the services they provide to surrounding residents, is increasingly becoming an important indicator for measuring the urban environment and residents' living standards. The spatial accessibility of urban parks and green spaces can, to some extent, quantify the level of urban ecological and living environment development. Evaluation methods for urban parks and green spaces typically include network analysis, cost-weighted distance method, minimum nearest neighbor method, potential model analysis, and two-step move search method. Among these, the two-step move search method, which considers distance decay and incorporates more accurate traffic network information, is more widely used.
[0004] Existing technical shortcomings mainly include: non-standardized and redundant POI addresses, as well as outliers. This affects subsequent web script crawling using HtmlUnit, leading to errors when submitting concurrent queries. Furthermore, the spatial accessibility of parks and green spaces to surrounding service providers is typically analyzed based on a fixed-distance buffer zone within the traffic-oriented development area, without considering the subjective needs expressed by service providers. Summary of the Invention
[0005] This invention provides a spatial reachability measurement method based on the DBSCAN clustering algorithm, aiming to overcome the shortcomings of existing technologies.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a spatial reachability calculation method based on the DBSCAN clustering algorithm, comprising the following steps:
[0007] Obtain residential POI data and urban park and green space data;
[0008] The DBSCAN clustering algorithm is used to obtain dense areas in the residential POI data and use them as clusters. Outliers in low-density areas of the residential POI data are marked and deleted.
[0009] The number of times the target park and green space co-occurs with the surrounding residential data after DBSCAN clustering is obtained by searching the website, and the degree of correlation between the park and green space and the POI data of the surrounding residential buildings is obtained to determine the weight of the park and green space.
[0010] By introducing a distance decay function under a certain search radius in the two-step moving search method, an improved two-step moving search method is obtained. The weights are then used in the improved two-step moving search method to calculate the accessibility of park green space.
[0011] Preferably, after obtaining the residential POI data, the residential POI data needs to be preprocessed, specifically including the following steps:
[0012] The acquired POI data is cleaned to obtain accurately categorized residential POI data;
[0013] Based on the universality, consistency, extensibility, extension, and public nature of the classification principles of urban residential POI data, a secondary classification is performed on the classified urban residential POI data;
[0014] The address information in the residential POI data after secondary classification is standardized using regular expression methods in NLP and matched into a unified address format.
[0015] Preferably, the step of using the DBSCAN clustering algorithm to obtain dense areas in the residential POI data and using them as clusters, and marking and deleting outliers in low-density areas of the residential POI data, specifically includes the following steps:
[0016] The DBSCAN clustering algorithm is used to retrieve all residential POI data points. If the number of points within the radius of a residential POI data point is greater than or equal to the minimum point, then the point is defined as a core point and included in the core point set. The points in the set whose density reaches the core point form the corresponding temporary cluster.
[0017] Randomly select a core point from the temporary cluster, identify adjacent residential POI data points with reachable density to generate a cluster, until every point in the temporary cluster is selected;
[0018] By calculating the distance between each point in the temporary cluster and its Kth neighbor, a k-distance map is plotted to determine the optimal radius of the temporary cluster and remove outliers in low-density areas of the residential POI data.
[0019] Preferably, the correlation between the park green space and the POI data of surrounding residential areas is obtained, and the weight of the park green space is determined. This specifically includes the following steps:
[0020] A web script crawler using HtmlUnit was used to submit concurrent queries for park and green space names and residential POI addresses.
[0021] The correlation between parks and green spaces and their surrounding residential points of interest (POIs) is determined by web page searches, and the number of searches for each is determined accordingly.
[0022] The number of times a park's POI address and its surrounding residential POI address co-occur in a webpage is used to determine the weight of the park's POI.
[0023] Preferably, the weights are incorporated into the improved two-step moving search method to calculate the accessibility of park green space, specifically including the following steps:
[0024] The shortest travel time and distance calculation method is used to obtain the actual travel time and distance from residence to park green space;
[0025] Based on the weights, travel time, and distance, a minimum cost matrix is obtained to determine the minimum cost path.
[0026] The weights and minimum cost path are incorporated into the improved two-step moving search method to calculate the accessibility of park green space.
[0027] Preferably, the method of calculating the shortest travel time distance to obtain the actual travel time and distance from the residence to the park green space includes the following steps:
[0028] The shortest time from residential communities to the nearest park or green space was calculated using the OD matrix module in ArcGIS network analysis, and unit statistics were performed.
[0029] Based on the DirectionLiteAPI route planning interface, obtain the actual travel time and distance.
[0030] Preferably, obtaining the actual travel time and distance based on the DirectionLiteAPI route planning interface specifically includes the following steps:
[0031] Using the coordinates of residential POI data and urban park green space POI data as the starting and ending points for distance calculation, we can find any path from the starting point to the ending point and calculate the straight-line distance of any path.
[0032] The average speed in path planning is used to limit the straight-line distance from the starting point to the ending point;
[0033] Write a GET request to use the route planning interface of the network map API to obtain the travel time from each starting point to the destination, and get the actual travel time and distance on foot.
[0034] Preferably, the weights and minimum cost path are incorporated into the improved two-step moving search method to calculate the accessibility of park green space, specifically including the following steps:
[0035] For a random park green location j, set a spatial distance threshold d, and retrieve the population of each cell k in the spatial domain when the threshold d is formed;
[0036] The population of each neighborhood k is weighted by calculating using the Gaussian equation, and the weighted populations are summed to obtain the total number of potential service providers for park green space j.
[0037] The weight of park green locations, calculated using network co-occurrence frequency, is divided by the total number of potential park service providers to obtain the supply-demand ratio R. j The results of accessibility of park green space were obtained;
[0038] Kriging interpolation is performed on the reachability results, and then visualization is applied.
[0039] Preferably, the supply-demand ratio R j The calculation expression is:
[0040]
[0041] Among them, P k It is the population of neighborhood k within the spatial domain of the park green space (d≤d0), where d kj The distance S is the travel time from the center of residential area k to the center of parkland j. The shortest travel time distance calculation method is used to obtain the travel distance. j It is the weight of parks and green spaces;
[0042] in,
[0043]
[0044] G(d kj ,d0) is the Gaussian equation that introduces spatial friction, representing the number of people that each park green space needs to serve.
[0045] Compared with existing technologies, this invention has the following advantages: It identifies residential POI datasets using the DBSCAN clustering algorithm to determine the clustering range of park and green space service targets, rather than simply defining buffer zones. This results in a more concentrated service target population, providing valuable insights for urban planning. Furthermore, it searches websites to obtain concurrent query results for parks, green spaces, and their surrounding POIs, using these results as weight parameters to calculate the spatial accessibility of parks and green spaces. This replaces the traditional, crude method of using parameters such as building area as weights to calculate spatial accessibility. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the process provided by the present invention. Detailed Implementation
[0047] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. The following examples are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0048] This invention addresses the shortcomings of existing technologies and mainly solves the following problems:
[0049] 1. In the study, after data cleaning and other preprocessing, POIs were used to establish a JSON-formatted corpus using regular expressions in NLP (Neural Language Processing) to standardize POI address information.
[0050] 2. By using the density-based, noisy DBSCAN clustering method, dense areas of residential POI data are found through calculation and used as clusters. Outliers in low-density areas are marked and removed, which can effectively suppress noise and reduce such outliers.
[0051] 3. Using HtmlUnit's multi-threaded web crawler, collect some dynamic web pages, submit concurrent queries, and obtain the number of times urban public facilities and surrounding residential POIs co-occur on the web pages from a human perspective.
[0052] 4. To simulate real-world accessibility, park entrances and geometric centers are used instead of urban park green spaces.
[0053] For the purpose of understanding and illustration, the following detailed description of a spatial reachability calculation method based on the DBSCAN clustering algorithm provided by an embodiment of the present invention includes the following steps:
[0054] Step 1: Obtain residential POI data.
[0055] Step 2: Use the DBSCAN clustering algorithm to obtain dense areas in the residential POI data as clusters, mark and delete outliers in low-density areas of the residential POI data, suppress noise, and determine the clustering range of park green space service objects.
[0056] Step 3: Use web search to obtain the number of times the target park green space and the surrounding residential data after DBSCAN clustering are co-occurred in the web pages, to obtain the degree of correlation between the park green space and the POI data of the surrounding residential buildings, and to determine the weight of the park green space.
[0057] Step 4: Introduce a distance decay function under a certain search radius of the two-step moving search method to obtain the improved two-step moving search method. Substitute the weights into the improved two-step moving search method to calculate the accessibility of park green space.
[0058] The detailed process is as follows:
[0059] 1. Data Acquisition and Preprocessing Technology Process
[0060] We obtain POI data for urban parks, green spaces, and residences through a web map API, and then clean the data to obtain data that can be accurately categorized.
[0061] Because POI addresses are non-standardized and contain redundant information, they can negatively impact search results when used as keywords during subsequent webpage feature extraction. Therefore, we utilize regular expressions in Natural Language Processing (NLP) to standardize POI address information, ensuring a uniform address format and more accurate contact data during webpage co-occurrence processing. This is achieved by segmenting addresses using town, street, and district information to unify the address format.
[0062] 2. DBSCAN clustering algorithm extracts clusters and suppresses noise.
[0063] Points of interest (POIs) with duplicate addresses or erroneous information can negatively impact spatial reachability calculations in later analyses. To reduce and eliminate such noise, after deduplicating duplicate POIs, the DBSCAN clustering method is used to calculate and identify dense regions of POIs, which are then designated as clusters. Outliers in low-density regions are then marked and removed. The DBSCAN clustering algorithm can extract clusters from high-density POI datasets and can discover clusters of arbitrary shapes in noisy spatial databases. Using the Scikit-learn machine learning library in the Python runtime environment, the DBSCAN clustering method is applied to effectively identify dense regions of POIs. The implementation steps are as follows:
[0064] (1) Find the core points to form temporary clusters
[0065] The algorithm retrieves all POI data points, and the number of points within the radius (Epsilon) of the POI data points is greater than or equal to the minimum number of points (min). Pts When the density reaches a certain value, the point is defined as the core point and included in the set. Finally, the set points that the density reaches directly form the corresponding temporary clusters.
[0066] (2) Merge temporary clusters
[0067] Based on the core point set, a core point is randomly selected from the set, and clusters are generated by identifying adjacent density-reachable POIs until every point in the core point set has been retrieved.
[0068] DBSCAN clustering, as a density-based spatial clustering algorithm, ultimately yields spatially distinct clusters of points of interest (POIs). POIs processed by DBSCAN can be used more accurately to extract clusters and outliers. Removing outliers results in more strongly correlated POI data.
[0069] 3. Obtain park and green space weights
[0070] When searching for information on websites describing directions to parks or landmark parks, the park's name and address will appear on the same webpage, along with the number of times both search keywords appear on the webpage containing the park's and residential POIs. This co-occurrence count is considered the weight of each park's POI.
[0071] Using HtmlUnit's web script crawler, concurrent queries ["park / green space name", "POI address"] are submitted to search the web and obtain the correlation between the park / green space and the POIs of surrounding residences. The number of searches containing both keywords is displayed on the search page. The correlation between the park / green space and surrounding residences is measured by the co-occurrence frequency of their appearances on web pages, thus determining the weight of the park / green space.
[0072] 4. Improved Two-Step Movement Search Method for Achieving Accessibility of Park and Green Spaces
[0073] The improved two-step move search method takes into account the distance decay problem when calculating the accessibility of park green space. Under a certain search radius of the traditional two-step move search method, a distance decay function is introduced. The decay rate of spatial accessibility first accelerates and then slows down as the service distance increases.
[0074] The main technical process for measuring the spatial accessibility of parks and green spaces based on the improved two-step move-search method is as follows:
[0075] 4.1 Shortest travel time distance calculation method to obtain actual travel time and distance
[0076] Based on data provided by online maps, the average speed for buses was set at 17 km / h, the average speed for subways was also set based on online data, and the average walking speed was set at 4.5 km / h. Considering transfers between various modes of transportation, the average waiting time for buses was set at 10 minutes, and the waiting time for subways was set according to the departure frequency of different stations. Considering transfer time, trips under 10 minutes are primarily on foot. The shortest time from residence to the nearest park / green space was calculated using the OD matrix module in ArcGIS network analysis, and then statistically analyzed by street or ring road area.
[0077] Based on the DirectionLiteAPI (Lightweight Route Planning Service) path planning interface of a web map, this method considers actual road traffic conditions to obtain real travel time and distance. First, the coordinates of residential data and urban park / green space POI data are used as the start and end points for distance calculation. Any path from the start to the end point is calculated, and its straight-line distance is determined. Considering the practical situation that travel from residential areas to surrounding parks / green spaces is primarily on foot, the average walking speed in path planning is used to limit the straight-line distance from the start to the end point. Then, a GET request is written to use the web map API path planning interface to obtain the travel time from each start point to the end point, thus obtaining the actual walking travel time and distance.
[0078] 4.2. Considering weights to obtain the minimum cost matrix
[0079] Based on Python programming, the weights of POI data around parks and green spaces and the actual walking time and distance are used to filter the OD cost matrix with the shortest time and the largest weight. This matrix is used to find and measure the minimum cost path from multiple starting points to multiple destinations, and to obtain the shortest distance and shortest time from the residential community to the nearest park or green space.
[0080] 4.3 Improved Two-Step Movement Search Method for Accessibility of Park and Green Space
[0081] For a random park green location j, a spatial distance threshold d is set, and the population of each cell k within the spatial scope formed by the threshold d is retrieved. Weights are calculated using a Gaussian equation, and the weighted populations are summed to obtain the total number of potential service providers for park green location j. Finally, the weight of the park green location, calculated using the network co-occurrence frequency, is divided by the total number of potential park service providers to obtain the supply-demand ratio Rj.
[0082] See formula (1).
[0083]
[0084] In equation (1), P k It is the population of neighborhood k within the spatial domain of the park green space (d≤d0), where d kjThe distance S is the travel time from the center of residential area k to the center of park green space j. The shortest travel time distance calculation method is used to obtain the travel distance. j The weight of parks and green spaces is calculated in the paper using the number of times they co-occur on the network, replacing the traditional expert experience-based setting method.
[0085]
[0086] In equation (2), G(d) kj ,d0) is the Gaussian equation that introduces spatial friction, representing the number of people that each park green space needs to serve.
[0087] The improved two-step movement search method for park and green space accessibility was calculated, and the accessibility results were then subjected to Kriging interpolation and visualized.
[0088] The above-described embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any simple changes or equivalent substitutions of the technical solutions that can be obviously obtained by those skilled in the art within the scope of the technology disclosed in the present invention shall fall within the scope of protection of the present invention.
Claims
1. A spatial reachability measurement method based on the DBSCAN clustering algorithm, characterized in that, Includes the following steps: Obtain residential POI data and urban park and green space data; The DBSCAN clustering algorithm is used to obtain dense regions in the residential POI data and establish them as clusters. Outliers in low-density regions of the residential POI data are then marked and removed. Specifically, the steps include: The DBSCAN clustering algorithm is used to retrieve all residential POI data points. If the number of points within the radius of a residential POI data point is greater than or equal to the minimum point, then the point is defined as a core point and included in the core point set. The points in the set whose density reaches the core point form the corresponding temporary cluster. Randomly select a core point from the temporary cluster, identify adjacent residential POI data points with reachable density to generate a cluster, until every point in the temporary cluster is selected; By calculating the distance between each point in the temporary cluster and its Kth neighbor, a k-distance map is plotted to determine the optimal radius of the temporary cluster and remove outliers in low-density areas of the residential POI data. The method involves obtaining the co-occurrence frequency of the target park / green space and the surrounding residential POI data (after DBSCAN clustering) on web pages through website search, determining the correlation between the park / green space and its surrounding residential POI data, and thus determining the weight of the park / green space. This includes the following steps: A web script crawler using HtmlUnit was used to submit concurrent queries for park and green space names and residential POI addresses. The correlation between parks and green spaces and their surrounding residential points of interest (POIs) is determined by web page searches, and the number of searches for each is determined accordingly. The number of times park green spaces and their surrounding residential POI addresses co-occur in web pages is used as the POI weight of the park green spaces; By introducing a distance decay function under a certain search radius in the two-step moving search method, an improved two-step moving search method is obtained. The weights are then used in the improved two-step moving search method to calculate the accessibility of park green space. Includes the following steps: The shortest travel time and distance calculation method is used to obtain the actual travel time and distance from residence to park green space; Based on the weights, travel time, and distance, a minimum cost matrix is obtained to determine the minimum cost path. The weights and minimum cost path are incorporated into the improved two-step moving search method to calculate the accessibility of park green space.
2. The spatial reachability calculation method based on the DBSCAN clustering algorithm as described in claim 1, characterized in that, After obtaining the residential POI data, it is necessary to preprocess the residential POI data, which specifically includes the following steps: The acquired residential POI data is cleaned to obtain accurately categorized residential POI data; Based on the universality, consistency, extensibility, extension, and public nature of the classification principles of urban residential POI data, a secondary classification is performed on the classified urban residential POI data; The address information in the residential POI data after secondary classification is standardized using regular expression methods in NLP and matched into a unified address format.
3. The spatial reachability calculation method based on the DBSCAN clustering algorithm as described in claim 1, characterized in that, The method of calculating the shortest travel time and distance to obtain the actual travel time and distance from the residence to the park green space includes the following steps: The shortest time from residential communities to the nearest park or green space was calculated using the OD matrix module in ArcGIS network analysis, and unit statistics were performed. Based on the DirectionLite API route planning interface, obtain the actual travel time and distance.
4. The spatial reachability measurement method based on the DBSCAN clustering algorithm as described in claim 3, characterized in that, The process of obtaining actual travel time and distance based on the DirectionLite API route planning interface includes the following steps: Using the coordinates of residential POI data and park green space POI data as the starting and ending points for distance calculation, we find any path from the starting point to the ending point and calculate the straight-line distance of any path. The average speed in path planning is used to limit the straight-line distance from the starting point to the ending point; Write a GET request to use the route planning interface of the network map API to obtain the travel time from each starting point to the destination, and get the actual travel time and distance on foot.
5. The spatial reachability measurement method based on the DBSCAN clustering algorithm as described in claim 1, characterized in that, The weights and minimum cost path are then incorporated into the improved two-step moving search method to calculate the accessibility of park green space, specifically including the following steps: For a random park green location j, set a spatial distance threshold d, and retrieve the population of each cell k in the spatial domain when the threshold d is formed; The population of each neighborhood k is weighted by calculating using the Gaussian equation, and the weighted populations are summed to obtain the total number of potential service providers for park green space j. The weight of park green locations, calculated using network co-occurrence frequency, is divided by the total number of potential park service providers to obtain the supply-demand ratio R. j The results of accessibility of park green space were obtained; Kriging interpolation was performed on the accessibility results of park green spaces, and then the results were visualized.
6. The spatial reachability measurement method based on the DBSCAN clustering algorithm as described in claim 5, characterized in that, The supply-demand ratio R j The calculation expression is: Among them, P k d is the population of community k within the spatial domain of the park / green space. kj The travel time is the distance from the center of residential area k to the center of parkland j. The shortest travel time distance calculation method is used to obtain the travel distance, S. j It is the weight of parks and green spaces; in, G(d) kj ,d0) is the Gaussian equation that introduces spatial friction, representing the number of people that each park green space needs to serve.
Citation Information
Patent Citations
Segmentation discovery, evaluation and implementation platform
CA2907159A1
Method of measuring reachability of public transportation service based on GIS (Geographic Information System)
CN103577539A