Urban hotspot detection method based on space-time neighborhood remodeling and road network distance
Through spatio-temporal gridding and road network distance analysis, the urban hotspot detection method is reshaped, which solves the problem of low accuracy and comprehensiveness of hotspot detection in the existing technology, achieves more efficient identification of urban hotspot areas, and provides scientific information for urban management. in accordance with.
Patent Information
- Application Number
- CN202410801908.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-17
AI Technical Summary
When existing urban hotspot detection methods consider the spatiotemporal attributes of trajectory data and the road network environment, there are problems with low hotspot detection accuracy and comprehensiveness, especially the relationship between the trajectory and the road network is ignored.
Using a method based on spatio-temporal neighborhood reshaping and road network distance, the trajectory data is spatio-temporally gridded, the local grid density and road segment influence value are calculated, the cluster center is reshaped, and cluster segmentation and merging are performed based on road segment distance to improve Detection accuracy of hotspot areas.
It effectively improves the accuracy and reliability of urban hotspot detection, can discover reliable and reasonable hotspot areas from taxi trajectory data, and provides scientific basis for urban planning and traffic management.
Smart Images

Figure CN118660269A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining, and more specifically, to an urban hotspot detection method based on spatiotemporal neighborhood reconstruction and road network distance. Background Art
[0002] In recent years, with the continuous development of location-based services and positioning technologies, GPS devices have been used more and more widely, resulting in massive records of trajectory data of moving objects. Urban hotspots, as the choice areas for more residents to depart and go to in cities, are important issues that need to be explored in urban planning and traffic management. Extracting and analyzing urban hotspots can help governments and enterprises better understand the needs and behaviors of urban residents so as to better plan urban infrastructure, public transportation and commercial activities. Taxi trajectory data can reflect the temporal and spatial patterns of residents' travel. Because passengers have diverse travel purposes, the locations where taxis pick up and drop off passengers can reflect the hot spots in the city's commerce, culture, medical care and other aspects. Therefore, it is of great significance to mine hotspots from taxi trajectory data that reflects the travel patterns of urban residents and the operation status of urban traffic.
[0003] As one of the main technologies for data analysis and mining, clustering has been widely used in machine learning, image recognition and other fields. Clustering can simplify complexity and maximize the homogeneity of elements within a class, so clustering methods have been widely used in hotspot detection. There are three main types of urban hotspot detection methods based on clustering:
[0004] 1. The method based on single spatial dimension clustering only considers the spatial attributes of trajectory data to mine hot spots, ignoring the influence of temporal attributes and road network environment;
[0005] 2. The method based on spatiotemporal attribute clustering considers the spatiotemporal attributes of trajectory data to discover hot spots that evolve over time, ignoring the influence of the road network environment;
[0006] 3. The method considering the road network environment uses the Dijkstra algorithm to calculate the road network distance between trajectory points or the Euclidean distance to measure the similarity of road section nodes for cluster analysis to improve the accuracy of urban hotspot detection. However, the complexity of calculating the road network distance is high, and the relationship between the trajectory and the road network is not fully considered.
[0007] Although the above three methods detect urban hotspots from different aspects, in the actual traffic network, the trajectories generated by taxis traveling on the road network are inseparable from the road sections. The above methods ignore the influence of the road sections on the spatial similarity between location points, and there are problems such as low hotspot detection accuracy and comprehensiveness. Summary of the invention
[0008] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an urban hotspot detection method based on spatiotemporal neighborhood reconstruction and road network distance, aiming to solve the problems of low hotspot detection accuracy and comprehensiveness of urban hotspot detection methods based on traditional clustering.
[0009] This patented technical solution proposes a method for detecting urban hotspots based on spatiotemporal neighborhood reconstruction and road network distance. Aiming at the spatiotemporal attributes of trajectories, a clustering method based on spatiotemporal neighborhood reconstruction is proposed with grids as units to discover clusters in spatiotemporal data; considering the limited characteristics of the trajectory data road network, relative road section distance is introduced to divide large clusters into several compact clusters or directly remove small sparse clusters to ensure the homogeneity of hotspot areas and improve the accuracy of hotspot area detection.
[0010] In order to achieve the above object, the technical solution adopted by the present invention is: a method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance, comprising the following steps:
[0011] Step 1: Grid the original trajectory data in time and space to obtain a three-dimensional grid space;
[0012] Step 2: Assign a spatiotemporal code to each grid, and obtain the local grid density by comprehensively considering the potential value, grid environmental impact, and grid heat factor within each grid;
[0013] Step 3: The grid with high spatiotemporal aggregation is regarded as the cluster center, and the grids whose similarity with it meets the threshold belong to the same cluster. For the grids in each cluster, the shared neighbors are considered to find the neighborhood boundary grids, and the attraction between the neighborhood boundary grids and the cluster center is calculated to reshape the neighborhood, and the preliminary clustering results are obtained;
[0014] Step 4: For each cluster in the preliminary clustering results, map matching is used to obtain a set of road segments, and the road segments with high road segment influence values are taken as cluster centers, and the road segments whose relative distances meet the road segment threshold belong to the same cluster;
[0015] Step 5: Perform overlap detection on the generated clusters to obtain the final city hotspot detection results.
[0016] Step 1 includes dividing the data space of the dataset into grids of the same size. The trajectory dataset U = {p1, p2, p3, ..., p t} contains t position points, each position point p i (1≤i≤t) has 3-dimensional properties, p ij represents the j-th dimension attribute of the i-th data, and the value set of all data on the j-th dimension attribute is recorded as A j .
[0017] The grid encoding in step 2 includes:
[0018] Given a base grid number k (k>1), the j-th dimension interval of the grid is represented by I j =(max(A j )-min(A j )) / k means that the position point p i The calculation of the jth component of the space-time code is shown in formula (1):
[0019]
[0020] Among them, floor() is a rounding down function. That is, the position point p i The spatiotemporal encoding of the grid to which it belongs;
[0021] The data obtained after integrating the data in each grid is called grid data, and the calculation is shown in formula (2):
[0022]
[0023] Where r represents the code of a grid, r = (r 1, r 2, r3), It is the jth component of the grid data after the grid is integrated, j represents the dimension, and gn is the total number of data in the grid.
[0024] In step 2, the method for solving the local grid density includes: after gridding, the original data will be divided into various grids, each grid has different data, and the local grid density lρ is calculated as shown in formula (3):
[0025]
[0026] Among them, pn is the number of positions in the grid, gro i is the grid heat factor of the grid, rn is the total number of road sections matched in the grid, num(R i ) is the number of position points on each road section; is the grid environmental impact value of a certain location point in the grid, R is half the distance between each grid diagonal, ‖p i -p j ‖ is p i and p j The Euclidean distance between i is the potential value of a point in the grid, m i Yes i is the quality of , a is the distance index, and σ is the impact factor.
[0027] Step 3 includes:
[0028] Step 31: Based on the local grid density, the spatiotemporal aggregation of the data in each grid is evaluated, and the grids are sorted from high to low according to the density to obtain a density sequence. The grid at the first position in the sequence is selected as the clustering center, and a cluster is created for it;
[0029] Step 32: Calculate the grid similarity between the remaining grids in the density sequence and the current cluster center, include the grids whose grid similarity is less than the neighborhood similarity threshold into the current cluster, and find the neighborhood boundary grids among these grids based on shared neighbors, delete the grids in the current cluster from the density sequence, and then return to step 31 to repeat steps 31 and 32 with the remaining density sequence until all grids are processed and enter step 33;
[0030] Step 33: Calculate the grid distance between the neighborhood boundary grid and all cluster centers, remove the grids whose grid distance is less than the edge threshold from the neighborhood range, obtain the reshaped cluster center of each cluster, calculate the attraction between the neighborhood boundary grid and all reshaped cluster centers, and assign it to the cluster where the cluster center with the greatest attraction is located, repeat the above operation until all neighborhood boundary grids are reallocated, and obtain the initial clustering result.
[0031] Step 4 includes: after the preliminary clustering results are generated, map matching technology is used for each cluster to obtain the road section to which the location point in the cluster belongs, and a sequence of road sections arranged in descending order according to the size of the road section influence value is obtained, and the road section at the first position in the sequence is selected as the cluster center, and a cluster is created for it, and the road sections whose relative road section distance to the cluster center is less than the road section threshold are included in the cluster until all road sections are allocated.
[0032] Step 5 includes: calculating the average latitude and longitude of each cluster's location point as the new cluster center. If the Manhattan distance between two clusters is less than the merging threshold, it is considered that the two clusters have overlapping parts, and the two clusters are merged. After the overlapping clusters are searched, the final hot spot area is obtained.
[0033] The advantages of the present invention are: the data space is divided into grid spaces of the same size, each grid is taken as the processing object, and the local grid density based on potential value and grid space is proposed. Through this density standard, the density of data in each grid can be effectively evaluated, and the cluster center can be effectively found; a method based on the relative attractiveness of grid attraction to judge the cluster to which the neighborhood boundary grid belongs is proposed, and the probability of data in the grid being correctly assigned can be improved by this method; the relative road section distance based on projection distance and position distance is proposed to evaluate the similarity between trajectory points of the road section to which they belong, which can effectively evaluate the similarity between trajectory points in the road network environment, thereby improving the accuracy of hot spot area detection. The visualization results and cluster evaluation results show that the algorithm in this paper can find reliable and reasonable urban hot spots from taxi trajectory data, providing a scientific basis for public facility planning, traffic management, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The following is a brief description of the contents expressed in the drawings of the present invention and the symbols in the drawings:
[0035] Figure 1 An overall flow chart of a method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance provided for the implementation of the present invention;
[0036] Figure 2 A schematic diagram of data gridding provided for the implementation of the present invention;
[0037] Figure 3 A grid sequence diagram sorted from high to low by local grid density value provided for the implementation of the present invention;
[0038] Figure 4 The hotspot detection results of the LMD method for comparison provided by the present invention at the taxi pick-up and drop-off locations in Shenzhen in different time periods; wherein (a) is the detection result of LMD in the 8:00-9:00 time period, (b) is the detection result of LMD in the 13:00-14:00 time period, and (c) is the detection result of LMD in the 18:00-19:00 time period;
[0039] Figure 5 The hotspot detection results of the comparison TPNC method at the taxi boarding and alighting locations in Shenzhen in different time periods provided for the implementation of the present invention; wherein (a) is the detection result of TPNC in the time period of 8:00-9:00, (b) is the detection result of TPNC in the time period of 13:00-14:00, and (c) is the detection result of TPNC in the time period of 18:00-19:00;
[0040] Figure 6The hotspot detection results of the NRRD method provided for the implementation of the present invention at the taxi pick-up and drop-off locations in Shenzhen in different time periods; wherein (a) is the detection result of NRRD in the 8:00-9:00 time period, (b) is the detection result of NRRD in the 13:00-14:00 time period, and (c) is the detection result of NRRD in the 18:00-19:00 time period;
[0041] Figure 7 Typical POIs corresponding to the detection results of the NRRD method provided for the implementation of the present invention in different time periods; wherein (a) is the POI corresponding to the NRRD time period of 8:00-9:00, (b) is the POI corresponding to the NRRD time period of 13:00-14:00, and (c) is the POI corresponding to the NRRD time period of 18:00-19:00;
[0042] Figure 8 The high-density POI area in Shenzhen provided by the implementation of the present invention;
[0043] Fig. 9 Schematic diagram of SC comparison between the NRRD method, the LMD method and the TPNC method provided for the implementation of the present invention in three time periods;
[0044] Fig.10 A schematic diagram of DBCV comparison among the NRRD method, the LMD method and the TPNC method in three time periods provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0045] The specific implementation of the present invention will be further explained in detail below by describing the optimal embodiment with reference to the accompanying drawings.
[0046] The present invention discloses a method for detecting urban hotspots based on spatiotemporal neighborhood reconstruction and road network distance. The method is suitable for processing trajectory data sets, and is superior to traditional urban hotspot detection methods in terms of hotspot area detection accuracy and reliability. The method includes: spatiotemporal gridding of original trajectory data to obtain a three-dimensional grid space, allocating spatiotemporal coding to each grid, comprehensively considering the potential value, grid environmental impact and grid heat factor in each grid to obtain local grid density; finding a grid with high spatiotemporal aggregation as a cluster center, and grids with grid similarity that meets a threshold belong to the same cluster, considering shared neighbors for the grids in each cluster to find the neighborhood boundary grid, calculating the attraction between the neighborhood boundary grid and the cluster center to reshape the neighborhood, and obtaining a preliminary clustering result; using a map matching technology for each cluster in the preliminary clustering result to obtain a road section set, a road section with a high road section influence value is a cluster center, and a road section with a relative road section distance that meets a road section threshold belongs to the same cluster; performing overlap detection on the generated clusters to obtain the final urban hotspot detection result. The present invention takes into account the impact of the road network environment on the detection of hotspot areas, detects urban hotspot areas according to local grid density, neighborhood reshaping and relative road section distance, effectively improves the detection accuracy and reliability, and has better practical guiding significance, such as traffic scheduling, urban planning and analysis of residents' travel behavior.
[0047] A method for detecting urban hotspots based on spatiotemporal neighborhood reconstruction and road network distance, the method specifically comprising the following steps:
[0048] S1. Divide the original trajectory data space into grids of the same size, obtain the spatiotemporal code and grid data of each grid, evaluate the spatiotemporal aggregation of data in each grid based on the local grid density, sort the grids from high to low according to density to obtain a density sequence, select the first grid in the sequence as the clustering center, and create a cluster for it;
[0049] S2, calculating the grid similarity between the grids other than the grid selected as the cluster center in the density sequence and the current cluster center, the grids whose grid similarity is less than the neighborhood similarity threshold are neighborhood grids, the neighborhood grids are included in the current cluster, and the neighborhood boundary grids are found in the neighborhood grids based on shared neighbors, the grids in the current cluster are deleted from the density sequence, and the first grid selected as the cluster center and step S2 are repeated in step S1 until all grids are processed, and then the cluster center and its cluster are obtained;
[0050] S3, calculate the grid distance between each neighborhood boundary grid and all cluster centers, remove the grids whose grid distance is less than the edge threshold from the neighborhood grid, obtain the cluster center after each cluster is reshaped, calculate the attraction between the neighborhood boundary grid and all the reshaped cluster centers, assign the neighborhood boundary grid to the cluster where the cluster center with the greatest attraction is located, repeat the above operation until all neighborhood boundary grids are reallocated, thereby obtaining a preliminary clustering result;
[0051] S4. After the preliminary clustering results are generated, the map matching technology is used for each cluster to obtain the road section to which the location point in the cluster belongs, and a road section sequence arranged in descending order according to the road section influence value is obtained. The first road section in the sequence is selected as the cluster center, and a cluster is created for it. The road sections whose relative road section distance to the cluster center is less than the road section threshold are included in the cluster. The first road section in the remaining road sections in the sequence is cyclically selected as the cluster center and a cluster is created. The road sections whose relative road section distance to the cluster center is less than the road section threshold are included in the cluster, until all road sections are assigned, and the cluster center and its cluster are obtained;
[0052] S5. Calculate the average latitude and longitude of the location points of each cluster as the new cluster center. If the Manhattan distance between two clusters is less than the merge threshold, it is considered that the two clusters have overlapping parts, and the two clusters are merged. After the overlapping clusters are searched, the merged clusters are obtained. Each cluster consists of location points, which is the final hot spot area.
[0053] Furthermore, the methods for obtaining spatiotemporal coding, grid data and local grid density are as follows:
[0054] S11, divide the data space of the trajectory data set into grids of the same size, trajectory data set U = {p 1, p 2, p3,…,p t} contains t position points, each position point p i (1≤i≤t) has 3-dimensional properties, p ij represents the j-th dimension attribute of the i-th data, and the value set of all data on the j-th dimension attribute is recorded as A j Given a base grid number k (k>1), the j-th dimension interval of the grid is represented by I j =(max(A j )-min(A j )) / k indicates the position point p i The calculation of the jth component of the space-time code is shown in formula (1):
[0055]
[0056] Among them, floor() is a rounding down function. That is, the position point p i The spatiotemporal encoding of the grid to which it belongs.
[0057] S12. The data obtained after integrating the data in each grid is called grid data, and the calculation is shown in formula (2):
[0058]
[0059] Where r represents the code of a grid, r = (r 1, r 2, r3), It is the jth component of the grid data after the grid is integrated, j represents the dimension, and gn is the total number of data in the grid.
[0060] S13. After gridding, the original data will be divided into various grids, each grid has different data, and the local grid density lρ is calculated as shown in formula (3):
[0061]
[0062] Among them, pn is the number of positions in the grid, gro i is the grid heat factor of the grid, , rn is the total number of road sections matched in the grid, num(R i ) is the number of position points on each road section; is the grid environmental impact value of location point i in the grid, R is half the distance between each grid diagonal, ‖p i -p j ‖ is the position point p i and p j The Euclidean distance between i is the potential value of position i in the grid, m i Yes i The quality of m, a is the distance index, σ is the impact factor, in this paper, set m i =1, a=2, σ=I, I is the grid spacing.
[0063] Furthermore, the method for obtaining the grid similarity and the neighborhood boundary grid is as follows:
[0064] S21, the grid distance is the Euclidean distance between the spatiotemporal codes of two grids, calculated as shown in formula (4):
[0065]
[0066] in, and are the jth component of the spatiotemporal encoding of the xth data and the yth data, respectively, and n is the dimension of the data. It is the grid distance between the grids to which the x-th data and the y-th data belong.
[0067] S22. Obtain the grid similarity based on the grid distance and the Euclidean distance between grid data. The calculation is shown in formula (5):
[0068]
[0069] Among them, θ and is a parameter, θ≥1, is the Euclidean distance between the grids to which the x-th data and the y-th data belong, is the jth component of the grid space-time code r to which the xth data belongs, It is the jth component of the grid space-time code r to which the yth data belongs.
[0070] S23, the neighborhood grid whose number of shared neighbors with the cluster center grid is less than l is called the neighborhood boundary grid st nbi , the calculation of shared neighbor sn is shown in formula (7):
[0071]
[0072] in, is the neighborhood grid of the cluster center grid, yes The neighborhood grid of l = nu × τ, nu is the number of grids in the neighborhood, τ = 1.25 in this paper, and the grids whose grid similarity with the cluster center grid is less than the neighborhood similarity threshold are neighborhood grids, and the same grids in the neighborhood grids of two grids are shared neighbors.
[0073] Furthermore, the method for obtaining the attraction, edge grid and reshaped cluster center is as follows:
[0074] S31, known neighborhood boundary grid st nbi , and the initial cluster center Grid attraction between and other cluster centers The relative attraction between the initial cluster centers is the neighborhood boundary grid st in the preliminary clustering results nbi The cluster center of the cluster, other cluster centers is the initial clustering result except the neighborhood boundary grid st nbi The cluster center outside the cluster center of the cluster, the attraction At(st nbi ) is calculated as shown in formula (8):
[0075]
[0076] Among them, grid attraction is the neighborhood boundary grid st nbi The grid heat factor, Is a 3-D grid With st nbi Grid distance between them; relative attraction st nbi yes The neighborhood boundary grid of is the center grid of other clusters, and cn is the total number of clusters before neighborhood reshaping.
[0077] S32, the neighborhood boundary grid st of a known cluster nbi , and the original cluster center The neighborhood boundary grid whose grid distance is less than the edge threshold is called the edge grid st egi , the calculation of edge threshold e is shown in formula (9):
[0078]
[0079] Among them, cn is the total number of clusters before neighborhood reshaping, and the difference between the neighborhood grid and the neighborhood boundary grid of a cluster is the reshaped neighborhood grid st rng , k is the grid base number, and α is the threshold.
[0080] S33, the neighborhood grid st after a certain cluster is reshaped rng , the reshaped cluster center st rcg The calculation of space-time coding is shown in formula (10):
[0081]
[0082] in, and represents the first and second dimensions of the spatiotemporal encoding of the i-th grid in the current cluster, and rgn is the number of grids in the cluster after the neighborhood is reshaped.
[0083] Furthermore, the method for obtaining the road section impact value and the relative road section distance is as follows:
[0084] S41, comprehensively consider the road section density and road section connectivity to evaluate the importance of a road section in the road network, the road section impact value RIV R The calculation of is shown in formula (11):
[0085] RIV R =τ×ρ R +β×RC R , (11)
[0086] Among them, τ and β are parameters, and the road segment density ρ R =n R / e Δt , n R represents the number of vehicles passing through section R, Δt = t max -t min , t maxis the longest time among the vehicle trajectory positions passing through the road section, t min is the shortest time among the vehicle trajectory locations passing through the road segment; road segment connectivity ρ i is the segment density of the incoming segments of R, and in is the total number of incoming segments. In this paper, τ=1, β=1.
[0087] S42. Use map matching technology to obtain the road section to which the position point belongs. The road sections R1 (s1, e1) and R2 (s2, e2) are known, where s1 and e1 are the starting node number and the ending node number of the road section R1, s2 and e2 are the starting node number and the ending node number of the road section R2, respectively. The projection point pro1 (x1, y1) of the position point p1 on R1 and the projection point pro2 (x2, y2) of the position point p2 on R2, x and y1 are the latitude and longitude of pro1, x2 and y2 are the latitude and longitude of pro2, respectively. The projection distance d between the road sections R1 and R2 is p The calculation is shown in formula (12):
[0088]
[0089] Among them, d c (pro 1, pro2) is the spherical cosine distance between the two projection points, d e (pro 1, pro2) is the Euclidean distance between the two projection points, max(d c ) is the maximum spherical cosine distance between all projection points, max(d e ) is the maximum Euclidean distance between all projected points.
[0090] S43, the distance d between sections R1 and R2 l The calculation is shown in formula (13):
[0091]
[0092] Among them, d c (p 1, p2) is the spherical cosine distance between two points, d e (p 1, p2) is the Euclidean distance between two points, max(d c ) is the maximum value of the spherical cosine distance between all position points, max(d c ) is the maximum value of the Euclidean distance between all location points.
[0093] S44, comprehensively consider the projection distance and the position distance between the position points to obtain the relative section distance, the relative section distance D (R1, R2) is calculated as shown in formula (14):
[0094] D(R 1, R2)=d p (R 1, R2)+d l (R 1, R2), (14)
[0095] Furthermore, the method of obtaining Manhattan is as follows:
[0096] S51. Calculate the average latitude and longitude of the location points in the cluster to obtain the new cluster center C i (cx i, cy i ), C i (cx i ,cy i ) and C j (cx j ,cy j ) is calculated as shown in formula (15):
[0097] MD(C i , C j )=|cx i -cx j |+|cy i -cy j |, (15)
[0098] like Figure 1 As shown, Figure 1 An overall flow chart of a method for detecting urban hotspots based on spatiotemporal neighborhood reconstruction and road network distance provided for the implementation of the present invention, the method comprising the following steps:
[0099] S1, divide the original trajectory data space into grids of the same size, and obtain the spatiotemporal coding and grid data of each grid, such as Figure 2 As shown in the figure, the data set is divided into 18 grids of equal size. The methods for obtaining spatiotemporal coding, grid data and local grid density are as follows:
[0100] S11. Obtain the grid space of the trajectory data set through the calculation formula of spatiotemporal coding, such as Figure 2 As shown, there are three position points in the grid whose spatiotemporal coding is (1, 2, 1).
[0101] S12. Not every grid contains data, e.g. Figure 2As shown in the figure, the grid coded as (3, 1, 1) does not contain data, while some grids contain a lot of data, such as the grid coded as (1, 2, 1). Therefore, there are two types of grid data calculations. When there is no data in the grid, the grid data of the grid is 0. When there is data, the grid data of the grid is the difference between the sum of each dimension of all the data in the grid and the total number of data.
[0102] S13, calculate the local grid density of each grid, and sort the density values from high to low to obtain a density sequence, such as Figure 3 As shown in the figure, the grid with grid code (1, 2, 1) is at the first position in the sequence, which is a high-density grid and has the greatest possibility of being the cluster center. The grid at the first position in the density sequence is selected as the cluster center and a cluster is created for it.
[0103] S2. Initially build the neighborhood through grid similarity and neighborhood boundary grid. The method for obtaining grid similarity and neighborhood boundary grid is as follows:
[0104] S21, calculating the similarity between the cluster center grid and the remaining grids, and the grids that meet the neighborhood similarity radius are the neighborhood grids of the current cluster and are included in the current cluster.
[0105] S22. The neighborhood grids whose number of shared neighbors with the cluster center is less than 1 are neighborhood boundary grids. The grids in the current cluster are deleted from the density sequence, and the grid at the first position in the density sequence is selected to repeat the above operation until all grids are processed and the initial construction of the neighborhood is completed.
[0106] S3. After the neighborhood results are generated, the neighborhood is reshaped through attraction, edge grid and reshaped cluster center. The method for obtaining attraction is as follows:
[0107] S31, calculating the grid distance between the neighborhood boundary grid and all cluster centers, the grid distance less than the edge threshold is the edge grid, and the edge grid is deleted from the neighborhood range to obtain a new neighborhood result.
[0108] S32. Based on the new neighborhood results, the reshaped cluster centers are obtained, the attraction between the neighborhood boundary grids and all the reshaped cluster centers is calculated, and the centers are assigned to the clusters where the cluster centers with the greatest attraction are located. The above operations are repeated until all neighborhood boundary grids are reallocated, the neighborhood reshaping is completed, and the preliminary clustering results are obtained.
[0109] S4. After the preliminary clustering results are generated, clustering is performed based on the road section influence value and the relative road section distance. The method for obtaining the road section influence value and the relative road section distance is as follows:
[0110] S41. For each cluster, a map matching technique is used to obtain the road section to which the location point in the cluster belongs, and a road section sequence arranged in descending order according to the road section influence value is obtained. The road section at the first position in the sequence is selected as the clustering center, and a cluster is created for it.
[0111] S42, calculate the relative segment distances between the remaining segments and the cluster center, include the segments that are less than the segment threshold into the current cluster, delete the segments in the current cluster from the segment sequence, select the segment at the first position in the sequence and repeat the above operation until the segment sequence is empty, and obtain the clustering result of the second stage.
[0112] S5. After the clustering results of the second stage are generated, overlap detection is performed using the Manhattan distance. The method for obtaining the Manhattan distance is as follows:
[0113] S51. Calculate the average latitude and longitude of each cluster's location point as the new cluster center. If the Manhattan distance between two clusters is less than the merge threshold, it is considered that the two clusters have overlapping parts, so the two clusters are merged. After the overlapping clusters are searched, the final hot spot area is obtained.
[0114] The urban hotspot detection method based on spatiotemporal neighborhood reconstruction and road network distance provided by the present invention has the following beneficial technical effects:
[0115] The data space is divided into grid spaces of the same size, and each grid is used as the processing object. The local grid density based on potential value and grid space is proposed. This density standard can effectively evaluate the density of data in each grid and effectively find the cluster center; a method based on the relative attraction of grid attraction to judge the cluster to which the neighborhood boundary grid belongs is proposed. This method can improve the probability of data in the grid being correctly assigned; the relative road section distance based on projection distance and position distance is proposed to evaluate the similarity between trajectory points to find the road section, which can effectively evaluate the similarity between trajectory points in the road network environment, thereby improving the accuracy of hot spot area detection. The visualization results and clustering evaluation results show that the algorithm in this paper can find reliable and reasonable urban hot spots from taxi trajectory data, providing a scientific basis for public facility planning, traffic management, etc.
[0116] The method is suitable for hot spot detection in trajectory data sets. Both theoretical analysis and experimental results show that the method can better divide location points into a cluster and has better detection accuracy.
[0117] To illustrate the effect, the specific implementation of the present invention lists the effectiveness of the proposed method on the Shenzhen taxi trajectory dataset. We use two indicators to evaluate the clustering effect: SC is calculated as follows: As shown, num c is the number of clusters generated, Ci is a generated cluster, i is a data in the cluster; DBCV is as follows As shown, C i is a detected cluster, i is a data in the cluster, DSC(C i ) is to consider C i The maximum edge weight of the internal edge in the minimum spanning tree constructed by the object in DSPC(C i , C j ) is to consider C i The minimum reachable distance between internal nodes in the minimum spanning tree constructed by the object in .
[0118] Figure 4 , 5 6 give the comparison of the detection results of the NRRD method, LMD method and TPNC method described in the present invention on the taxi boarding and alighting positions in three time periods. Figure 4 , 5 It can be seen from Figure 6 that the hotspot detection effect of our method is better than that of the comparison method. The hotspot areas detected by the LMD method are too large and have little significance for traffic planning and urban management. The TPNC method can detect some hotspot areas with moderate range, but some hotspot areas are still too large. Figure 7 and Figure 8 The typical POIs and high-density POI areas in Shenzhen corresponding to the detection results of the NRRD method provided by the present invention in different time periods are given respectively. Figure 7 and 8 It can be seen from the figure that the hotspot areas detected by our proposed method correspond to POIs, and the overlap between them and high-density POIs is relatively high. Therefore, the hotspot areas detected by our proposed method have stronger practical guiding significance.
[0119] Fig. 9 and Fig.10The SC comparison diagram and DBCV comparison diagram of the NRRD method, LMD method and TPNC method provided by the implementation of the present invention in three time periods are given. It can be found from the figure that the SC value and DBCV value of the proposed NRRD method are better than those of the LMD method and the TPNC method. Although the LMD algorithm can detect hot spots, its range is too large. This is because it uses the elbow point method to determine the fixed scale of the hot spot area, but the hot spot range in different regions may be different. The setting of the fixed scale leads to inaccurate results. At the same time, it does not consider that the taxi is in a road network environment, which reduces the practical significance of the results; although the TPNC algorithm detects some small-scale hot spots with practical significance, the range of individual hot spots is still too large, resulting in poor detection accuracy. This is because it uses the idea of regional growth to re-segment each cluster in the first stage. If the location points in the current cluster are relatively compact and the regional boundaries are not obvious, it will lead to the detection of a larger range of hot spots. Therefore, the NRRD method described in the present invention is better than the comparison method in terms of visualization and accuracy evaluation results, and is more suitable for hot spot detection.
[0120] Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, they are all within the protection scope of the present invention.
Claims
1. A method for detecting urban hotspots based on spatiotemporal neighborhood reconstruction and road network distance, Features: The steps include: Step 1: Grid the original trajectory data in time and space to obtain a three-dimensional grid space; Step 2: Assign a spatiotemporal code to each grid, and obtain the local grid density by comprehensively considering the potential value, grid environmental impact, and grid heat factor within each grid; Step 3: The grid with high spatiotemporal aggregation is regarded as the cluster center, and the grids whose similarity with it meets the threshold belong to the same cluster. For the grids in each cluster, the shared neighbors are considered to find the neighborhood boundary grids, and the attraction between the neighborhood boundary grids and the cluster center is calculated to reshape the neighborhood, and the preliminary clustering results are obtained; Step 4: For each cluster in the preliminary clustering results, map matching is used to obtain a set of road segments, and the road segments with high road segment influence values are taken as cluster centers, and the road segments whose relative distances meet the road segment threshold belong to the same cluster; Step 5: Perform overlap detection on the generated clusters to obtain the final city hotspot detection results.
2. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in claim 1, Features: Step 1 includes dividing the data space of the dataset into grids of the same size. The trajectory dataset U = {p 1 , p 2 , p 3 …,p t } contains t position points, each position point p i (1≤i≤t) has 3-dimensional properties, p ij represents the j-th dimension attribute of the i-th data, and the value set of all data on the j-th dimension attribute is recorded as A j .
3. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in claim 1 or 2, Features: The grid encoding in step 2 includes: Given a base grid number k (k>1), the j-th dimension interval of the grid is represented by I j =(max(A j )-min(A j )) / k means that the position point p i The calculation of the jth component of the space-time code is shown in formula (1): Among them, floor() is a rounding down function. That is, the position point p i The spatiotemporal encoding of the grid to which it belongs; The data obtained after integrating the data in each grid is called grid data, and the calculation is shown in formula (2): Where r represents the code of a grid, r = (r 1 , r 2 , r 3 ), It is the jth component of the grid data after the grid is integrated, j represents the dimension, and gn is the total number of data in the grid.
4. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as described in any one of claims 1 to 3, Features: In step 2, the method for solving the local grid density includes: after gridding, the original data will be divided into various grids, each grid has different data, and the local grid density lρ is calculated as shown in formula (3): Among them, pn is the number of positions in the grid, gro i is the grid heat factor of the grid, rn is the total number of road sections matched in the grid, num(R i ) is the number of location points on each road section; is the grid environmental impact value of a certain location point in the grid, R is half the distance of each grid diagonal, ||p i -p j || is p i and p j The Euclidean distance between i is the potential value of a point in the grid, m i Yes i is the quality of , a is the distance index, and σ is the impact factor.
5. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in claim 1 or 2, Features: Step 3 includes: Step 31: Based on the local grid density, the spatiotemporal aggregation of the data in each grid is evaluated, and the grids are sorted from high to low according to the density to obtain a density sequence. The grid at the first position in the sequence is selected as the clustering center, and a cluster is created for it; Step 32: Calculate the grid similarity between the remaining grids in the density sequence and the current cluster center, include the grids whose grid similarity is less than the neighborhood similarity threshold into the current cluster, and find the neighborhood boundary grids among these grids based on shared neighbors, delete the grids in the current cluster from the density sequence, and then return to step 31 to repeat steps 31 and 32 with the remaining density sequence until all grids are processed and enter step 33; Step 33: Calculate the grid distance between the neighborhood boundary grid and all cluster centers, remove the grids whose grid distance is less than the edge threshold from the neighborhood range, obtain the reshaped cluster center of each cluster, calculate the attraction between the neighborhood boundary grid and all reshaped cluster centers, and assign it to the cluster where the cluster center with the greatest attraction is located, repeat the above operation until all neighborhood boundary grids are reallocated, and obtain the initial clustering result.
6. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in claim 1 or 2, Features: Step 4 includes: after the preliminary clustering results are generated, map matching technology is used for each cluster to obtain the road section to which the location point in the cluster belongs, and a sequence of road sections arranged in descending order according to the size of the road section influence value is obtained, and the road section at the first position in the sequence is selected as the cluster center, and a cluster is created for it, and the road sections whose relative road section distance to the cluster center is less than the road section threshold are included in the cluster until all road sections are allocated.
7. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in claim 1 or 2, Features: Step 5 includes: calculating the average latitude and longitude of each cluster's location point as the new cluster center. If the Manhattan distance between two clusters is less than the merging threshold, it is considered that the two clusters have overlapping parts, and the two clusters are merged. After the overlapping clusters are searched, the final hot spot area is obtained.
8. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance according to any one of claims 1 to 7, Features: The method for solving the grid similarity includes: the grid distance is the Euclidean distance between the spatiotemporal codes of two grids, and the calculation is shown in formula (4): in, and are the j-th component of the grid code to which the x-th data and the y-th data belong respectively, and n is the dimension of the data; The grid similarity is obtained based on the grid distance and the Euclidean distance between grid data, and the calculation is shown in formula (5): Among them, θ and is a parameter, θ≥1, 9. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance as claimed in any one of claims 1 to 7, Features: Step S33 includes: a known neighborhood boundary grid st nbi , and the initial cluster center Grid attraction between and other cluster centers The relative attraction between nbi ) is calculated as shown in formula (8): Among them, grid attraction is the neighborhood boundary grid st nbi The grid heat factor, Is a 3-D grid With st nbi Grid distance between them; relative attraction st nbi yes The neighborhood boundary grid of is the center grid of other clusters, and cn is the total number of clusters before neighborhood reshaping.
10. A method for detecting urban hot spots based on spatiotemporal neighborhood reconstruction and road network distance according to any one of claims 1 to 7, Features: The method for obtaining the road section impact value and the relative road section distance is as follows: (1) Comprehensively consider the road section density and road section connectivity to evaluate the importance of a road section in the road network, the road section impact value RIV R The calculation of is shown in formula (11): RIV R =τ×ρ R +β×RC R ,(11) Among them, τ and β are parameters, and the road segment density ρ R =n R / e Δt , n R represents the number of vehicles passing through section R, Δt = t max -t min , t max is the longest time among the vehicle trajectory positions passing through the road section, t min is the shortest time among the vehicle trajectory locations passing through the road segment; road segment connectivity ρ i is the segment density of the incoming segments of R, and in is the total number of incoming segments. In this paper, τ=1, β=1. (2) Use map matching technology to obtain the road section to which the location point belongs. Given the road section R 1 (s 1 , e 1 ) and R 2 (s 2 , e 2 ), position point p 1 In R 1 Projection point on pro 1 (x 1 ,y 1 ) and position point p 2 In R 2 Projection point on pro 2 (x 2 ,y 2 ), section R 1 and R 2 Projection distance d p The calculation is shown in formula (12): Among them, d c (pro 1 , pro 2 ) is the spherical cosine distance between the two projection points, d e (pro 1 , pro 2 ) is the Euclidean distance between two projection points, max(d c ) is the maximum spherical cosine distance between all projection points, max(d e ) is the maximum Euclidean distance between all projected points. (3) Section R 1 and R 2 The position distance d l The calculation is shown in formula (13): Among them, d c (p 1 , p 2 ) is the spherical cosine distance between two points, d e (p 1 , p 2 ) is the Euclidean distance between two locations, max(d c ) is the maximum value of the spherical cosine distance between all position points, max(d c ) is the maximum value of the Euclidean distance between all location points. (4) Comprehensively consider the projection distance and position distance between the position points to obtain the relative section distance, section R 1 and R 2 The relative distance D(R 1 ,R 2 ) is calculated as: D(R 1 ,R 2 )=d p (R 1 ,R 2 )+d l (R 1 ,R 2 )。
