A spatiotemporal clustering method for public transport travel based on individuals

By introducing time and space accuracy constraint thresholds in the space-time mode mining of bus travel, subdividing clustering results and making potential correlation corrections, the problem of insufficient accuracy and interpretability of clustering algorithms is solved, and the bus route arrangement and vehicle utilization rate are optimized. .

CN118152831BActive Publication Date: 2024-11-22HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410106521.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2024-11-22
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

In the existing method of time and space mode mining for bus travel, the clustering algorithm results are uncontrollable, lack of interpretability, and insufficient time mode characterization, resulting in unreasonable route arrangements and low bus utilization rate.

Method used

A single-day travel time and space clustering method is proposed. By constructing a single-day travel chain, introducing time and spatial accuracy constraint thresholds, using external and internal evaluation indicators to verify the clustering effect, subdividing the clustering results, defining potential categories, and A potential association correction algorithm is proposed to optimize clustering results.

Benefits of technology

Effectively control the accuracy of the clustering model, improve the interpretability and authenticity of the clustering results, optimize the bus route arrangement, and improve the utilization rate of buses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152831B_ABST
    Figure CN118152831B_ABST
Patent Text Reader

Abstract

A method for spatiotemporal clustering of public transportation based on individuals. The present invention relates to a method for spatiotemporal clustering of public transportation based on individuals. The purpose of the present invention is to solve the problems of uncontrollable accuracy of clustering algorithm results, lack of interpretability, lack of temporal pattern characterization and insufficient restoration of real travel behaviors in the existing methods during the spatiotemporal pattern mining of public transportation. The process is: 1. Construct a single-day travel chain; 2. Obtain initial time and space clustering labels; 3. Obtain subdivided time and space clustering labels; 4. Obtain the time precision constraint threshold and space precision constraint threshold for the optimal clustering effect; 5. Substitute the threshold obtained in 4 into 3 to obtain the newly subdivided time and space clustering labels; based on the potential categories, modify the newly subdivided time and space clustering labels to obtain the final time and space clustering label results. The present invention is used in the field of spatiotemporal clustering based on public transportation travel information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for spatiotemporal clustering of public transport travel based on individuals. Background Art

[0002] As an important mode of public transportation, public transportation plays an indispensable role in urban life. It has an important impact on urban sustainability, social inclusion, environmental protection and economic development. Public transportation is an important part of the urban transportation system. Public transportation covers a wide range, connects different communities, and enables people to go to destinations such as workplaces, schools, hospitals, shopping centers, etc. At the same time, public transportation is usually a relatively cheap transportation option for the general public, especially those who do not have private vehicles or are unwilling to drive. This makes public transportation the preferred mode of transportation for various social groups in the city. At the same time, public transportation has a lower carbon footprint, which helps to reduce urban traffic emissions, improve air quality, and support the city's sustainable development goals. Public transportation plays a key role in urban planning and development. It affects the design of urban roads, transportation hubs, stations and routes, and also affects residents' housing and work choices. With the continuous development of technology, new technology applications such as intelligent transportation systems and real-time vehicle tracking are significantly improving the efficiency and reliability of public transportation systems. Therefore, it is of great significance to improve the urban transportation system, improve passenger experience, support urban sustainable development and promote the development of smart cities by mining the travel time and space patterns and laws behind public transportation travel information. Progress in this research field will help build smarter, more efficient and environmentally friendly public transportation systems, making a positive contribution to the sustainable development of cities.

[0003] Although existing technologies have used clustering and classification methods to identify travel characteristics and travel patterns based on public transportation travel data, they are mostly optimized for clustering algorithms, and there are relatively few optimization algorithms that can be modified and optimized based on the actual situation of public transportation travel to more appropriately restore daily public transportation travel behavior. At the same time, in the research on pattern mining, there is a certain foundation for spatial pattern mining, but the mining of temporal patterns needs to be deepened. It is necessary to explore and evaluate different clustering methods in depth to determine the optimal clustering optimization algorithm. Summary of the invention

[0004] The purpose of the present invention is to solve the problems of uncontrollable clustering algorithm result accuracy, lack of interpretability, lack of temporal pattern characterization and insufficient restoration of real travel behavior in the process of bus travel spatiotemporal pattern mining in existing methods, resulting in unreasonable route arrangement and low bus utilization rate, and propose a bus travel spatiotemporal clustering method based on individuals.

[0005] The specific process of a spatiotemporal clustering method for public transportation travel based on individuals is as follows:

[0006] Step 1: Build a single-day travel chain;

[0007] Step 2: Perform initial time and space clustering of travel data based on the constructed single-day travel chain to obtain initial time and space clustering labels;

[0008] Step 3: Based on the initial time and space cluster labels obtained in step 2, the intra-class time distance mean constraint is introduced in time clustering, and the intra-class space distance mean constraint is introduced in space clustering. Based on the accuracy constraint, the initial time and space cluster labels obtained in step 2 are subdivided to obtain the subdivided time and space cluster labels;

[0009] The accuracy constraint is that the mean time distance within the class is less than the set time accuracy constraint threshold dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ;

[0010] Step 4: Use the external evaluation index and internal evaluation index in the clustering evaluation index to verify the clustering effect under different precision constraint thresholds, and obtain the time precision constraint threshold dis with the best clustering effect. t , spatial accuracy constraint threshold dis s ;

[0011] Step 5: Set the optimal time precision constraint threshold dis for clustering obtained in step 4 t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels;

[0012] Define latent classes based on the newly segmented temporal and spatial cluster labels;

[0013] The newly segmented time and space cluster labels are modified based on the potential categories to obtain the final travel time and space cluster label results.

[0014] The beneficial effects of the present invention are:

[0015] The present invention extracts travel information from smart card swiping data that requires swiping for both boarding and alighting, and then mines the time and space patterns of passengers' public transportation travel behaviors.

[0016] The present invention provides a method for spatiotemporal clustering of public transport travel based on individuals, improves the existing spectral clustering algorithm, introduces an accuracy constraint threshold to control the model accuracy, and proposes a potential association correction algorithm for further optimization, making it more suitable for the real public transport travel environment.

[0017] Based on the fact that each travel data point includes the fields of the travel starting point longitude and latitude, the end point longitude and latitude, the boarding time and the alighting time, the present invention constructs a single-day travel chain, sets transfer identification conditions to distinguish and merge each passenger's single trip to obtain a single-day travel chain that can ultimately reflect the passenger's travel purpose; performs initial time and space clustering of travel data according to the constructed single-day travel chain to obtain initial time and space clustering labels; based on the initial time and space clustering labels, introduces a mean constraint of intra-class time distance in time (the constraint means the mean constraint condition) and introduces a mean constraint of intra-class space distance in space (the constraint means the mean constraint condition) to control the accuracy of the clustering results, and subdivides the obtained initial time and space clustering labels based on the accuracy constraint to obtain the subdivided time and space clustering labels; the accuracy constraint is that the mean of the intra-class time distance is less than a set time accuracy constraint threshold value dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ; The external evaluation index and internal evaluation index in the clustering evaluation index are used to verify the clustering effect under different precision constraint thresholds, and the time precision constraint threshold dis with the best clustering effect is obtained. t , spatial accuracy constraint threshold dis s ; Based on the optimal clustering effect time precision constraint threshold dis t , spatial accuracy constraint threshold dis s , get the time and space cluster labels after the new segmentation; define the potential categories based on the time and space cluster labels after the new segmentation; and propose a method for correcting the potential associations in the same zone and the same block; correct the time and space cluster labels after the new segmentation based on the potential categories to obtain the final travel time and space cluster label results. Based on the final travel time and space cluster label results, optimize the bus routes. It solves the problems of the existing methods in the process of mining the spatiotemporal patterns of bus travel, such as the inability to control the accuracy of clustering algorithm results, lack of interpretability, lack of time pattern characterization, and insufficient restoration of real travel behaviors, resulting in unreasonable route arrangements and low bus utilization.

[0018] (1) Based on the initial spectral clustering algorithm, the time and space precision constraint thresholds are introduced, and the CH index of the clustering results when different numbers of cluster categories are set is calculated and compared to obtain the optimal number of cluster categories. Based on the optimal number of cluster categories, the precision constraint is continuously subdivided until all categories meet the time and space precision constraint threshold conditions, which can effectively control the mean time distance and spatial distance between each travel itinerary chain in each category to achieve the effect of controlling the accuracy of the clustering model.

[0019] (2) A method for calibrating the temporal and spatial precision constraint thresholds is proposed. The more important evaluation criteria in previous clustering results are drawn from the travel experience of people traveling in the same block with the same travel mode. The external and internal evaluation indicators for clustering effect verification are combined. On this basis, it is extended to use the travel behavior in the same area and block as the true value to verify the validity of the clustering results under each precision constraint threshold, and the temporal and spatial precision constraint threshold with the best clustering effect is selected.

[0020] (3) A method for correcting potential associations in the same time zone and the same block is proposed. Considering that passenger travel has a certain degree of randomness, the threshold-based clustering algorithm has certain limitations. By defining latent categories and finding and merging related travel chains based on the same time zone and the same block, the impact of randomness in fixed travel patterns is effectively reduced, and clustering results that are more in line with the actual travel of residents are obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of the present invention;

[0022] Figure 2 It is a flow chart of segmentation clustering;

[0023] Figure 3a This is the initial clustering visualization diagram;

[0024] Figure 3b This is a visualization of the accuracy constraint threshold of 0.1km;

[0025] Figure 4 This is a distribution map of some blocks in a city;

[0026] Figure 5 Comparison chart before and after correction for potential associations in the same zone;

[0027] Figure 6 Comparison chart before and after correction of potential associations in the same block. DETAILED DESCRIPTION

[0028] Specific implementation method 1: This implementation method is based on individual public transportation travel time and space clustering method. The specific process is as follows:

[0029] Step 1: Construct a single-day travel chain, set transfer identification conditions, identify and merge each passenger's single trip to obtain a single-day travel chain that can ultimately reflect the passenger's travel purpose;

