GPS trajectory travel mode chain identification method based on "bottom-up" strategy
By adopting the ‘bottom-up’ strategy in GPS trajectory data processing, combining the random forest model and adjacent homogeneous merging algorithm, the travel mode is identified and corrected, and the problem of low accuracy and efficiency of travel mode identification in the existing technology is solved, and more efficient travel mode chain identification is achieved.
Patent Information
- Application Number
- CN202210466596.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-04-29
AI Technical Summary
In the existing travel mode identification methods based on GPS trajectory data, the ‘top-down’ strategy is difficult to effectively extract transfer points without obvious stay features, resulting in identification errors. The lengths and motion characteristics of different transportation modes vary greatly, which affects the application of feature extraction and machine learning models, resulting in low data processing efficiency.
The GPS trajectory travel mode chain identification method based on the ‘bottom-up’ strategy is adopted. By extracting time and space information, calculating motion characteristics, defining time sliding windows, calculating speed, acceleration and direction change rate, combining the random forest model and adjacent homogeneity merging algorithm, the travel mode is identified and corrected, thereby generating a travel mode chain.
It significantly improves the accuracy and efficiency of travel mode chain identification of GPS trajectory data, avoids the difficulty of identifying transfer points in transportation modes, and improves the application effect of feature extraction and machine learning models.
Smart Images

