Efficient space-time clustering method based on GPS trajectory data
Through the steps of data cleaning, three-dimensional trajectory matching and compression linear reference technology segmentation, the longest common subsequence and similarity matrix of the trajectory are determined, and the efficiency and accuracy of GPS trajectory data clustering analysis in the prior art are solved. The problem of low efficiency achieves efficient trajectory clustering.
Patent Information
- Application Number
- CN202510047533.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-02-21
AI Technical Summary
It is difficult for prior art to efficiently and accurately cluster analysis of GPS trajectory data, especially when the data complexity and heterogeneity increase.
Using an efficient spatiotemporal clustering method based on GPS trajectory data, the longest common subsequence and similarity matrix are determined through data cleaning, three-dimensional trajectory matching, compressed linear reference technology segmentation and CLR spatial characterization, and finally trajectory clustering is performed.
The representation of trajectory is simplified, the calculation efficiency and accuracy of trajectory similarity are improved, and efficient trajectory clustering analysis is achieved.
Smart Images

Figure CN119494008A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to an efficient spatiotemporal clustering method based on GPS trajectory data. Background Art
[0002] With the rapid development of information technology, it has become possible to collect a large amount of individual spatiotemporal behavioral data with precise information, allowing researchers to study human behavioral activities from multiple dimensions such as time, space, and direction.
[0003] However, calculating the similarity between trajectories is a complex task, because the length and sampling point distribution of each trajectory are different, which increases the difficulty of comparing them. In addition, due to the rapid increase in the amount of trajectory data constrained by the network, these data are highly complex and heterogeneous in space and time, which brings great challenges to data processing and analysis. Therefore, how to efficiently and accurately cluster the trajectories has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, the object of the present invention is to provide an efficient spatiotemporal clustering method based on GPS trajectory data, in order to solve the above problems.
[0005] In a first aspect, an embodiment of the present application provides an efficient spatiotemporal clustering method based on GPS trajectory data to obtain target GPS trajectory data; Cleaning the target GPS trajectory data, including outlier deletion, trajectory noise removal and trajectory smoothing; Matching the cleaned target GPS trajectory data with the map data to generate at least one target three-dimensional trajectory; The target 3D trajectory data is segmented using compressed linear reference technology to obtain the representation result of each target 3D trajectory in 2D CLR space; Determine the longest common subsequence based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space; Based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, determining the longest common subsequence of each pair of trajectories, and calculating the similarity matrix based on the longest common subsequence of each pair of trajectories; Trajectory clustering is performed based on the similarity matrix.
[0006] In the above manner, the compressed linear referencing technology is used to simplify the representation of trajectories and enhance the calculation efficiency and accuracy of trajectory similarity.
[0007] In one possible manner, the step of obtaining the target GPS trajectory data includes: The original GPS trajectory data is obtained, and the Kalman filter algorithm and the Douglas-Peucker algorithm are used to perform trajectory noise removal and trajectory smoothing processing on the original GPS trajectory data respectively to generate the target GPS trajectory data.
[0008] One possible way is that in the step of segmenting the target three-dimensional trajectory data by using the compressed linear reference technology and obtaining the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the representation result of each target three-dimensional trajectory in the two-dimensional CLR space includes: position information of each trajectory point in the CLR space and a buffer of each trajectory point; The position information of each track point in CLR space is determined as follows: ; x—trajectory data of the target's three-dimensional trajectory; g(x) is the global mean function; The buffer zone for each trajectory point is determined using the following formula: ; - trajectory points; P— Any point within the buffer zone of the trajectory point; -radius; — The timestamp corresponding to the trajectory point; -high.
[0009] One possible way is that in the step of determining the longest common subsequence of each pair of trajectories based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the trajectory is determined in the following way: and The longest common subsequence of: ; in, and The trajectories and Length; —Trajectory The A buffer of trajectory points; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The number of points in the trajectory; —Trajectory The number of points in the trajectory; —Trajectory and trajectory The distance between —Distance threshold.
[0010] One possible way is, in the step of calculating the similarity matrix between trajectories based on the longest common subsequence: Calculate as follows and The similarity between: ; —Trajectory and The similarity.
[0011] One possible method is to use the compressed linear reference technology to segment the target three-dimensional trajectory data and obtain the three-dimensional trajectory of each target in the two-dimensional CLR space representation result, and determine the trajectory in the following way: Characterization results in CLR space: ; —Trajectory The slope and intercept of the nth line segment in .
[0012] One possible way is that in the step of determining the longest common subsequence of each pair of trajectories based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the trajectory is determined in the following way: and The longest common subsequence of: ; )—Trajectory and The longest common subsequence of: —Trajectory middle Line segments and trajectories middle The longest common subsequence of line segments; —Trajectory the number of midline segments; —Trajectory The number of midline segments.
[0013] One possible way is that in the step of clustering trajectories based on the similarity matrix, Trajectory clustering is performed based on the set neighborhood radius and minimum number of points and the similarity matrix.
[0014] The present invention uses the compressed linear reference technology in the above manner to simplify the representation of the trajectory and enhance the calculation efficiency and accuracy of the trajectory similarity.
[0015] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A flow chart of an efficient spatiotemporal clustering method based on GPS trajectory data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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.
[0019] To facilitate understanding of this embodiment, firstly, an efficient spatiotemporal clustering method based on GPS trajectory data disclosed in an embodiment of the present invention is introduced in detail.
[0020] Reference Figure 1 The present application embodiment provides an efficient spatiotemporal clustering method based on GPS trajectory data, which specifically includes the following steps: S101: Obtain target GPS trajectory data.
[0021] In this embodiment, the so-called target GPS trajectory data corresponds to the GPS trajectory data that needs to be classified.
[0022] S102: Cleaning the target GPS trajectory data.
[0023] In this step, it specifically includes outlier deletion, trajectory noise removal and trajectory smoothing.
[0024] As a preferred embodiment, in this step, the Kalman filter algorithm is used to remove trajectory noise, and the Douglas-Peucker algorithm is used to smooth the trajectory.
[0025] S103: Matching the cleaned target GPS trajectory data with the map data to generate at least one target three-dimensional trajectory.
[0026] Specifically, in this step, the target GPS trajectory data is aligned with the road on the map to obtain a matching relationship between the trajectory point and the road.
[0027] Furthermore, the matching relation M can be represented as a set of two-tuples: ; in , , ..., is the GPS track point, It is a map road node.
[0028] S104: Using the compressed linear reference technology to segment the target three-dimensional trajectory data, and obtain the representation result of each target three-dimensional trajectory in the two-dimensional CLR space.
[0029] In this step, the three-dimensional trajectories are transformed using compressed linear referencing techniques to simplify the subsequent clustering steps.
[0030] S105: determining the longest common subsequence of each pair of trajectories in the three-dimensional trajectories of the target based on the representation result of the three-dimensional CLR space of each target, and calculating a similarity matrix based on the longest common subsequence of each pair of trajectories; S106: performing trajectory clustering based on the similarity matrix.
[0031] In the above manner, the compressed linear referencing technology is used to simplify the representation of trajectories and enhance the calculation efficiency and accuracy of trajectory similarity.
[0032] The following will specifically describe the steps S103 and S104: In some embodiments, the representation result of each target three-dimensional trajectory in the two-dimensional CLR space includes: position information of each trajectory point in the CLR space and a buffer of each trajectory point.
[0033] In this embodiment, the position information of each track point in the CLR space is determined in the following manner: ; x—trajectory data of the target's three-dimensional trajectory; g(x) is the global mean function; The buffer zone for each trajectory point is determined using the following formula: ; - trajectory points; P— Any point within the buffer zone of the trajectory point; -radius; — The timestamp corresponding to the trajectory point; -high.
[0034] From the above formula, we can see that the buffer includes time and space information. In this embodiment, in the aforementioned step S105: determining the longest common subsequence of each pair of trajectories based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, for the trajectory and , the trajectory can be determined in the following way and The longest common subsequence of: ; in, and The trajectories and Length; —Trajectory The A buffer of trajectory points; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The number of points in the trajectory; —Trajectory The number of points in the trajectory; —Trajectory and trajectory The distance between —Distance threshold.
[0035] In this embodiment, the following method is used to calculate and The similarity between: ; —Trajectory and The similarity.
[0036] The similarity matrix is generated in the above way, which provides a basis for subsequent trajectory clustering.
[0037] In this embodiment, by generating a buffer in the CLR space, the efficiency and accuracy of trajectory similarity calculation are improved.
[0038] In some embodiments, in the aforementioned step S104: segmenting the target three-dimensional trajectory data using the compressed linear referencing technology to obtain the representation result of each target three-dimensional trajectory in the two-dimensional CLR space: The trajectory is determined as follows Characterization results in CLR space: ; —Trajectory The slope and intercept of the nth line segment in .
[0039] In this embodiment, the trajectory is determined in the following manner: and The longest common subsequence of: ; )—Trajectory and The longest common subsequence of: —Trajectory middle Line segments and trajectories middle The longest common subsequence of line segments; —Trajectory the number of midline segments; —Trajectory The number of midline segments.
[0040] In this embodiment, the following method is used to calculate and The similarity between: ; in, — and The similarity between They are and Length.
[0041] In the above way, the compressed linear referencing technology is used for trajectory segmentation, the trajectory representation is simplified and the slope and intercept of the line segment are calculated, which improves the efficiency of similarity matrix operations.
[0042] The clustering process involved in this application is described below: In the embodiment provided in this application, in order to cluster the trajectory points, the neighborhood radius needs to be set first. and minimum points , and then perform trajectory clustering based on the set neighborhood radius and minimum number of points and the similarity matrix.
[0043] Specifically, for each track point of the target GPS track point , calculate its LCSS similarity with all other points to determine Neighborhood The number of points within If satisfied, ,but is a core point, yes of The set of points in the neighborhood. Then, for each core point , -All points in the neighborhood (including core points and non-core points) are temporarily grouped into the same cluster. If a non-core point is located in a core point of an existing cluster, -neighborhood, it is added to the cluster. This process is called density reachability, which ensures that the points in the cluster are interconnected. The core points are constructed in the above way.
[0044] After constructing the core points, it is necessary to determine the cluster edges. Specifically, the boundary points are those located between the core points. -Neighborhood, but not a core point, and does not belong to any other cluster. These points are usually located at the edge of the cluster, reflecting the boundaries of the cluster. Noise points are points that are not in any core point. -Neighborhood, but not belonging to any cluster. These points may be due to data noise, abnormal behavior or other reasons.
[0045] In some cases, two or more clusters are - If the neighborhoods are in contact with each other (i.e. their boundary points or core points are close to each other) and meet the merging conditions (such as cluster size, shape, etc.), they can be merged into a larger cluster. This helps to discover larger-scale tourist behavior patterns.
[0046] Clustering is completed in the above manner.
[0047] In some embodiments, the clustering results may also be verified. Specifically, the target GPS data is first divided into K groups, and then a cross-validation method is used to calculate the clustering performance index.
[0048] Through the above method, the clustering verification is completed.
[0049] In the description of the embodiments of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present invention. In the embodiments of the present invention, the schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in the embodiments of the present invention and the features of the different embodiments or examples, without contradiction.
[0050] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0051] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred implementation of the embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0052] The above description is only a preferred embodiment of the embodiment of the present invention and is not intended to limit the embodiment of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiment of the present invention should be included in the scope of protection of the embodiment of the present invention.
Claims
1. An efficient spatiotemporal clustering method based on GPS trajectory data, characterized in that: Get target GPS trajectory data; Cleaning the target GPS trajectory data; Matching the cleaned target GPS trajectory data with the map data to generate at least one target three-dimensional trajectory; The target 3D trajectory data is segmented using compressed linear reference technology to obtain the representation result of each target 3D trajectory in 2D CLR space; Based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, determining the longest common subsequence of each pair of trajectories, and calculating the similarity matrix based on the longest common subsequence of each pair of trajectories; Trajectory clustering is performed based on the similarity matrix.
2. The method according to claim 1, characterized in that The step of obtaining target GPS track data includes: The original GPS trajectory data is obtained, and the Kalman filter algorithm and the Douglas-Peucker algorithm are used to perform trajectory noise removal and trajectory smoothing processing on the original GPS trajectory data respectively to generate the target GPS trajectory data.
3. The method according to claim 1, characterized in that In the step of segmenting the target three-dimensional trajectory data using the compressed linear reference technology and obtaining the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the representation result of each target three-dimensional trajectory in the two-dimensional CLR space includes: the position information of each trajectory point in the CLR space and the buffer of each trajectory point; The position information of each track point in CLR space is determined as follows: ; x—trajectory data of the target's three-dimensional trajectory; g(x) is the global mean function; The buffer zone for each trajectory point is determined using the following formula: ; - trajectory points; P— Any point within the buffer zone of the trajectory point; -radius; — The timestamp corresponding to the trajectory point; -high.
4. The method according to claim 3, characterized in that Based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, in the step of determining the longest common subsequence of each pair of trajectories, the trajectory is determined in the following manner: and The longest common subsequence of: ; in, and The trajectories and Length; —Trajectory The A buffer of trajectory points; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The Track point buffers; —Trajectory The number of points in the trajectory; —Trajectory The number of points in the trajectory; —Trajectory and trajectory The distance between —Distance threshold.
5. The method according to claim 4, characterized in that In the step of calculating the similarity matrix based on the longest common subsequence of each pair of trajectories: Calculate as follows and The similarity between: ; —Trajectory and The similarity.
6. The method according to claim 2, characterized in that In the step of segmenting the target three-dimensional trajectory data using the compressed linear reference technology and obtaining the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the trajectory is determined in the following way Characterization results in CLR space: ; —Trajectory The slope and intercept of the nth line segment in .
7. The method according to claim 3, characterized in that In the step of determining the longest common subsequence of each pair of trajectories based on the representation result of each target three-dimensional trajectory in the two-dimensional CLR space, the trajectory is determined in the following manner: and The longest common subsequence of: ; )—Trajectory and The longest common subsequence of: —Trajectory middle Line segments and trajectories middle The longest common subsequence of line segments; —Trajectory the number of midline segments; —Trajectory The number of midline segments.
8. The method according to any one of claims 1 to 7, characterized in that: In the step of clustering trajectories based on the similarity matrix, trajectory clustering is performed based on a set neighborhood radius and a minimum number of points and the similarity matrix.
Citation Information
Patent Citations
Hotspot path mining method based on longest common sub-trajectory density clustering
CN111897805A
Traffic data completion method based on space-time clustering tensor decomposition
CN112820104A
Massive high-dimensional AIS trajectory data clustering method
WO2023029461A1