[0030] Step 2: Perform initial time and space clustering of travel data based on the constructed single-day travel chain to obtain initial time and space clustering labels;

[0031] Step 3: Based on the initial time and space cluster labels obtained in step 2, the time distance mean constraint within the class is introduced in time (the constraint means the mean constraint condition), and the space distance mean constraint within the class is introduced in space (the constraint means the mean constraint condition) to control the accuracy of the clustering results. Based on the accuracy constraint, the initial time and space cluster labels obtained in step 2 are subdivided to obtain the subdivided time and space cluster labels;

[0032] The accuracy constraint is that the mean time distance within the class is less than the set time accuracy constraint threshold dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ;

[0033] Step 4: Use the external evaluation index and internal evaluation index in the clustering evaluation index to verify the clustering effect under different precision constraint thresholds, and obtain the time precision constraint threshold dis with the best clustering effect. t , spatial accuracy constraint threshold dis s ;

[0034] Step 5: Set the optimal time precision constraint threshold dis for clustering obtained in step 4 t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels;

[0035] Define latent classes based on the newly segmented temporal and spatial cluster labels;

[0036] A method for correcting potential associations in the same zone and the same block is proposed; the newly subdivided time and space cluster labels are corrected based on the potential categories to obtain the final travel time and space cluster label results.

[0037] Specific implementation method 2: This implementation method is different from the specific implementation method 1 in that: in the step 1, a single-day travel chain is constructed, and transfer identification conditions are set to identify and merge each passenger's single trip to obtain a single-day travel chain that can ultimately reflect the passenger's travel purpose; the specific process is:

[0038] Transportation travel refers to passengers moving from one place to another with the help of transportation. During the process of public transportation, passengers may not be able to reach the final destination by taking one route due to the influence of the route settings and station distribution in the bus network. Therefore, they may experience multiple transfers during the process of public transportation. If reasonable travel definition and identification are not performed, it will seriously affect the judgment of the purpose and time and space mode of this trip. Therefore, it is very necessary to perform transfer identification before performing travel clustering and pattern recognition, identify the transfer process and merge it into the initial trip to build a complete travel chain for the day. Under normal circumstances, passengers tend to choose to transfer when the walking distance is the shortest and the transfer time is the shortest. Transfer identification can be performed by combining the travel data of the day and the location and time relationship between the corresponding travel stations;

[0039] A trip chain is the movement of passengers from one location to another with the help of transportation;

[0040] There are two situations in which passengers move from one place to another using transportation:

[0041] In the first case, passengers take one route to reach the final destination and obtain a single-day trip chain;

[0042] The second case: passengers cannot reach their final destination by taking one route, and the transfer process needs to be identified and merged to construct a single-day travel chain;

[0043] Transfer process recognition must meet the following five conditions at the same time:

[0044] (1) The date is the same (not across days); (2) The time distance between the end point of the previous data and the start point of the next data is less than 30 minutes; (3) The spatial distance between the end point of the previous data and the start point of the next data is less than 600 meters; (4) The start point of the previous data and the end point of the next data cannot be the same, and the end point of the previous data and the start point of the next data cannot be the same (if the previous data is AB, the next data cannot be BA, which means it is completely opposite); (5) The bus routes (for example, bus route 9, the next data cannot be bus route 9 and you cannot take bus route 9 back) cannot be the same;

[0045] The identified transfer processes are merged to obtain a single-day travel chain that can ultimately reflect the passengers' real travel intentions.

[0046] Since its travel information such as time and space will be merged into the previous trip to construct the travel chain of the day, the merged trip does not participate in the subsequent travel clustering process, and the clustering result is the same as the merged trip of the previous trip, that is, it is considered that the merged trip has the same travel time and space pattern as the merged trip of the previous trip;

[0047] Therefore, the present invention defines public transportation as the process in which public transportation passengers start from the starting point, transfer several times, and finally reach the destination. By constructing a travel chain through transfer identification, travel information can be effectively merged to provide a guarantee for the accuracy of subsequent travel clustering and pattern recognition. Other steps and parameters are the same as those in the first embodiment.

[0048] Specific implementation method three: This implementation method is different from specific implementation methods one or two in that: in step two, the initial time and space clustering of travel data is performed according to the constructed single-day travel chain to obtain the initial time and space clustering labels; the specific process is:

[0049] The travel spatiotemporal pattern mining model divides the data points into different classes according to the travel similarities between them, and after mapping the travel data points to an undirected graph, the problem is transformed into a graph partitioning problem.

[0050] Step 2 1. Set different cluster numbers K, K = 2, ..., N; K is a positive integer; (only set the number of classes, do not know which data belongs to which class) (K = 2, 3, 4, 5, 6, 7, 8 (K value from 2 to 8, n is the travel data points X1, X2, ... X n The number of data in the set; if n is less than 8, K is n (K takes values ​​of 2, 3, 4, 5, 6, 7, 8. If n = 5, then K takes values ​​of 2, 3, 4, 5. The optimal number of clusters is to select the best value among K values ​​(that is, select the best one among 2, 3, 4, 5 in the above example));

[0051] When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n;

[0052] n is the travel data point X1, X2, ...X n The number of data in the collection;

[0053] When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0054] When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0055] When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is n, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on.

[0056] When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is n, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on.

[0057] When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on are determined.

[0058] When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is N, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on.

[0059] Step 2: Substitute the time travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the time optimal cluster number K. bt (We only know the number of categories, but we don’t know which data belongs to which category);

[0060] Time optimal number of clusters K bt The corresponding cluster labels are used as the initial time cluster label results (knowing which data belongs to which category);

[0061] The time travel similarity matrix W = (W ij ) i,j=1,2,…,n ;

[0062] Substitute the spatial travel similarity matrix W and cluster labels corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the spatial optimal cluster number K. bs (We only know the number of categories, but we don’t know which data belongs to which category);

[0063] The optimal number of spatial clusters K bs The corresponding cluster labels are used as the initial spatial cluster label results (knowing which data belongs to which category);

[0064] The spatial travel similarity matrix W = (W ij ) i,j=1,2,…,n The other steps and parameters are the same as those in the first or second embodiment.

[0065] Specific implementation method 4: This implementation method is different from specific implementation methods 1 to 3 in that: in step 21, a different number of clusters K is set, K=2, ..., N; K is a positive integer;

[0066] When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n;

[0067] n is the travel data point X1, X2, ...X n The number of data in the collection;

[0068] When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0069] When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0070] When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined;

[0071] When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined;

[0072] When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined.

[0073] When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. The specific process is:

[0074] The spectral clustering algorithm is used to perform initial travel time and space clustering on the travel data. Spectral clustering is one of the typical representatives of modern clustering algorithms based on graph theory. It combines traditional algorithm ideas with graph optimization theory, greatly improving the versatility of clustering algorithms. The essence is to transform the clustering problem into the optimal partitioning problem of the graph, and partition the graph according to the edge weights between vertices based on the matrix eigenvector.

[0075] Step 2: Given a set of travel data points X1, X2, ...X n Each travel data point contains the fields of the starting point longitude and latitude, the end point longitude and latitude, the boarding time and the getting off time, etc., and defines the similarity W between each two travel data points ij ≥0;

[0076] Step 2: Divide the travel data points into K categories according to the spatial similarity between the data points. The specific process is as follows:

[0077] 1) The spatial similarity calculation formula is as follows:

[0078]

[0079] In the formula, d(O i ,O j ) is the distance between the starting points of two travel data; d(D i ,D j ) is the distance between the endpoints of two travel data; dist(T i ,T j ) is the order distance difference between the two travel data (each order data has a starting point and an end point, and the distance between the starting point and the end point of each order data is calculated to get the order distance of this travel order. Then it refers to the difference in order distance between the two orders. For example: the order distance of order one is 1.5km, and the order distance of order two is 1.3km, then the order distance difference between the two orders is 0.2km); Az(T i ,T j ) is the azimuth difference between the starting point and the end point of the two travel data (each order data has a starting point and an end point, and the azimuth formed by the starting point and the end point of each order data is calculated. Then here it refers to the azimuth difference between the two orders, for example: the azimuth of order one is 30 degrees, the azimuth of order two is 100 degrees, then the order distance difference between the two orders is 70 degrees); X i is the i-th travel data point, X j is the jth travel data point, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the set; i = 1, 2, ..., n, j = 1, 2, ..., n;

[0080] The spatial definition scenario is: it is determined that there is no spatial similarity between the two travel data in this scenario, that is, the spatial similarity is 0;

[0081] A space definition scenario is considered to be one that meets any of the following conditions:

[0082] (1) Two travel data are on the same route and in opposite directions;

[0083] (2) The departure point of the previous travel data is consistent with the arrival point of the next travel data;

[0084] (3) The destination of the previous travel data is consistent with the departure place of the next travel data;

[0085] (4) The number of stops in both trip data is less than 5 and the sum of the distances between the two starting points is greater than 4 kilometers or the sum of the distances between the two end points is greater than 4 kilometers (either the sum of the distances between the two starting points is greater than 4 kilometers or the sum of the distances between the two end points is greater than 4 kilometers);

[0086] (5) The order distance difference between the two travel data is greater than 2 kilometers;

[0087] (6) The azimuth difference between the start and end points of the two trip data is greater than 90 degrees (each order data has a start and an end point, and the azimuth formed by the start and end points of each order data is calculated. Then it refers to the difference in azimuth between the two orders. For example: the azimuth of order one is 10 degrees, and the azimuth of order two is 110 degrees, then the order distance difference between the two orders is 100 degrees);

[0088] The spatial similarity value is [0,1];

[0089] 2) The similarity relationship between travel data points is represented by a travel similarity graph G = (V, E);

[0090] E is the edge of the travel similarity graph;

[0091] The vertex set of the travel similarity graph V = {v1,v2,…v n}, each vertex v in the travel similarity graph i Represents a data point X i ;