Figure CN114943059B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of traffic data mining, and in particular relates to a GPS trajectory travel mode chain identification method based on a "bottom-up" strategy. Background Art
[0002] Mining the characteristics of residents' travel modes based on traffic spatiotemporal trajectory data is a key technology for urban traffic planning driven by data. Using smartphones to collect individual GPS trajectory data is an emerging means of urban residents' travel survey. It can simultaneously collect individual travel GPS trajectories and real travel modes, which is conducive to model training and result verification. Most of the existing travel mode identification methods based on GPS trajectory data adopt a "top-down" strategy. The main steps include: first extracting stops and dividing the trajectory into trips; then extracting traffic mode transfer points and dividing the trips into single-mode travel segments; finally, using algorithms to identify the travel mode of single-mode segments. The main problems of this method are: it is difficult to extract mode transfer points without obvious stop features, and it is easy to cause traffic mode identification errors due to excessive extraction or omission of mode transfer points; the length and motion characteristics of travel segments of different traffic modes vary greatly, which is not conducive to feature extraction and application of machine learning models, and the data processing efficiency is low. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a GPS trajectory travel mode chain identification method based on a "bottom-up" strategy, which is used for GPS trajectory processing and travel mode chain identification when an individual travels with multiple means of transportation.
[0004] The technical solution to achieve the purpose of the present invention is: a GPS trajectory travel mode chain identification method based on a "bottom-up" strategy, comprising the following steps:
[0005] S1. Extract spatiotemporal information from the collected individual GPS trajectory data, calculate the motion characteristics between adjacent trajectory points, set rules to filter GPS signal drift points, and make up for missing data in the trajectory point sequence, and convert the trajectory into a time series with a set frequency;
[0006] S2, defining a time sliding window size and a sliding window overlap ratio, and dividing the time series into segment units of fixed length;
[0007] S3, calculating the velocity, acceleration, and direction change rate of the trajectory point, and extracting the feature vector of the segment unit;
[0008] S4, extracting the feature vector of the segment unit of the sample trajectory data with the travel mode label according to steps S1 to S3, taking the labeled travel mode as the dependent variable, establishing and training a random forest model, and using the trained random forest model to predict the travel mode of the segment unit in step S3;
[0009] S5. For the travel mode sequence of the said segment units, use the adjacent homogeneous merging algorithm to transform the irregular travel mode sequence into continuous and stable travel mode labels;
[0010] S6. Convert the segment units with continuous identical travel mode labels into single-mode travel segments and output the travel mode chain in the GPS trajectory.
[0011] Preferably, the motion features between adjacent trajectory points include speed v i and acceleration a i , which are respectively expressed as:
[0012]
[0013]
[0014] where n is the label of the end trajectory point of the trip, t i is the moment of the i-th trajectory point, x i , y i are respectively the values of longitude and latitude converted to the plane coordinate system.
[0015] Preferably, the rule for filtering GPS signal drift points is: arrange the absolute values of speed and acceleration from large to small, and remove the trajectory points in the GPS trajectory dataset with the first 1% of the absolute values of speed and acceleration.
[0016] Preferably, use the average interpolation method to fill in the missing data in the trajectory point sequence. For the missing trajectory segment {P i , P i+m}, m > 1, fill in the missing points {P i} between P i+m and P i+l , 0 < l < m, where P i+l = (t i+l , x i+l , y i+l ), and its position coordinates x i+l , y i+l are respectively expressed as:
[0017]
[0018]
[0019] After filling in the missing trajectory segment {P i , P i+m}, it becomes the segment {P i , P i+1 , …, P i+m-1 , P i+m}, the time interval between adjacent trajectory points is 1 second; for each trajectory point P i , add missing variable g i , if P i If g is the original trajectory point i is 0, if it is an interpolation supplement point, then g i = 1, the original GPS trajectory data is converted into D = {P i}, i = 1, ..., n, where P i =(t i ,x i ,y i ,g i ).
[0020] Preferably, the time length of the time sliding window in step 2 is s, s<<n, and for GPS trajectory data D={P i}, slide from the first track point P1 to the last track point P n , the overlap rate between the front and rear sliding windows is r, 0≤r<1, the overlap length between sliding windows is rs, if the time length of the last sliding window trajectory point is less than s / 2, it is removed; the segment unit sequence U={u j}, j = 1, ..., N, where u j = {P b ,…,P c}, c = b + s-1, b, c are fragment units u j The start and end numbers of the inner track points are expressed as:
[0021] b=s·(1-r)·j
[0022]
[0023] The number of fragment units N is expressed as:
[0024]
[0025] Where [·] is the rounding function.
[0026] Preferably, in step 3, the fragment unit u j = {P i}, i = {b,…,c}, its trajectory point P i The speed v i , acceleration a i , Direction change rate w i , respectively expressed as:
[0027]
[0028]
[0029]
[0030] t i is the moment of the ith trajectory point, x i ,y i are the values of latitude and longitude converted to plane coordinate system, b and c are the fragment unit u j The start and end numbers of the inner track points.
[0031] Preferably, the feature vector of the extracted segment unit includes: average speed 15th Percentile Speed 95th percentile speed Average acceleration 15th percentile acceleration 95th percentile acceleration Average rate of change of direction 15th Percentile Directional Change Rate 95th percentile directional change rate Trajectory point missing rate γ i , respectively expressed as:
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042] c=b+s-1, b and c are fragment units u j The start and end numbers of the inner trajectory points. For the i-th trajectory point, if it is missing, then g i =1, otherwise g i =0;
[0043] Where Percentile(x,15) and Percentile(x,95) are the 15th and 95th percentile functions respectively;
[0044] The feature vector is
[0045] Preferably, the specific steps of using the adjacent homogeneous merging algorithm to transform the irregular travel mode sequence into a continuous and stable travel mode label are:
[0046] S61, parameter setting, setting the minimum number of segment units MinNum parameter for travel;
[0047] S62, fragment coding, expands the weight term of the predicted travel mode sequence, that is, {y j} expands to {(y j ,z j )}, where {z j} is the fragment unit weight, the initial state is 1;
[0048] S63, fragment merging, merging adjacent fragment units with the same travel mode label to generate a new fragment tuple (y j ,z' j ), z' j is the number of merged fragment units;
[0049] S64, core fragment labeling, weight z' j Fragments ≥MinNum are marked as core fragments This core segment constitutes the core of the single-mode travel segment, and MinNum is the set threshold;
[0050] S65, fragment correction, from the fragment with the largest weight At the beginning, search for the adjacent non-core segments until the next core segment, and correct the non-core segment travel mode between the two core segments to
[0051] S66, looping steps S63 to S65 until all fragments are merged into a core fragment;
[0052] S67, fragment decoding, core fragment According to its weight Decoded into a travel mode sequence, represented as Y = {y'1, ..., y' N}, corresponding to the sequence The travel modes are fragment unit.
[0053] Preferably, the travel mode chain includes a start time t i , end time t k , travel mode d, expressed as
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The present invention avoids the identification of transportation mode transfer points in the "top-down" strategy. It divides the travel GPS trajectory into segment units of fixed length by defining a time sliding window, and uses a hybrid model of random forest and adjacent homogeneous merging algorithm to identify and correct the travel mode of each segment unit, thereby generating a travel mode chain, which greatly improves the travel mode chain identification accuracy and efficiency of GPS trajectory data. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of GPS trajectory data travel mode chain identification of the present invention;
[0057] Figure 2 GPS track map collected for smartphones;
[0058] Figure 3 This is an effect diagram of the travel mode chain identification example of the present invention. DETAILED DESCRIPTION
[0059] A GPS trajectory travel mode chain identification method based on a "bottom-up" strategy includes the following steps:
[0060] S1. Extracting spatiotemporal information from the collected individual GPS trajectory data, calculating the motion characteristics between adjacent trajectory points, setting rules to filter GPS signal drift points; using the average interpolation method to make up for missing data in the trajectory point sequence, and converting the trajectory into a 1 Hz time series;
[0061] Furthermore, the collected GPS trajectory data is D = {P i}(i=1,…,n),P i =(t i ,x i ,y i ), where n is the number of the end point of the trip, t i is the moment of the ith trajectory point, x i ,y i are the latitude and longitude values of the i-th trajectory point converted to the plane coordinate system;
[0062] Furthermore, the motion characteristics between adjacent trajectory points include the velocity v i and acceleration a i , the calculation formulas are:
[0063]
[0064]
[0065] Further, the rule for filtering GPS signal drift points is: remove the trajectory points in the GPS trajectory dataset where the speed v i and the absolute value of acceleration |a i | are sorted from largest to smallest, and the top 1% of the trajectory points are removed;
[0066] Further, using the average interpolation method, for the missing trajectory segment {P i , P i+m} (m > 1), fill in the missing points {P i} between P i+m and P i+l (0 < l < m), where P i+l = (t i+l , x i+l , y i+l ), and its position coordinates x i+l and y i+l are respectively expressed as:
[0067]
[0068]
[0069] After filling in the missing trajectory segment {P i , P i+m} (m > 1), it becomes the segment {P i , P i+1 , …, P i+m-1 , P i+m}, and the time interval between adjacent trajectory points is 1 second; for each trajectory point P i , add the missing variable g i . If P i is an original trajectory point, then g i is 0. If it is an interpolation supplementary point, then g i is 1, and the original GPS trajectory data is transformed into D = {P i} (i = 1, …, n), where P i = (t i , x i , y i , g i ).
[0070] In some embodiments, the individual GPS trajectory data is collected by a smartphone or a device equipped with a Global Positioning System (GPS) / BeiDou Navigation Satellite System (BDS), etc.
[0071] S2. Set the time window size and the window overlap rate, and divide the time series into fixed-length segment units;
[0072] In some embodiments, the time length of the time sliding window is s (s<<n), and for GPS trajectory data D={P i}(i=1,…,n), slide from the first track point P1 to the last track point P n The overlap rate between the front and rear sliding windows is r (0≤r<1), and the overlap length between sliding windows is rs. If the time length of the last sliding window trajectory point is less than s / 2, it will be removed. Parameter settings: s = 30 seconds, r = 1 / 2.
[0073] Furthermore, the segment unit sequence U={u j}(j=1,…,N), where u j = {P b ,…,P c}(c=b+s-1), b and c are fragment units u respectively j The start and end numbers of the inner track points are expressed as:
[0074] b=s·(1-r)·j
[0075]
[0076] The number of fragment units N is expressed as:
[0077]
[0078] Where [·] is the rounding function.
[0079] S3, calculating the speed, acceleration, and direction change rate of the trajectory points, and extracting feature vectors such as the average speed, average acceleration, average direction change rate, and trajectory point missing rate of the segment unit;
[0080] Furthermore, the fragment unit u j = {P i}, i = trajectory point P in {b,…,c} i The speed v i , acceleration a i , Direction change rate w i , respectively expressed as:
[0081]
[0082]
[0083]
[0084] Specifically, extract the fragment unit u j The characteristics include average speed 15th Percentile Speed 95th percentile speed Average acceleration 15th percentile acceleration 95th percentile acceleration Average rate of change of direction 15th Percentile Directional Change Rate 95th percentile directional change rate Trajectory point missing rate γ j , respectively expressed as:
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095] where Percentile(x,15) and Percentile(x,95) are the 15th and 95th percentile functions respectively; the eigenvector is
[0096] S4, extracting the feature vector of the segment unit of the sample trajectory data with the travel mode label according to steps S1 to S3, taking the labeled travel mode as the dependent variable, establishing and training a random forest model, and using the trained random forest model to predict the travel mode of the segment unit in step S3;
[0097] The trajectory data with travel labels are sample data collected by smart phones or GPS and BDS devices. The investigators complete the annotation of the travel modes in the trajectory, which is expressed as T = {P i}, P i =(t i ,x i ,y i ,d i ), where d i is the travel mode corresponding to the trajectory point;
[0098] Extract the feature vector X of the sample data in steps S1 to S3 j , establish the random forest model Y j =h(X j ,Θ), setting parameters Θ including the number of decision trees, the maximum number of features, the maximum depth of the decision tree, etc., predicting the fragment units {u1,…,u N}, represented by Y = {y1,…,y N}.
[0099] S5. For the segment unit travel mode sequence, an adjacent homogeneous merging algorithm is used to transform the irregular travel mode sequence into a continuous and stable travel mode label. The specific steps are as follows:
[0100] S51, parameter setting, setting the minimum number of segment units MinNum parameter of the trip;
[0101] S52, fragment coding, expands the weight term of the predicted travel mode sequence, that is, {y j} expands to {(y j ,z j )}, where {z j} is the fragment unit weight, the initial state is 1;
[0102] S53, fragment merging, merging adjacent fragment units with the same travel mode label to generate a new fragment tuple (y j ,z' j ), z' j is the number of merged fragment units;
[0103] S54, core fragment annotation, weight z' j Fragments ≥MinNum are marked as core fragments This core segment constitutes the core of the single-mode travel segment, and MinNum is 5;
[0104] S55, fragment correction, from the fragment with the largest weight At the beginning, search for the adjacent non-core segments until the next core segment, and correct the non-core segment travel mode between the two core segments to
[0105] S56, looping steps S53 to S55 until all the fragments are merged into a core fragment;
[0106] S56, fragment decoding, core fragment According to its weight Decoded into a travel mode sequence, represented as Y = {y' j ,…,y' N}, corresponding to the sequence The travel modes are fragment unit.
[0107] S6, converting the segment units with the same continuous travel mode label into single mode travel segments, the single mode travel segment sequence constitutes a travel mode chain, and outputting the travel mode chain in the GPS trajectory. The travel mode chain includes the start time t i , end time t k , travel mode d, expressed as
[0108] The following is a detailed description of an embodiment of the present invention. This embodiment is based on the technical solution of the present invention and provides a detailed implementation method and specific operation process.
[0109] Example:
[0110] The smartphone collects the GPS trajectory of a user for one day, including two trips: the first trip is from home to workplace, with a travel trajectory time of 07:37:08-09:04:15, and the user's transportation methods are "walking-bus-subway-walking", with a total of four single-mode travel segments; the second trip is from workplace to home, with a travel trajectory time of 17:22:40-18:36:17, and the user's transportation methods are "walking-subway-bus-walking", with a total of four single-mode travel segments.
[0111] Table 1 A user's daily travel mode record
[0112]
[0113] Set parameters: time sliding window size s, sliding window overlap rate r, and minimum number of travel segment units MinNum.
[0114] For the GPS travel trajectory data of users in Table 1, Figure 1 The flowchart of the GPS track travel mode chain identification method of the present invention based on the "bottom-up" strategy is shown, which processes and identifies the travel mode chain of the first trip and outputs the travel mode chain identification result.
[0115] The travel trajectory shows the results as follows Figure 2 shown.
[0116] The results of the travel mode chain identification are as follows: Figure 3 shown.
[0117] The above embodiments are preferred embodiments of the present application. Ordinary technicians in this field can also make various changes or improvements on this basis. Without departing from the overall concept of the present application, these changes or improvements should fall within the scope of protection required by the present application.
Claims
1. A GPS trajectory travel mode chain identification method based on a "bottom-up" strategy, characterized in that: The steps include: S1. Extract spatiotemporal information from the collected individual GPS trajectory data, calculate the motion characteristics between adjacent trajectory points, set rules to filter GPS signal drift points, and make up for missing data in the trajectory point sequence, and convert the trajectory into a time series with a set frequency; S2, defining a time sliding window size and a sliding window overlap ratio, and dividing the time series into segment units of fixed length; S3, calculating the velocity, acceleration, and direction change rate of the trajectory point, and extracting the feature vector of the segment unit; S4, extracting the feature vector of the segment unit of the sample trajectory data with the travel mode label according to steps S1 to S3, taking the labeled travel mode as the dependent variable, establishing and training a random forest model, and using the trained random forest model to predict the travel mode of the segment unit in step S3; S5. For the segment unit travel mode sequence, an adjacent homogeneous merging algorithm is used to transform the irregular travel mode sequence into a continuous and stable travel mode label; S6. Convert the segment units with the same continuous travel mode label into single-mode travel segments, and output the travel mode chain in the GPS trajectory.
2. According to the method for identifying GPS trajectory travel mode chains based on the "bottom-up" strategy of claim 1, it is characterized in that: The motion characteristics between adjacent trajectory points include the velocity v i and acceleration a i , respectively expressed as: Among them, t i is the moment of the ith trajectory point, x i ,y i They are the values of longitude and latitude converted to plane coordinate system.
3. The method for identifying GPS trajectory travel mode chains based on the "bottom-up" strategy according to claim 1 is characterized in that: The rule for filtering GPS signal drift points is: arrange the absolute values of speed and acceleration from large to small, and remove the trajectory points with the top 1% of the absolute values of speed and acceleration in the GPS trajectory data set.
4. The method for identifying GPS trajectory travel mode chains based on a "bottom-up" strategy according to claim 1 is characterized in that: Use the average interpolation method to fill in the missing data in the trajectory point sequence. For the missing trajectory segment {P i , P i+m}, m > 1, fill in the missing points {P i} between P i+m and P i+l , 0 < l < m, where P i+l = (t i+l , x i+l , y i+l ), and its position coordinates x i+l , y i+l are respectively expressed as: Track missing fragment {P i ,P i+m }After filling, it becomes a fragment {P i ,P i+1 ,…,P i+m-1 ,P i+ m } , the time interval between adjacent trajectory points is 1 second; for each trajectory point P i , add missing variable g i , if P i If g is the original trajectory point i is 0, if it is an interpolation supplement point, then g i = 1, the original GPS trajectory data is converted into D = {P i }, i = 1, ..., n, where P i =(t i ,x i ,y i ,g i ), n is the number of the end point of the trip, t i is the moment of the ith trajectory point.
5. The method for identifying GPS trajectory travel mode chains based on the "bottom-up" strategy according to claim 1 is characterized in that: The time length of the time sliding window in step 2 is s, s<<n, for GPS trajectory data D={P i }, slide from the first track point P1 to the last track point P n , the overlap rate between the front and rear sliding windows is r, 0≤r<1, the overlap length between sliding windows is rs, if the time length of the last sliding window trajectory point is less than s / 2, it is removed; the segment unit sequence U={u j }, j = 1, ..., N, where N is the number of fragment units, u j = {P b ,…,P c }, c = b + s-1, b, c are fragment units u j The start and end numbers of the inner track points are expressed as: b=s·(1-r)·j The number of fragment units N is expressed as: Where [·] is the rounding function.
6. The method for identifying GPS trajectory travel mode chains based on a "bottom-up" strategy according to claim 1 is characterized in that: The fragment unit u in step 3 j = {P i }, i = {b,…,c}, its trajectory point P i The speed v i , acceleration a i , Direction change rate w i , respectively expressed as: t i is the moment of the ith trajectory point, x i ,y i are the values of latitude and longitude converted to plane coordinate system, b and c are the fragment unit u j The start and end numbers of the inner track points.
7. The method for identifying GPS trajectory travel mode chains based on the "bottom-up" strategy according to claim 6 is characterized in that: The feature vectors of the extracted fragment units include: average speed 15th Percentile Speed 95th percentile speed Average acceleration 15th percentile acceleration 95th percentile acceleration Average rate of change of direction 15th Percentile Directional Change Rate 95th percentile directional change rate Trajectory point missing rate γ j , respectively expressed as: c=b+s-1, b and c are fragment units u j The start and end numbers of the inner trajectory points, s is the time length of the time window, for the i-th trajectory point, if it is missing, then g i =1, otherwise g i =0; Where Percentile(x,15) and Percentile(x,95) are the 15th and 95th percentile functions respectively; The feature vector is 8. The method for identifying GPS trajectory travel mode chains based on a "bottom-up" strategy according to claim 1 is characterized in that: The specific steps of using the adjacent homogeneous merging algorithm to transform irregular travel mode sequences into continuous and stable travel mode labels are as follows: S61, parameter setting, setting the minimum number of segment units MinNum parameter of the trip; S62, fragment coding, expands the weight term of the predicted travel mode sequence, that is, {y j } expands to {(y j ,z j )}, where {z j } is the fragment unit weight, the initial state is 1; S63, fragment merging, merging adjacent fragment units with the same travel mode label to generate a new fragment tuple (y j ,z′ j ), z′ j is the number of merged fragment units; S64, core fragment labeling, weight z′ j Fragments ≥MinNum are marked as core fragments This core segment constitutes the core of the single-mode travel segment, and MinNum is the set threshold; S65, fragment correction, from the fragment with the largest weight At the beginning, search for the adjacent non-core segments until the next core segment, and correct the non-core segment travel mode between the two core segments to S66, looping steps S63 to S65 until all fragments are merged into a core fragment; S67, fragment decoding, core fragment According to its weight Decoded into a travel mode sequence, represented as Y = {y′1,…,y′ n }, corresponding to the sequence The travel modes are fragment unit.
9. The method for identifying GPS trajectory travel mode chains based on a "bottom-up" strategy according to claim 6 is characterized in that: The travel mode chain includes a start time t i , end time t k , travel mode d, expressed as
Citation Information
Patent Citations
Smart-phone track chain-cluster identification method considering sequential DBSCAN
CN105206041A
Method for identifying traveling mode of smart phone by considering integrating degree of road network
CN106446208A