Vehicle space-time trajectory data processing method based on smart city
By denoising, segmenting and matching trajectory data in the smart city vehicle spatio-temporal trajectory data processing method, the problem of inaccurate trajectory data caused by GPS errors is solved, and accurate analysis of vehicle movement trajectories and real-time monitoring of road traffic conditions are achieved.
Patent Information
- Application Number
- CN202410807707.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-03
AI Technical Summary
Due to factors such as GPS error, sampling accuracy, and signal interference, there is a large deviation between the vehicle's GPS position and its true position, resulting in inaccurate trajectory data and making it difficult to analyze vehicle movement trajectories to obtain road traffic conditions.
A smart city vehicle spatio-temporal trajectory data processing method is adopted to obtain GPS location information, denoise, segment and match trajectory data, identify and remove noise points, calculate average speed, mark area types, and map trajectory data to roads. network to obtain real-time traffic conditions.
Effectively remove noise, improve the accuracy of trajectory data, analyze and match the road network segmentally, accurately obtain real-time road traffic conditions, and provide parking, congestion, normal traffic and high-speed traffic information of the road network.
Smart Images

Figure CN118587885A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method for processing spatiotemporal trajectory data of vehicles based on a smart city. Background Art
[0002] At present, my country is vigorously developing the construction of smart cities, and the study of urban vehicle traffic data is one of the important research tasks. The research on urban vehicle traffic data mainly relies on vehicle trajectory data. By using the GPS positioning system, the position of the vehicle at different time points is obtained. The vehicle's movement trajectory is obtained from the vehicle GPS position collected at each successive time point.
[0003] On the one hand, due to factors such as GPS error, sampling accuracy and signal interference, there will be a large deviation between the vehicle's GPS position and the vehicle's actual position in the trajectory data. Therefore, the mobile trajectory needs to be processed to obtain an accurate mobile trajectory. On the other hand, in order to further analyze the vehicle's mobile trajectory and obtain the road network traffic conditions based on the vehicle's mobile trajectory, we proposed a smart city vehicle spatiotemporal trajectory data processing method to process and analyze the vehicle's mobile trajectory obtained by GPS, and to obtain the road network traffic conditions by matching the mobile trajectory to the city's road network. Summary of the invention
[0004] The purpose of the present invention is to provide a method for processing spatiotemporal trajectory data of vehicles in a smart city, so as to solve the problems existing in the background technology.
[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows:
[0006] A method for processing spatiotemporal trajectory data of vehicles in a smart city comprises the following steps:
[0007] Step S100: Obtaining trajectory coordinate points to form a moving trajectory:
[0008] Obtain the GPS location information of the object at different time points and generate a sequence of trajectory coordinate points, represented by a set p, where p = {p1, p2, p3, ..., p n}, Represents, and connects and sorts each trajectory coordinate point in chronological order to form the moving trajectory of the object;
[0009] Among them, λ represents the longitude of the object at the coordinate point of the trajectory, represents the latitude of the object at the coordinate point of the trajectory, and t represents the time when the object is at the coordinate point of the trajectory;
[0010] Step S200: trajectory denoising:
[0011] According to the moving trajectory of the object, the average speed between the trajectory coordinate points of the object at two adjacent time points in the trajectory coordinate point sequence is measured in sequence. The default noise baseline speed value is V, based on the average speed The noise point reference speed value V is used to determine and identify and remove the noise points in the moving trajectory;
[0012] Step S300: Track segmentation:
[0013] Segment the object according to its denoised moving trajectory;
[0014] Step S400: Track map matching:
[0015] Map the denoised moving trajectory to the road network, so that each trajectory coordinate point is mapped to the road network to obtain a matching trajectory;
[0016] Step S500: Obtaining real-time road network traffic conditions based on matching trajectories and trajectory segmentation information.
[0017] The step S200 specifically includes the following sub-steps:
[0018] Step S201: sequentially calculate the trajectory coordinate points {p n ,p n+1 ,n≥1}, make the following judgment:
[0019] ①: Taking the trajectory coordinate point p1 of the starting point as the reference, if Then p2 is a noise point, otherwise it is a normal trajectory coordinate point;
[0020] ②: Take the trajectory coordinate point p at the previous time point n As a benchmark, if Then p n+1 is a noise point, otherwise it is a normal trajectory coordinate point;
[0021] ③: If p is judged in this case n+1 For noise points, p is not used in this judgment. n+1 As the benchmark n+2 Make a determination;
[0022] ④: If p is judged in this case n+1 is the normal trajectory coordinate point, and p is used in this judgment n+1 As the benchmark n+2 Make a judgment.
[0023] Step S202: According to the determination rule of step S201, the trajectory coordinate point sequence of the moving trajectory is determined step by step:
[0024] ①: After the first judgment, identify and remove the noise points in the moving trajectory to obtain the first denoised trajectory coordinate point sequence of the object;
[0025] ②: The second judgment is based on the first denoising trajectory coordinate point. The noise points in the moving trajectory are identified and removed to obtain the second denoising trajectory coordinate point sequence of the object. This is repeated until after the nth judgment, no noise points are determined to exist. The judgment is completed and the final denoising trajectory coordinate point sequence is output.
[0026] The step S200 also includes:
[0027] Step S203: generating a denoised moving trajectory from the final denoised trajectory coordinate point sequence in chronological order.
[0028] The step S300 specifically includes the following sub-steps:
[0029] Step S301: preset a spatial distance threshold D and a time threshold T, and mark the trajectory coordinate point of the object at a certain time point as an anchor point p i , make the following conditional judgment:
[0030] ①: Anchor point p i The trajectory coordinate points {p j ,p j+1 ,...,p i-1} all meet the anchor point p i The distance is less than or equal to the spatial distance threshold D;
[0031] ②: Track coordinate point p j The trajectory coordinate point p before the time point j-1 Satisfy the anchor point p i The distance is greater than the spatial distance threshold D;
[0032] ③: Anchor point p i With trajectory coordinate point p j The time interval (time difference)
[0033] If the above three judgment conditions are met at the same time, then the collection set {p j ,p j+1 ,...,p i-1 ,p i} is the residence area, marked as S.
[0034] The step S300 specifically includes the following sub-steps:
[0035] Step S302: Preset low speed threshold V l And the constant speed threshold V n, according to the denoised trajectory coordinate point sequence, calculate the average speed of the trajectory coordinate points of two adjacent time points, and perform the following segmentation:
[0036] ①: Set the average speed to be less than or equal to the low speed threshold V l The connecting area between the trajectory coordinate points of two adjacent time points is marked as a low-speed area, marked as L;
[0037] ②: Set the average speed to be greater than the low speed threshold V l And less than or equal to the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the constant speed area, marked as N;
[0038] ③: Set the average speed to be greater than the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the high-speed area, marked as H.
[0039] The step S400 specifically includes the following sub-steps:
[0040] Step S401: Construct a road network, represented by G = (V, E), where V = {v1, v2, ..., v n}, v represents a road intersection, E = {e1, e2, ..., e n}, e represents a directed segment, ev start andev end Respectively represent the starting point and the ending point of the directed road segment e;
[0041] Step S402: Map the denoised moving trajectory to the road network and obtain the matching trajectory tr:
[0042] tr=<(e1,t1)→(e2,t2)→...→(e n ,t n )>;
[0043] Among them, t represents the time point when the object enters the directed road segment e;
[0044] In the continuous matching trajectory, for any 1≤i<n, the directed segment e i The end point and the directed segment e i+1 The starting and ending points are the same, that is, e i .v end =e i+1 .v start .
[0045] The step S500 is specifically to match the resident area S, the low speed area L, the normal speed area N and the high speed area H marked in the above steps with the matching trajectory tr=<(e1,t1)→(e2,t2)→...→(en ,t n )>Correspond to obtain real-time road network traffic status information.
[0046] The road network traffic condition information includes:
[0047] The parking section in the road network is obtained through the stationary area S, the congested or low-speed section in the road network is obtained through the low-speed area L, the normal traffic section in the road network is obtained through the normal speed area N, and the high-speed area H is obtained through the high-speed traffic section in the road network.
[0048] The present invention can effectively remove noise points from the vehicle movement trajectory collected by GPS, making the vehicle movement trajectory more accurate, while segmenting the vehicle movement trajectory and matching the movement trajectory with the road network, thereby effectively obtaining real-time road network traffic conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The present invention is further illustrated by means of the non-limiting examples given in the accompanying drawings.
[0050] Figure 1 It is the overall flow chart of the present invention;
[0051] Figure 2 It is a flow chart of noise point determination of the moving track of the present invention;
[0052] Figure 3 This is an example diagram of noise determination for a moving trajectory of an object;
[0053] Figure 4 It is a schematic diagram of the noise point step-by-step determination process of the present invention;
[0054] Figure 5 It is a schematic diagram of the determination process of the resident area of the present invention;
[0055] Figure 6 It is a schematic diagram of the speed region determination process of the present invention;
[0056] Figure 7 Schematic diagram of the map matching algorithm of the present invention. DETAILED DESCRIPTION
[0057] In order to enable those skilled in the art to better understand the present invention, the technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0058] like Figures 1 to 7 A method for processing spatiotemporal trajectory data of vehicles in a smart city is shown, comprising the following steps:
[0059] Step S100: Obtaining trajectory coordinate points to form a moving trajectory:
[0060] Obtain the GPS location information of the object at different time points and generate a sequence of trajectory coordinate points, represented by a set p, where p = {p1, p2, p3, ..., p n}, Represents, and connects and sorts each trajectory coordinate point in chronological order to form the moving trajectory of the object;
[0061] Among them, λ represents the longitude of the object at the coordinate point of the trajectory, represents the latitude of the object at the coordinate point of the trajectory, and t represents the time when the object is at the coordinate point of the trajectory;
[0062] Step S200: trajectory denoising:
[0063] According to the moving trajectory of the object, the average speed between the trajectory coordinate points of the object at two adjacent time points in the trajectory coordinate point sequence is measured in sequence. The default noise baseline speed value is V, based on the average speed The noise point reference speed value V is determined to identify and remove the noise points in the moving trajectory, which specifically includes the following sub-steps:
[0064] Step S201: sequentially calculate the trajectory coordinate points {p n ,p n+1 ,n≥1}, make the following judgment:
[0065] ①: Taking the trajectory coordinate point p1 of the starting point as the reference, if Then p2 is a noise point, otherwise it is a normal trajectory coordinate point;
[0066] ②: Take the trajectory coordinate point p at the previous time point n As a benchmark, if Then p n+1 is a noise point, otherwise it is a normal trajectory coordinate point;
[0067] ③: If p is judged in this case n+1 For noise points, p is not used in this judgment. n+1 As the benchmark n+2 Make a determination;
[0068] ④: If p is judged in this case n+1 is the normal trajectory coordinate point, and p is used in this judgment n+1 As the benchmark n+2 Make a determination;
[0069] Step S202: According to the determination rule of step S201, the trajectory coordinate point sequence of the moving trajectory is determined step by step:
[0070] ①: After the first judgment, identify and remove the noise points in the moving trajectory to obtain the first denoised trajectory coordinate point sequence of the object;
[0071] ②: The second judgment is based on the first denoising trajectory coordinate point to perform the second judgment, identify and remove the noise points in the moving trajectory, and obtain the second denoising trajectory coordinate point sequence of the object. Repeat until after the nth judgment, no noise points are judged to exist, the judgment is completed, and the final denoising trajectory coordinate point sequence is output;
[0072] Step S203: generating a denoised moving trajectory from the final denoised trajectory coordinate point sequence in chronological order;
[0073] Specific as Figure 3 As shown in (a), the trajectory coordinate point sequence of an object is {p1, p2, p3, ..., p 16};
[0074] In the first noise point determination, determine p1 to p4, p7 to p9, and p 13 to p 16 are the normal trajectory coordinate points, p5, p 10 and p 12 As noise points, p5 and p 10 and p 12 The first denoised trajectory coordinate point sequence is obtained by removing the denoised trajectory coordinate point sequence as shown in (b);
[0075] In the second noise point determination, the first denoised trajectory coordinate point sequence is used as the reference for determination, and p6 is determined to be a normal trajectory coordinate point, p 11 For noise points, the p in the first denoising trajectory coordinate point sequence is 11 The removal results in a second denoised trajectory coordinate point sequence as shown in (c);
[0076] In the third noise point determination, the second denoising trajectory coordinate point sequence is used as the reference to determine p 13 It is a normal trajectory coordinate point and there is no noise point. At this time, the judgment is completed, and the final denoised trajectory coordinate point sequence as shown in (d) is obtained, and the denoised movement trajectory is generated in chronological order;
[0077] Step S300: Track segmentation:
[0078] Segmentation is performed based on the denoised moving trajectory of the object, specifically including the following sub-steps:
[0079] Step S301: preset a spatial distance threshold D and a time threshold T, and mark the trajectory coordinate point of the object at a certain time point as an anchor point p i , make the following conditional judgment:
[0080] ①: Anchor point p i The trajectory coordinate points {p j ,p j+1 ,...,p i-1} all meet the anchor point p i The distance is less than or equal to the spatial distance threshold D;
[0081] ②: Track coordinate point p j The trajectory coordinate point p before the time point j-1 Satisfy the anchor point p i The distance is greater than the spatial distance threshold D;
[0082] ③: Anchor point p i With trajectory coordinate point p j The time interval (time difference)
[0083] If the above three judgment conditions are met at the same time, then the collection set {p j ,p j+1 ,...,p i-1 ,p i} is the residence area, marked as S;
[0084] Step S302: Preset low speed threshold V l And the constant speed threshold V n , according to the denoised trajectory coordinate point sequence, calculate the average speed of the trajectory coordinate points of two adjacent time points, and perform the following segmentation:
[0085] ①: Set the average speed to be less than or equal to the low speed threshold V l The connecting area between the trajectory coordinate points of two adjacent time points is marked as a low-speed area, marked as L;
[0086] ②: Set the average speed to be greater than the low speed threshold V l And less than or equal to the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the constant speed area, marked as N;
[0087] ③: Set the average speed to be greater than the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the high-speed area, marked as H.
[0088] Step S400: Track map matching:
[0089] Map the denoised moving trajectory to the road network so that each trajectory coordinate point is mapped to the road network to obtain a matching trajectory, which specifically includes the following sub-steps:
[0090] Step S401: Construct a road network, represented by G = (V, E), where V = {v1, v2, ..., v n}, v represents a road intersection, E = {e1, e2, ..., e n}, e represents a directed segment, ev start andev end Respectively represent the starting point and the ending point of the directed road segment e;
[0091] Step S402: Map the denoised moving trajectory to the road network and use the map matching algorithm to obtain the matching trajectory tr:
[0092] tr=<(e1,t1)→(e2,t2)→...→(e n ,t n )>;
[0093] Among them, t represents the time point when the object enters the directed road segment e;
[0094] In the continuous matching trajectory, for any 1≤i<n, the directed segment e i The end point and the directed segment e i+1 The starting and ending points are the same, that is, e i .v end =e i+1 .v start .
[0095] The present invention mainly adopts an interactive voting-based map matching algorithm (IVMM) because it can perform well even when the trajectory sampling rate is very low and has high operating efficiency. The IVMM algorithm is a variant of the hidden Markov model method, which takes into account both the measurement error and the relationship between different trajectory points. Here, the IVMM method is briefly introduced. The advanced algorithm contains local and global information (or geometry, topology and probability) to process the mapping of low sampling rate trajectories. The algorithm first finds local candidate sections within the circular distance range of each point in the trajectory, such as Figure 7 As shown in A):
[0096] Road Section and At distance p i Within the circle distance, and are candidate points on these sections. Indicates p i The distance between the candidate point and Indicates p i The probability of matching a candidate point is modeled using a normal distribution as follows:
[0097]
[0098] The algorithm also considers the transition probability between each candidate point of two consecutive trajectory points, such as Figure 7 As shown in B), p i-1 and p i+1 compared to, More likely with p i Matching, the transition probability between two candidate points is expressed by the ratio of their Euclidean distance to the road network distance. The transition is actually based on the topological information of the road network;
[0099] Finally, if Figure 7 As shown in C), the local probability and transition probability are combined to find a path on the candidate graph through a mapping matching algorithm to maximize the global probability of matching. This idea is similar to the hidden Markov model, in which the emission and transition probabilities are used to find the most likely state sequence given an observation sequence.
[0100] Step S500: Obtaining real-time road network traffic conditions based on the matching trajectory and trajectory segmentation information, specifically:
[0101] According to the stationary area S, low speed area L, normal speed area N and high speed area H marked in the above steps, they are matched with the matching trajectory tr=<(e1,t1)→(e2,t2)→...→(e n ,t n )>According to the real-time road network traffic status information;
[0102] The parking section in the road network is obtained through the stationary area S, the congested or low-speed section in the road network is obtained through the low-speed area L, the normal traffic section in the road network is obtained through the normal speed area N, and the high-speed area H is obtained through the high-speed traffic section in the road network.
[0103] Through the technical solution of the present invention, the noise points of the vehicle movement trajectory collected by GPS can be effectively removed, making the vehicle movement trajectory more accurate. At the same time, the vehicle movement trajectory can be segmented and matched with the road network, so as to effectively obtain the real-time road network traffic conditions.
[0104] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for processing spatiotemporal trajectory data of vehicles in smart cities, characterized by: The following steps are included: Step S100: Obtaining trajectory coordinate points to form a moving trajectory: Obtain the GPS location information of the object at different time points and generate a sequence of trajectory coordinate points, represented by a set p, where p = {p1, p2, p3, ..., p n }, Represents, and connects and sorts each trajectory coordinate point in chronological order to form the moving trajectory of the object; Among them, λ represents the longitude of the object at the coordinate point of the trajectory, represents the latitude of the object at the coordinate point of the trajectory, and t represents the time when the object is at the coordinate point of the trajectory; Step S200: trajectory denoising: According to the moving trajectory of the object, the average speed between the trajectory coordinate points of the object at two adjacent time points in the trajectory coordinate point sequence is measured in sequence. The default noise baseline speed value is V, based on the average speed The noise point reference speed value V is used to determine and identify and remove the noise points in the moving trajectory; Step S300: Track segmentation: Segment the object according to its denoised moving trajectory; Step S400: Track map matching: Map the denoised moving trajectory to the road network, so that each trajectory coordinate point is mapped to the road network to obtain a matching trajectory; Step S500: Obtaining real-time road network traffic conditions based on matching trajectories and trajectory segmentation information.
2. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 1, characterized in that: The step S200 specifically includes the following sub-steps: Step S201: sequentially calculate the trajectory coordinate points {p n ,p n+1 ,n≥1}, make the following judgment: ①: Taking the trajectory coordinate point p1 of the starting point as the reference, if Then p2 is a noise point, otherwise it is a normal trajectory coordinate point; ②: Take the trajectory coordinate point p at the previous time point n As a benchmark, if Then p n+1 is a noise point, otherwise it is a normal trajectory coordinate point; ③: If p is judged in this case n+1 For noise points, p is not used in this judgment. n+1 As the benchmark n+2 Make a determination; ④: If p is judged in this case n+1 is the normal trajectory coordinate point, and p is used in this judgment n+1 As the benchmark n+2 Make a judgment. Step S202: According to the determination rule of step S201, the trajectory coordinate point sequence of the moving trajectory is determined step by step: ①: After the first judgment, the noise points in the moving trajectory are identified and removed to obtain the first denoised trajectory coordinate point sequence of the object; ②: The second judgment is based on the first denoising trajectory coordinate point. The noise points in the moving trajectory are identified and removed to obtain the second denoising trajectory coordinate point sequence of the object. This is repeated until after the nth judgment, no noise points are determined to exist. The judgment is completed and the final denoising trajectory coordinate point sequence is output.
3. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 2, characterized in that: The step S200 also includes: Step S203: generating a denoised moving trajectory from the final denoised trajectory coordinate point sequence in chronological order.
4. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 3 is characterized in that: The step S300 specifically includes the following sub-steps: Step S301: preset a spatial distance threshold D and a time threshold T, and mark the trajectory coordinate point of the object at a certain time point as an anchor point p i , make the following conditional judgment: ①: Anchor point p i The trajectory coordinate points {p j ,p j+1 ,...,p i-1 } all meet the anchor point p i The distance is less than or equal to the spatial distance threshold D; ②: Track coordinate point p j The trajectory coordinate point p before the time point j-1 Satisfy the anchor point p i The distance is greater than the spatial distance threshold D; ③: Anchor point p i With trajectory coordinate point p j The time interval (time difference) Δt = t pi -t pj ≥T; If the above three judgment conditions are met at the same time, then the collection set {p j ,p j+1 ,...,p i-1 ,p i } is the residence area, marked as S.
5. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 4, characterized in that: The step S300 specifically includes the following sub-steps: Step S302: Preset low speed threshold V l And the constant speed threshold V n , according to the denoised trajectory coordinate point sequence, calculate the average speed of the trajectory coordinate points of two adjacent time points, and perform the following segmentation: ①: Set the average speed to be less than or equal to the low speed threshold V l The connecting area between the trajectory coordinate points of two adjacent time points is marked as a low-speed area, marked as L; ②: Set the average speed to be greater than the low speed threshold V l And less than or equal to the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the constant speed area, marked as N; ③: Set the average speed to be greater than the normal speed threshold V n The trajectory coordinate points of two adjacent time points are marked as the high-speed area, marked as H.
6. A method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 5, characterized in that: The step S400 specifically includes the following sub-steps: Step S401: Construct a road network, represented by G = (V, E), where V = {v1, v2, ..., v n }, v represents a road intersection, E = {e1, e2, ..., e n }, e represents a directed segment, ev start andev end Respectively represent the starting point and the ending point of the directed road segment e; Step S402: Map the denoised moving trajectory to the road network and obtain the matching trajectory tr: tr=<(e1,t1)→(e2,t2)→...→(e n ,t n )>; Among them, t represents the time point when the object enters the directed road segment e; In the continuous matching trajectory, for any 1≤i<n, the directed segment e i The end point and the directed segment e i+1 The starting and ending points are the same, that is, e i .v end =e i+1 .v start .
7. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 6, characterized in that: The step S500 is specifically to match the resident area S, the low speed area L, the normal speed area N and the high speed area H marked in the above steps with the matching trajectory tr=<(e1,t1)→(e2,t2)→...→(e n ,t n )>Correspond to obtain real-time road network traffic status information.
8. The method for processing spatiotemporal trajectory data of vehicles in a smart city according to claim 7, characterized in that: The road network traffic condition information includes: The parking section in the road network is obtained through the stationary area S, the congested or low-speed section in the road network is obtained through the low-speed area L, the normal traffic section in the road network is obtained through the normal speed area N, and the high-speed area H is obtained through the high-speed traffic section in the road network.