[0092] Assume that the travel similarity graph G is weighted, that is, two vertices v i and v j Each edge between has a non-negative weight W ij ≥0;

[0093] The weighted adjacency matrix of the trip similarity graph is the trip similarity matrix W = (W ij ) i,j=1,2,…,n(The similarity between data points is a series of discrete values, and each similarity is combined together to form a similarity matrix.) ij = 0, which means that vertex v i and v j There are no edge connections;

[0094] Since the travel similarity graph G is undirected, we define W ij =W ji , and then the travel clustering problem is transformed into a similarity graph;

[0095] Vertex v i ∈V is defined as the trip similarity diagonal matrix D, where the elements of the trip similarity diagonal matrix D are

[0096]

[0097] 3) Based on the travel similarity matrix W, construct a non-regularized travel Laplace matrix L, where L = DW;

[0098] The non-regularized travel spectrum clustering is based on the non-regularized travel Laplace matrix.

[0099] 4) The non-regularized travel Laplace matrix L is an n-row k-column matrix. The characteristic variables corresponding to the k smallest eigenvalues ​​of L are calculated as f1, f2, ... f k ;

[0100] 5) According to the characteristic variables f1, f2, ... f k Construct the matrix F∈R n×k (n rows and k columns);

[0101] 6) Treat each row of the matrix F as a travel data point, use the k-means algorithm to cluster F, divide the travel data points into K categories according to the spatial similarity between the data points (spectral clustering principle), and obtain cluster labels with K cluster numbers;

[0102] Step 2-3: Divide the travel data points into K categories according to the time similarity between the data points. The specific process is as follows:

[0103] 1) The temporal similarity calculation formula is as follows

[0104]

[0105] In the formula, t(O i ,O j ) is the departure time difference of the two travel data; t(D i ,D j ) is the difference in arrival time of two travel data;

[0106] The time definition scenario is: it is determined that there is no time similarity between the two travel data in this scenario, that is, the time similarity is 0;

[0107] Any of the following conditions is considered a time-defined scenario:

[0108] (1) The departure time of the two travel data is greater than 2 hours;

[0109] (2) The arrival time difference between the two travel data is greater than 2 hours;

[0110] The time similarity value is [0,1];

[0111] 2) The similarity relationship between travel data points is represented by a travel similarity graph G = (V, E);

[0112] E is the edge of the travel similarity graph;

[0113] The vertex set of the travel similarity graph V = {v1,v2,…v n}, each vertex v in the travel similarity graph i Represents a data point X i ;

[0114] Assume that the travel similarity graph G is weighted, that is, two vertices v i and v j Each edge between has a non-negative weight W ij ≥0;

[0115] The weighted adjacency matrix of the trip similarity graph is the trip similarity matrix W = (W ij ) i,j=1,2,…,n (The similarity between data points is a series of discrete values, and each similarity is combined together to form a similarity matrix.) ij = 0, which means that vertex v i and v j There are no edge connections;

[0116] Since the travel similarity graph G is undirected, we define W ij =W ji , and then the travel clustering problem is transformed into a similarity graph;

[0117] Vertex v i ∈V is defined as the trip similarity diagonal matrix D, where the elements of the trip similarity diagonal matrix D are

[0118]

[0119] 3) Based on the travel similarity matrix W, construct a non-regularized travel Laplace matrix L, where L = DW;

[0120] The non-regularized travel spectrum clustering is based on the non-regularized travel Laplace matrix.

[0121] 4) The non-regularized travel Laplace matrix L is an n-row k-column matrix. The characteristic variables corresponding to the k smallest eigenvalues ​​of L are calculated as f1, f2, ... f k ;

[0122] 5) According to the characteristic variables f1, f2, ... f k Construct the matrix F∈R n×k (n rows and k columns);

[0123] 6) Treat each row of the matrix F as a travel data point, use the k-means algorithm to cluster F, divide the travel data points into K categories according to the time similarity between the data points (spectral clustering principle), and obtain cluster labels with K cluster numbers.

[0124] F can be regarded as a mapping of the original data in a low-dimensional space, and then k-means is used to cluster F to obtain a cluster label for each travel data point. Other steps and parameters are the same as those of the first to third embodiments.

[0125] Specific implementation method five: This implementation method is different from specific implementation methods one to four in that: in step 22, the time travel similarity matrix W and cluster labels corresponding to each cluster number K are substituted into the CH index calculation formula, and the CH index corresponding to each cluster number K is compared, and the cluster number corresponding to the maximum CH index is selected as the time optimal cluster number K bt (We only know the number of categories, but we don’t know which data belongs to which category);

[0126] Time optimal number of clusters K bt The corresponding clustering labels are used as the initial time clustering label results (to know which data belongs to which category); the spatial travel similarity matrix W = (W ij ) i,j=1,2,…,n ;

[0127] Substitute the spatial travel similarity matrix W and cluster labels corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the spatial optimal cluster number K. bs (We only know the number of categories, but we don’t know which data belongs to which category);

[0128] The optimal number of spatial clusters K bs The corresponding clustering labels are used as the initial spatial clustering label results (to know which data belongs to which category); the spatial travel similarity matrix W = (W ij ) i,j=1,2,…,n ; The specific process is:

[0129] An internal evaluation index, the CH index (Calinski-Harabasz Score), is selected to determine the optimal number of cluster centers in the spectral clustering algorithm. Clustering evaluation can measure the performance of cluster analysis based on internal evaluation indicators. The comprehensive evaluation is mainly carried out from two aspects: the density of points within the same class and the separation between classes. The CH index is essentially the ratio of the distance between classes to the distance within a class. The data set X with a capacity of N is clustered into K classes, and the square sum of the distances W between each point in the class and the class center is calculated. k To measure the intra-class closeness (intra-class distance), the center point of each class and the travel data points X1, X2, ...X n The sum of squares of the distances between the center points of the set B k To measure the separation of the data set (distance between classes); the calculation formula is

[0130]

