A trajectory identification grouping method based on low-precision random sampling data
By constructing a spatiotemporal reachability matrix (MST), trajectory points in low-precision random sampling data are identified and grouped, solving the problems of low positioning accuracy and sampling time uncertainty in trajectory information, and improving the efficiency and applicability of trajectory identification and grouping.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIFTH RES INST OF TELECOMM SCI & TECH CO LTD
- Filing Date
- 2023-09-21
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, trajectory information suffers from problems such as low positioning accuracy, large sampling time span, high randomness of sampling time, and high repetition of sampling time, resulting in low efficiency of trajectory recognition grouping and inability to effectively utilize massive trajectory information.
A trajectory recognition grouping method based on low-precision random sampling data is adopted. By constructing a spatiotemporal reachability matrix (MST), spatiotemporal reachability key points and adjacent points are identified, and trajectory points with the same time and different time are separated for grouping and aggregation.
It improves the timeliness and applicability of trajectory recognition grouping, reduces the amount of computation, and can effectively handle a large number of trajectory points with the same time but different latitude and longitude, thus improving data utilization.
Smart Images

Figure CN117332028B_ABST
Abstract
Description
A trajectory recognition grouping method based on low-precision random sampling data Technical Field
[0001] This invention relates to the field of trajectory recognition and grouping technology, and more specifically, to a trajectory recognition and grouping method based on low-precision random sampling data. Background Technology
[0002] Trajectory information is one of the most critical foundational data in emerging artificial intelligence application fields such as smart cities, smart transportation, and intelligent navigation. Mining useful information from massive amounts of trajectory information is the basis for related applications. The prerequisite for mining useful information is to group the trajectory points. Data mining based on the grouped trajectory points has practical value.
[0003] Due to factors such as user privacy protection and positioning sensor accuracy, massive trajectory information only has three attributes: time point, latitude and longitude points. Trajectory information suffers from problems such as low positioning accuracy, large sampling time span, high sampling time randomness, and high sampling time repetition. Summary of the Invention
[0004] The present invention aims to provide a trajectory recognition grouping method based on low-precision random sampling data, so as to solve the problems of low positioning accuracy, large sampling time span, high randomness of sampling time and high repeatability of sampling time in current trajectory information.
[0005] This invention provides a trajectory recognition and grouping method based on low-precision random sampling data, comprising the following steps:
[0006] Step 1: Obtain low-precision random sampling trajectory point data;
[0007] Step 2: Preprocess low-precision random sampling trajectory point data to obtain trajectory point data with the same time and trajectory point data with different time.
[0008] Step 3: Construct a distance matrix M using trajectory point data from different times. D and time matrix M T ;
[0009] Step 4: Based on the distance matrix M D and time matrix M T Construct the spatiotemporal reachability matrix M ST ;
[0010] Step 5: Based on the spatiotemporal reachability matrix M ST Obtain the set of spatiotemporally reachable key points;
[0011] Step 6: Based on spatiotemporally reachable key points, group trajectory points by obtaining a set of spatiotemporally reachable adjacent points;
[0012] Step 7: Aggregate the trajectory point data with the same time frame, grouping them according to the trajectory points from Step 6.
[0013] Furthermore, in step one, the trajectory point attributes of the acquired low-precision random sampling trajectory point data include at least time points, longitude points, and latitude points.
[0014] Furthermore, in step two, the preprocessing of low-precision random sampled trajectory point data includes:
[0015] First, sort the low-precision random sampling trajectory point data in chronological order, and then remove trajectory points with the same time point, longitude point and latitude point.
[0016] For trajectory points at different time points, select trajectory points with different time points from the remaining trajectory point data and add them to the trajectory point data with different time points;
[0017] For trajectory points with the same time point, randomly select any trajectory point with the same time point and add it to the data of trajectory points with different time points; add the remaining trajectory points with the same time point to the data of trajectory points with the same time point.
[0018] Furthermore, step three includes:
[0019] Given N trajectory points in the trajectory point data at different times, construct a distance matrix M of size N*N. D With a time matrix M of size N*N T For any two trajectory points x i and x j Two trajectory points x i and x j The time difference is t ij Two trajectory points x i and x j The distance is d ij :
[0020] M Tij =M Tji =t ij M Tij The time matrix M T The element in the i-th row and j-th column of M; Tji The time matrix M T The element in the j-th row and i-th column;
[0021] If T thr >t ij M Dij =M Dji =d ij Otherwise M Dij =M Dji = any negative number; Tthr The set time threshold; M Dij The distance matrix M D The element in the i-th row and j-th column of M; Dji The distance matrix M D The element in the j-th row and i-th column.
[0022] Furthermore, step four includes:
[0023] Based on distance matrix M D and time matrix M T Construct a spatially reachable matrix M S M S =M D / M T ;
[0024] For any two trajectory points x i and x j The spatially reachable matrix M S and time matrix M T After the following transformation, it becomes M S . and M T .: If S thr >M Sij M Sij =M Sji =1; otherwise M Sij =M Sji =0; if T thr >M Tij M Tij =M Tji =1, otherwise M Tij =M Tji =0;M Sij Let M be the spatially reachable matrix. S The element in the i-th row and j-th column of M; Sji Let M be the spatially reachable matrix. S The element in the j-th row and i-th column of S; thr The set space reachable threshold;
[0025] Spatiotemporal reachability matrix M ST =M S .*M T .
[0026] Furthermore, step five includes:
[0027] For the i-th trajectory point corresponding to M ST Given the i-th row or i-th column, calculate the sum of that row or i-th column as Sum. i If Sum i ≥K thrIf the i-th trajectory point is a spatiotemporally reachable key point, it is added to the set of spatiotemporally reachable key points; K thr The threshold for spatiotemporal reachability of key points is set.
[0028] Furthermore, step six includes:
[0029] For the set of spatiotemporally reachable key points, sequentially determine the spatiotemporally reachable matrix M corresponding to each spatiotemporally reachable key point. ST Does it include other spacetime reachable key points?
[0030] If other spatiotemporally reachable keypoints are not included, then the adjacent points corresponding to the spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points and marked as a group of trajectory points;
[0031] If other spatiotemporally reachable keypoints are included, then the adjacent points corresponding to the spatiotemporally reachable keypoints and other spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points, and marked as a group of trajectory points, and these spatiotemporally reachable keypoints are no longer evaluated.
[0032] Furthermore, step seven includes:
[0033] For trajectory points with the same time, find the corresponding trajectory point group obtained in step six based on time matching; determine whether each trajectory point with the same time satisfies spatiotemporal reach with the corresponding trajectory point group: if it satisfies spatiotemporal reach, add the trajectory point with the same time to the group to be aggregated; otherwise, add it to the outlier group. Take the average of the latitude and longitude of all trajectory points with the same time in the group to be aggregated and the latitude and longitude of the trajectory points with the same time in the trajectory point group as the latitude and longitude of the time point, and re-add it to the trajectory point group.
[0034] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0035] 1. This invention offers greater timeliness. Traditional trajectory recognition grouping methods require calculating the motion state between any two trajectory points in the trajectory point set. The computational load increases exponentially with the number of trajectory points. This invention avoids calculating the motion state between any two trajectory points by constructing a spatiotemporal reachability matrix to calculate reachable key points and reachable adjacent points, significantly reducing the computational load and improving the timeliness of trajectory recognition grouping.
[0036] 2. This invention has wider applicability. Traditional trajectory recognition and grouping methods assume that the time intervals between trajectory points are different. However, in real-world scenarios, there are many trajectory points with the same time interval but different latitude and longitude. Once the time intervals are the same, the motion state cannot be calculated, resulting in the loss of a large number of trajectory points with the same time interval but different latitude and longitude. This invention divides the original trajectory points into sets of trajectory points with the same time interval and sets of trajectory points with different time intervals. First, the sets of trajectory points with different time intervals are identified and grouped. Then, the sets of trajectory points with the same time intervals are aggregated and the corresponding trajectory points with the same time intervals are removed, making this invention more widely applicable. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 is a flowchart of the trajectory recognition grouping method based on low-precision random sampling data in an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0041] Example
[0042] As shown in Figure 1, this embodiment proposes a trajectory recognition grouping method based on low-precision random sampling data, which includes the following steps:
[0043] Step 1: Obtain low-precision random sampling trajectory point data; wherein, the trajectory point attributes of the obtained low-precision random sampling trajectory point data include at least time points, longitude points, and latitude points. In this embodiment, the obtained low-precision random sampling trajectory point data contains 512 trajectory points.
[0044] Step 2: Preprocess the low-precision random sampling trajectory point data to obtain trajectory point data with the same time and trajectory point data with different times:
[0045] First, sort the low-precision random sampling trajectory point data in chronological order, and then remove trajectory points with the same time point, longitude point and latitude point.
[0046] For trajectory points at different time points, select trajectory points with different time points from the remaining trajectory point data and add them to the trajectory point data with different time points;
[0047] For trajectory points with the same time point, randomly select any trajectory point with the same time point and add it to the data of trajectory points with different time points; add the remaining trajectory points with the same time point to the data of trajectory points with the same time point.
[0048] Step 3: Construct a distance matrix M using trajectory point data from different times. D and time matrix M T :
[0049] Assuming the number of trajectory points in the trajectory point data at different times is 300, construct a distance matrix M of size 300*300. D With a time matrix M of size 300*300 T For any two trajectory points x i and x j Two trajectory points x i and x j The time difference is t ij Two trajectory points x i and x j The distance is d ij :
[0050] M Tij =M Tji =t ij M Tij The time matrix M T The element in the i-th row and j-th column of M; Tji The time matrix M T The element in the j-th row and i-th column;
[0051] If T thr >t ij M Dij =M Dji =d ij Otherwise M Dij =M Dji = any negative number; T thr The set time threshold, such as T thr = 30 minutes; M Dij The distance matrix M DThe element in the i-th row and j-th column of M; Dji The distance matrix M D The element in the j-th row and i-th column.
[0052] Step 4: Based on the distance matrix M D and time matrix M T Construct the spatiotemporal reachability matrix M ST :
[0053] Based on distance matrix M D and time matrix M T Construct a spatially reachable matrix M S M S =M D / M T ;
[0054] For any two trajectory points x i and x j The spatially reachable matrix M S and time matrix M T After the following transformation, it becomes M S . and M T .: If S thr >M Sij M Sij =M Sji =1; otherwise M Sij =M Sji =0; if T thr >M Tij M Tij =M Tji =1, otherwise M Tij =M Tji =0;M Sij Let M be the spatially reachable matrix. S The element in the i-th row and j-th column of M; Sji Let M be the spatially reachable matrix. S The element in the j-th row and i-th column of S; thr The set space reachable threshold, such as S thr =60 km / h;
[0055] Spatiotemporal reachability matrix M ST =M S .*M T .
[0056] Step 5: Based on the spatiotemporal reachability matrix M ST Obtain the set of spatiotemporally reachable key points:
[0057] For the i-th trajectory point corresponding to M ST Given the i-th row or i-th column, calculate the sum of that row or i-th column as Sum. i If Sumi ≥K thr If the i-th trajectory point is a spatiotemporally reachable key point, it is added to the set of spatiotemporally reachable key points; K thr The threshold for spatiotemporal reachability of key points, such as K. thr =3.
[0058] Step 6: Based on spatiotemporally reachable key points, group trajectory points by obtaining the set of spatiotemporally reachable neighboring points:
[0059] For the set of spatiotemporally reachable key points, sequentially determine the spatiotemporally reachable matrix M corresponding to each spatiotemporally reachable key point. ST Does it include other spacetime reachable key points?
[0060] If other spatiotemporally reachable keypoints are not included, then the adjacent points corresponding to the spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points and marked as a group of trajectory points;
[0061] If other spatiotemporally reachable keypoints are included, then the adjacent points corresponding to the spatiotemporally reachable keypoints and other spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points, and marked as a group of trajectory points, and these spatiotemporally reachable keypoints are no longer evaluated.
[0062] Step 7: Aggregate the trajectory point data with the same time frame, grouping them according to the trajectory points from Step 6:
[0063] For trajectory points with the same time, find the corresponding trajectory point group obtained in step six based on time matching; determine whether each trajectory point with the same time satisfies spatiotemporal reach with the corresponding trajectory point group: if it satisfies spatiotemporal reach, add the trajectory point with the same time to the group to be aggregated; otherwise, add it to the outlier group. Take the average of the latitude and longitude of all trajectory points with the same time in the group to be aggregated and the latitude and longitude of the trajectory points with the same time in the trajectory point group as the latitude and longitude of the time point, and re-add it to the trajectory point group.
[0064] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A trajectory recognition and grouping method based on low-precision random sampling data, characterized in that, The process includes the following steps: Step 1: Obtain low-precision random sampled trajectory point data; Step 2: Preprocess the low-precision random sampled trajectory point data to obtain trajectory point data with the same time and trajectory point data with different times; Step 3: Construct a distance matrix M using trajectory point data with different times. D and time matrix M T Step 4: Based on the distance matrix M D and time matrix M T Construct the spatiotemporal reachability matrix M ST Step 5: Based on the spatiotemporal reachability matrix M ST Step 6: Based on the spatiotemporally reachable key points, group the trajectory points by obtaining the set of spatiotemporally reachable adjacent points. Step 7: Aggregate the trajectory point data with the same time frame, grouped according to the trajectory points in Step 6; Step 3 includes: the number of trajectory points in the trajectory point data with different times is N, and the size of the aggregated data is N. The distance matrix M of N D With a size of N N's time matrix M T For any two trajectory points x i and x j Two trajectory points x i and x j The time difference is t ij Two trajectory points x i and x j The distance is d ij M Tij =M Tji =t ij M Tij The time matrix M T The element in the i-th row and j-th column of M; Tji The time matrix M T The element in the j-th row and i-th column of T; if T thr >t ij M Dij = M Dji = d ij Otherwise M Dij = M Dji =any negative number; T thr The set time threshold; M Dij The distance matrix M D The element in the i-th row and j-th column of M; Dji The distance matrix M D The element in the j-th row and i-th column; Step four includes: based on the distance matrix M D and time matrix M T Construct a spatially reachable matrix M S M S =M D / M T For any two trajectory points x i and x j The spatially reachable matrix M S and time matrix M T After the following transformation, it becomes M S . and M T .: If S thr >M Sij M Sij =M Sji =1; otherwise M Sij =M Sji =0; if T = 0; thr >M Tij M Tij =M Tji =1, otherwise M Tij =M Tji =0; M Sij Let M be the spatially reachable matrix. S The element in the i-th row and j-th column of M; Sji Let M be the spatially reachable matrix. S The element in the j-th row and i-th column of S; thr The set spatial reachability threshold; the spatiotemporal reachability matrix M ST = M S . M T Step five includes: for the i-th trajectory point corresponding to M... ST Given the i-th row or i-th column, calculate the sum of that row or i-th column as Sum. i If Sum i ≥K thr If the i-th trajectory point is a spatiotemporally reachable key point, it is added to the set of spatiotemporally reachable key points; K thr The threshold for spatiotemporal reachability of key points is set.
2. The trajectory recognition grouping method based on low-precision random sampling data according to claim 1, characterized in that, In step one, the trajectory point attributes of the low-precision random sampling trajectory point data obtained include at least time points, longitude points, and latitude points.
3. The trajectory recognition and grouping method based on low-precision random sampling data according to claim 2, characterized in that, In step two, the preprocessing of low-precision random sampling trajectory point data includes: first, sorting the low-precision random sampling trajectory point data according to time order, and then removing trajectory points with the same time point, longitude point, and latitude point; for trajectory points with different time points, selecting trajectory points with different time points from the remaining trajectory point data and adding them to the trajectory point data with different time points; for trajectory points with the same time points, randomly selecting any trajectory point with the same time point and adding it to the trajectory point data with different time points, and adding the remaining trajectory points with the same time points to the trajectory point data with the same time points.
4. The trajectory recognition and grouping method based on low-precision random sampling data according to claim 1, characterized in that, Step six includes: For the set of spatiotemporally reachable key points, sequentially determine the spatiotemporally reachable matrix M corresponding to each spatiotemporally reachable key point. ST Whether other spatiotemporally reachable keypoints are included: If other spatiotemporally reachable keypoints are not included, the adjacent points corresponding to the spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points and marked as a group of trajectory points; if other spatiotemporally reachable keypoints are included, the adjacent points corresponding to the spatiotemporally reachable keypoints and other spatiotemporally reachable keypoints are added to the set of spatiotemporally reachable adjacent points and marked as a group of trajectory points, and these spatiotemporally reachable keypoints are no longer evaluated.
5. The trajectory recognition and grouping method based on low-precision random sampling data according to claim 4, characterized in that, Step seven includes: finding the corresponding trajectory point groups obtained in step six based on time matching for trajectory point data with the same time; determining whether each trajectory point with the same time satisfies spatiotemporal reachability with its corresponding trajectory point group: if spatiotemporal reachability is satisfied, then add the trajectory point with the same time to the group to be aggregated; otherwise, add it to the outlier group, and take the average of the latitude and longitude of all trajectory points with the same time in the group to be aggregated and the latitude and longitude of the trajectory points with the same time in the trajectory point group as the latitude and longitude of the time point, and re-add it to the trajectory point group.
Citation Information
Patent Citations
Track similarity matching method based on low-precision random sampling data
CN114048792A
Method and device for determining abnormal behavior of vehicle
CN114781546A
Social media user behavior pattern mining method
CN115687429A