Trajectory data-based method for identifying electric bicycle reverse driving behavior on large-curvature road
By using data cleaning and improved map matching algorithms, the system identifies the wrong-way riding behavior of electric bicycles on roads with high curvature, solving the problem of recognition failure in existing technologies. This achieves highly accurate and robust detection of wrong-way riding behavior, thereby improving the efficiency of traffic safety management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF TECH
- Filing Date
- 2024-12-25
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot effectively identify the reverse riding behavior of electric bicycles on roads with high curvature, especially when the trajectory quality is poor or the road section has high curvature, which leads to recognition failure.
By adopting an integrated technical solution of data cleaning, map matching and behavior recognition, missing and drifting points in trajectory data are cleaned, and trajectory chains are accurately matched to urban road network data using an improved map matching algorithm. By identifying wrong-way behavior and quantifying road network risks, city-level all-weather wrong-way behavior detection is achieved.
It improves the accuracy and robustness of identifying wrong-way driving behavior, adapts to road conditions with different curvatures, realizes fully automated processing, and enhances the efficiency and effectiveness of traffic safety management.
Smart Images

Figure CN119785599B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation information processing technology, and more specifically relates to a method for recognizing the reverse driving behavior of electric bicycles on roads with large curvature based on trajectory data. Background Technology
[0002] In recent years, electric bicycles have become a primary choice for short-distance travel due to their speed, convenience, and affordability. However, the surge in their use has also brought safety issues. Most electric bicycle traffic accidents are related to high-risk riding behaviors; therefore, accurately identifying these behaviors is crucial for strengthening electric bicycle traffic safety management.
[0003] Among numerous risky cycling behaviors, riding against traffic is the most frequent, second only to running red lights. Riding against traffic can be categorized into one-way and two-way riding depending on the road type. Currently, the identification of riding against traffic based on electric bicycle trajectory data is widely used. For example, patent CN201910865192.5 proposes "A Method for Identifying Riding Against Traffic Based on Bicycle Trajectory Data," which achieves the identification of riding against traffic on both one-way and two-way roads and has been widely adopted in the industry. However, the method provided by this patent is only applicable to straight road segments or road segments with small curvature, and it also has high requirements for trajectory quality. (See attached...) Figure 2 As shown, on one-way roads, when poor trajectory quality leads to position drift, the direction angle difference easily exceeds the threshold, causing recognition failure. On two-way roads, when the road curvature is too large, the reverse trajectory chain will be located on the right side of the temporary direction, causing recognition failure. In these cases, existing algorithms are no longer applicable. Therefore, how to provide a method for recognizing reverse behavior based on electric bicycle trajectory data that adapts to road segments with large curvature and low trajectory quality is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The technical problem this invention aims to solve is to address the aforementioned shortcomings of existing technologies by proposing a method for identifying wrong-way driving behavior on roads with high curvature based on electric bicycle trajectory data. The key feature is that it overcomes the limitations of existing technologies in effectively identifying wrong-way driving behavior on roads with excessive curvature by employing an integrated technical solution of "data cleaning - map matching - behavior recognition - risk quantification" to quickly and accurately identify wrong-way driving behavior. Furthermore, by leveraging emerging data platforms such as shared electric bicycles and delivery electric bicycles, it can achieve city-level, all-weather detection of wrong-way driving behavior, quantify road risk levels, and provide technical support for traffic safety management.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] Step 1: Acquisition and cleaning of electric bicycle trajectory data, mainly cleaning up missing and drifting trajectory data;
[0007] Step 2: Obtain road network data, sort the trajectory sub-chains and trajectory points in the sub-chains in ascending order of time, perform map matching, and accurately match the trajectory chains to the urban road network data;
[0008] Step 3: Use trajectory data to identify reverse driving behavior;
[0009] Step 4: Classification of road network risk levels.
[0010] According to the present invention, a method for identifying reverse riding behavior on high-curvature roads based on electric bicycle trajectory data is provided. Step 1, electric bicycle trajectory data acquisition and cleaning, includes:
[0011] Step 1.1: The electric bicycle trajectory data comes from the anonymized data of the shared electric bicycle operator, which includes the order number, trajectory timestamp, and latitude and longitude coordinates.
[0012] Step 1.2: Clean up missing and drifting points in the trajectory data. These points include those that are abnormal due to GPS sensor malfunctions on electric bicycles or obstructions from tall buildings in the city, which are manifested as points that deviate too much from the actual location (drifting points) or missing points (missing points).
[0013] According to the present invention, a method for recognizing reverse riding behavior on high-curvature roads based on electric bicycle trajectory data is provided, wherein step 2, map matching, includes:
[0014] Step 2.1: Road network data preparation.
[0015] Step 2.2: Perform map matching. After each trajectory point is matched with the map, three attributes will be added: road segment ID, one-way / two-way identification, and road direction angle.
[0016] According to the present invention, a method for recognizing wrong-way riding behavior on high-curvature roads based on electric bicycle trajectory data is provided, wherein step 3, the wrong-way riding behavior recognition, includes:
[0017] Step 3.1: Arrange the trajectory points P in trajectory chain T in ascending time order. i , where i is the time sequence identifier of the trajectory point.
[0018] Step 3.2: Place P i P i+1 Projected onto matching road segment E j Obtain the projection point P′ i 、P′ i+1 j is the road segment code identifier.
[0019] Step 3.3: For the identification of the reverse point on a one-way road, when P′i 、P′ i+1 Belonging to the same road segment e jk , and P′ i 、P′ i+1 With e jk Starting point v jl distance d i,jl <d i+1,jl At that time, P i If P' is a point of reverse movement, then it is a point of forward movement; otherwise, it is a point of forward movement. i 、P′ i+1 Not belonging to the same road segment e jk When comparing P′ i Belongs to jk2 Position labels k2 and P′ i+1 Belongs to jk1 The relative size of the position label k1, if P′ i The k2 label is larger, and the label P is larger. i If it is a point of reverse movement, then it is a point of forward movement; otherwise, it is a point of forward movement. Where e... jk v represents the sub-segment of the road segment where the projection point is located. jl Here, k and l are the starting points of the road segment sub-segment, and k and l are the code identifiers.
[0020] Step 3.4: For the identification of the reverse direction point on a two-way road, use the projection point P′ i 、P′ i+1 Construct temporary direction vectors make Represents the trajectory point P i The direction of riding. When a × b i =a x b y -a y b x When P > 0, i If it is a point of reverse movement, then it is a point of forward movement; otherwise, it is a point of forward movement.
[0021] Step 3.5: Calculate the number NW of all retrograde points in trajectory chain T. T With the number of trajectory points N T When NW T / N T When the value is greater than 0.5, the trajectory chain T is a reverse trajectory chain; otherwise, it is a forward trajectory chain.
[0022] According to the present invention, a method for identifying reverse riding behavior on high-curvature roads based on electric bicycle trajectory data is provided, wherein step 4, road network risk level classification, includes:
[0023] Step 4.1: Based on the shared electric bicycle trajectory data, count the frequency of wrong-way riding behavior on each road segment in a day, classify the severity of wrong-way riding behavior with appropriate frequency panes, and display the road network risk level based on the GIS map platform.
[0024] The present invention provides a method for recognizing reverse riding behavior on roads with high curvature based on electric bicycle trajectory data, which has at least the following advantages compared with the prior art:
[0025] (1) Strong adaptability to road conditions. The method proposed in this invention can adapt to the identification of reverse driving behavior under road conditions with different curvatures, and has higher accuracy.
[0026] (2) Strong data robustness. The reverse behavior recognition method proposed in this invention can adapt to situations with low trajectory data accuracy and has better robustness.
[0027] (3) Integrated technical solution. Through the integrated technical solution of "data cleaning - map matching - behavior recognition - risk quantification", this invention realizes the full-process automation of data acquisition and risk assessment, which helps to improve the efficiency and effectiveness of traffic safety management. Attached Figure Description
[0028] Figure 1 This is a flowchart illustrating a method for identifying reverse riding behavior based on electric bicycle trajectory data.
[0029] Figure 2 A diagram illustrating errors in identifying reverse driving behavior;
[0030] Figure 3 A schematic diagram for identifying the wrong-way point on a one-way road;
[0031] Figure 4 A schematic diagram for identifying the wrong-way point on a two-way road;
[0032] Figure 5 Schematic diagram of an embodiment for identifying reverse driving behavior on a one-way road;
[0033] Figure 6 A schematic diagram illustrating an implementation method for identifying reverse driving behavior on a two-way road;
[0034] Figure 7 This is a schematic diagram showing the frequency distribution of wrong-way driving behavior on the road network. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0036] Please see the appendix Figure 1 This invention provides a method for recognizing reverse riding behavior on curves based on electric bicycle trajectory data, comprising the following steps:
[0037] Step 1: Acquisition and cleaning of electric bicycle trajectory data;
[0038] Step 2: Map matching;
[0039] Step 3: Use trajectory data to identify reverse driving behavior on one-way and two-way roads;
[0040] Step 4: Classification of road network risk levels.
[0041] The specific implementation steps are as follows:
[0042] (1) Acquisition and cleaning of electric bicycle trajectory data
[0043] The electric bicycle trajectory data comes from anonymized data from shared electric bicycle operators, and drift points and missing points in the trajectory are cleaned. For drift points, when d i,i+1 >v thr t i,i+1 At that time, delete trajectory point P. i For missing points, when t i,i+1 >t thr At that time, the original trajectory chain is truncated, and a new trajectory sub-chain is generated. Where P... i Represents the i-th trajectory point, e ,i+1 Let P be the trajectory point i With P i+1 Euclidean distance, t i,i+1 Let P be the trajectory point i With P i+1 The time interval, v thr t is the upper limit of the permissible speed. thr This represents the maximum allowable time.
[0044] (2) Map matching
[0045] 1) Road Network Preparation: Road network data was obtained through the open-source map platform OSM (OpenStreetMap). Each road segment E in the road network... j It contains four elements, E j = (rid, roneway, rdirection), where rid represents the road segment ID, roneway represents the one-way / two-way identifier, and rdirection represents the road segment direction. In OSM, road segment E j E is a set consisting of several directed acyclic line segments. j =(v j ,e j ). Among them, e j ={e j1 ,e j2 ,…,e jk ,…,e jm} represents the set of sub-segments of a road segment, v j ={v j1 ,v j2 ,…,vjl ,…,v jq Let} represent the set of road segment nodes, 1≤k≤m, 1≤l≤q. Here, k and l represent the road segment nodes E. j The sub-segment and node codes, where m and q are the sub-segments and nodes of road segment E, respectively. j The total number of sub-segments and nodes.
[0046] Subsequently, highways and expressways where electric bicycles could not pass were removed.
[0047] 2) Map Matching: This invention employs an interactive voting-based map matching (IVMM) algorithm, with improvements made to the algorithm considering the operational characteristics of electric bicycles. First, electric bicycles may cross roads at any location on two-way roads or at pedestrian crossings on one-way roads. Matching on two-way roads does not affect subsequent behavior recognition results, while matching on one-way roads interferes with the recognition results after crossing the road (e.g., whether it's against traffic). This is because the original OSM road network does not label the topological relationships at pedestrian crossings on one-way roads. Therefore, the road segments at pedestrian crossings are truncated and connected by new road segments to ensure the accuracy of behavior recognition. Second, considering the frequent occurrence of electric bicycles traveling against traffic, especially at high speeds, the road topology is changed from a directed graph to an undirected graph to avoid situations where the against-traffic trajectory chain cannot be matched or is incorrectly matched to the oncoming lane, ensuring correct matching of the against-traffic trajectory chain. Finally, each trajectory point gains three attributes after map matching: road segment ID, one-way / two-way identification, and road direction angle.
[0048] (3) Identification of reverse driving behavior
[0049] 1) Identification of wrong-way driving behavior on one-way roads
[0050] In an OSM map, a one-way road is a directed graph vector with correct direction labeling, and its direction is the same as the normal travel direction of vehicles. Therefore, the trajectory point P can be used as a reference. i With road segment e jk Relationship identification of reverse behavior. (See attached image) Figure 3 As shown, the recognition steps are as follows:
[0051] a) Data Indexing: Sort the n trajectory points in trajectory chain T in ascending order of time, and define the current trajectory point and the next trajectory point as P, respectively. i P i+1 .
[0052] b) Segment / sub-segment identification: P i P i+1 Projected onto the matched road segment E j The resulting projection point is P′. i 、P′ i+1 .
[0053] c) Identification of retrograde points: When P′ i、P′ i+1 Belonging to the same e jk When, calculate P′ i 、P′ i+1 With e jk Starting point v jl distance d i,jl d i+1,jl When d i+1,jl <d i,jl Mark P i If P' is a point of reverse movement, then it is a point of forward movement; otherwise, it is a point of forward movement. i 、P′ i+1 Not belonging to the same e jk At that time, assume P′ i ∈e jk2 、P′ i+1 ∈e jk1 Compare the labels of k1 and k2; if P′ i The k2 label is larger, and the label P is larger. i If it is a point of reverse movement, then it is a point of forward movement;
[0054] d) Reverse behavior recognition: Calculate the number NW of all reverse points in trajectory chain T. T With the number of trajectory points N T When NW T / N T When the value is greater than 0.5, the trajectory chain T is a reverse trajectory chain; otherwise, it is a forward trajectory chain.
[0055] 2) Identification of driving against traffic on both directions of the road
[0056] Two-way roads are directed graph vectors with incorrect direction labeling in OSM maps, so one-way road identification methods cannot be used.
[0057] Therefore, geometric methods can be used to identify reverse driving behavior on two-way roads. (See attached image) Figure 4 As shown, the recognition steps are as follows:
[0058] a) Data Indexing: Sort the n trajectory points in trajectory chain T in ascending order of time, and define the current trajectory point and the next trajectory point as P, respectively. i P i+1 .
[0059] b) Segment / sub-segment identification: P i P i+1 Projected onto the matched road segment E j The resulting projection point is P′. i 、P′ i+1 .
[0060] c) Reverse direction point identification: Construct a temporary direction vector, let the projection point P′ i 、P′ i+1If the endpoints of the temporary direction vector are given, then the vector... make Represents the trajectory point P i If the direction of riding is reversed, then the trajectory point P will be the reverse direction. i To the left of a, that is, when a × b i =a x b y -a y b x When >0, mark P. i If it is a point of reverse movement, then it is a point of forward movement; otherwise, it is a point of forward movement.
[0061] d) Reverse behavior recognition: Calculate the number NW of all reverse points in trajectory chain T. T With the number of trajectory points N T When NW T / N T When the value is greater than 0.5, the trajectory chain T is a reverse trajectory chain; otherwise, it is a forward trajectory chain.
[0062] (4) Road network risk level classification
[0063] 1) Based on shared electric bicycle trajectory data, the frequency of wrong-way riding behavior on various road sections in a certain area of Changsha City was statistically analyzed within a day. Three levels were then defined using appropriate frequency panes, and road sections were marked on a GIS map platform using green, red, and black colors to indicate the severity of wrong-way riding behavior, in order to observe the risk level at the road network level. (See attached image) Figure 7 As shown.
[0064] The following are application examples of the present invention.
[0065] Using Xinyao Road and Linda Road in Changsha City, Hunan Province as examples of one-way and two-way roads respectively, we conducted a study on identifying reverse driving behavior on curves.
[0066] (1) Obtain the riding trajectory of shared electric bicycles and complete the data cleaning work.
[0067] (2) Perform map matching on the cycling trajectory and add three elements to each trajectory point: road segment ID, one-way and two-way identification and road direction angle.
[0068] (3) Identification of reverse driving behavior
[0069] 1) Identification of wrong-way driving behavior on one-way roads
[0070] Appendix Figure 5 The diagram shows the road topology of Xinyao Road (marked in blue). Let this road segment be E. j The matching trajectory chain is T. First, the one-way road reverse driving behavior recognition algorithm provided by patent CN201910865192.5 is used for judgment. Taking due north as 0° and clockwise as the positive direction, E can be obtained. jThe direction angle is 238°. The trajectory point P... i The direction angles are successively related to road segment E j A comparison of direction angles showed that, except for P4 and P6, all other trajectory points were correctly identified as points of reverse movement. Upon investigation, the direction angle of P4 was 347°, with a difference of 109°, and the direction angle of P6 was 332°, with a difference of 94°. Both met the reverse movement criteria of direction angles [135°, 225°]. The proposed curve reverse movement identification algorithm was then used for further determination. It was determined that points P1 to P... 11 All were correctly identified as retrograde points. For trajectory points P4 and P5, their projection points P′4 and P′5 are both located at e. j3 The calculations yielded P′4, P′5, and v. j3 The distances are 90m and 80m respectively. Therefore, P′4 and v j3 Since they are further apart, P4 is marked as the retrograde point. Similarly, for trajectory points P6 and P7, their projection points P′6 and P′7 are both located at e. j3 The calculations yielded P′6, P′7, and v. j3 The distances are 77m and 75m respectively. Therefore, P′6 and v j3 At a greater distance, P6 was marked as the retrograde point.
[0071] In summary, both patent CN201910865192.5 and this invention can identify trajectory chain T as reverse driving behavior in one-way roads. However, because patent CN201910865192.5 sets a hyperparameter for the direction angle difference during identification, trajectory points outside the hyperparameter range fail to be identified. The reverse driving behavior identification algorithm proposed in this invention relies on road topology relationships, avoiding the problems caused by defining hyperparameters, and thus exhibits stronger robustness.
[0072] 2) Identification of driving against traffic on both directions of the road
[0073] Appendix Figure 6 The diagram shows the road topology of Linda Road (marked in blue). Let this road segment be E. j The matching trajectory chain is T. First, the bidirectional road reverse driving behavior recognition algorithm provided by patent CN201910865192.5 is used for determination. The trajectory point P is... i In sequence, determine a×b with the temporary direction vector of the road. i Whether the value is greater than 0, P1 and P2 were ultimately determined to be reverse points, while the rest were misclassified as forward points. (See attached...) Figure 4 It can be seen that P1 to P 12All points are in reverse direction. P1 and P2 are located to the left of the temporary road direction vector, while the remaining trajectory points are to the right. Therefore, the reverse direction behavior is misjudged. It is evident that due to the excessive curvature of the road segment, the temporary road direction vector cannot be used as a reference vector for reverse direction behavior identification, leading to the failure of the reverse direction behavior judgment. Subsequently, the curve reverse direction identification algorithm proposed in this invention is used for judgment. It is determined that P1 to P... 12 All were correctly identified as retrograde points. Taking trajectory point P6 as an example, the projection point of trajectory point P6 is located at e. j4 P′6=(112.984239,28.139520), the projection point of trajectory point P7 is located at e. j5 P7 ′ = (112.983685, 28.139678). With As a temporary direction vector for the road, then The calculation yields a × b i =1.505×10 -7 >0. Therefore, P6 is marked as the retrograde point. Ultimately, the entire trajectory chain T is correctly identified as a retrograde trajectory chain.
[0074] In summary, regarding the identification of reverse driving behavior on two-way roads, patent CN201910865192.5 failed to correctly identify the reverse driving trajectory chain T, while this invention correctly identified it. When the road curvature is too large, using the start and end points of road segments as temporary road direction vectors is no longer applicable. The reverse driving behavior identification algorithm proposed in this invention relies on using the projection points of trajectory points as temporary road direction vectors, avoiding incorrect matching caused by excessive road curvature, and thus achieving higher accuracy.
[0075] Matters not covered in this invention are common knowledge.
[0076] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A large-curvature road electric bicycle reverse behavior identification method based on trajectory data, characterized by, By using geometry and road topology, reverse driving behavior is identified when there is significant road curvature. The identification method includes the following steps: Step S1: Acquisition and cleaning of electric bicycle trajectory data; The process of acquiring and cleaning trajectory data in step S1 is as follows: Step S11: The electric bicycle trajectory data comes from the anonymized data of the shared electric bicycle operator, which includes the order number, trajectory timestamp, and latitude and longitude coordinates; Step S12: Clean up drift points and missing points in the trajectory data caused by the failure of the electric bicycle's GPS sensor or the obstruction of urban tall buildings; Step S2: Obtain road network data, arrange trajectory sub-chains and trajectory points within the sub-chains in ascending time order, perform map matching, and accurately map the trajectory chains to the urban road network data; the map matching process in step S2 is as follows: Step S21: Road network data preparation; Step S22: After each trajectory point is matched with the map, three attributes will be added: road segment ID, one-way / two-way identification, and road direction angle; Step S3: Using trajectory data, identify reverse driving behavior on roads with high curvature; the reverse driving behavior identification process in step S3 is as follows: Step S31: arranging the track points in the track sub-chain in ascending order of time wherein is a time order identification of the track point; Step S32: , Projected onto matching road segments Obtain the projection point , , For road segment coding identification; Step S33: The method for identifying the reverse point on a one-way road is as follows: when , Belonging to the same road segment ,and , and starting point distance < hour, If it is a point of reverse movement, then it is a point of forward movement; when , Not belonging to the same road segment At times, comparison Belong Location label and Belong Location label The relative size, if of 2 is a larger number, marked If it is a point of reverse movement, then it is a point of forward movement; among them The sub-segment of the road segment where the projection point is located. This is the starting point of the road segment. and For encoding identification; Step S34: The method for identifying the reverse driving point on a two-way road is to use the projection point... , Construct temporary direction vectors = =( ),make = =( ) represents the trajectory point The direction of riding; when At 0 o'clock, If it is a point of reverse movement, then it is a point of forward movement; Step S35: Calculate the trajectory chain Total number of retrograde points With the number of trajectory points ,when When >0.5, the trajectory chain If it is a reverse trajectory chain, then it is a forward trajectory chain; Step S4: Based on the electric bicycle trajectory data, classify the road network risk level.
2. The method for recognizing the reverse-traffic behavior of electric bicycles on roads with high curvature based on trajectory data according to claim 1, characterized in that, The process of classifying the road network risk level in step S4 is as follows: Based on the trajectory data of shared electric bicycles, the frequency of wrong-way riding behavior on each road segment is counted within a day, and the severity of wrong-way riding behavior is divided into appropriate frequency panes. The risk level of the road network is displayed based on a GIS map platform.
3. The method for recognizing the reverse-traffic behavior of electric bicycles on roads with high curvature based on trajectory data according to claim 2, characterized in that, For the drift point, when At that time, delete trajectory points ; For missing points, when At that time, the original trajectory chain is truncated, and a new trajectory sub-chain is generated; among them, Representing the A trajectory point, For trajectory points and European distance, For trajectory points and The time interval, This is the maximum permissible speed. This represents the maximum allowable time.