[0131] Where S is the CH index; n is the travel data point X1, X2, ...X n The number of data in the set; K is the number of clusters (K = 2, 3, 4, 5, 6, 7, 8 (K ranges from 2 to 8, n is the travel data point X1, X2, ... X n The number of data in the set; if n is less than 8, K is n (K takes values ​​of 2, 3, 4, 5, 6, 7, 8. If n = 5, then K takes values ​​of 2, 3, 4, 5. The optimal number of clusters is to select the best value among K values ​​(that is, select the best one among 2, 3, 4, 5 in the above example));

[0132] B K For each class center point and travel data point X1, X2, ...X n The sum of squared distances between the center points of the set, W K is the sum of the squares of the distances between each point in the class and the class center. The specific calculation formula is:

[0133]

[0134]

[0135] In the formula, c q is the center point of class q, c e are travel data points X1, X2, …X n The center point of the set, n q is the number of data in class q, is the data set of class q, T is the transpose;

[0136] The larger the CH index score, the better, that is, the smaller the covariance within the category, the better, and the larger the covariance between categories, the better. The number of clusters corresponding to the maximum CH index is selected as the optimal number of clusters.

[0137] The other steps and parameters are the same as those in Specific Embodiments 1 to 4.

[0138] Specific implementation method six: This implementation method is different from any one of specific implementation methods one to five in that: in step three, based on the initial time and space clustering labels obtained in step two, a time distance mean constraint within the class is introduced in time, and a space distance mean constraint within the class is introduced in space to control the accuracy of the clustering results, and the initial time and space clustering labels obtained in step two are subdivided based on the accuracy constraint to obtain the subdivided time and space clustering labels;

[0139] The accuracy constraint is that the mean time distance within the class is less than the set time accuracy constraint threshold dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ; The specific process is:

[0140] The mean time distance within a class must meet the precision constraint threshold, and the mean space distance within a class must meet the spatial precision constraint threshold. The category that meets the precision constraint threshold ends the category segmentation cycle, otherwise the category continues to be segmented and clustered. This continues until the mean time and space distances of all cluster categories meet the precision constraint threshold. t , spatial accuracy constraint threshold dis s It can effectively control the accuracy of clustering subdivision and achieve the accuracy control effect that traditional clustering methods cannot achieve. Specific operation steps:

[0141] Step 31: Obtain the time clustering labels after segmentation; the specific process is:

[0142] (1) Based on the initial time clustering labels obtained in step 2, calculate the mean time distance between the travel data points under each clustering label: to The specific calculation formula is:

[0143] where diso ij is the travel data point X i and travel data point X j The starting time distance between the two points, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection;

[0144] (2) Filter outto >dis t The clustering categories generate a catalog of categories to be subdivided;

[0145] dis t Indicates the set time accuracy constraint threshold;

[0146] (3) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided time clustering label;

[0147] (4) Based on the subdivided time cluster labels obtained in step (3), calculate the mean time distance between the travel data points under each cluster label: to ', the specific calculation formula is

[0148] (5) Filter out to '>dis t The clustering categories generate a catalog of categories to be subdivided;

[0149] (6) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the final time cluster label after subdivision considering the starting time distance. If not, repeat (3), (4), and (5) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty and the final time cluster label after subdivision considering the starting time distance is obtained; that is, until the mean starting time distance between the travel data points under each cluster label in the generated category directory is equal to or greater than 0. to are all less than the time accuracy constraint threshold dis t ;

[0150] (7) Based on the final subdivided time cluster labels considering the starting time distance in step (6), calculate the mean time distance between the travel data points under each cluster label dis td The specific calculation formula is:

[0151] where diso ij is the travel data point X i and travel data point X j The time distance between the destinations, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection;

[0152] (8) Filter out the dis td >dis t The clustering categories generate a catalog of categories to be subdivided;

[0153] (9) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided time clustering label;

[0154] The specific process of clustering and subdividing each category in the category directory to be subdivided in turn and obtaining the subdivided time clustering label is the same as (31) and (32), which is for each category in the category directory to be subdivided;

[0155] (10) Based on the subdivided time cluster labels obtained in step (9), calculate the mean time distance between the travel data points under each cluster label: td ', the specific calculation formula is

[0156] (11) Filter out the dis td '>dis t The clustering categories generate a catalog of categories to be subdivided;

[0157] (12) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the final time cluster label after subdivision considering the terminal time distance. If not, repeat (9), (10), and (11) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty and the final time cluster label after subdivision considering the terminal time distance is obtained; that is, until the mean terminal time distance dis between the travel data points under each cluster label in the generated category directory to be subdivided is td are all less than the time accuracy constraint threshold dis t ;

[0158] Step 32: Obtain the spatial clustering labels after segmentation; the specific process is as follows:

[0159] (13) Based on the initial spatial clustering labels obtained in step 2, calculate the mean spatial distance between the starting points of the travel data points under each clustering label: so The specific calculation formula is:

[0160] where diso ij is the travel data point X i and travel data point X j The spatial distance between the starting points, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection;

[0161] (14) Filter out the dis so >dis s The clustering categories generate a catalog of categories to be subdivided;

[0162] dis s Indicates the set spatial accuracy constraint threshold;

[0163] (15) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided space cluster label;

[0164] (16) Based on the subdivided spatial cluster labels obtained in step (15), calculate the mean spatial distance dis between the starting points of the travel data points under each cluster label so ', the specific calculation formula is

[0165] (17) Filter out dis so '>dis s The clustering categories generate a catalog of categories to be subdivided;

[0166] (18) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the spatial cluster label after the final subdivision considering the starting point spatial distance. If not, repeat (15), (16), and (17) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty and the spatial cluster label after the final subdivision considering the starting point spatial distance is obtained; that is, until the mean spatial distance dis between the travel data points under each cluster label in the generated category directory to be subdivided is so are all less than the spatial accuracy constraint threshold dis s ;

[0167] (19) Based on the final subdivided spatial cluster labels considering the starting point spatial distance obtained in step (18), calculate the mean spatial distance between the destination points under each cluster label: sd The specific calculation formula is:

[0168] where diso ij is the travel data point X i and travel data point X j The spatial distance between the endpoints, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection;

[0169] (20) Filter out dis sd >dis s The clustering categories generate a catalog of categories to be subdivided;

[0170] (21) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided space cluster label;

[0171] The specific process of clustering and subdividing each category in the category catalog to be subdivided in turn to obtain the subdivided space clustering label is the same as (151) and (152), which is for each category in the category catalog to be subdivided;

[0172] (22) Based on the subdivided spatial cluster labels of step (21), calculate the mean spatial distance dis between the destination points under each cluster label sd ', the specific calculation formula is

[0173] (23) Filter out dis sd '>dis s The clustering categories generate a catalog of categories to be subdivided;

[0174] (24) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the final spatial cluster label after subdivision considering the spatial distance of the terminal. If not, repeat (21), (22), and (23) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the final category directory to be subdivided is empty and the final spatial cluster label after subdivision considering the spatial distance of the terminal is obtained; that is, until the mean spatial distance dis between the travel data points under each cluster label in the generated category directory to be subdivided is sd are all less than the spatial accuracy constraint threshold dis s .

[0175] As shown in the visualization effect diagram in Figure 3, it shows that setting different time accuracy constraint thresholds dis t , spatial accuracy constraint threshold dis s The other steps and parameters are the same as those in the first to fifth embodiments.

[0176] Specific implementation method 7: This implementation method is different from any one of specific implementation methods 1 to 6 in that: in the above (3), based on the generated category directory to be subdivided, each category in the category directory to be subdivided is clustered and subdivided in turn to obtain a subdivided time clustering label; the process is:

[0177] (31) Set different cluster numbers K, K = 2, ..., N; K is a positive integer; (only set the number of classes, do not know which data belongs to which class) (K = 2, 3, 4, 5, 6, 7, 8 (K value from 2 to 8, n is the travel data points X1, X2, ... X nThe number of data in the set; if n is less than 8, K is n (K takes values ​​of 2, 3, 4, 5, 6, 7, 8. If n = 5, then K takes values ​​of 2, 3, 4, 5. The optimal number of clusters is to select the best value among K values ​​(that is, select the best one among 2, 3, 4, 5 in the above example));

[0178] When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n;

[0179] n is the travel data point X1, X2, ...X n The number of data in the collection;

[0180] When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0181] When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is n, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and the travel data points belonging to the nth category are determined;

[0182] When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and the travel data points belonging to the Nth category are determined;

[0183] The specific process is the same as the specific implementation method 4;

[0184] (32) Substitute the time travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the time optimal cluster number. (We only know the number of categories, but we don’t know which data belongs to which category);

[0185] Time-optimal number of clusters The corresponding cluster labels are used as the cluster label results after each category is subdivided (knowing which data belongs to which category), targeting each category in the category directory to be subdivided;

[0186] For example, the initial clustering is done: Trip 1 and Trip 2 are in Trip 1 and Trip 2 are in Trip 1, 2, 3, and 4 are in Trip 2. After calculating the mean time distance, it is found that Trip 2 does not meet the requirement that the mean time distance is less than the time accuracy constraint threshold. Then Trip 2 needs to be subdivided. Subdivision process: Trip 1, 2, 3, and 4 are clustered in Trip 2. Calculate the CH index to see if it is appropriate to divide them into two categories. Then I will subdivide the four trip clusters in Trip 2 into two categories. For example, Trip 1 and 2 are in one category, and Trip 3 and 4 are in another category. Then, after the subdivision, Trip 2 is split into Trip 2-1 and Trip 2-2. The other steps and parameters are the same as those in Specific Implementation Methods 1 to 6-1.

[0187] Specific implementation eight: This implementation differs from any one of specific implementations one to seven in that: in (15), based on the generated category catalog to be subdivided, each category in the category catalog to be subdivided is clustered and subdivided in turn to obtain a subdivided space cluster label; the process is:

[0188] (151) Set different cluster numbers K, K = 2, ..., N; K is a positive integer; (only set the number of classes, do not know which data belongs to which class) (K = 2, 3, 4, 5, 6, 7, 8 (K value from 2 to 8, n is the travel data points X1, X2, ... X n The number of data in the set; if n is less than 8, K is n (K takes values ​​of 2, 3, 4, 5, 6, 7, 8. If n = 5, then K takes values ​​of 2, 3, 4, 5. The optimal number of clusters is to select the best value among K values ​​(that is, select the best one among 2, 3, 4, 5 in the above example));

[0189] When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n;

[0190] n is the travel data point X1, X2, ...X n The number of data in the collection;

[0191] When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined;

[0192] When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is n, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on.

[0193] When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points (spectral clustering principle), and the cluster labels are obtained when the number of clusters K is N, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on.

[0194] The specific process is the same as the specific implementation method 4;

[0195] (152) Substitute the spatial travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the optimal spatial cluster number. (We only know the number of categories, but we don’t know which data belongs to which category);

[0196] Optimal number of spatial clusters The corresponding cluster labels serve as the cluster label results after each category is subdivided (knowing which data belongs to which category), and are targeted at each category in the category directory to be subdivided.

[0197] The other steps and parameters are the same as those in Specific Embodiments 1 to 7.

[0198] Specific implementation method 9: This implementation method is different from any one of specific implementation methods 1 to 8 in that: in step 4, the external evaluation index and the internal evaluation index in the clustering evaluation index are used to verify the clustering effect under different precision constraint thresholds, and the time precision constraint threshold dis with the best clustering effect is obtained. t , spatial accuracy constraint threshold dis s ; The specific process is:

[0199] From the above process, it can be seen that the introduction of precision constraint threshold can effectively control the accuracy range of clustering results, but at the same time, the determination of the threshold also affects the rationality and accuracy of the clustering algorithm to a certain extent. Therefore, a more objective and reasonable selection and verification method is needed for the determination of the precision constraint threshold. This section proposes a time precision constraint threshold dis t , spatial accuracy constraint threshold dis s Parameter calibration verification method.

[0200] Evaluating the effectiveness of clustering results, also known as clustering evaluation or validation, is critical to the success of clustering applications. It ensures that the clustering algorithm identifies meaningful clusters in the data. It can also be used to determine which clustering algorithm is best suited for a specific dataset and task, and to tune algorithm parameters. A good clustering method can produce high-quality clusters, with high intra-class similarity and low inter-class similarity. Generally speaking, there are two criteria for evaluating clustering quality, external evaluation indicators and internal evaluation indicators.

[0201] (1) External evaluation indicators: these are indicators with reference standards, which are also usually called indicators for measuring clustering algorithms and parameters in a supervised situation. Specifically, the clustering results of the clustering algorithm are compared with known ones (labeled, artificial standards, or true values ​​based on an ideal clustering) to measure the performance and quality of the designed clustering algorithm.

[0202] (2) Internal evaluation indicators: Internal indicators are unsupervised, do not require a benchmark data set, and do not require the help of an external reference model. They use the distance between the sample points in the sample data set and the cluster center to measure the quality of the clustering results.

[0203] Step 41: Select 8 time precision constraint thresholds, and bring the 8 time precision constraint thresholds into step 31 respectively to obtain 8 subdivided time cluster labels;

[0204] The eight time accuracy constraint thresholds are 0.5h, 1h, 1.5h, 2h, 2.5h, 3h, 3.5h, and 4h respectively;

[0205] Step 42: Bring the subdivided time cluster labels and true categories corresponding to the 0.5h time accuracy constraint threshold into the external evaluation index for calculation to obtain the external evaluation index result;

[0206] The subdivided time cluster labels and true categories corresponding to the 1h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0207] The subdivided time cluster labels and true categories corresponding to the 1.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0208] The subdivided time cluster labels and true categories corresponding to the 2h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0209] The subdivided time cluster labels and true categories corresponding to the 2.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0210] The subdivided time cluster labels and true categories corresponding to the 3h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0211] The subdivided time cluster labels and true categories corresponding to the 3.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0212] The subdivided time cluster labels and true categories corresponding to the 4h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0213] The initial time clustering labels and true categories without time precision constraint threshold obtained in step 2 are brought into the external evaluation index for calculation to obtain the external evaluation index result;

