Traffic mode classification method, device and storage medium based on crowdsourced navigation trajectory
By extracting the motion and geographic features of navigation trajectories, combining geographic information data and change point segmentation, and training with multiple classifiers, the problem of insufficient accuracy in motor vehicle mode classification in existing technologies is solved, achieving higher accuracy in traffic mode classification and segmentation.
Patent Information
- Application Number
- CN202211046581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-08-30
AI Technical Summary
Existing technologies lack sufficient accuracy in traffic mode classification based on trajectory data, especially in distinguishing motor vehicle modes (such as cars and buses), making it difficult to achieve refined classification.
By extracting motion and geographic features from navigation trajectories, multiple classifiers are used for training and testing. The best classifier is selected, and trajectory segmentation is performed using change points. Geographic information data is then combined for accurate classification.
It improves the accuracy of traffic mode classification, especially the differentiation accuracy of motor vehicle modes, and achieves higher classification accuracy and segmentation accuracy.
Smart Images

Figure CN115358339B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method, device and storage medium for classifying transportation modes based on crowdsourced navigation trajectories. Background Technology
[0002] Navigation trajectory data, as a form of crowdsourced geographic data, boasts advantages such as low cost, wide coverage, and rapid updates, making it significant for road information extraction and behavioral pattern analysis. Since navigation trajectory data encompasses trajectories from various modes of transportation, data mining based on navigation trajectory data first requires refined classification of transportation modes.
[0003] Current research on traffic mode classification based on trajectory data primarily relies on machine learning, which requires manually constructing expert features. Based on whether supplementary data is used, current methods can be categorized into two types: those based solely on trajectory data and those combining supplementary data.
[0004] However, most traditional methods suffer from insufficient discriminative power in constructing features, making it difficult to distinguish between various modes of transportation, especially motor vehicle modes with similar travel characteristics (such as cars and buses). Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art by providing a traffic mode classification method, device, and storage medium with high classification accuracy based on crowdsourced navigation trajectories.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] According to a first aspect of the present invention, a method for classifying transportation modes based on crowdsourced navigation trajectories is provided, the method comprising the following steps:
[0008] Step S1: Based on the sample trajectory data and geographic information data, extract the motion features and geographic features of the sample trajectory;
[0009] Step S2: Based on the motion features and geographic features extracted in step S1, train and test multiple classifiers, and select the classifier with the highest classification accuracy as the best classifier through accuracy evaluation.
[0010] Step S3: Segment the collected raw navigation trajectory data based on change points to obtain segmented navigation trajectory data;
[0011] Step S4: Based on the segmented navigation trajectory data and geographic information data, calculate the motion characteristics and geographic characteristics of the navigation trajectory data;
[0012] Step S5: Based on the motion and geographical features of the navigation trajectory data obtained in Step S4, input the segmented navigation trajectory data obtained in Step S3 into the best classifier trained in Step S2 to predict the traffic mode category of the navigation trajectory.
[0013] Preferably, step S1 includes the following sub-steps:
[0014] Step S11: Calculate trajectory segment parameters based on sample trajectory data and geographic information data, including motion parameters and geographic parameters; the motion parameters include heading Hc. i Speed V i Acceleration A i and jerk J i The geographic parameters include the shortest distance to the railway (DRWi), the shortest distance to the road (DRi), and the deviation from the road direction (Ddev). i And the shortest distance to the bus stop, DSi;
[0015] Step S12: Calculate motion characteristics based on motion parameters, calculate the statistical characteristics of motion parameters of the trajectory segment, and propose advanced features; the advanced features include the rate of change of heading (HCR), the rate of stopping (SR), and the rate of change of velocity (VCR);
[0016] Step S13: Extract geographic features based on geographic parameters; the geographic features include the Proximity Rate (POR), Course Deviation Rate (DDR), Railway Proximity Rate (RC), Bus Stop Proximity Rate (BSC), and Bus Stop Stop Rate (BSR).
[0017] Preferably, the calculation expressions for the motion parameters in step S11 are as follows:
[0018] Heading Hc i :
[0019] Hc i =|Azimuth i+1 -Azimuth i |
[0020] Speed V i :
[0021]
[0022] Acceleration A i :
[0023]
[0024] jerk J i :
[0025]
[0026] In the formula, Distance i Let P be the trajectory point i To trajectory point P i+1 The distance, Azimuth i For azimuth, t i Represents the trajectory point P i The moment recorded;
[0027] The deviation of the motor vehicle from the road direction Ddev i The calculation expression is:
[0028]
[0029] In the formula, DR i DR i+1 They are the trajectory points P i 、P i+1 The shortest distance to the road segment, Distance i Let P be the point i Point P i+1 The distance.
[0030] Preferably, the statistical characteristics in step S12 include the mean, standard deviation, and percentiles; wherein, the percentiles include 25... th 75 th and 95 th .
[0031] Preferably, the high-level feature calculation expressions in step S12 are as follows:
[0032] 1) Rate of change of heading (HCR):
[0033]
[0034] In the formula, P c This indicates the number of points within the trajectory segment where the heading change exceeds a set threshold, and D represents the total length of the trajectory segment.
[0035] 2) Stopping rate SR:
[0036]
[0037] In the formula, P s This indicates the number of points within the trajectory segment whose speed is less than a set speed threshold;
[0038] 3) Rate of change of velocity (VCR):
[0039]
[0040]
[0041] In the formula, V i Represents the trajectory point P i speed, P v This indicates the number of points within the trajectory segment where VRate is greater than a set threshold.
[0042] Preferably, the calculation expressions for the geographic features in step S13 are as follows:
[0043] 1) Edge proximity ratio (POR):
[0044]
[0045] In the formula, P a This represents the number of points in the trajectory segment whose DRi is greater than a set threshold, where N is the total number of points in the trajectory segment;
[0046] 2) Heading Deviation Rate (DDR):
[0047]
[0048] In the formula, P d Ddev represents the deviation of the road direction in the trajectory segment. i The number of points exceeding the set threshold;
[0049] 3) Railway proximity rate (RC):
[0050]
[0051] In the formula, P r This indicates the number of points in the trajectory segment whose DRWi is less than a set threshold;
[0052] 4) Bus stop proximity rate (BSC):
[0053]
[0054] In the formula, P b This indicates the number of points in the trajectory segment where DSi is less than a set threshold;
[0055] 5) Bus Stop Stop Rate (BSR):
[0056]
[0057] In the formula, P f This indicates the number of points in the trajectory segment where both DSi and velocity are less than a set threshold.
[0058] Preferably, the multiple classifiers in step S2 include K-nearest neighbor classifier, support vector machine classifier, decision tree classifier, random forest classifier, XGBoos, lightweight gradient boosting machine (LGBM) classifier, and convolutional neural network (CNN) classifier.
[0059] Preferably, step S3 specifically comprises:
[0060] First, if the speed of a trajectory point is less than the set speed value, it is considered a walking point; otherwise, it is a non-walking point.
[0061] If the number of consecutive walking points or non-walking points is less than the set point value, they will be merged into the backward trajectory;
[0062] If the continuous distance between the start and end points of a walking segment is less than a set distance value, then the start and end points of the walking segment are considered as change points, and the trajectory is segmented based on the change points.
[0063] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement any of the methods described above.
[0064] According to a third aspect of the invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the methods described herein.
[0065] Compared with the prior art, the present invention has the following advantages:
[0066] 1) This invention extracts five geographical features related to the traffic environment by combining geographic information data, which makes up for the problem of poor classification accuracy of similar motor vehicle types (buses, cars and trains) and improves the overall classification accuracy;
[0067] 2) This invention uses a trajectory segmentation method based on changing points to segment navigation trajectory data, resulting in more accurate segmentation results;
[0068] 3) This invention uses a pre-trained optimal classifier to predict the mode of transportation in navigation trajectory data, resulting in higher prediction accuracy. Attached Figure Description
[0069] Figure 1 Flow chart of the method of the present invention. Detailed Implementation
[0070] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0071] Example
[0072] This embodiment presents a traffic mode classification method based on crowdsourced navigation trajectories, such as... Figure 1 As shown, the method includes:
[0073] 1. Calculate trajectory segment parameters based on sample trajectory data and geographic information data, including motion parameters and geographic parameters:
[0074] The motion parameters include: heading Hc i Speed V i Acceleration A i and jerk J i ;
[0075] The geographic parameters include: the shortest distance to the railway (DRWi), the shortest distance to the road (DRi), and the deviation from the road direction (Ddev). i And the shortest distance to the bus stop, DSi;
[0076] 1) Based on Distance i and azimuth i Calculate motion parameters:
[0077] Hc i =|Azimuth i+1 -Azimuth i |
[0078]
[0079]
[0080]
[0081] In the formula, t i Represents the trajectory point P i The moment recorded;
[0082] 2) Calculate geographic parameters based on data from motor vehicle roads, railway stations, and bus stops:
[0083] The shortest distance to the railway, DRWi: for each trajectory point P i DRWi represents trajectory point P i The shortest distance to the railway section.
[0084] Shortest distance DRi to the motor vehicle road: for each trajectory point P i DRi represents trajectory point P i The shortest distance to the road section for motor vehicles.
[0085] Motor vehicle road direction deviation Ddev i For each trajectory point P i Devi represents the angle between the trajectory's direction of travel and the road's direction.
[0086]
[0087] In the formula, DRi represents the trajectory point P. i The shortest distance to the road segment, Distance i Let P be the point i Point P i+1 The distance;
[0088] Shortest distance DSi to the bus stop: for each trajectory point P i DSi represents trajectory point P i The shortest distance to the bus stop.
[0089] 3) Calculate motion characteristics based on motion parameters. Use statistical methods to calculate statistical characteristics based on the motion parameters of the trajectory segment, including mean, standard deviation, and percentile (25%). th 75 th (95th), a total of 20 statistical characteristics;
[0090] Three more advanced features were extracted: rate of change of heading (HCR), rate of stop (SR), and rate of change of velocity (VCR), resulting in a total of 23 motion features.
[0091]
[0092] In the formula, P c This indicates the number of points within the trajectory segment whose heading changes exceed a certain threshold; D represents the total length of the trajectory segment.
[0093]
[0094] In the formula, P s This indicates the number of points within the trajectory segment whose speed is less than a certain threshold.
[0095]
[0096] In the formula, V i P represents the velocity of the trajectory point. v This indicates the number of points within a trajectory segment whose VRate is greater than a certain threshold.
[0097]
[0098] 4) Five geographic features are extracted based on geographic parameters, including Probability of Approach (POR), Course Deviation Rate (DDR), Railway Proximity Rate (RC), Bus Stop Proximity Rate (BSC), and Bus Stop Stop Rate (BSR). The specific calculation formulas are as follows:
[0099] Edge ratio (POR):
[0100]
[0101] In the formula, P a This represents the number of points in the trajectory segment whose DRi is greater than a set threshold, where N is the total number of points in the trajectory segment;
[0102] Heading deviation rate (DDR):
[0103]
[0104] In the formula, P d Ddev represents the deviation of the road direction in the trajectory segment. i The number of points exceeding the set threshold;
[0105] Railway proximity rate (RC):
[0106]
[0107] In the formula, P r This indicates the number of points in the trajectory segment whose DRWi is less than a set threshold;
[0108] Bus stop proximity rating (BSC):
[0109]
[0110] In the formula, P b This indicates the number of points in the trajectory segment where DSi is less than a set threshold;
[0111] Bus Stop Stop Rate (BSR):
[0112]
[0113] In the formula, P f This indicates the number of points in the trajectory segment where both DSi and velocity are less than a set threshold.
[0114] 2. Standardize the extracted features and train and test them in multiple classifiers. Compare the classification accuracy of the seven classifiers and select the best classifier.
[0115] The multiple classifiers include K-nearest neighbor classifier, support vector machine classifier, decision tree classifier, random forest classifier, XGBoos, lightweight gradient boosting machine (LGBM) classifier, and convolutional neural network (CNN) classifier.
[0116] 3. The navigation trajectory data is segmented using a trajectory segmentation method based on changing points:
[0117] First, if the speed of a trajectory point is less than the set speed value, it is considered a walking point; otherwise, it is a non-walking point.
[0118] If the number of consecutive walking points or non-walking points is less than the set point value, they will be merged into the backward trajectory;
[0119] If the continuous distance between the start and end points of a walking segment is less than a set distance value, then the start and end points of the walking segment are considered as change points, and the trajectory is segmented based on the change points.
[0120] 4. After trajectory segmentation, each navigation trajectory is divided as much as possible into trajectories containing only one mode of transportation;
[0121] Based on steps 1 to 3, 28 features of the navigation trajectory segment are extracted. The optimal classifier trained in step S4 is used to predict the traffic mode category of the navigation trajectory data, and the final traffic mode classification result of the navigation trajectory is obtained.
[0122] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0123] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0124] The processing unit executes the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S5 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 by any other suitable means (e.g., by means of firmware).
[0125] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.
[0126] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0128] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A transportation mode classification method based on crowdsourced navigation trajectories, characterized in that, The method includes the following steps: Step S1: Based on the sample trajectory data and geographic information data, extract the motion features and geographic features of the sample trajectory, including the following sub-steps: Step S11: Calculate trajectory segment parameters based on sample trajectory data and geographic information data, including motion parameters and geographic parameters; the motion parameters include heading. ,speed acceleration and accelerometer The geographic parameters include the shortest distance to the railway (DRWi), the shortest distance to the road (DRi), and the deviation of the road direction. And the shortest distance to the bus stop, DSi; Step S12: Calculate motion characteristics based on motion parameters, calculate the statistical characteristics of the motion parameters of the trajectory segment, and propose high-level features; the high-level features include the rate of change of heading. Stop rate and rate of change of velocity ; Step S13: Extract geographic features based on geographic parameters; the geographic features include Probability of Approach (POR), Course Deviation Rate (DDR), Railway Proximity Rate (RC), Bus Stop Proximity Rate (BSC), and Bus Stop Stop Rate (BSR). Step S2: Based on the motion features and geographic features extracted in step S1, train and test multiple classifiers, and select the classifier with the highest classification accuracy as the best classifier through accuracy evaluation. Step S3: Segment the collected raw navigation trajectory data based on change points to obtain segmented navigation trajectory data, specifically as follows: First, if the speed of a trajectory point is less than the set speed value, it is considered a walking point; otherwise, it is a non-walking point. If the number of consecutive walking points or non-walking points is less than the set point value, they will be merged into the backward trajectory; If the continuous distance between the start and end points of a walking segment is less than a set distance value, then the start and end points of the walking segment are considered as change points, and the trajectory is segmented based on the change points; Step S4: Based on the segmented navigation trajectory data and geographic information data, calculate the motion characteristics and geographic characteristics of the navigation trajectory data; Step S5: Based on the motion and geographical features of the navigation trajectory data obtained in Step S4, input the segmented navigation trajectory data obtained in Step S3 into the best classifier trained in Step S2 to predict the traffic mode category of the navigation trajectory.
2. The transportation mode classification method based on crowdsourced navigation trajectory according to claim 1, characterized in that, The calculation expressions for the motion parameters in step S11 are as follows: course : speed : acceleration : accelerometer : In the formula, For trajectory points To the trajectory point distance, It is the azimuth angle. Represents trajectory points The moment recorded; The deviation of the motor vehicle from the road direction The calculation expression is: In the formula, Trajectory points The shortest distance to the road segment, For point Time The distance.
3. The transportation mode classification method based on crowdsourced navigation trajectory according to claim 1, characterized in that, The statistical characteristics in step S12 include the mean, standard deviation, and percentiles; wherein, the percentiles include 25... th 75 th and 95 th .
4. The transportation mode classification method based on crowdsourced navigation trajectory according to claim 1, characterized in that, The high-level feature calculation expressions in step S12 are as follows: 1) Rate of change of heading : In the formula, This indicates the number of points within the trajectory segment where the heading change exceeds a set threshold. Indicates the total length of the trajectory segment; 2) Stopping rate : In the formula, This indicates the number of points within the trajectory segment whose speed is less than a set speed threshold; 3) Rate of change of velocity : In the formula, Represents trajectory points speed, Indicates the trajectory segment The number of points that exceed the set threshold.
5. The transportation mode classification method based on crowdsourced navigation trajectory according to claim 1, characterized in that, The calculation expressions for the geographic features in step S13 are as follows: 1) Edge proximity ratio (POR): In the formula, This indicates the number of points in the trajectory segment where DRi is greater than a set threshold. This represents the total number of points in the trajectory segment; 2) Heading Deviation Rate (DDR): In the formula, Indicates the deviation of road direction in the trajectory segment The number of points exceeding the set threshold; 3) Railway proximity rate (RC): In the formula, This indicates the number of points in the trajectory segment whose DRWi is less than a set threshold; 4) Bus stop proximity rate (BSC): In the formula, This indicates the number of points in the trajectory segment where DSi is less than a set threshold; 5) Bus Stop Stop Rate (BSR): In the formula, This indicates the number of points in the trajectory segment where both DSi and velocity are less than a set threshold.
6. The transportation mode classification method based on crowdsourced navigation trajectory according to claim 1, characterized in that, The multiple classifiers in step S2 include K-nearest neighbor classifier, support vector machine classifier, decision tree classifier, random forest classifier, XGBoos, lightweight gradient boosting machine (LGBM) classifier, and convolutional neural network (CNN) classifier.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for identifying vehicles from GPS (global positioning system) data
CN106227859A
Trip mode identification method based on GPS trajectory data
CN107330469A