Urban road track convergence mode detection method based on ID partition
Through the method of ID partitioning, the aggregation mode detection of urban road trajectory data is solved, and the problem of low detection efficiency in the prior art is realized, efficient processing and accurate detection of large-scale data are achieved.
Patent Information
- Application Number
- CN202410909095.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2025-01-03
AI Technical Summary
The existing group motion mode detection methods are difficult to efficiently detect urban road trajectory aggregation mode in urban spaces with road network constraints. Especially as the scale of trajectory data increases, the construction and update of tree structures have become bottlenecks in algorithm efficiency.
The urban road trajectory aggregation mode detection method based on ID partition is adopted. By performing position sampling, discrete processing on mobile objects, building VNIndex index structure, clustering and generating candidate aggregation mode, and combining SCI constraints and recursive search methods, the conformance is identified. Aggregation mode of constraints.
By dividing large-scale data into small partitions for independent detection, the overall detection speed is accelerated, the amount of data that needs to be processed is significantly reduced, the detection efficiency is improved, and the aggregation mode detection efficiency of urban road trajectory data is greatly improved.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer big data, and in particular relates to a method for detecting urban road trajectory convergence patterns based on ID partitioning. Background Art
[0002] With the rapid development of positioning devices and global satellite navigation systems, the spatiotemporal trajectory data in urban networks has exploded. The analysis and mining of spatiotemporal trajectory data is a representative work in the field of trajectory data mining. By mining spatiotemporal trajectory data, the behavioral characteristics of moving objects can be detected and used to discover group movement patterns and group movement trends. The group movement behavior revealed by it has broad application prospects in many fields such as urban planning and transportation.
[0003] ID partitioning is a commonly used data processing technology that partitions data according to established standards by identifying and analyzing the characteristics of existing data. This partitioning method allows subsequent data mining tasks to be performed separately in each partition, thereby improving mining efficiency.
[0004] In the field of spatiotemporal trajectory data analysis, group motion pattern detection is a key research direction. Existing group motion pattern detection work is mainly based on Euclidean (planar) distance, which is not applicable in urban spaces with road network constraints. Convergence pattern is an important category in group motion pattern detection, which is used to discover the convergence behavior of group motion objects, such as celebrations and gatherings. At present, the convergence behavior detection of mobile object trajectory data mainly uses a tree structure to organize trajectory data. By traversing these trajectory data to build and update the tree structure, the convergence behavior can be effectively detected. However, as the scale of trajectory data increases, the construction and update of the tree structure will become a bottleneck for the efficiency of the algorithm.
[0005] Therefore, there is an urgent need for an effective urban road trajectory convergence pattern detection method to achieve efficient detection of the convergence pattern of urban road trajectory data. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide an urban road trajectory convergence pattern detection method based on ID partitioning to solve the problem that the existing motion pattern detection method is difficult to apply in urban spaces with road network constraints.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is a method for detecting urban road trajectory convergence mode based on ID partitioning, comprising the following steps:
[0008] S1: Sampling the position of the moving object and collecting trajectory sample data;
[0009] S2: Obtain road network data and perform preprocessing;
[0010] S3: Discretize the trajectory sample data of S1 to generate a time snapshot;
[0011] S4: Use the road network data preprocessed by S2 and the distance threshold d to construct the VNIndex index structure of the road nodes;
[0012] S5: Map the mobile objects in the time snapshot in S3 to the road network data preprocessed in S2, and update the VNIndex index structure; cluster the mobile objects in the time snapshot and generate partitions;
[0013] S6: Generate candidate aggregation modes according to the partitions in S5, and identify aggregation modes that meet the constraint conditions.
[0014] Furthermore, each track sample data in S1 includes: a unique identifier of the moving object, position coordinates, and sampling time.
[0015] Further, the S2 includes:
[0016] S2.1: Obtain road network data using QGIS;
[0017] S2.2: In the road network data, filter the road edge data and road node data; wherein each road edge data includes: the unique identifier of the edge, the identifiers of the two road nodes constituting the edge, and the road length; each road node data includes: the unique identifier of the node, the longitude and latitude, and the set of edges connected to the node.
[0018] Further, the S3 includes:
[0019] S3.1: Sampling time interval and sampling start and end time in statistical trajectory sample data;
[0020] S3.2: Take the sampling time interval with the highest frequency in the sampling time interval of S3.1 as the time slice length, and divide the time slices based on the sampling start time; the moving objects in the same time slice constitute a snapshot, in which each moving object has only one position coordinate; continue to divide the next time slice according to the length of the time slice until the sampling end time is reached, and obtain all time slice snapshots, and the timestamps of the moving objects in each snapshot are the same.
[0021] Further, the S4 includes:
[0022] S4.1: Based on the data obtained by S2.2 preprocessing and the distance threshold d, the edge set connected to each road node is expanded to construct the road network index of each node, namely, VNIndex index; the road network index structure of each node includes: the safe edge set of this node, the unsafe edge set, and the distance from this node to each safe edge and each unsafe edge; the specific steps are described as follows:
[0023] For any node node1, the construction process of its safe edge set and unsafe edge set is as follows:
[0024] Safe edge set: For edge edge1 connected to node node1, if the length of edge1 is not greater than d, then edge1 is a safe edge of node1, and the distance from node node1 to edge1 is the length of edge1; for edge edge2 connected to another node node2 of edge1, if the length of edge2 plus the length of edge1 is not greater than d, then edge2 is also a safe edge of node1, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; continue the expansion process until the sum of the lengths of all the expanded edges exceeds d. During this process, all edges whose sum of edge lengths does not exceed d are safe edges, and these safe edges constitute the safe edge set of node node1; therefore, the distance from node node1 to a safe edge is the sum of the lengths of all safe edges from node node1 to this safe edge;
[0025] Non-safe edge set: For edge edge1 connected to node node1, if the length of edge1 is greater than d, then edge1 is a non-safe edge, and the distance from node node1 to edge1 is the length of edge1; if during the expansion process, the length of edge1 is not greater than d, for edge edge2 connected to another node node2 of edge1, after edge1 plus edge2, the sum of the edge lengths exceeds d, then edge2 is a non-safe edge, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; therefore, for edge edge3 connected to another node node3 of edge2, it is also a non-safe edge, and all subsequent edges whose sum of edge lengths after adding their lengths is greater than d are non-safe edges, and these non-safe edges constitute the non-safe edge set of node1, and the distance from node node1 to the non-safe edge is the sum of all edge lengths from node node1 to this non-safe edge;
[0026] At the same time, the following principles should be followed during the expansion process:
[0027] (1) The edge edge1 with nodes node1 and node2 as two nodes, whether extending from node1 to node2 or from node2 to node1, is the same edge edge1;
[0028] (2) For the non-safe edge edge1 obtained by expanding node node1, if edge1 is found to be a safe edge in other expansion processes, then edge1 is updated to a safe edge and the distance from node node1 to edge edge1 is updated. Edge edge1 is deleted from the non-safe edge set, and the distance from node node1 to the non-safe edge edge1 is deleted.
[0029] (3) For edge edge1 of node node1, the distance from node node1 to edge edge1 in different expansion processes is based on the minimum distance.
[0030] Further, the S5 includes:
[0031] S5.1: Based on the roadside data and road node data in S2.2 and the time slice snapshot in S3.2, for each mobile object in the snapshot, firstly use the point-to-straight line distance calculation formula to calculate the distance between the mobile object and all roadsides. The coordinates of the mobile object are obtained from the position coordinates of the mobile object in S1, and the coordinates of the roadside are obtained from the longitude and latitude coordinates of the road node in S2.2; then select the roadside with the smallest distance, map the mobile object to the edge closest to it, that is, add the unique identifier of the mobile object and the distance from the mobile object to the node of the nearest edge to the roadside data in S2.2;
[0032] S5.2: Update the VNIndex index of each node according to the result of S5.1, and calculate the neighbor set of each mobile object o, including:
[0033] S5.2.1: For the mapping result of S5.1, each edge contains the set of objects mapped to the edge and the distance from each object to the node on the edge; the VNIndex index of each road node is updated as follows: for each road node, all mobile objects on each safe edge are obtained, and for mobile objects on non-safe edges, only mobile objects whose distance from this road node is not greater than d are obtained;
[0034] S5.2.2: Filter the mobile objects adjacent to o to form the neighbor set of o; use the following method to filter:
[0035] For a mobile object o, in the object set of the corresponding road node,
[0036] For any moving object that is not on the edge, calculate the distance from this moving object to the road node plus the distance from o to the road node, that is, the distance between this moving object and o. If it is not greater than d, the object is adjacent to o, otherwise it is not adjacent.
[0037] For any mobile object on the edge, calculate the absolute value of the distance from the mobile object to the road node minus the distance from o to the road node. If it is not greater than d, the mobile object is adjacent to o, otherwise it is not adjacent;
[0038] The objects adjacent to o are grouped into the neighbor set of o;
[0039] S5.3: construct a proximity relationship graph based on the neighbor set of the mobile object o obtained in S5.2;
[0040] S5.4: Cluster the neighbor relationship graph constructed in S5.3 as the input of the SCAN algorithm to obtain clusters. Each cluster contains multiple mobile objects, which are expressed as: cluster c = {o i ,o j …}, where o i , o j Represents each mobile object in the group, i, j represents the unique identifier of the mobile object; and sorts the objects in the clusters obtained by clustering. The sorting standard is: sort from small to large according to the unique identifier of the mobile object, select the first object in the cluster as the ID partition standard for partitioning, and add this cluster to the corresponding partition, and perform this operation on all clusters in all snapshots in turn.
[0041] Further, the S6 includes:
[0042] S6.1: For each cluster c in the partition obtained in S5.4, query the cluster c′ that has a non-ID cluster inclusion relationship with c and meets the time interval I constraint, and complete c′ to the partition where cluster c is located;
[0043] The cluster inclusion relation CCR describes the convergence behavior of two mobile object groups. For two clusters c1 and c2, if all mobile objects in c1 exist in c2, it means that c2 contains c1, that is, there is a cluster inclusion relation between the two, which is recorded as Denoted as CCR(c1,c2); given clusters c1, c2 with ID o, and cluster c3 with ID o', if Then c2 and c1 are ID CCR, and c3 and c1 are Non-ID CCR;
[0044] For each cluster in the partition, the clusters that have Non-ID CCR with cluster c and meet the time interval I constraint are queried. The query formula is as follows:
[0045] Non-ID CCR-I(c,t c )={c′∈PC[o]|o=c[i](for i=2to|c|-μ+1),CCR(c,c′),t c′ ∈[tI,t c -1]}
[0046] Among them, Non-ID CCR-I(c,t c ) represents the set of clusters that have Non-ID CCR with c and meet the time interval I constraint, i.e., c′; t c Indicates the timestamp of c; during the query process, t is a variable representing time, and initially t is t c , t c′ It is represented as the timestamp of c′, tI is represented as the upper limit of the timestamp of c′, t c -1 indicates the lower limit of the timestamp of c′, [tI,t c -1] is expressed as the time constraint of c′. Every time c′ is queried, t is updated to t c′ ; PC[o] represents the cluster set in the partition with ID o, i.e., the non-ID partition of c, where o is a mobile object; c[i] represents the i-th mobile object in c; |c| represents the number of mobile objects in c, i.e., the size of cluster c; μ represents the size threshold of the cluster; CCR(c,c′) represents that there is a cluster inclusion relationship between c and c′;
[0047] S6.2: Filter the time series of all completed partitions obtained in S6.1 according to the SCI constraint, and only retain the clusters corresponding to the time series that meet the SCI constraint at the same time;
[0048] For a cluster list Cs = {c1,...,c n}, the corresponding time series T = [t1,…,t n ], SCI = [S, C, I] is used to represent the values of S, C, and I; the SCI constraint includes the following principles:
[0049] (1) Continuity principle: The length of T, i.e., the number of elements in T, is greater than or equal to the threshold S, i.e., |T| ≥ S;
[0050] (2) Continuity principle: The length of the continuous time series in T is greater than or equal to the threshold C, that is, there is a subsequence ts in T that satisfies ts[i+1]-ts[i]=1, and |ts|≥C, where 1≤i≤|ts|-1, i represents the sequence number of the element in the subsequence ts, ts[i+1] represents the i+1th element in ts, ts[i] represents the i-th element in ts, ts[i+1]-ts[i]=1 represents the difference between the timestamp represented by the i+1th element in ts and the timestamp represented by the i-th element; |ts| represents the number of timestamps in ts, that is, the length of the time series ts;
[0051] (3) Interval principle: The interval between adjacent timestamps in T is less than or equal to the threshold I, that is, T[i+1]-T[i]≤I, where 1≤i≤|T|-1, i represents the sequence number of the element in T, T[i+1] represents the i+1th element in T, T[i] represents the ith element in T, and |T| represents the length of the time series T;
[0052] S6.3: Generate a cluster inclusion relationship table for the partitions filtered in S6.2, recording the inclusion relationship between clusters in the cluster set that meet the time constraint, where the time constraint is: the timestamp is between [t+1, t+I];
[0053] S6.4: Using the cluster inclusion relationship table generated in S6.3, two search methods, forward recursion and backtracking recursion, are used to obtain all candidate aggregation modes in all partitions, and select the aggregation modes that meet the constraints; including:
[0054] S6.4.1: Initialize the mark cluster list markcs and cluster list C S , time series T, markpath, nextmarkpath; markcs is used to record the clusters visited in forward recursion and backtracking recursion. After the recursion is completed, markcs is updated according to markpath; cluster list C S Used to record clusters in candidate aggregation mode; time series T is used to record cluster list C S The timestamp corresponding to each cluster in represents the time series of the candidate convergence mode; the markpath is used to record the clusters visited during the forward recursion and backtracking recursion. After the recursion is completed, the elements in the markpath are merged into the mark cluster list markcs; the next markpath nextmarkpath is used to record the clusters that are newly added in the forward recursion and also exist in another cluster inclusion relationship and the clusters visited during the backtracking recursion. When the recursive search ends, the elements in the nextmarkpath are merged into the markpath markpath;
[0055] S6.4.2: Forward recursive search: For each partition, traverse the clusters in the cluster inclusion table, and add the clusters that have not been visited to C S and the marked path markpath, whose time series is added to T;
[0056] According to the cluster inclusion relationship table, get the first cluster that has a cluster inclusion relationship with the current cluster, and check whether this cluster has been visited; if not, add it to C S and markpath, whose timestamp is added to T;
[0057] If the newly added cluster does not exist in the inclusion relation of another cluster, the forward recursive search ends and the candidate aggregation mode MP = (C S ,T);
[0058] If the newly added cluster also exists in the other cluster inclusion relation, initialize the next mark path nextmarkpath, continue the forward recursive search, and add the first cluster in the other cluster inclusion relation to C S and nextmarkpath, whose timestamp is added to T, and the forward recursive search is continuously performed until the newly added cluster is not included in the other cluster, and the forward recursive search is terminated to obtain the candidate convergence mode MP = (C S ,T);
[0059] After the forward recursive search is finished, the elements in nextmarkpath are merged into the markpath to update the markpath;
[0060] S6.4.3: Check whether the candidate aggregation mode meets the principles of cluster size threshold M and SCI constraint, and output the mode that meets the conditions;
[0061] If the candidate convergence mode MP=(C S ,T) satisfies the following conditions at the same time:
[0062] (1) c i Represents C S The i-th cluster in c i+1 Represents C S The i+1th cluster in ; Represents the cluster list C S Each cluster c in i Its adjacent cluster c i+1 There is a containment relationship between them;
[0063] (2)|c n |≥M;|c n | means C S The number of moving objects in the nth cluster, i.e. cluster c nScale;
[0064] (3) T satisfies the SCI constraint;
[0065] Then the MP is in aggregation mode and outputs;
[0066] S6.4.4: Backtracking recursion: Each candidate convergence mode MP obtained according to S6.4.2 = (C S ,T), select the cluster list C of candidate aggregation mode S The last cluster c in n , trace back to the previous cluster c with which it has a cluster inclusion relationship n-1 , check with c n-1 Whether the cluster with the containment relationship has been visited, that is, check whether the cluster with c in markcs in S6.4.2 has been visited. n-1 Whether the cluster with inclusion relationship has been visited. If not, repeat S6.4.2-S6.4.3, search all remaining candidate aggregation modes in each partition, determine and output the aggregation mode in each partition that meets the cluster size threshold M and SCI constraints;
[0067] If we backtrack until we reach the candidate convergence pattern C S If there is no unvisited cluster in the first cluster c1, the backtracking recursive search ends; the clusters visited by this process are added to the next mark path nextmarkpath, and markpath is updated according to nextmarkpath, the elements in markpath are merged into markcs, and markcs is updated.
[0068] The beneficial effects of the present invention are
[0069] 1. The present invention processes in units of ID partitions during the detection in the aggregation mode. By dividing large-scale data into multiple smaller partitions, detection can be performed independently in each partition, thereby speeding up the overall detection speed.
[0070] 2. The present invention introduces the SCI filtering operation to pre-process each partition and filter out the partitions that do not meet the constraint conditions in advance, which can significantly reduce the amount of data to be processed and improve the detection efficiency.
[0071] 3. The present invention combines ID partitioning technology, VNIndex index structure, cluster inclusion relationship, SCI constraint, forward recursion, and backtracking recursive search method to greatly improve the detection efficiency of the convergence mode of urban road trajectory data. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0073] Figure 1 It is a flow chart of the present invention.
[0074] Figure 2 It is a schematic diagram of constructing the VNIndex index structure of road node F.
[0075] Figure 3 This is a schematic diagram of the VNIndex index structure of road node F.
[0076] Figure 4 This is an example diagram of ID partitioning.
[0077] Figure 5 is a flowchart for generating candidate convergence patterns.
[0078] Figure 6 This is a schematic diagram of performing non-ID cluster inclusion relationship query on clusters.
[0079] Figure 7 This is a schematic diagram of convergence mode detection using the backtracking method.
[0080] Figure 8 This is a comparison chart of the efficiency of the method of the present invention and the Baseline. DETAILED DESCRIPTION
[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0082] See also Figure 1 The complete steps of the method of the present invention are as follows:
[0083] S1: In the urban detection area, the positioning device carried by the mobile object is sampled and trajectory sample data is collected. Each trajectory sample data includes: the unique identification of the mobile object, the location coordinates, and the sampling time.
[0084] S2: Download the road network data of the corresponding city from the OSMnx library in Python and perform preprocessing. The specific steps are as follows:
[0085] S2.1: Open the road network data using QGIS.
[0086] S2.2: Filter road edge data and road node data in QGIS. Each road edge data includes the following information: the unique identifier of the edge, the identifiers of the two road nodes that constitute the edge, and the road length; each road node data includes the following information: the unique identifier of the node, longitude and latitude, and the set of edges connected to the node.
[0087] S3: Discretize the trajectory sample data collected in step S1 according to the time information to generate multiple time snapshots. The specific steps are as follows:
[0088] S3.1: Count the sampling time intervals and the sampling start and end times in the trajectory sample data.
[0089] S3.2: Use the sampling time interval with the highest frequency in the sampling time intervals in S3.1 as the time slice length, and divide the time slices based on the sampling start time. The moving objects in the same time slice constitute a snapshot, and the moving objects in the snapshot are unique, that is, in this snapshot, a moving object has only one location information; then continue to divide the next time slice according to the length of the time slice until the end time is reached. Finally, a series of time slice snapshots are obtained, and the timestamp information of the moving objects in each snapshot is the same.
[0090] S4: Use the road network data obtained in S2 and the set distance threshold d to construct the road network index structure VNIndex.
[0091] S4.1: Based on the data obtained in S2.2 and the distance threshold d, which is determined by the user according to the needs, the edge set connected to each road node is expanded to build the road network index structure of each node, namely, the VNIndex index; the road network index structure of each node includes: the safe edge set and the unsafe edge set of this road node, and the distance from the node to each safe edge and each unsafe edge. The specific steps are described as follows:
[0092] For any node node1, the construction process of its safe edge set and unsafe edge set is as follows:
[0093] Safe edge set: For edge edge1 connected to node node1, if the length of edge1 is not greater than d, then edge1 is a safe edge of node1, and the distance from node node1 to edge1 is the length of edge1; further, for edge edge2 connected to another node node2 of edge1, if the length of edge2 plus the length of edge1 is not greater than d, then edge2 is also a safe edge of node1, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; continue the expansion process until the sum of the lengths of all the expanded edges exceeds d. In this process, all edges whose sum of edge lengths does not exceed d are safe edges, and these safe edges constitute the safe edge set of node node1. Therefore, the distance from node node1 to a safe edge is the sum of the lengths of all safe edges in the process from node node1 to this safe edge.
[0094] Non-safe edge set: For edge edge1 connected to node node1, if the length of edge1 is greater than d, then edge1 is a non-safe edge, and the distance from node node1 to edge1 is the length of edge1; if during the expansion process, the length of edge1 is not greater than d, for edge edge2 connected to another node node2 of edge1, after edge1 plus edge2, the sum of the edge lengths exceeds d, then edge2 is a non-safe edge, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; therefore, for edge edge3 connected to another node node3 of edge2, it is also a non-safe edge, and so on. All subsequent edges whose sum of edge lengths after adding their lengths is greater than d are non-safe edges. These non-safe edges constitute the non-safe edge set of node1, and the distance from node node1 to the non-safe edge is the sum of all edge lengths from node node1 to this non-safe edge.
[0095] In addition, the following principles should be followed during the expansion process:
[0096] (1) The edge edge1 with nodes node1 and node2 as two nodes, whether extending from node1 to node2 or from node2 to node1, is the same edge edge1;
[0097] (2) For the non-safe edge edge1 obtained by expanding node node1, if edge1 is found to be a safe edge in the new expansion, then edge1 is updated to a safe edge and the distance from node node1 to edge edge1 is updated, and its information in the non-safe edge set is deleted;
[0098] (3) For edge edge1 of node node1, the distance from node node1 to edge edge1 in different expansion processes is based on the minimum distance.
[0099] The following example illustrates the construction process of safe edge sets and unsafe edge sets and the principles they follow:
[0100] Figure 2 A schematic diagram of constructing a VNIndex index structure for road node F when the distance threshold d = 200m is given. Figure 3 This is a schematic diagram of the VNIndex index structure of F. For the edge set connected to node F = {FG, FI, FC, FE}, first expand the edges in the set one by one. First, FG, whose length is greater than d, so this edge is a non-safe edge of F, end the expansion, and record the distance from F to FG. The length of FI is less than d, so FI is a safe edge. Then expand the edge set connected to node I = {IJ, IE}, where the sum of the lengths of FI and IJ is still less than d, so IJ is a safe edge. Continue to expand the edge set connected to J = {JK, JN}, where the sum of the lengths of FI, IJ and JK (JN) is greater than d, and both are non-safe edges. End the expansion, and record the distances from F to JK and JN respectively. The expansion process of IE and FC is the same as above.
[0101] For FI, when FI is expanded, the sum of the lengths of FI, IE and EF is greater than d, so EF is identified as an unsafe edge, but the distance from F to FE is less than d, so FE is updated to be a safe edge of F, and its information in the unsafe edge set is deleted.
[0102] The set of edges connected by E = {EB, EI}, where the sum of the lengths of FE and EB is greater than d, but less than the sum of the lengths of FI, IE and EB, so the distance from F to EB is updated according to the distance extended from FE to EB.
[0103] The sum of the lengths of FE and EI is greater than d, but greater than the sum of the lengths of FI and IE, so IE is still a safe edge and the distance from F to EI is not updated.
[0104] S5: Map the snapshots generated in S3 to the road network obtained in S2 in turn, and update the VNIndex index structure in S4. Then cluster the mobile objects in each snapshot and obtain each partition by combining the ID partitioning technology. The specific steps are described as follows:
[0105] S5.1: Based on the data in S2.2 and S3.2, for each mobile object in the snapshot, first calculate its distance from all road edges. This calculation uses the distance calculation formula from a point to a straight line. The coordinates of the mobile object are obtained from the position coordinates of the mobile object in S1, and the coordinates of the road edge are obtained from the longitude and latitude coordinates of the node in S2.2. Select the road edge with the smallest distance, and map the mobile object to the edge closest to it, that is, add the unique identifier of the mobile object and the distance from the mobile object to the node of the nearest edge to the road edge data in S2.2. Since the road edge is a straight line, the distance from the mobile object to the node of the nearest edge can be calculated using the Pythagorean theorem; this step ensures that each mobile object is accurately mapped to the road edge closest to it.
[0106] S5.2: Update the VNIndex index structure of each node according to the result of S5.1. Next, calculate the neighbor set of each mobile object o. The specific steps are:
[0107] S5.2.1: For the mapping result of S5.1, each edge contains the set of objects mapped to the edge and the distance from each object to the node on the edge. The VNIndex index structure of each node is updated as follows: for each node, all objects on each safe edge are obtained, and for objects on non-safe edges, only those with a distance from the node not greater than d are obtained.
[0108] S5.2.2: Calculate the neighbor set of o based on the road edge to which o is mapped. During the calculation process, the following method is used for screening:
[0109] For a mobile object o, it is in the object set of its corresponding node.
[0110] For any object that is not on the edge, calculate the distance from this object to the node plus the distance from o to the node, that is, get the distance between this object and o in the object set of the node. If it is not greater than d, the object is adjacent to o, otherwise it is not adjacent.
[0111] For any object on the edge, calculate the absolute value of the distance from this object to the node minus the distance from o to the node. If it is not greater than d, the object is adjacent to o, otherwise it is not adjacent.
[0112] These objects adjacent to o constitute o's neighbor set.
[0113] S5.3: Construct a neighbor relationship graph based on the neighbor set of the mobile object o calculated in S5.2. Specifically, the vertices of the graph represent objects with neighbor relationships, and the edges represent the neighbor relationships between objects.
[0114] S5.4: Cluster the neighbor relationship graph constructed in S5.3 as the input of the SCAN algorithm to obtain clusters, each of which contains multiple mobile objects, that is, cluster c = {o i ,o j …}, where o i , o j Represents each mobile object in the group, i, j represents the unique identifier of the mobile object. And sort the objects in the clusters obtained by clustering. The sorting standard is: sort from small to large according to the unique identifier of the mobile object, then select the first object in the cluster as the standard for ID partitioning, and add the cluster to the corresponding partition. Figure 4 Take the cluster in as an example and perform ID partitioning. In snapshot S1, clusters c5 and c7 are the clustering results of snapshot s1. After sorting the objects in c5, use the mobile object o2 as the partitioning standard and add it to the partition P[o2], that is, all objects in c5 are classified into the partition P[o2] named after o2. After sorting the objects in c7, use the mobile object o4 as the partitioning standard and add it to the partition P[o4], and perform this operation on the clusters in all snapshots in turn.
[0115] S6: Generate candidate aggregation patterns for the partitions obtained in S5.4, and identify aggregation patterns that meet the constraints. Figure 4-Figure 5 The specific steps are as follows:
[0116] S6.1: For each cluster c in the partition obtained in S5.4, search for a cluster c′ that has a non-ID cluster inclusion relationship with c and meets the time interval I constraint, and complete c′ into the partition where cluster c is located.
[0117] First, the cluster containment relation (CCR) is used to describe the convergence behavior of two mobile object groups. Given two clusters c1 and c2, if all mobile objects in c1 exist in c2, it means that c2 contains c1, that is, there is a cluster containment relation between the two, which is denoted as Expressed as CCR(c1,c2).
[0118] In order to detect the convergence mode in combination with the ID partitioning technology, the present invention further refines the cluster containment relationship into the ID cluster containment relationship (ID CCR) and the non-ID cluster containment relationship (Non-ID CCR). Given clusters c1 and c2 with ID o, and cluster c3 with ID o', if Then c2 and c1 are ID CCR, and c3 and c1 are Non-ID CCR.
[0119] In order to represent the clusters that have Non-ID CCR with cluster c and meet the time interval I constraint, the formula is given:
[0120] Non-ID CCR-I(c,t c )={c′∈PC[o]|o=c[i](for i=2to|c|-μ+1),CCR(c,c′),t c′ ∈[tI,t c -1]}
[0121] Among them, Non-ID CCR-I(c,t c ) represents the set of clusters that have Non-ID CCR with c and meet the time interval I constraint, i.e., c′; t c Indicates the timestamp of c; during the query process, t is a variable representing time, and initially t is t c , t c′ It is represented as the timestamp of c′, tI is represented as the upper limit of the timestamp of c′, t c -1 indicates the lower limit of the timestamp of c′, so [tI,t c -1] is expressed as the time constraint of c′. Every time c′ is queried, t is updated to t c′ ; PC[o] represents the cluster set in the partition with ID o, that is, the non-ID partition of c, where o is a mobile object; c[i] represents the i-th mobile object in c; |c| represents the number of mobile objects in c, that is, the size of cluster c; μ represents the cluster size threshold; CCR(c,c′) indicates that there is a cluster inclusion relationship between c and c′.
[0122] This formula recursively updates t to the timestamp t of c′ each time it is queried. c′ , check whether c′ is in the non-ID partition of c and has a cluster inclusion relationship with c, that is, Non-ID CCR, and c′ needs to meet the scale threshold μ. This formula can screen out all eligible cluster sets.
[0123] The following example illustrates this step:
[0124] Assuming I = 2, μ = 2, for cluster c3 with timestamp t = 5, the query time of c′ is initially [3,4]. c′ ∈[3,4], where c6 and c3 have Non-ID CCR. Since the timestamp of c6 is t c′ =3, so the query time of c′ is updated to [1,4]. Next, at t c′∈[1,4], where c5 and c3 have Non-ID CCR. According to the above method, query in the non-ID partitions P[o3], P[o4], P[o5], P[o6], and P[o7] of c3 in turn, so as to obtain the Non-ID CCR-I of c3, that is, Non-ID CCR-I(c3,5)={c6,c5,c8,c7,c9}, and add the result to P[o1]. Figure 6 The process of finding the Non-ID CCR-I of c3 is shown. Similarly, the same operation is performed on c1, c2, and c4, and finally Figure 5 Similarly, for the remaining c5-c 13 Perform the same operation and complete the found cluster to c5-c 13 In the partition where it is located.
[0125] S6.2: Perform SCI constraint filtering on all completed partitioned time series obtained in S6.1, and only retain clusters corresponding to time series that meet the SCI constraints.
[0126] SCI constraints restrict the convergence behavior in terms of time. n}, the corresponding time series T = [t1,…,t n ], SCI constraints include the following principles:
[0127] (1) Continuity principle: The length of T, that is, the number of elements in T, is greater than or equal to the threshold S, that is, |T| ≥ S, to ensure that the convergence behavior continues to occur within a certain time range; this excludes short-term, accidental convergence events and focuses on longer-term, stable convergence behavior.
[0128] (2) Continuity principle: The length of the continuous time series in T is greater than or equal to the threshold C, that is, there is a subsequence ts in T that satisfies ts[i+1]-ts[i]=1, and |ts|≥C, where 1≤i≤|ts|-1, i represents the sequence number of the element in the subsequence ts, ts[i+1] represents the i+1th element in ts, ts[i] represents the i-th element in ts, and ts[i+1]-ts[i]=1 represents the difference between the timestamp represented by the i+1th element in ts and the timestamp represented by the i-th element. |ts| represents the number of timestamps in ts, that is, the length of the time series ts. This ensures that the convergence behavior is temporally coherent without large time gaps, thereby enhancing the continuity and stability of the convergence pattern.
[0129] (3) Interval principle: The interval between adjacent timestamps in T is less than or equal to the threshold I, that is, T[i+1]-T[i]≤I, where 1≤i≤|T|-1, i represents the sequence number of the element in T, T[i+1] represents the i+1th element in T, T[i] represents the ith element in T, and |T| represents the length of the time series T. This principle stipulates that the maximum allowed interval between any adjacent timestamps in the time series T is I. This prevents the time series T from being too dispersed and maintains the temporal compactness of the convergence behavior.
[0130] The above three principles limit the discrete degree of convergence behavior in time. SCI = [S, C, I] is used to represent the values of S, C, and I. The three values of S, C, and I are determined according to needs.
[0131] For example, when SCI = [4, 3, 2], Figure 5 The time series of the partition P[o1] after completion is T = {1, 2, 3, 4, 5, 8}, and after filtering according to the SCI constraint, it is T = {1, 2, 3, 4, 5}, and the clusters of time series that meet the conditions after filtering are retained.
[0132] S6.3: Generate a cluster inclusion relationship table for the partitions filtered in S6.2, and record the inclusion relationship between clusters in the cluster set that meet the time constraint. The time constraint is: the timestamp is between [t+1, t+I], with Figure 5 For example, when I=2, for cluster c5 with timestamp t=1, in the snapshot at time [2,3], c1 and c6 contain c5. For c7, in the snapshot at time [2,3], c8 contains c7.
[0133] S6.4: Using the cluster inclusion relationship table generated in S6.3, use forward recursion and backtracking recursion to obtain all possible candidate aggregation modes in all partitions, and select the aggregation modes that meet the constraints. Figure 5 and Figure 7 The specific steps are as follows:
[0134] S6.4.1: Initialize the mark cluster list markcs and cluster list C S , time series T, markpath, nextmarkpath; markcs is used to record the clusters visited in forward recursion and backtracking recursion. After the recursion is completed, markcs is updated according to markpath; cluster list C S Used to record clusters in candidate aggregation mode; time series T is used for cluster list C SThe timestamp corresponding to each cluster in is the time series of the candidate aggregation pattern; the markpath is used to record the clusters visited during the forward recursion and backtracking recursion, and merge the elements in it into the mark cluster list markcs after the recursion ends; the next markpath nextmarkpath is used to record the clusters visited when the newly added cluster in the forward recursion also exists in another cluster inclusion relationship and the backtracking recursion, and merge the elements in nextmarkpath into the markpath when the recursive search ends.
[0135] S6.4.2: Forward recursive search: For each partition, traverse the clusters in the cluster inclusion table, and add the clusters that have not been visited to C S And the marked path markpath, its time series is added to T. Figure 5 According to the cluster inclusion relationship table in the figure, first access c5 and add c5 to C S and markpath, whose timestamp 1 is added to T, i.e. C S ={c5}, markpath={c5}, T={1}, Figure 7 The process is given.
[0136] According to the cluster inclusion relationship table, get the first cluster that has a cluster inclusion relationship with the current cluster and check whether this cluster has been visited. If it has not been visited, add it to C S and markpath, whose timestamp is added to T. Figure 5 For c5 in the cluster inclusion relationship table, the cluster with which it has a CCR is {c1, c6}. First, get c1. If c1 has not been visited, add it to S and markpath, whose timestamp 2 is added to T, i.e. C S ={c5,c1}, markpath={c5,c1}, T={1,2}, Figure 7 The process is given.
[0137] If the newly added cluster does not exist in the inclusion relation of another cluster, the forward recursive search ends and the candidate aggregation mode MP = (C S ,T).
[0138] If the newly added cluster also exists in another cluster inclusion relation, then initialize the next mark path nextmarkpath, continue forward recursive search, and add the first cluster in another cluster inclusion relation to C Sand nextmarkpath, whose timestamp is added to T, and forward recursive search is continuously performed until the newly added cluster is not included in another cluster. The forward recursive search ends and the elements in nextmarkpath are merged into the markpath to update the markpath. The candidate convergence pattern MP is obtained. S ,T).
[0139] like Figure 5 , c1 is in another cluster inclusion relation, then initialize nextmarkpath, and recursively search to add c2 in another cluster inclusion relation to C S and nextmarkpath, whose timestamp 4 is added to T. c2 is in another cluster inclusion relationship, nextmarkpath is initialized, and recursive search is performed to add c3 that has a cluster inclusion relationship with c2 to C S and nextmarkpath, whose timestamp 5 is added to T. That is, C S ={c5,c1,c2,c3}, nextmarkpath={c2,c3}, T={1,2,4,5}.
[0140] S6.4.3: Check whether the current candidate aggregation mode meets the cluster size threshold M and SCI constraints, and output the mode that meets the conditions.
[0141] If the candidate convergence mode MP=(C S ,T) satisfies the following conditions:
[0142] (1) c i Represents C S The i-th cluster in c i+1 Represents C S The i+1th cluster in ; Represents the cluster list C S Each cluster c in i Its adjacent cluster c i+1 There is a containment relationship between them, which indicates that the convergence behavior is continuous in space.
[0143] (2)|c n |≥M;|c n | means C S The number of moving objects in the nth cluster, i.e. cluster c n scale.
[0144] (3) T satisfies the SCI constraints, namely, the continuity principle, the continuity principle, and the interval principle, which ensures the continuity, continuity, and closeness of the convergence behavior in time.
[0145] The MP is in aggregation mode and outputs data.
[0146] like Figure 5 , the current candidate convergence mode MP = (C S ,T), where C S ={c5,c1,c2,c3}, T ={1,2,4,5}. At this time, c3 is not in the other cluster inclusion relation table, and the current candidate aggregation mode MP = (C S ,T) is checked. If the MP meets the above three conditions at the same time, the MP is in aggregation mode and outputs.
[0147] S6.4.4: Backtracking recursion: Each candidate convergence mode MP obtained according to S6.4.2 = (C S ,T), select the cluster list C of candidate aggregation mode S The last cluster c in n , trace back to the previous cluster c with which it has a cluster inclusion relationship n-1 , check with c n-1 Whether the cluster with the containment relationship has been visited, that is, check the cluster with c in the nextmarkpath of S6.4.2 n-1 Check whether the cluster with inclusion relationship has been visited. If not, repeat S6.4.2-S6.4.3, search all remaining candidate aggregation modes in each partition, and judge and output the aggregation mode in each partition that meets the cluster size threshold M and SCI constraints.
[0148] If we backtrack until we reach the candidate cluster list C S If there is no unvisited cluster in the first cluster c1, the backtracking recursive search ends; the clusters visited in this process are added to the next mark path nextmarkpath, and markpath is updated according to nextmarkpath, the elements in markpath are merged into markcs, and markcs is updated.
[0149] like Figure 5 , Figure 7 , for c2, c3 with which it has a CCR has been visited, so this level of search ends, and the updated next mark path is nextmarkpath={c2,c3}. For c1, c2 with which it has a CCR has been visited, so this level of search ends, and the updated next mark path is nextmarkpath={c1,c2,c3}. For c5, c1 with which it has a CCR has been visited, but c6 has not been visited, so the mark path markpath={c5,c1,c2,c3} is updated, and then c6 is visited. c6 is not in the markpath, so the recursive search continues.
[0150] like Figure 5According to the recursive search method in S6.4.3, another candidate convergence mode is obtained as C S ={c5,c6,c2,c3}, nextmarkpath={c2,c3}, T={1,3,4,5}. Determine whether the candidate convergence mode is a qualified convergence mode. If not, repeat the method in S6.4.5 to backtrack. For c2, c3 with which it has a CCR has been visited, so this level of search ends. The updated next mark path is nextmarkpath={c2,c3}. Backtrack to C={c5,c6}, T={1,3}. At this time, nextmarkpath={c2,c3}. For c6, c2 with which it has a CCR has been visited, but c3 has not been visited. Therefore, the next mark path nextmarkpath={c6,c2,c3} is updated, and then c3 is visited. Since c3 is in the nextmarkpath, the recursive search ends. Figure 7 The process is given.
[0151] In order to verify the efficiency of the ID partition-based convergence pattern detection method IDP-MPM proposed in the present invention, we designed an experiment. By adjusting the values of the scale threshold M, persistence constraint threshold S, continuity constraint threshold C, and interval constraint threshold I of the method of the present invention, we compared it with the traditional tree-based convergence pattern detection method (Baseline). The efficiency comparison was carried out on three different data sets. These three data sets include two real data sets (Beijing taxi data set, Shanghai taxi data set) and one simulated data set (San Joaquin simulated trajectory data set). The experimental results are shown in the figure. Figure 8 As shown, the results show that with the change of threshold, the efficiency of the method proposed in the present invention is better than the traditional tree-based detection method in the three data sets.
[0152] The invention points of the present invention:
[0153] At present, the convergence behavior detection of mobile object trajectory data is mainly carried out using a tree structure, which is constructed and updated by traversing the data. However, as the scale of trajectory data increases, the construction and update of the tree structure will become a bottleneck of the algorithm efficiency. The inventive points of the present invention are as follows:
[0154] 1. Based on the ID partitioning technology, this paper designs an efficient convergence pattern detection algorithm IDP-MPM for urban road trajectory data, aiming to efficiently analyze the convergence behavior of mobile objects in urban space. First, in the clustering stage, the mobile objects in each snapshot are clustered and the ID partitioning technology is combined to generate partitions. Then, in the pattern detection stage, each partition is detected to find the convergence pattern that meets the constraint conditions.
[0155] 2. In the clustering stage, the present invention uses the VNIndex index structure to implement neighbor set query for all objects in each snapshot, and uses the SCAN clustering method to perform clustering.
[0156] 3. In the pattern detection phase, the cluster inclusion relationship is refined, and clusters that have non-ID cluster inclusion relationships with clusters in the partition and meet the time interval I constraint are completed into the partition.
[0157] 4. Filter each partition through SCI constraints, filter out the partitions that do not meet the time constraints in advance, and then generate a cluster inclusion relationship table based on the filtered data, and combine forward recursion and backtracking recursive search methods to find the aggregation pattern that meets the constraints.
[0158] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for detecting urban road trajectory convergence patterns based on ID partitioning, characterized in that: The following steps are involved: S1: Sampling the position of the moving object and collecting trajectory sample data; S2: Obtain road network data and perform preprocessing; S3: Discretize the trajectory sample data of S1 to generate a time snapshot; S4: Use the road network data preprocessed by S2 and the distance threshold d to construct the VNIndex index structure of the road nodes; S5: Map the mobile objects in the time snapshot in S3 to the road network data preprocessed in S2, and update the VNIndex index structure; cluster the mobile objects in the time snapshot and generate partitions; S6: Generate candidate aggregation modes according to the partitions in S5, and identify aggregation modes that meet the constraint conditions.
2. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 1 is characterized in that: Each track sample data in S1 includes: a unique identifier of the moving object, position coordinates, and sampling time.
3. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 1 is characterized in that: The S2 includes: S2.1: Obtain road network data using QGIS; S2.2: In the road network data, filter the road edge data and road node data; wherein each road edge data includes: the unique identifier of the edge, the identifiers of the two road nodes constituting the edge, and the road length; each road node data includes: the unique identifier of the node, the longitude and latitude, and the set of edges connected to the node.
4. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 1 is characterized in that: The S3 includes: S3.1: Sampling time interval and sampling start and end time in statistical trajectory sample data; S3.2: Take the sampling time interval with the highest frequency in the sampling time interval of S3.1 as the time slice length, and divide the time slices based on the sampling start time; the moving objects in the same time slice constitute a snapshot, in which each moving object has only one position coordinate; continue to divide the next time slice according to the length of the time slice until the sampling end time is reached, and obtain all time slice snapshots, and the timestamps of the moving objects in each snapshot are the same.
5. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 3 is characterized in that: The S4 includes: S4.1: Based on the data obtained by S2.2 preprocessing and the distance threshold d, the edge set connected to each road node is expanded to construct the road network index of each node, namely, VNIndex index; the road network index structure of each node includes: the safe edge set of this node, the unsafe edge set, and the distance from this node to each safe edge and each unsafe edge; the specific steps are described as follows: For any node node1, the construction process of its safe edge set and unsafe edge set is as follows: Safe edge set: For edge edge1 connected to node node1, if the length of edge1 is not greater than d, then edge1 is a safe edge of node1, and the distance from node node1 to edge1 is the length of edge1; for edge edge2 connected to another node node2 of edge1, if the length of edge2 plus the length of edge1 is not greater than d, then edge2 is also a safe edge of node1, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; continue the expansion process until the sum of the lengths of all the expanded edges exceeds d. During this process, all edges whose sum of edge lengths does not exceed d are safe edges, and these safe edges constitute the safe edge set of node node1; therefore, the distance from node node1 to a safe edge is the sum of the lengths of all safe edges from node node1 to this safe edge; Non-safe edge set: For edge edge1 connected to node node1, if the length of edge1 is greater than d, then edge1 is a non-safe edge, and the distance from node node1 to edge1 is the length of edge1; if during the expansion process, the length of edge1 is not greater than d, for edge edge2 connected to another node node2 of edge1, after edge1 plus edge2, the sum of the edge lengths exceeds d, then edge2 is a non-safe edge, and the distance from node node1 to edge2 is the length of edge1 plus the length of edge2; therefore, for edge edge3 connected to another node node3 of edge2, it is also a non-safe edge, and all subsequent edges whose sum of edge lengths after adding their lengths is greater than d are non-safe edges, and these non-safe edges constitute the non-safe edge set of node1, and the distance from node node1 to the non-safe edge is the sum of all edge lengths from node node1 to this non-safe edge; At the same time, the following principles should be followed during the expansion process: (1) The edge edge1 with nodes node1 and node2 as two nodes, whether extending from node1 to node2 or from node2 to node1, is the same edge edge1; (2) For the non-safe edge edge1 obtained by expanding node node1, if edge1 is found to be a safe edge in other expansion processes, then edge1 is updated to a safe edge and the distance from node node1 to edge edge1 is updated. Edge edge1 is deleted from the non-safe edge set, and the distance from node node1 to the non-safe edge edge1 is deleted. (3) For edge edge1 of node node1, the distance from node node1 to edge edge1 in different expansion processes is based on the minimum distance.
6. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 3 or 4 is characterized in that: The S5 includes: S5.1: Based on the roadside data and road node data in S2.2 and the time slice snapshot in S3.2, for each mobile object in the snapshot, firstly use the point-to-straight line distance calculation formula to calculate the distance between the mobile object and all roadsides. The coordinates of the mobile object are obtained from the position coordinates of the mobile object in S1, and the coordinates of the roadside are obtained from the longitude and latitude coordinates of the road node in S2.2; then select the roadside with the smallest distance, map the mobile object to the edge closest to it, that is, add the unique identifier of the mobile object and the distance from the mobile object to the node of the nearest edge to the roadside data in S2.2; S5.2: Update the VNIndex index of each node according to the result of S5.1, and calculate the neighbor set of each mobile object o, including: S5.2.1: For the mapping result of S5.1, each edge contains the set of objects mapped to the edge and the distance from each object to the node on the edge; the VNIndex index of each road node is updated as follows: for each road node, all mobile objects on each safe edge are obtained, and for mobile objects on non-safe edges, only mobile objects whose distance from this road node is not greater than d are obtained; S5.2.2: Filter the mobile objects adjacent to o to form the neighbor set of o; use the following method to filter: For a mobile object o, in the object set of the corresponding road node, For any moving object that is not on the edge, calculate the distance from this moving object to the road node plus the distance from o to the road node, that is, the distance between this moving object and o. If it is not greater than d, the object is adjacent to o, otherwise it is not adjacent. For any mobile object on the edge, calculate the absolute value of the distance from the mobile object to the road node minus the distance from o to the road node. If it is not greater than d, the mobile object is adjacent to o, otherwise it is not adjacent; The objects adjacent to o are grouped into the neighbor set of o; S5.3: construct a proximity relationship graph based on the neighbor set of the mobile object o obtained in S5.2; S5.4: Cluster the neighbor relationship graph constructed in S5.3 as the input of the SCAN algorithm to obtain clusters. Each cluster contains multiple mobile objects, which are expressed as: cluster c = {o i ,o j …}, where o i , o j Represents each mobile object in the group, i, j represents the unique identifier of the mobile object; and sorts the objects in the clusters obtained by clustering. The sorting standard is: sort from small to large according to the unique identifier of the mobile object, select the first object in the cluster as the ID partition standard for partitioning, and add this cluster to the corresponding partition, and perform this operation on all clusters in all snapshots in turn.
7. The urban road trajectory convergence mode detection method based on ID partitioning according to claim 6 is characterized in that: The S6 includes: S6.1: For each cluster c in the partition obtained in S5.4, query the cluster c′ that has a non-ID cluster inclusion relationship with c and meets the time interval I constraint, and complete c′ to the partition where cluster c is located; The cluster inclusion relation CCR describes the convergence behavior of two mobile object groups. For two clusters c1 and c2, if all mobile objects in c1 exist in c2, it means that c2 contains c1, that is, there is a cluster inclusion relation between the two, which is recorded as Denoted as CCR(c1,c2); given clusters c1, c2 with ID o, and cluster c3 with ID o', if Then c2 and c1 are IDCCR, c3 and c1 are Non-ID CCR; For each cluster in the partition, the clusters that have Non-ID CCR with cluster c and meet the time interval I constraint are queried. The query formula is as follows: Non-ID CCR-I(c,t c )={c′∈PC[o]|o=c[i](for i=2to|c|-μ+1),CCR(c,c′),t c′ ∈[t-I,t c -1]} Among them, Non-ID CCR-I(c,t c ) represents the set of clusters that have Non-ID CCR with c and meet the time interval I constraint, i.e., c′; t c Indicates the timestamp of c; during the query process, t is a variable representing time, and initially t is t c , t c′ It is represented as the timestamp of c′, tI is represented as the upper limit of the timestamp of c′, and t c -1 indicates the lower limit of the timestamp of c′, [tI,t c -1] is expressed as the time constraint of c′. Every time c′ is queried, t is updated to t c′ ; PC[o] represents the cluster set in the partition with ID o, i.e., the non-ID partition of c, where o is a mobile object; c[i] represents the i-th mobile object in c; |c| represents the number of mobile objects in c, i.e., the size of cluster c; μ represents the size threshold of the cluster; CCR(c,c′) represents that there is a cluster inclusion relationship between c and c′; S6.2: Filter the time series of all completed partitions obtained in S6.1 according to the SCI constraint, and only retain the clusters corresponding to the time series that meet the SCI constraint at the same time; For a cluster list Cs = {c1,...,c n }, the corresponding time series T = [t1,…,t n ], SCI = [S, C, I] is used to represent the values of S, C, and I; the SCI constraint includes the following principles: (1) Continuity principle: The length of T, i.e., the number of elements in T, is greater than or equal to the threshold S, i.e., |T| ≥ S; (2) Continuity principle: The length of the continuous time series in T is greater than or equal to the threshold C, that is, there is a subsequence ts in T that satisfies ts[i+1]-ts[i]=1, and |ts|≥C, where 1≤i≤|ts|-1, i represents the sequence number of the element in the subsequence ts, ts[i+1] represents the i+1th element in ts, ts[i] represents the i-th element in ts, ts[i+1]-ts[i]=1 represents the difference between the timestamp represented by the i+1th element in ts and the timestamp represented by the i-th element; |ts| represents the number of timestamps in ts, that is, the length of the time series ts; (3) Interval principle: The interval between adjacent timestamps in T is less than or equal to the threshold I, that is, T[i+1]-T[i]≤I, where 1≤i≤|T|-1, i represents the sequence number of the element in T, T[i+1] represents the i+1th element in T, T[i] represents the ith element in T, and |T| represents the length of the time series T; S6.3: Generate a cluster inclusion relationship table for the partitions filtered in S6.2, recording the inclusion relationship between clusters in the cluster set that meet the time constraint, where the time constraint is: the timestamp is between [t+1, t+I]; S6.4: Using the cluster inclusion relationship table generated in S6.3, two search methods, forward recursion and backtracking recursion, are used to obtain all candidate aggregation modes in all partitions, and select the aggregation modes that meet the constraints; including: S6.4.1: Initialize the mark cluster list markcs and cluster list C S , time series T, markpath, nextmarkpath; markcs is used to record the clusters visited in forward recursion and backtracking recursion. After the recursion is completed, markcs is updated according to markpath; cluster list C S Used to record the clusters in the candidate aggregation mode; the time series T is used to record the cluster list C S The timestamp corresponding to each cluster in represents the time series of the candidate convergence mode; the markpath is used to record the clusters visited during the forward recursion and backtracking recursion. After the recursion is completed, the elements in the markpath are merged into the mark cluster list markcs; the next markpath nextmarkpath is used to record the clusters that are newly added in the forward recursion and also exist in another cluster inclusion relationship and the clusters visited during the backtracking recursion. When the recursive search ends, the elements in the nextmarkpath are merged into the markpath markpath; S6.4.2: Forward recursive search: For each partition, traverse the clusters in the cluster inclusion relation table, and add the clusters that have not been visited to C S and the marked path markpath, whose time series is added to T; According to the cluster inclusion relationship table, get the first cluster that has a cluster inclusion relationship with the current cluster, and check whether this cluster has been visited; if not, add it to C S and markpath, whose timestamp is added to T; If the newly added cluster does not exist in the inclusion relation of another cluster, the forward recursive search ends and the candidate aggregation mode MP = (C S ,T); If the newly added cluster also exists in the other cluster inclusion relation, initialize the next mark path nextmarkpath, continue the forward recursive search, and add the first cluster in the other cluster inclusion relation to C S and nextmarkpath, whose timestamp is added to T, and the forward recursive search is continuously performed until the newly added cluster is not included in the other cluster, and the forward recursive search is terminated to obtain the candidate convergence mode MP = (C S ,T); After the forward recursive search is finished, the elements in nextmarkpath are merged into the markpath to update the markpath; S6.4.3: Check whether the candidate aggregation mode meets the cluster size threshold M and SCI constraints, and output the mode that meets the conditions; If the candidate convergence mode MP=(C S ,T) satisfies the following conditions at the same time: (1) c i Represents C S The i-th cluster in c i+1 Represents C S The i+1th cluster in ; Represents the cluster list C S Each cluster c in i Its adjacent cluster c i+1 There is a containment relationship between them; (2)|c n |≥M;|c n | means C S The number of moving objects in the nth cluster, i.e. cluster c n Scale; (3) T satisfies the SCI constraint; Then the MP is in aggregation mode and outputs; S6.4.4: Backtracking recursion: Each candidate convergence mode MP obtained according to S6.4.2 = (C S ,T), select the cluster list C of candidate aggregation mode S The last cluster c in n , trace back to the previous cluster c with which it has a cluster inclusion relationship n-1 , check with c n-1 Whether the cluster with containment relationship has been visited, that is, check the cluster with c in nextmarkpath of S6.4.2 n-1 Whether the cluster with inclusion relationship has been visited. If not, repeat S6.4.2-S6.4.3, search all remaining candidate aggregation modes in each partition, determine and output the aggregation mode in each partition that meets the cluster size threshold M and SCI constraints; If the candidate convergence mode MP is reached by backtracking recursively, then S ,T) does not contain any unvisited clusters in the first cluster c1, and the backtracking recursive search ends; the clusters visited by this process are added to the next mark path nextmarkpath, and markpath is updated according to nextmarkpath, and the elements in markpath are merged into markcs, and markcs is updated.