[0214] Step 43: Substitute the subdivided time cluster labels and time travel data point data corresponding to the 0.5h time accuracy constraint threshold into the internal evaluation index calculation formula to obtain the internal evaluation index result;

[0215] The subdivided time cluster labels and time travel data points corresponding to the 1h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0216] The subdivided time cluster labels and time travel data points corresponding to the 1.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0217] The subdivided time cluster labels and time travel data points corresponding to the 2h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0218] The subdivided time cluster labels and time travel data points corresponding to the 2.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0219] The subdivided time cluster labels and time travel data points corresponding to the 3h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0220] The subdivided time cluster labels and time travel data points corresponding to the 3.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0221] The subdivided time cluster labels and time travel data points corresponding to the 4h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0222] The initial time clustering labels and time travel data points without time precision constraint threshold obtained in step 2 are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index result;

[0223] Step 44: normalize the external evaluation index results and the internal evaluation index results and calculate the average value, and take the precision constraint threshold corresponding to the maximum value of the average value as the time precision constraint threshold with the best clustering effect;

[0224] There are seven external evaluation indicators, namely cluster purity, adjusted Rand coefficient, Foulkes-Malo index, mutual information score, standardized mutual information score, homogeneity and completeness;

[0225] There are 2 internal evaluation indicators, namely Chapman-Halder index and silhouette coefficient;

[0226] The true category determination process is:

[0227] The trips in the same zone are considered as one type of trip by default and used as the real category;

[0228] Step 4-5: Select 12 spatial accuracy constraint thresholds, and bring the 12 spatial accuracy constraint thresholds into step 3-2 respectively to obtain 12 subdivided spatial cluster labels;

[0229] The 12 spatial accuracy constraint thresholds are 0.05km, 0.1km, 0.2km, 0.5km, 0.8km, 1km, 1.2km, 1.5km, 1.8km, 2km, 2.5km, and 3km respectively;

[0230] Step 46: Bring the subdivided spatial cluster labels and true categories corresponding to the 0.05km spatial accuracy constraint threshold into the external evaluation index for calculation to obtain the external evaluation index results;

[0231] The subdivided spatial cluster labels and true categories corresponding to the 0.1km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0232] The subdivided spatial cluster labels and true categories corresponding to the 0.2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0233] The subdivided spatial cluster labels and true categories corresponding to the 0.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0234] The subdivided spatial cluster labels and true categories corresponding to the 0.8km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0235] The subdivided spatial cluster labels and true categories corresponding to the 1km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0236] The subdivided spatial cluster labels and true categories corresponding to the 1.2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0237] The subdivided spatial cluster labels and true categories corresponding to the 1.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0238] The subdivided spatial cluster labels and true categories corresponding to the 1.8km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0239] The subdivided spatial cluster labels and true categories corresponding to the 2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0240] The subdivided spatial cluster labels and true categories corresponding to the 2.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0241] The subdivided spatial cluster labels and true categories corresponding to the 3km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results;

[0242] The initial spatial clustering labels and true categories without spatial precision constraint threshold obtained in step 2 are brought into the external evaluation index for calculation to obtain the external evaluation index result;

[0243] Step 47: Substitute the subdivided spatial cluster labels and spatial travel data points corresponding to the 0.05km spatial accuracy constraint threshold into the internal evaluation index calculation formula to obtain the internal evaluation index result;

[0244] The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.1km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0245] The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0246] The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0247] The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.8km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0248] The subdivided spatial cluster labels and spatial travel data points corresponding to the 1km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0249] The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0250] The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0251] The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.8km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0252] The subdivided spatial cluster labels and spatial travel data points corresponding to the 2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0253] The subdivided spatial cluster labels and spatial travel data points corresponding to the 2.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0254] The subdivided spatial cluster labels and spatial travel data points corresponding to the 3km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0255] The initial spatial clustering labels and spatial travel data points without spatial precision constraint threshold obtained in step 2 are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results;

[0256] Step 48: normalize the external evaluation index results and the internal evaluation index results and calculate the average value, and take the spatial constraint threshold corresponding to the maximum value of the average value as the optimal spatial accuracy constraint threshold;

[0257] There are seven external evaluation indicators, namely cluster purity, adjusted Rand coefficient, Foulkes-Malo index, mutual information score, standardized mutual information score, homogeneity and completeness;

[0258] There are 2 internal evaluation indicators, namely Chapman-Halder index and silhouette coefficient;

[0259] The true category determination process is:

[0260] The trips in the same block are considered as one type of trip by default and used as the real category;

[0261] A. Clustering Purity: In the evaluation criteria of clustering results, the number of correctly clustered samples is divided by the total number of samples. However, for the clustering results, we do not know the true category corresponding to each class, so we need to take the maximum value in each case.

[0262] B. Adjusted Rand Index (ARI): Adjusted Rand Score is an indicator used to measure the performance of clustering algorithms. It is an adjusted form of Rand Index and can be used to evaluate clustering algorithms that divide sample points into multiple classes. It takes into account the probability of chance and has a value range of [-1,1]. The closer the value is to 1, the more accurate the clustering result is, the closer the value is to 0, the clustering result is equivalent to the random result, and the closer the value is to -1, the clustering result is completely opposite to the true category.

[0263] C. Folkestone-Malo Index (FMI): It is mainly calculated based on the intersection and union of the true labels of the data and the clustering results, as well as the ratio of the number of point pairs within and between classes.

[0264] D. Mutual Information Score (MI): It is an indicator used to measure the performance of clustering algorithms. It measures the similarity between clustering results and true labels. The score based on mutual information can be used to evaluate clustering algorithms that divide sample points into multiple classes. The closer the value of the score based on mutual information is to 1, the more accurate the clustering result is. The closer the value is to 0, the clustering result is equivalent to the random result. The smaller the value is, the greater the difference between the clustering result and the true category. The score based on mutual information is a relative indicator, and its value is affected by the number of true categories.

[0265] E. Normalized Mutual Information Score (NMI): It is a standardized form of score based on mutual information, which can be used to evaluate clustering algorithms that classify sample points into multiple clusters. The mutual information score is standardized and scaled between 0 (indicating no mutual information) and 1 (indicating perfect correlation).

[0266] F. Homogeneity: measures whether each class contains only members of a single class; used to measure whether the clustering algorithm divides the data into "homogeneous" (i.e., the class contains only sample points of the same category);

[0267] G. Completeness: measures whether all members of a given class are assigned to the same class. It is used to measure whether the clustering algorithm divides the data "completely" (i.e. whether the sample points of the same category are divided into the same class);

[0268] H, Chapman-Hard index (CH index);

[0269] I. Silhouette Coefficient (SC): Use the distance between points in the same cluster, and the distance between points in the next adjacent cluster and all other points to evaluate the performance of the model. It is mainly calculated based on factors such as the distance, similarity, and closeness between the sample point and its class and the nearest neighbor class. The higher the value, the better the model performance.

[0270] Among them, the external evaluation index requires a true value label, so it is necessary to define a true value label for the travel data. In the process of travel clustering, it is more inclined to consider that the trips starting from the same block and arriving at the same block are of the same type. Based on this idea, the same zone verification method and the same block verification method are proposed.

[0271] Verification method for the same time zone: the travel data from the same departure time zone (the time zone with a range of 0.5h to establish a time zone buffer at the starting point, for example: the departure time is 9.5, the time zone buffer range is 9-10) to the same arrival time zone (the time zone with a range of 0.5h to establish a time zone buffer at the end point, for example: the arrival time is 10.2, the time zone buffer range is 9.7-10.7) is the same type of travel, which is defined as the true value; example: trip one: departure time is 9.3, arrival time is 10.5; trip two: departure time is 9, arrival time is 10.6. The starting time zone buffer of trip one is 8.8-9.8, and the end time zone buffer is 10-11; the starting time zone buffer of trip two is 8.5-9.5, and the end time zone buffer is 10.1-11.1; because trip one and trip two have intersections in both the starting and end buffers, trip one and trip two are considered to have the same time category of travel, and are defined as true values.

[0272] Same block verification method: Referring to the Beijing Ground Bus Network Master Plan (Draft), it is proposed that the coverage rate of ground bus stops within 500 meters is 99.5%, and the coverage rate of 500-meter stops in built-up areas is 99.4%. Therefore, in the block correspondence process, the buffer zone range is set to 0.5km, that is, the blocks within 0.5km of the starting and ending points are searched and mapped to the travel data. The travel data from the same departure block set (all blocks intersecting with the buffer zone established at the starting point with a range of 0.5km) to the same arrival block set (all blocks intersecting with the buffer zone established at the end point with a range of 0.5km) are considered to be the same type of travel, and are defined as true values.

[0273] The specific block distribution used in the same block verification method is as follows Figure 4 As shown, blocks are used to divide a city according to the road network.

[0274] Table 1 Time accuracy constraint threshold ranking table

[0275]

[0276] After sorting the above results according to the normalized average value, it can be concluded that for this test data set, the clustering effect is best when the accuracy constraint threshold is set to 1h. Therefore, 1h is selected as the optimal time accuracy constraint threshold for this test data set.

[0277] Table 2 Spatial accuracy constraint threshold ranking table

[0278]

[0279]

[0280] After sorting the above results according to the normalized average value, it can be found that for this test data set, the clustering effect is best when the accuracy constraint threshold is set to 0.8 km, so 0.8 km is selected as the optimal spatial accuracy constraint threshold for this test data set. The other steps and parameters are the same as those of the specific implementation methods one to eight.

[0281] Specific implementation method 10: This implementation method is different from any one of specific implementation methods 1 to 9 in that: in step 5, the time accuracy constraint threshold dis with the optimal clustering effect obtained in step 4 is set to t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels;

