A pedestrian and non-motor vehicle trajectory segmentation method and system based on change point detection
By calculating the characteristic distance of trajectory points and dividing them into sub-trajectories based on a change point detection method, the robustness and accuracy issues of pedestrian and non-motor vehicle trajectory segmentation in the existing technology are solved, and more accurate pedestrian and non-motor vehicle behavior analysis is achieved.
Patent Information
- Application Number
- CN202410996568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-07-24
AI Technical Summary
Existing technologies are not robust in segmenting pedestrian and non-motor vehicle trajectories, have low segmentation accuracy, and are greatly affected by parameters. It is especially difficult to accurately understand the behavior patterns of pedestrians and non-motor vehicles in densely trafficked urban intersections.
A method based on change point detection is adopted to calculate the characteristic distance of trajectory points, identify the change points of movement mode, divide the trajectory data into different sub-trajectories, and perform state discrimination on the sub-trajectories. Sub-trajectories with the same state are merged to obtain the pedestrian and non-motor vehicle trajectory segmentation results.
It enhances the robustness and accuracy of trajectory segmentation, avoids the trouble of manually setting segmentation thresholds, enables a more detailed understanding of the movement status of pedestrians and non-motor vehicles, and improves data quality and analysis efficiency.
Smart Images

Figure CN119027448B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of trajectory analysis, and in particular to a pedestrian and non-motor vehicle trajectory segmentation method and system based on change point detection. Background Art
[0002] The development of sensing technology over the past decade has led to an explosive growth in mobile object data. This massive amount of data provides a foundation for traffic behavior analysis, and analysis of this data is necessary to obtain more effective conclusions. In the current traffic environment, pedestrians and non-motorized vehicles are often at a disadvantage in traffic, especially at dense urban intersections. The movement and speed of pedestrians and non-motorized vehicles vary greatly, and their behavior directly affects traffic safety and efficiency at the entire intersection. Therefore, it is necessary to segment pedestrian and non-motorized vehicle trajectories and understand their different movement states. This will help to gain a deeper understanding of their behavior patterns and provide strong data support for the development of traffic management plans.
[0003] Currently, there are various approaches to trajectory segmentation. For example, thresholds are used to detect trajectory sequences that meet required spatiotemporal conditions. Common thresholds include spatial distance, time duration, velocity, and angular change thresholds. While this approach is easy to implement and relatively intuitive, it is not robust to noise. Another approach is trajectory segmentation based on a cost function. This method constructs the most uniform trajectory segments by minimizing a specific cost function. For example, GRASP-UTS, based on the minimum description length principle, seeks a trajectory segmentation method that maximizes data compression. However, this method has high time complexity and is not suitable for large datasets. Furthermore, clustering-based segmentation methods are primarily used to describe the behavior of individuals staying in a specific area for longer than a certain period of time. This method detects stops by identifying spatially and temporally adjacent continuous sequences. However, this method is significantly affected by clustering parameters and can easily lead to over-segmentation or incomplete segmentation, especially for mixed pedestrian and non-motorized vehicle trajectories. Summary of the Invention
[0004] In order to overcome the defects of the above-mentioned prior art, such as lack of robustness, great influence by parameters and low segmentation accuracy, the present invention provides a pedestrian and non-motor vehicle trajectory segmentation method and system based on change point detection.
[0005] In order to achieve the above technical effects, the technical solutions of the present invention are as follows:
[0006] The present invention proposes a pedestrian and non-motor vehicle trajectory segmentation method based on change point detection, comprising the following steps:
[0007] Acquire trajectory data including a plurality of trajectory points and perform preprocessing;
[0008] Calculating a characteristic distance of each trajectory point in the trajectory data;
[0009] Obtaining a trajectory point where the movement mode changes based on the characteristic distance of the trajectory point;
[0010] The trajectory data is divided into different sub-trajectories based on the trajectory points where the movement mode changes, and the sub-trajectories are judged to be in a moving or stationary state. The sub-trajectories in the same state are merged to obtain a pedestrian and non-motor vehicle trajectory segmentation result.
[0011] The present invention also proposes a pedestrian and non-motor vehicle trajectory segmentation system based on change point detection, the system comprising:
[0012] Trajectory data preprocessing module, used to preprocess the acquired trajectory data;
[0013] A feature distance calculation module is used to calculate the feature distance of each trajectory point in the trajectory data;
[0014] The trajectory segmentation module is used to calculate the trajectory points where the movement mode changes based on the characteristic distance of each trajectory point. Based on this, the trajectory data is divided into different sub-trajectories, and they are judged as moving or stationary. Sub-trajectories with the same state are merged to obtain the pedestrian and non-motor vehicle trajectory segmentation results.
[0015] The present invention also proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for evaluating the optimal ratio of wind and solar energy capacity as described in the present invention is implemented.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] The present invention uses a sliding window method to pre-process the trajectory data and obtain the characteristic distance of each trajectory point. Based on the characteristic distance, it determines whether the movement mode has changed. The trajectory data is divided into different sub-trajectories based on the trajectory points where the movement mode has changed. The sub-trajectories are then judged to be in a moving or stationary state. The sub-trajectories with the same state are merged to obtain the pedestrian and non-motor vehicle trajectory segmentation results. By calculating the characteristic distance of each trajectory point and analyzing whether the movement state has changed, the present invention avoids the problem of manually setting the segmentation threshold in existing methods and enhances the robustness of the method. At the same time, by dividing the trajectory points where the movement state has changed into different sub-trajectories, the accuracy of the trajectory segmentation can be ensured. In addition, by accurately judging the state of different sub-trajectories and classifying them as moving or stationary, it helps to understand the movement state of pedestrians and non-motor vehicles in more detail. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flowchart of the pedestrian and non-motor vehicle trajectory segmentation method based on change point detection in Example 1.
[0019] Figure 2 This is an architecture diagram of the pedestrian and non-motor vehicle trajectory segmentation system based on change point detection in Example 2. DETAILED DESCRIPTION
[0020] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting the present invention;
[0021] It is understandable to those skilled in the art that some well-known descriptions may be omitted in the drawings.
[0022] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0023] Example 1
[0024] This embodiment proposes a pedestrian and non-motor vehicle trajectory segmentation method based on change point detection. Figure 1 , which is a flow chart of the pedestrian and non-motor vehicle trajectory segmentation method based on change point detection in this embodiment.
[0025] The present embodiment proposes a pedestrian and non-motor vehicle trajectory segmentation method based on change point detection, comprising the following steps:
[0026] Acquire trajectory data including a plurality of trajectory points and perform preprocessing;
[0027] Calculating a characteristic distance of each trajectory point in the trajectory data;
[0028] Obtaining a trajectory point where the movement mode changes based on the characteristic distance of the trajectory point;
[0029] The trajectory data is divided into different sub-trajectories based on the trajectory points where the movement mode changes, and the sub-trajectories are judged to be in a moving or stationary state. The sub-trajectories in the same state are merged to obtain a pedestrian and non-motor vehicle trajectory segmentation result.
[0030] In this embodiment, the trajectory data is divided into sub-trajectories based on the characteristic distances between trajectory points in the trajectory data. These distances are then used to identify trajectory points where a change in movement occurs. The sub-trajectories are then classified as either stationary or moving, and sub-trajectories with the same state are merged to generate the segmentation results. Compared to existing techniques, this method eliminates the need for custom segmentation thresholds, enhancing its robustness. Within the segmented sub-trajectories, a simple and efficient method is used to distinguish between stationary and moving states, simplifying the calculation while ensuring accurate trajectory segmentation.
[0031] In an optional embodiment, the trajectory point includes latitude, longitude and time; the preprocessing step includes: analyzing the trajectory data and individual trajectory points and removing trajectory points that do not meet preset requirements.
[0032] In this embodiment, the collected trajectory data only needs to include the most basic location and time information. Analyzing the trajectory data and individual trajectory points and removing those that do not meet preset requirements effectively reduces noise and abnormal data, thereby improving overall data quality and analysis accuracy. Furthermore, reducing abnormal data reduces the computational burden during data processing, improving system efficiency and response speed, and enabling more effective identification of pedestrian and non-motorized vehicle behavior patterns.
[0033] As an example, a trajectory point that does not meet the preset requirements is a trajectory point that meets any of the following conditions:
[0034] The number of trajectory points is less than 10;
[0035] Track points lacking time or longitude and latitude;
[0036] Noise points that are more than 10m away from adjacent trajectory points.
[0037] In an optional embodiment, the step of calculating the characteristic distance of each trajectory point in the trajectory data includes:
[0038] For any trajectory point, the trajectory data of a certain distance before and after the trajectory point is selected as its past trajectory and future trajectory respectively;
[0039] The feature vectors of the past trajectory and the future trajectory are calculated, and the feature distance of any trajectory point is calculated based on the feature vectors of the past trajectory and the future trajectory.
[0040] Furthermore, the feature vector includes the average speed, average angle, average density and loop coefficient of all trajectory points in the trajectory data; the average density includes the average number of neighbor points of a trajectory point; the loop coefficient is the ratio of the straight-line distance of the trajectory data to the actual movement distance; its expression is as follows:
[0041]
[0042] Among them, f3(s i ) is the average density, where N(p i ) represents the i-th trajectory point p i The number of neighbor points within the radius R; k represents the number of trajectory points contained in the trajectory data; f4(s i ) is the loop coefficient, and eu(·) represents the Euclidean distance calculation function.
[0043] Specifically, the average speed and average angle of all trajectory points in the trajectory data can be calculated according to the following formula:
[0044]
[0045] Among them, f1(s i ) is the average speed, Speed(p i ) represents the velocity of the i-th trajectory point; f2(s i ) is the average angle, Angle(p i ) represents the angle of the i-th trajectory point.
[0046] Furthermore, the eigenvector is expressed as follows:
[0047] F(p i-l+1 →p i )=(f1(s i ),f2(s i ),f3(s i ),f4(s i ))
[0048] Among them, F(p i-l+1 →p i ) represents the feature vector of the trajectory data from the i-l+1th trajectory point to the i-th trajectory point;
[0049] As an example, the feature vector of the past feature is expressed by the following formula:
[0050]
[0051] Among them, F past (p i ) is p i The eigenvector of the past features of the point.
[0052] As another exemplary illustration, the feature vector of the future feature is represented by the following formula:
[0053]
[0054] Among them, F future (p i ) is p i Feature vector of future features of the point.
[0055] In this embodiment, by selecting fixed-length past and future features from trajectory points, we can conduct a detailed analysis of behavioral patterns before and after a specific time point and clearly identify behavioral transition points. By selecting a variety of different information in the trajectory data to construct feature vectors, we can provide a comprehensive behavioral analysis perspective. Specifically, average speed and angle focus on dynamic changes, while average density and loop coefficient emphasize the properties of spatial and path efficiency. This enables this method to more comprehensively capture the behavioral characteristics of pedestrians or non-motor vehicles and improve segmentation accuracy.
[0056] Furthermore, the radius R is obtained by the sampling interval and average speed of the trajectory points, and R is expressed by the following formula:
[0057] R=α*Δt*v
[0058] Among them, α is the adjustment coefficient; Δt is the sampling interval of the trajectory points; and v is the average velocity.
[0059] As an example, the adjustment coefficient α is set to 2.
[0060] Furthermore, the step of calculating the characteristic distance of the trajectory point includes: calculating the cosine similarity between the characteristic vectors of the past trajectory and the future trajectory to obtain the characteristic distance of the trajectory point.
[0061] Specifically, if the past and future trajectories of a trajectory point have significantly different features, their cosine similarity will be low, that is, the feature distance will be large. This method uses feature distance as the basis for determining whether a trajectory point has undergone a change in movement state. It not only provides an intuitive way to identify and quantify behavioral changes, but also, because the calculation of cosine similarity depends only on the direction of the vector and not its magnitude, it is more robust when dealing with changes at different speeds or within the same behavioral pattern.
[0062] In an optional embodiment, the step of obtaining the trajectory points of the movement mode change based on the characteristic distance of the trajectory points includes: fitting the characteristic distance of each trajectory point into a curve FitDist(p i ), where p i Represents the i-th trajectory point; based on the curve FitDist(p i ) Select the trajectory points that meet the movement mode change condition to obtain the trajectory points of the movement mode change; wherein the expression of the movement mode change condition is as follows:
[0063] FitDist′(p i-1 )>0andFitDist′(p i )=0andFitDist′(p i )<0
[0064] Among them, FitDist′(p i ) is the function FitDist(p i ) in p i The derivative of .
[0065] In this embodiment, a characteristic distance curve is fitted to the trajectory and its extreme values are used to adaptively identify change points. Specifically, the characteristic distances of trajectory points are fitted into a curve and its derivatives are analyzed to identify movement pattern change points. This method can accurately identify key turning points in the characteristic distances of trajectory data and determine whether the movement pattern has changed, which is beneficial for enhancing adaptability. It also does not rely on preset thresholds, which enhances robustness.
[0066] In an optional embodiment, the step of dividing the trajectory data into different sub-trajectories based on the trajectory points where the movement mode changes, and determining whether the sub-trajectories are in a moving or stationary state includes: calculating the average density f3(s of the sub-trajectories based on the sub-trajectories i ) and loop coefficient f4(s i ), and based on the preset value, it is judged as moving or stationary state, wherein the expression of the judgment method is as follows:
[0067] f3(s i )>N s andf4(s i ) <C s
[0068] Among them, N s is the preset density threshold, c s is the preset loop coefficient threshold. If the expression is satisfied, the sub-trajectory is judged to be in a stationary state; otherwise, the sub-trajectory is judged to be in a moving state.
[0069] Specifically, if pedestrians or non-motor vehicles are in a stopped state, they must meet the requirements of high density and directional stability. If a pedestrian or non-motor vehicle is in a stopped or extremely slow moving state, the trajectory points generated by it will be closely clustered on the map; directional stability refers to the continuity of the trajectory direction of the individual during movement; directional stability can eliminate the misjudgment of the movement state caused by high density due to U-turns or similar moving trajectories.
[0070] As an example, the density threshold N s Set to 4.
[0071] As another example, if the moving direction deviates by no more than 45 degrees, the original moving direction is maintained, and the loop coefficient threshold C s Set to
[0072] In this example, a high-density threshold and a directional stability threshold are used to determine whether an individual is moving or stationary. This method ensures computational simplicity and speed while improving the accuracy of location data analysis, especially in high-density environments such as traffic congestion or crowded areas. By considering directional continuity, it reduces the possibility of misjudgment and provides a more comprehensive understanding of behavior.
[0073] Example 2
[0074] This embodiment proposes a pedestrian and non-motor vehicle trajectory segmentation system based on change point detection, and applies the pedestrian and non-motor vehicle trajectory segmentation method based on change point detection proposed in Example 1. Figure 2 , which is an architecture diagram of a pedestrian and non-motor vehicle trajectory segmentation system based on change point detection in this embodiment.
[0075] This embodiment proposes a pedestrian and non-motor vehicle trajectory segmentation system based on change point detection, including:
[0076] Trajectory data preprocessing module, used to preprocess the acquired trajectory data;
[0077] A feature distance calculation module is used to calculate the feature distance of each trajectory point in the trajectory data;
[0078] The trajectory segmentation module is used to calculate the trajectory points where the movement mode changes based on the characteristic distance of each trajectory point. Based on this, the trajectory data is divided into different sub-trajectories, and they are judged as moving or stationary. Sub-trajectories with the same state are merged to obtain the pedestrian and non-motor vehicle trajectory segmentation results.
[0079] It can be understood that the system of this embodiment corresponds to the method of the above-mentioned embodiment 1, and the options in the above-mentioned embodiment 1 are also applicable to this embodiment, so they will not be described again here.
[0080] Example 3
[0081] This embodiment proposes a computer device including a memory and a processor, wherein the memory stores computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the processor executes the steps of the pedestrian and non-motor vehicle trajectory segmentation method based on change point detection proposed in Example 1.
[0082] The terms used in the drawings are for illustrative purposes only and should not be construed as limiting this patent;
[0083] Obviously, the above embodiments of the present invention are merely examples for the purpose of clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the claims of the present invention.
Claims
1. A pedestrian and non-motor vehicle trajectory segmentation method based on change point detection, characterized in that: The following steps are involved: Acquire trajectory data including a plurality of trajectory points and perform preprocessing, wherein the trajectory points include latitude, longitude and time; Calculating a characteristic distance of each trajectory point in the trajectory data; Obtaining a trajectory point where the movement mode changes based on the characteristic distance of the trajectory point; The trajectory data is divided into different sub-trajectories based on the trajectory points where the movement mode changes, and the sub-trajectories are judged to be in a moving or stationary state, and the sub-trajectories in the same state are merged to obtain a pedestrian and non-motor vehicle trajectory segmentation result; The step of calculating the characteristic distance of each trajectory point in the trajectory data comprises: For any trajectory point, the trajectory data of a certain distance before and after the trajectory point is selected as its past trajectory and future trajectory respectively; Calculating the feature vectors of the past trajectory and the future trajectory, and calculating the feature distance of any trajectory point based on the feature vectors of the past trajectory and the future trajectory; The feature vector includes the average speed, average angle, average density and loop coefficient of all trajectory points in the trajectory data; the average density includes the average number of neighbor points of a trajectory point; the loop coefficient is the ratio of the straight-line distance of the trajectory data to the actual movement distance; the expressions of the average density and the loop coefficient are as follows: Among them, f3(s i ) is the average density, where N(p i ) represents the i-th trajectory point p i The number of neighbor points within the radius R; l represents the number of trajectory points contained in the trajectory data; f4(s i ) is the loop coefficient, eu(·) represents the Euclidean distance calculation function, and n represents the number of trajectory points; The step of obtaining the trajectory point of the movement mode change based on the characteristic distance of the trajectory point includes: fitting the characteristic distance of each trajectory point into a curve FitDist(p i ), where p i Represents the i-th trajectory point; based on the curve FitDist(p i ) Selecting trajectory points that meet the movement mode change condition to obtain the movement mode change trajectory points; wherein the movement mode change condition is expressed as follows: FitDist′(p i-1 )>0 and FitDist′(p i )=0 and FitDist′(p i+1 )<0 Among them, FitDist′(p i ) is the function FitDist(p i ) in p i The derivative of The step of dividing the trajectory data into different sub-trajectories based on the trajectory points where the movement mode changes, and determining whether the sub-trajectories are in a moving or stationary state comprises: calculating the average density f3(s i ) and loop coefficient f4(s i ), and determines whether it is a moving or stationary state based on a preset judgment condition, wherein the expression of the preset judgment condition is as follows: f3(s i )>N s and f4(s i )<C s Among them, N s is the preset density threshold, C s is a preset loop coefficient threshold. If the preset judgment condition is met, the sub-track is judged to be in a stationary state; otherwise, the sub-track is judged to be in a moving state.
2. The pedestrian and non-motor vehicle trajectory segmentation method based on change point detection according to claim 1 is characterized in that: The pre-processing step includes: analyzing the trajectory data and individual trajectory points and removing trajectory points that do not meet preset requirements.
3. The pedestrian and non-motor vehicle trajectory segmentation method based on change point detection according to claim 1 is characterized in that: The radius R range is obtained by the sampling interval and average speed of the trajectory points, and R is expressed by the following formula: R=α*Δt*v Among them, α is the adjustment coefficient; Δt is the sampling interval of the trajectory points; and v is the average velocity.
4. The pedestrian and non-motor vehicle trajectory segmentation method based on change point detection according to claim 1, characterized in that: The step of calculating the characteristic distance of any trajectory point includes: calculating the cosine similarity between the characteristic vectors of the past trajectory and the future trajectory to obtain the characteristic distance of the trajectory point.
5. A pedestrian and non-motor vehicle trajectory segmentation system based on change point detection, applied to the pedestrian and non-motor vehicle trajectory segmentation method according to any one of claims 1 to 4, characterized in that: The system comprises: Trajectory data preprocessing module, used to preprocess the acquired trajectory data; A feature distance calculation module is used to calculate the feature distance of each trajectory point in the trajectory data; The trajectory segmentation module is used to calculate the trajectory points where the movement mode changes based on the characteristic distance of each trajectory point. Based on this, the trajectory data is divided into different sub-trajectories, and they are judged as moving or stationary. Sub-trajectories with the same state are merged to obtain the pedestrian and non-motor vehicle trajectory segmentation results.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the pedestrian and non-motor vehicle trajectory segmentation method based on change point detection according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Traffic trajectory clustering similarity calculation method based on shape factor adjustment
CN110443311A
Method and system for improving data quality of riding track of non-motor vehicle
CN115310522A