[0282] Define latent classes based on the newly segmented temporal and spatial cluster labels;

[0283] A method for correcting potential associations in the same zone and the same block is proposed. The newly subdivided time and space cluster labels are corrected based on the potential categories to obtain the final travel time and space cluster label results. The specific process is as follows:

[0284] The clustering based on the precision constraint threshold may have certain defects. For example, if a person usually leaves at 8 a.m. and arrives at 9 a.m., but leaves at 7:30 a.m. and arrives at 8:30 a.m. one day, the threshold judgment may consider this trip as two different types of travel from his usual departure at 8 a.m. and arrival at 9 a.m., but in fact, these two trips are of the same type. For example, if a person often goes from station A to station B, but one day he gets off at the station before the journey from station A to station B, the clustering based on the precision constraint threshold may consider this trip and the previous trip as two different types of travel. Taking into account the shortcomings of clustering based on the precision constraint threshold for similar situations mentioned above, a method for correcting potential associations in the same zone and block is proposed. The specific steps are as follows:

[0285] The optimal time precision constraint threshold dis obtained in step 4 is t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels;

[0286] Based on the newly segmented time and space cluster labels, the categories with more than 3 time cluster similar identification data of one month's travel data are defined as time potential categories, and the categories with more than 2 space cluster similar identification data are defined as space potential categories.

[0287] The clustering results are given based on the newly segmented time and space clustering labels. If category 1 has 4 travel data, this category is a potential category. If category 2 has 2 travel data, this category is not a potential category.

[0288] Those that do not meet the temporal latent category are temporal non-latent categories;

[0289] Those that do not meet the spatial latent category are spatial non-latent categories;

[0290] Determine whether the travel data of the non-latent time category and the travel data of the latent time category have a same-time zone intersection;

[0291] If the travel data of the non-temporal latent category and the travel data of the temporal latent category do not have a same-time zone intersection, no correction is performed;

[0292] If the travel data of the non-latent category of time and the travel data of the latent category of time have the same time zone intersection, the following corrections are made;

[0293] Intersection of time zones: The starting and ending points of two travel data intersect in the same time zone. That is, the two travel data start from the same time zone and arrive at the same time zone. For example: Travel data 1: departure at 8 o'clock and arrival at 9 o'clock. The starting buffer zone time zone is 7:30 to 8:30, and the end buffer zone time zone is 8:30 to 9:30. Travel data 2: departure at 7:50 and arrival at 8:10. The starting buffer zone time zone is 7:20 to 8:20, and the end buffer zone time zone is 7:40 to 8:40. The two travel data intersect in both the starting buffer zone and the end buffer zone, so it is considered that the two travel data have intersection of time zones.

[0294] Potential correlation corrections for the same time zone:

[0295] If the travel data of the time non-latent category and the travel data of a time latent category have a time zone intersection, the time clustering label of the travel data of the time non-latent category is modified to the time clustering label of the corresponding time latent category;

[0296] If the travel data of the time non-latent category intersects with the travel data of two or more time potential categories at the same time zone, it is necessary to calculate the time distance sum of the travel data of the time non-latent category and all the travel data in each time potential category respectively, and then modify the time cluster label of the travel data of the time non-latent category to the time cluster label of the corresponding time potential category with the smallest time distance sum;

[0297] Determine whether the travel data of the spatial non-latent category and the travel data of the spatial latent category intersect in the same block;

[0298] If the travel data of the spatial non-latent category and the travel data of the spatial latent category do not intersect in the same block, no correction is performed;

[0299] If the travel data of the spatial non-latent category and the travel data of the spatial latent category intersect in the same block, the following corrections are made;

[0300] Intersection in the same block: The starting and ending points of two travel data intersect in the same block. That is, the two travel data start from the same block and arrive at the same block. For example: Travel data 1: Buffer block set (1, 2, 3) departure buffer block set (4, 5) arrival. Travel data 2: Buffer block set (2, 3, 4) departure buffer block set (4) arrival. The two travel data intersect at the starting buffer block 2 and 3, and at the ending buffer block 4, so it is considered that the two travel data have intersection in the same block.

[0301] Modifiers for potential associations with the same block:

[0302] If the travel data of the spatial non-latent category and the travel data of a spatial latent category have the same block intersection, the spatial clustering label of the travel data of the spatial non-latent category is modified to the spatial clustering label of the corresponding spatial latent category;

[0303] If the travel data of the spatial non-latent category intersects with the travel data of two or more spatial latent categories in the same block, it is necessary to calculate the sum of the spatial distances between the travel data of the spatial non-latent category and all the travel data in each spatial latent category respectively, and then modify the spatial clustering label of the travel data of the spatial non-latent category to the spatial clustering label of the corresponding spatial latent category with the smallest sum of spatial distances.

[0304] Get the final time and space clustering labels.

[0305] For example, the travel data of non-latent categories include: trip 1; all travel data in potential category 1 include: trips 2, 3, 4, and 5 in the travel category; all travel data in potential category 2 include: trips 6, 7, 8, and 9 in the travel category; then calculate the sum of the distances between the starting and ending points of trip 1 and trips 2, 3, 4, and 5 to get distance 1; calculate the sum of the distances between the starting and ending points of trip 1 and trips 6, 7, 8, and 9 to get distance 2; compare distance 1 and distance 2, if distance 2 is smaller, modify the cluster label of the travel data of non-latent categories to the cluster label of potential category 2;

[0306] Based on the above clustering algorithm principles and correction rules, the final time and space clustering labels are obtained, and a visual comparison chart is drawn for analysis. Figure 5 Each horizontal line in the graph is a trip data. The left endpoint is the trip departure time, the right endpoint is the trip end time, and the length of the bar represents the trip time. The color of the bar represents the cluster label, that is, the same color bar represents the same trip cluster label result. Figure 5 The more the same color is in similar travel intervals, the better the clustering effect is.

[0307] from Figure 5 It can be seen that after the potential correlation correction in the same time zone, some travel data in the frame line were corrected from being considered to be two time types of travel to being the same time type of travel, which is more in line with the actual travel situation.

[0308] Visualization of spatial clustering results Figure 5 The starting point of each line is the trip starting point, and the end point of each line is the trip end point. The line represents the starting and ending point of the trip. The line color represents the travel clustering label. The same color represents the same clustering label result.

[0309] from Figure 6 It can be seen from the figure that after the potential association correction in the same block, Figure 6These trips that were originally identified as different spatial types were corrected to the same spatial type. In reality, these trip data are just because the passengers got off one stop earlier or later than a fixed trip behavior, so they should be considered as the same spatial type of trip. From this point of view, the potential association correction method of the same block can be more realistic for clustering and has a better correction effect. The other steps and parameters are the same as those of the specific implementation methods one to nine.

[0310] Specific implementation eleven: This implementation is different from specific implementations one to ten in that: the method also includes step six, optimizing bus routes based on the travel time and spatial clustering label results finally obtained (for example, the travel time and spatial clustering label results indicate that there are a lot of passengers on bus route 9 during peak hours (8:00-10:00 in the morning and 17:00-19:00 in the evening), while there are very few passengers on bus route 3 which has the same starting and ending points as bus route 9, then appropriately increase the number of stops on bus route 9 on bus route 3 to alleviate the number of passengers on bus route 9 and better optimize the bus routes). Therefore, the present invention also provides a bus route optimization method based on bus travel information.

[0311] Based on the final travel time and spatial clustering label results, combined with the bus network layout and route planning, the current bus operation problems can be identified, providing a reference for bus network planning and route optimization.

[0312] The other steps and parameters are the same as those in Specific Implementation Examples 1 to 10.

[0313] The present invention may also have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for spatiotemporal clustering of public transport trips based on individuals, characterized by: The specific process of the method is: Step 1: Build a single-day travel chain; Step 2: Perform initial time and space clustering of travel data based on the constructed single-day travel chain to obtain initial time and space clustering labels; Step 3: Based on the initial time and space cluster labels obtained in step 2, the time distance mean constraint within the class is introduced in time, and the space distance mean constraint within the class is introduced in space. Based on the accuracy constraint, the initial time and space cluster labels obtained in step 2 are subdivided to obtain the subdivided time and space cluster labels; The accuracy constraint is that the mean time distance within the class is less than the set time accuracy constraint threshold dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ; Step 4: Use the external evaluation index and internal evaluation index in the clustering evaluation index to verify the clustering effect under different precision constraint thresholds, and obtain the time precision constraint threshold dis with the best clustering effect. t , spatial accuracy constraint threshold dis s ; Step 5: Set the optimal time precision constraint threshold dis for clustering obtained in step 4 t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels; Define latent classes based on the newly segmented temporal and spatial cluster labels; The newly segmented time and space cluster labels are modified based on the potential categories to obtain the final travel time and space cluster label results.

2. The method for spatiotemporal clustering of public transportation trips based on individuals according to claim 1, characterized in that: In step 1, a single-day travel chain is constructed; the specific process is as follows: A trip chain is the movement of passengers from one location to another with the help of transportation; There are two situations in which passengers move from one place to another using transportation: In the first case, passengers take one route to reach their final destination and obtain a single-day trip chain; The second situation: passengers cannot reach their final destination by taking one route, and the transfer process needs to be identified and merged to construct a single-day travel chain; Transfer process recognition must meet the following five conditions at the same time: (1) The dates are the same; (2) The time interval between the end point of the previous data and the start point of the next data is less than 30 minutes; (3) The spatial distance between the end point of the previous data and the starting point of the next data is less than 600 meters; (4) The starting point of the previous data cannot be the same as the end point of the next data, and the end point of the previous data cannot be the same as the starting point of the next data; (5) The bus routes cannot be the same; The identified transfer processes are merged to obtain a single-day travel chain.

3. The method for spatiotemporal clustering of public transport trips based on individuals according to claim 2, characterized in that: In the step 2, the initial time and space clustering of the travel data is performed according to the constructed single-day travel chain to obtain the initial time and space clustering labels; the specific process is: Step 21. Set different cluster numbers K, K = 2, ..., N; K is a positive integer; When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n; n is the travel data point X1, X2, ...X n The number of data in the collection; When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined; When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. Step 2: Substitute the time travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the time optimal cluster number K. bt ; Time optimal number of clusters K bt The corresponding cluster labels are used as the initial time cluster label results; Substitute the spatial travel similarity matrix W and cluster labels corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the spatial optimal cluster number K. bs ; The optimal number of spatial clusters K bs The corresponding cluster labels are used as the initial spatial cluster label results.

4. The method for spatiotemporal clustering of public transportation trips based on individuals according to claim 3 is characterized by: In the step 21, different cluster numbers K are set, K=2, ..., N; K is a positive integer; When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n; n is the travel data point X1, X2, ...X n The number of data in the collection; When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined; When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. The specific process is: Step 2: Given a set of travel data points X1, X2, ...X n Each travel data point includes the latitude and longitude of the starting point, the latitude and longitude of the end point, the boarding time and the getting off time. The similarity W between each two travel data points is defined ij ≥0; Step 2: Divide the travel data points into K categories according to the spatial similarity between the data points. The specific process is as follows: 1) The spatial similarity calculation formula is as follows: In the formula, d(O i ,O j ) is the distance between the starting points of two travel data; d(D i ,D j ) is the distance between the endpoints of two travel data; dist(T i ,T j ) is the order distance difference between the two travel data; Az(T i ,T j ) is the azimuth difference between the starting point and the end point of the two travel data; X i is the i-th travel data point, X j is the jth travel data point, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the set; i = 1, 2, ..., n, j = 1, 2, ..., n; The spatial definition scenario is: there is no spatial similarity between two travel data, that is, the spatial similarity is 0; Any of the following conditions is considered a space definition scenario: (1) Two travel data are on the same route and in opposite directions; (2) The departure point of the previous travel data is consistent with the arrival point of the next travel data; (3) The destination of the previous travel data is consistent with the departure place of the next travel data; (4) The number of stops in both trip data is less than 5 and the sum of the distances between the two starting points is greater than 4 kilometers or the sum of the distances between the two end points is greater than 4 kilometers; (5) The order distance difference between the two travel data is greater than 2 kilometers; (6) The azimuth difference between the starting point and the end point of the two travel data is greater than 90 degrees; The spatial similarity value is [0,1]; 2) The similarity relationship between travel data points is represented by a travel similarity graph G = (V, E); E is the edge of the travel similarity graph; The vertex set of the travel similarity graph V = {v1,v2,…v n }, each vertex v in the travel similarity graph i Represents a data point Xi; Assume that the travel similarity graph G is weighted, that is, two vertices v i and v j Each edge between has a non-negative weight W ij ≥0; The weighted adjacency matrix of the trip similarity graph is the trip similarity matrix W = (W ij ) i,j=1,2,…,n ; if W ij = 0, which means that vertex v i and v j There are no edge connections; Since the travel similarity graph G is undirected, we define W ij =W ji ; Vertex v i ∈V is defined as the trip similarity diagonal matrix D, where the elements of the trip similarity diagonal matrix D are 3) Based on the travel similarity matrix W, construct a non-regularized travel Laplace matrix L, where L = DW; 4) The non-regularized travel Laplace matrix L is an n-row k-column matrix. The characteristic variables corresponding to the k smallest eigenvalues ​​of L are calculated as f1, f2, ... f k ; 5) According to the characteristic variables f1, f2, ... f k Construct the matrix F∈R n×k ; 6) Treat each row of the matrix F as a travel data point, use the k-means algorithm to cluster F, divide the travel data points into K categories according to the spatial similarity between the data points, and obtain cluster labels with K cluster numbers; Step 2-3: Divide the travel data points into K categories according to the time similarity between the data points. The specific process is as follows: 1) The temporal similarity calculation formula is as follows In the formula, t(O i ,O j ) is the departure time difference between the two travel data; t(D i ,D j ) is the difference in arrival time of two travel data; The time definition scenario is: there is no time similarity between two travel data, that is, the time similarity is 0; Any of the following conditions is considered a time-defined scenario: (1) The departure time of the two travel data is greater than 2 hours; (2) The arrival time difference between the two travel data is greater than 2 hours; The time similarity value is [0,1]; 2) The similarity relationship between travel data points is represented by a travel similarity graph G = (V, E); E is the edge of the travel similarity graph; The vertex set of the travel similarity graph V = {v1,v2,…v n }, each vertex v in the travel similarity graph i Represents a data point Xi; Assume that the travel similarity graph G is weighted, that is, two vertices v i and v j Each edge between has a non-negative weight W ij ≥0; The weighted adjacency matrix of the trip similarity graph is the trip similarity matrix W = (W ij ) i,j=1,2,…,n ; if W ij = 0, which means that vertex v i and v j There are no edge connections; Since the travel similarity graph G is undirected, we define W ij =W ji ; Vertex v i ∈V is defined as the trip similarity diagonal matrix D, where the elements of the trip similarity diagonal matrix D are 3) Based on the travel similarity matrix W, construct a non-regularized travel Laplace matrix L, where L = DW; 4) The non-regularized travel Laplace matrix L is an n-row k-column matrix. The characteristic variables corresponding to the k smallest eigenvalues ​​of L are calculated as f1, f2, ... f k ; 5) According to the characteristic variables f1, f2, ... f k Construct the matrix F∈R n×k ; 6) Treat each row of the matrix F as a travel data point, use the k-means algorithm to cluster F, divide the travel data points into K categories according to the time similarity between the data points, and obtain cluster labels with K cluster numbers.

5. The method for spatiotemporal clustering of public transport trips based on individuals according to claim 4, characterized in that: In step 22, the time travel similarity matrix W and cluster labels corresponding to each cluster number K are substituted into the CH index calculation formula, and the CH index corresponding to each cluster number K is compared, and the cluster number corresponding to the maximum CH index is selected as the time optimal cluster number K. bt ; Time optimal number of clusters K bt The corresponding cluster labels are used as the initial time cluster label results; Substitute the spatial travel similarity matrix W and cluster labels corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the spatial optimal cluster number K. bs ; The optimal number of spatial clusters K bs The corresponding cluster labels are used as the initial spatial cluster label results; The specific process is: The calculation formula is Where S is the CH index; n is the travel data point X1, X2, ...X n The number of data in the set; K is the number of clusters; B K For each class center point and travel data point X1, X2, ...X n The sum of squared distances between the center points of the set, W K is the sum of the squares of the distances between each point in the class and the class center. The specific calculation formula is: In the formula, c q is the center point of class q, c e are travel data points X1, X2, …X n The center point of the set, n q is the number of data in class q, is the data set of class q, T is the transpose; The number of clusters corresponding to the maximum value of the CH index is selected as the optimal number of clusters.

6. The method for spatiotemporal clustering of public transportation trips based on individuals according to claim 5, characterized in that: In the step 3, based on the initial time and space cluster labels obtained in step 2, the time distance mean constraint within the class is introduced in time, and the space distance mean constraint within the class is introduced in space, and the initial time and space cluster labels obtained in step 2 are subdivided based on the accuracy constraint to obtain the subdivided time and space cluster labels; The accuracy constraint is that the mean time distance within the class is less than the set time accuracy constraint threshold dis t , the mean intra-class spatial distance is less than the set spatial accuracy constraint threshold dis s ; The specific process is: Step 31: Obtain the time clustering labels after segmentation; The specific process is: (1) Based on the initial time clustering labels obtained in step 2, calculate the mean time distance between the travel data points under each clustering label: to The specific calculation formula is where diso ij is the travel data point X i and travel data point X j The starting time distance between the two points, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection; (2) Filter out to >dis t The clustering categories generate a catalog of categories to be subdivided; dis t Indicates the set time accuracy constraint threshold; (3) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided time clustering label; (4) Based on the subdivided time cluster labels obtained in step (3), calculate the mean time distance between the travel data points under each cluster label: to ′, the specific calculation formula is (5) Filter out to ′>dis t The clustering categories generate a catalog of categories to be subdivided; (6) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the final time cluster label after subdivision considering the time distance of the starting point. If not, repeat (3), (4), and (5) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty to obtain the final time cluster label after subdivision considering the time distance of the starting point; (7) Based on the final subdivided time cluster labels considering the starting time distance in step (6), calculate the mean time distance between the travel data points under each cluster label dis td The specific calculation formula is where diso ij is the travel data point X i and travel data point X j The time distance between the destinations, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection; (8) Filter out the dis td >dis t The clustering categories generate a catalog of categories to be subdivided; (9) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided time clustering label; (10) Based on the subdivided time cluster labels obtained in step (9), calculate the mean time distance between the travel data points under each cluster label: td ′, the specific calculation formula is (11) Filter out the dis td ′>dis t The clustering categories generate a catalog of categories to be subdivided; (12) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the final time cluster label after subdivision considering the time distance of the end point. If not, repeat (9), (10), and (11) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty to obtain the final time cluster label after subdivision considering the time distance of the end point; Step 32: Obtain the spatial clustering labels after segmentation; the specific process is as follows: (13) Based on the initial spatial clustering labels obtained in step 2, calculate the mean spatial distance between the starting points of the travel data points under each clustering label: so The specific calculation formula is where diso ij is the travel data point X i and travel data point X j The spatial distance between the starting points, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection; (14) Filter out dis so >dis s The clustering categories generate a catalog of categories to be subdivided; dis s Indicates the set spatial accuracy constraint threshold; (15) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided space cluster label; (16) Based on the subdivided spatial cluster labels obtained in step (15), calculate the mean spatial distance dis between the starting points of the travel data points under each cluster label so ′, the specific calculation formula is (17) Filter out dis so ′>dis s The clustering categories generate a catalog of categories to be subdivided; (18) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the spatial cluster label after the final subdivision considering the starting point spatial distance. If not, repeat (15), (16), and (17) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty and obtains the spatial cluster label after the final subdivision considering the starting point spatial distance; (19) Based on the final subdivided spatial cluster labels considering the starting point spatial distance obtained in step (18), calculate the mean spatial distance between the destination points under each cluster label: sd The specific calculation formula is where diso ij is the travel data point X i and travel data point X j The spatial distance between the endpoints, i is the travel data point X i The serial number of j is the travel data point X j The sequence number of n is the travel data point X1, X2, …X n The number of data in the collection; (20) Filter out dis sd >dis s The clustering categories generate a catalog of categories to be subdivided; (21) Based on the generated catalog of categories to be subdivided, cluster and subdivide each category in the catalog of categories to be subdivided in turn to obtain a subdivided space cluster label; (22) Based on the subdivided spatial cluster labels of step (21), calculate the mean spatial distance dis between the destination points under each cluster label sd ′, the specific calculation formula is (23) Filter out dis sd ′>dis s The clustering categories generate a catalog of categories to be subdivided; (24) Determine whether the category directory to be subdivided is empty. If so, end the loop to obtain the spatial clustering label after the final subdivision considering the spatial distance of the endpoint. If not, repeat (21), (22), and (23) to continue to determine whether the newly obtained category directory to be subdivided is empty, until the category directory to be subdivided is empty and the spatial clustering label after the final subdivision considering the spatial distance of the endpoint is obtained.

7. The method for spatiotemporal clustering of public transportation trips based on individuals according to claim 6, characterized in that: In (3), based on the generated category catalog to be subdivided, each category in the category catalog to be subdivided is clustered and subdivided in turn to obtain a subdivided time clustering label; the process is: (31) Set different cluster numbers K, K = 2, ..., N; K is a positive integer; When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n; n is the travel data point X1, X2, ...X n The number of data in the collection; When the number of clusters K is 2, the travel data points are divided into two categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and the travel data points belonging to the nth category are determined; When the number of clusters K is N, the travel data points are divided into N categories according to the time similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and the travel data points belonging to the Nth category are determined; (32) Substitute the time travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the time optimal cluster number. Time-optimal number of clusters The corresponding cluster labels are used as the cluster label results after each category is subdivided.

8. The method for spatiotemporal clustering of public transport trips based on individuals according to claim 7, characterized in that: In (15), based on the generated category catalog to be subdivided, each category in the category catalog to be subdivided is clustered and subdivided in turn to obtain a subdivided space cluster label; the process is: (151) Set different cluster numbers K, K = 2, ..., N; K is a positive integer; When n≥N, the number of clusters K=2,3,…,N; when n<N, the number of clusters K=2,…,n; n is the travel data point X1, X2, ...X n The number of data in the collection; When the number of clusters K is 2, the travel data points are divided into two categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is 2 are obtained, that is, the travel data points belonging to the first category and the travel data points belonging to the second category are determined; When the number of clusters K is n, the travel data points are divided into n categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is n are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on until the travel data points belonging to the nth category are determined; When the number of clusters K is N, the travel data points are divided into N categories according to the spatial similarity between the data points, and the cluster labels when the number of clusters K is N are obtained, that is, the travel data points belonging to the first category, the travel data points belonging to the second category, and so on, are determined. (152) Substitute the spatial travel similarity matrix W and cluster label corresponding to each cluster number K into the CH index calculation formula, compare the CH index size corresponding to each cluster number K, and select the cluster number corresponding to the maximum CH index as the optimal spatial cluster number. Optimal number of spatial clusters The corresponding cluster labels are used as the cluster label results after each category is subdivided.

9. The method for spatiotemporal clustering of public transport trips based on individuals according to claim 8, characterized in that: In step 4, the external evaluation index and the internal evaluation index in the clustering evaluation index are used to verify the clustering effect under different precision constraint thresholds, and the time precision constraint threshold dis with the best clustering effect is obtained. t , spatial accuracy constraint threshold dis s ; The specific process is: Step 41: Select 8 time precision constraint thresholds, and bring the 8 time precision constraint thresholds into step 31 respectively to obtain 8 subdivided time cluster labels; The eight time accuracy constraint thresholds are 0.5h, 1h, 1.5h, 2h, 2.5h, 3h, 3.5h, and 4h respectively; Step 42: The subdivided time cluster labels and true categories corresponding to the 0.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 1h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 1.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 2h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 2.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 3h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 3.5h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided time cluster labels and true categories corresponding to the 4h time accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The initial time clustering labels and true categories without time precision constraint threshold obtained in step 2 are brought into the external evaluation index for calculation to obtain the external evaluation index result; Step 43 The subdivided time cluster labels and time travel data points corresponding to the 0.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 1h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 1.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 2h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 2.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 3h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 3.5h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided time cluster labels and time travel data points corresponding to the 4h time accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The initial time clustering labels and time travel data points without time precision constraint threshold obtained in step 2 are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index result; Step 44 The external evaluation index results and the internal evaluation index results are normalized and then averaged. The accuracy constraint threshold corresponding to the maximum value of the average value is taken as the time accuracy constraint threshold with the best clustering effect. There are seven external evaluation indicators, namely cluster purity, adjusted Rand coefficient, Foulkes-Malo index, mutual information score, standardized mutual information score, homogeneity and completeness; There are 2 internal evaluation indicators, namely Chapman-Halder index and silhouette coefficient; The true category determination process is: The trips in the same zone are considered as one type of trip by default and used as the real category; Step 4-5: Select 12 spatial accuracy constraint thresholds, and bring the 12 spatial accuracy constraint thresholds into step 3-2 respectively to obtain 12 subdivided spatial cluster labels; The 12 spatial accuracy constraint thresholds are 0.05km, 0.1km, 0.2km, 0.5km, 0.8km, 1km, 1.2km, 1.5km, 1.8km, 2km, 2.5km, and 3km respectively; Step 46 The subdivided spatial cluster labels and true categories corresponding to the 0.05km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 0.1km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 0.2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 0.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 0.8km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 1km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 1.2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 1.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 1.8km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 2km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 2.5km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The subdivided spatial cluster labels and true categories corresponding to the 3km spatial accuracy constraint threshold are brought into the external evaluation index for calculation to obtain the external evaluation index results; The initial spatial clustering labels and true categories without spatial precision constraint threshold obtained in step 2 are brought into the external evaluation index for calculation to obtain the external evaluation index result; Step 47 The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.05km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.1km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 0.8km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 1km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 1.8km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 2km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 2.5km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The subdivided spatial cluster labels and spatial travel data points corresponding to the 3km spatial accuracy constraint threshold are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; The initial spatial clustering labels and spatial travel data points without spatial precision constraint threshold obtained in step 2 are brought into the internal evaluation index calculation formula for calculation to obtain the internal evaluation index results; Step 48 The external evaluation index results and the internal evaluation index results are normalized and then averaged, and the spatial constraint threshold corresponding to the maximum value of the average value is taken as the optimal spatial accuracy constraint threshold; There are seven external evaluation indicators, namely cluster purity, adjusted Rand coefficient, Foulkes-Malo index, mutual information score, standardized mutual information score, homogeneity and completeness; There are 2 internal evaluation indicators, namely Chapman-Halder index and silhouette coefficient; The true category determination process is: Trips within the same block are considered as one type of trip by default and used as the actual category.

10. The method for spatiotemporal clustering of public transport trips based on individuals according to claim 9, characterized in that: In step 5, the optimal time precision constraint threshold dis of the clustering effect obtained in step 4 is set t , spatial accuracy constraint threshold dis s Substitute into step 3 to obtain the newly subdivided time and space cluster labels; Define latent classes based on the newly segmented temporal and spatial cluster labels; Based on the potential categories, the newly segmented time and space cluster labels are modified to obtain the final travel time and space cluster label results; The specific process is: Based on the newly segmented time and space cluster labels, the categories with more than 3 time cluster similar identification data of one month's travel data are defined as time potential categories, and the categories with more than 2 space cluster similar identification data are defined as space potential categories. Those that do not meet the temporal latent category are temporal non-latent categories; Those that do not meet the spatial latent category are spatial non-latent categories; Determine whether the travel data of the non-latent time category and the travel data of the latent time category have a same-time zone intersection; If the travel data of the non-temporal latent category and the travel data of the temporal latent category do not have a same-time zone intersection, no correction is performed; If the travel data of the non-latent category of time and the travel data of the latent category of time have the same time zone intersection, the following corrections are made; Potential correlation corrections for the same time zone: If the travel data of the time non-latent category and the travel data of a time latent category have a time zone intersection, the time clustering label of the travel data of the time non-latent category is modified to the time clustering label of the corresponding time latent category; If the travel data of the time non-latent category intersects with the travel data of two or more time potential categories at the same time zone, it is necessary to calculate the time distance sum of the travel data of the time non-latent category and all the travel data in each time potential category respectively, and then modify the time cluster label of the travel data of the time non-latent category to the time cluster label of the corresponding time potential category with the smallest time distance sum; Determine whether the travel data of the spatial non-latent category and the travel data of the spatial latent category intersect in the same block; If the travel data of the spatial non-latent category and the travel data of the spatial latent category do not intersect in the same block, no correction is performed; If the travel data of the spatial non-latent category and the travel data of the spatial latent category intersect in the same block, the following corrections are made; Modifiers for potential associations with the same block: If the travel data of the spatial non-latent category and the travel data of a spatial latent category have the same block intersection, the spatial clustering label of the travel data of the spatial non-latent category is modified to the spatial clustering label of the corresponding spatial latent category; If the travel data of the spatial non-latent category intersects with the travel data of two or more spatial latent categories in the same block, it is necessary to calculate the spatial distance sum of the travel data of the spatial non-latent category and all the travel data in each spatial latent category respectively, and then modify the spatial clustering label of the travel data of the spatial non-latent category to the spatial clustering label of the corresponding spatial latent category with the smallest spatial distance sum; Get the final time and space clustering labels.