Vehicle track deviation correction method based on environmental sanitation field

By constructing a road network directed graph and hybrid index, calculating trajectory probability, and using ST-MATCHING and Viterbi-like algorithms, complex deviations and anomalies in sanitation vehicle trajectory correction are solved, and the positioning accuracy and path analysis accuracy are improved.

CN118779398AActive Publication Date: 2024-10-15LONG MA HU LIAN (FU JIAN) KE JI YOU XIAN GONG SI

Patent Information

Application Number
CN202411282471.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-10-15
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Existing technologies fail to effectively handle complex trajectory deviations and abnormal situations in sanitation vehicle trajectory correction, resulting in reduced positioning accuracy and inaccurate path analysis.

Method used

By filtering the ordered longitude and latitude coordinates with abnormal formats, construct a road network directed graph, mark intersections and close points, establish hybrid indexes, calculate state space generation probability and transition probability, and use ST-MATCHING global map matching algorithm and Viterbi-like Algorithm performs trajectory correction.

Benefits of technology

It improves the accuracy and robustness of trajectory matching, ensures data quality and processing efficiency, and achieves precise trajectory correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779398A_ABST
    Figure CN118779398A_ABST
Patent Text Reader

Abstract

A vehicle track deviation correction method based on the field of environmental sanitation comprises the following steps that according to track road data, firstly, an ordered longitude and latitude coordinate set is obtained, and coordinates with abnormal formats are filtered out; and storing the cleaned data in a data warehouse, converting the coordinates into directed node data, and constructing a road network directed graph based on the nodes. And marking cross points in the image, and identifying extremely close points. And splitting the two-way road into one-way roads which are opposite to each other, and repairing the non-connected parts in the map through the intersection points and the extremely close points. And establishing a mixed index of a density grid index and an R-tree grid index for filtering and compressing abnormal track points. And searching the road network directed graph by using the mixed index, and calculating the state space generation probability of each node. And calculating the transition probability from each node to the next node based on an ST-MATCHING algorithm. And traversing the transition probabilities through a viterbi-like algorithm, generating a maximum final state generation probability, and backtracking to obtain a deviation rectification path, thereby realizing deviation rectification of the vehicle track.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a vehicle track deviation correction method based on the environmental sanitation field, belonging to the technical field of track deviation correction. Background Art

[0002] In urban environmental sanitation management, sanitation vehicles (such as garbage trucks and sweepers) need to collect and clean garbage along predetermined routes. However, in actual operation, due to complex road conditions and unstable GPS signals, the vehicle's GPS trajectory often deviates from the actual road. These deviations may make it impossible to confirm the vehicle's actual driving trajectory through the GPS trajectory when the platform is tracking tasks.

[0003] For vehicles in the field of sanitation, the roads they travel on are usually located in cities and rural roads, and they are not likely to travel on small roads. Therefore, the deviation correction of the vehicle's driving trajectory can also be understood as the road matching of the GPS trajectory.

[0004] Traditional trajectory tracking methods mainly rely on GPS navigation, but GPS signals are easily interfered with in areas with tall buildings and dense trees, resulting in reduced positioning accuracy. In addition, if there is a problem with the accuracy of the vehicle's own GPS device, the uploaded GPS driving trajectory will deviate from the normal road.

[0005] Prior art, such as a Chinese patent with patent number "CN106528589B", discloses a data management method and device. The method includes the following steps: matching the original trajectory points to the road network through a map matching method, obtaining a trajectory set after map matching; determining the minimum support and the minimum number of road sections corresponding to different road types according to training data; establishing a trajectory tree according to the trajectory set, and establishing a trajectory subtree with each node in the trajectory tree as the starting point; the trajectory tree and the trajectory subtree include: at least one node; each node is an intersection in the road network; according to the trajectory subtree, determining the trajectory pattern that passes through each node and satisfies the minimum support and the minimum number of road sections; performing redundancy processing on the trajectory pattern of each node, generating a new trajectory pattern, and storing it.

[0006] The problem with the above prior art is that there is no mention of the steps of preprocessing and cleaning the raw trajectory data, which may lead to inaccuracy in subsequent analysis. Relying solely on the map matching method may not be able to handle complex trajectory deviations and abnormal situations, and there is no calculation of transition probability and state space generation probability, which may reduce the accuracy of path analysis and prediction. Summary of the invention

[0007] In order to solve the above problems existing in the prior art, the present invention proposes a vehicle trajectory correction method based on the sanitation field.

[0008] The technical solution of the present invention is as follows: On the one hand, the present invention proposes a vehicle trajectory correction method based on the sanitation field, comprising the following specific steps: Obtaining an ordered set of longitude and latitude coordinates according to the trajectory road data, filtering out the ordered set of longitude and latitude coordinates with abnormal formats, and storing the filtered ordered set of longitude and latitude coordinates in a data warehouse; Convert the ordered longitude and latitude coordinate sets in the data warehouse into directed node data, construct a road network directed graph through the directed node data, mark intersections and extreme points according to the road network directed graph; repair the disconnected parts of the road network directed graph based on intersections and extreme points; Establish a hybrid index including a density grid index and an R-tree grid index, filter abnormal trajectory points in the trajectory road, and compress the filtered trajectory road; Search the road network directed graph according to the mixed index and calculate the state space generation probability of each node of the road network directed graph; calculate the transition probability from each node of the road network directed graph to the next node based on the ST-MATCHING global map matching algorithm; The transfer probability from each node to the next node of the directed graph of the road network is traversed through a Viterbi-like algorithm. According to the maximum final state generation probability generated by the traversal, the correction path is obtained by backtracking through the maximum final state generation probability.

[0009] As a preferred implementation, the disconnected parts of the road network directed graph are repaired based on the closest points and intersections, specifically: Mark nodes with out-degree or in-degree greater than 1 in the road network directed graph as intersections, split roads with lengths greater than a preset value at intersections, and use the intersections as new starting points; Split the two-way road of the road network directed graph into two one-way roads that are opposite to each other; Set a judgment threshold, mark two points within the judgment threshold as extremely close points, and merge them into one point; Repair disconnected parts of the directed graph of the road network based on intersections and extreme points.

[0010] As a preferred implementation, a hybrid index including a density grid index and an R-tree grid index is established, specifically: The clustering of directed road network nodes is calculated by a clustering algorithm, and the roads are classified according to the clustering results based on the road network directed graph associated with the road network nodes, and a density grid index is constructed according to the classification results; the clustering algorithm is a K-means clustering algorithm; Build an R-tree grid index for each road segment based on the R-tree; The specific process of hybrid index search road network directed graph is as follows: Set the search range threshold r, trajectory point (x, y) and the maximum number of candidate sections K; Search for the nearest center point between the trajectory point (x, y) and the Kmeans cluster, and take the R-tree grid index associated with the nearest center point cluster; The R-tree grid index is used to quickly search for the trajectory point as the center, and the search range threshold r is used as the length and width to construct the range grid and the R-tree grid index to see if there is an intersection; if there is an intersection, all intersection sections are taken out, and the first K sections closest to the trajectory point (x, y) are filtered out as the search result, and the search result is returned .

[0011] As a preferred embodiment, the method for determining abnormal track points in the track road is: Abnormal points include points where the instantaneous speed of adjacent nodes exceeds a threshold and points where the angle change between adjacent trajectory segments exceeds a threshold; The abnormal points where the instantaneous speed of adjacent nodes exceeds the threshold are obtained by the following method: Let the speed threshold be ; Let two adjacent points be ; Where t represents the timestamp; Instantaneous speed of adjacent nodes The calculation formula is:

[0012] in, Indicates the current time stamp. Indicates the timestamp of the next moment; like ,but is an outlier point; The outliers where the angle change between adjacent trajectory segments exceeds the threshold are obtained by the following method: Let the angle threshold be

[0013] Let any three adjacent trajectory points be in the order of their position in the trajectory path: ; make:

[0014] Among them, a represents the point To point The direction vector of b represents the point To point The direction vector of Mould length

[0015] Mould length

[0016] The angle between direction vector a and direction vector b as follows:

[0017] If the angle , then the current point is an outlier.

[0018] As a preferred implementation, the specific method of using the trajectory compression algorithm to compress the filtered trajectory road is: S1, set the distance threshold to ; S2, command trajectory , where the starting point is , the end point is ; S3, traverse and remove the starting point With the end point The trajectory collection , the traversed points are recorded as points , judgment point To the straight line Vertical distance ; S4. If , then the trajectory Split into ;like , then skip , continue to traverse the next node ; S5. Track With trajectory Execute step S2 respectively as trajectory traj until all points are traversed.

[0019] As a preferred implementation, the calculation method of the state space generation probability of each node of the road network directed graph is: Set the search radius threshold radius; According to the search results Collect road collections:

[0020] in,{ |i=n} represents the kth candidate road corresponding to the nth point; Assume that the probability of each point in the state space follows a normal distribution:

[0021] in, represents weight; State space generation probability

[0022]

[0023] in, Indicate point To candidate road segment The projection distance, The calculation process is expressed as: Let vector Indicate point ; Let vector Indicates road segment Starting point; Let vector Indicates road segment The end point; The road segment vector D is expressed as

[0024]

[0025] in, Represents the vector The result of projection onto vector D. The projection operation is to calculate the projection of vector AB on vector D. The result is a vector parallel to D, representing the component of AB in the direction of D.

[0026] As a preferred implementation, based on the ST-MATCHING global map matching algorithm, the calculation method for calculating the transfer probability from each node of the road network directed graph to the next node is: Calculate the ratio of the distance between two points to the projected road distance

[0027]

[0028] in, It represents the coordinate vector of the current trajectory point from the straight line between the two trajectory points before and after. Represents the coordinate vector of the next trajectory point; represents the shortest path distance between two candidate road segments, Indicates candidate road segments To candidate road segment The shortest path distance between Calculate the cosine similarity between the speed at each point and the speed limit of each road section

[0029]

[0030] in, Indicates the speed limit of the road section. express arrive The average rate of ; Among them, FV ( ) represents the transition probability from each node mapping the road to the next node mapping the road in the road network directed graph, where t represents the node at the current moment, represents the node at the next moment, Represents the state space of the current node ; express In the state space the way, Represents the state space of the next moment , express In the state space the way; Representing the state space within Road transfer to state within The condition of the road.

[0031] As a preferred implementation, the DJSKALA algorithm is used to calculate the candidate road segments. Arrived within the entire road network directed graph The shortest distance between.

[0032] As a preferred implementation, the method for calculating the transition probability from each node to the next node of the directed graph of the road network by traversing the Viterbi-like algorithm is as follows: Starting from the initial node, traverse the state space {r1, r2, ..., rk} at each time t, and calculate the cumulative probability of each possible path from all states at the previous time t-1 to the current time t; By considering the transition probability and observation probability, the path with the largest cumulative probability at each time t is selected, and the previous state of the path and the corresponding maximum probability are recorded for each state; When traversing to the last node, select the terminal state rj with the largest cumulative probability. At this time, the optimal path to reach this state and its probability have been recorded; Starting from the terminal state rj, trace back along the recorded optimal path, and gradually find the maximum possible path ri at each time t-1 until you trace back to the initial state and get the optimal path from the starting point to the end point; The specific steps are: Let points be a set of ordered longitude and latitude coordinates (x, y); The specific calculation process of the state space is: Let the road set {r1,…,rk} in the rectangle with the point (x,y) as the center and the length and width as radius be: {r1,……,rk}=search(graph,graph_index,radius,point,k); Among them, search() represents the road network index search function, graph represents the road network directed graph, graph_index represents the R-tree grid index, radius represents the search range, and point represents the longitude and latitude coordinates of the point to be searched; Let R[ ][ ] be the two-dimensional array of search road set; Let S[ ][ ] be the state space two-dimensional array; The specific steps to calculate the state space are: Let i=0, j=0; S1. Calculate the state space probability of each longitude and latitude coordinate point: result=search(graph,graph_index,radius,radius,k), i=i+1; Among them, result represents a road set {r1,...,rk}; Assign each element of the collection to R[i][0] to R[i][k]; The search function returns the nearest k roads. , receive each road with R[i][j], j∈[0,k-1]; S2. Calculate the probability of the jth road searched for each point:

[0033] S3, repeat step S2 until all candidate roads corresponding to the current longitude and latitude coordinates are traversed; S4, let j = 0, and repeat steps S1 and S3 until all longitude and latitude coordinates are traversed; The search function returns the nearest k roads. , S[i][0] represents the probability of r0, S[i][1] represents the probability of r1, and so on; The specific calculation steps of the transition probability matrix are: Let T[ ][ ][ ] be the three-dimensional array of transition probabilities; Let i, j and k be initialized to 0; M1, T[i][j][k]=FV(R[i+1]|R[i]); Among them, step M1 calculates the road R[i][j] corresponding to the current point and the set of all roads corresponding to point i+1 The transition probability of T[i][j][k] corresponds to the transition probability between the jth road of the i-th point and the kth road of the next node; M2, repeat step M1, perform k+1 times each time, until the last candidate road of the next longitude and latitude coordinates corresponding to the current longitude and latitude coordinates is traversed; Among them, the M2 step corresponds to the next point R[i+1] of the current i-th point, that is, the candidate road set of the i+1-th point

[0034] M3, let k = 0, repeat step M2, and execute j + 1 times each time until the last candidate road of the current i-th longitude and latitude coordinates is traversed; Among them, step M3 corresponds to R[i], that is, the candidate road set of the i-th point

[0035] M4, let k=0, j=0, repeat step M3, execute i+1 each time, until all longitude and latitude coordinates are traversed; Among them, step M4 corresponds to the subscript of the corresponding point of points, where T[i][ ][ ] represents the corresponding point of points[i]; The specific calculation steps of the probability matrix are: Let V[ ][ ] be a two-dimensional array of probability matrices; Let path[ ][ ] be a two-dimensional array; Let i=0,j=0,t=0; G1. If t=0, execute step G2, otherwise execute step G3; G2, V[t]=S[t]; G3. If t>1, execute step G4, otherwise execute step G12; G4, let max = -∞; G5. Let alt=ln(V[t-1][j])+ln(T[t-1][j][i])+ln(S[t][i]); Where alt represents the final probability of the cumulative probability state V[t-1][j] of the jth road at the previous node being transferred to the current node; G6. If alt>max, execute step G7, otherwise execute step G9; G7, max=alt; G8, path[t][i]=j; G9, repeat step G5, and execute it once j+1 times until the corresponding probabilities of all candidate roads of the previous longitude and latitude coordinates are traversed; G10, v[t][i]=max; G11, let j = 0, repeat step G4, and execute i + 1 times each time until the corresponding probabilities of all candidate roads at the current longitude and latitude coordinates are traversed; G12, let i=0, j=0, repeat step G1, and execute it once every t+1 until all longitude and latitude coordinates are traversed; The specific calculation steps of the optimal road array are: Let argmax() be the index corresponding to finding the element with the largest value in the set; Let n be the maximum value of the first subscript of the probability matrix V[ ][ ]; Let m be the second maximum subscript of the probability matrix V[ ][ ]; Initialize the one-dimensional array segments[ ]; Let i=n; F1. Let ci=argmax(V[n]); Among them, ci represents the corresponding subscript of the maximum value in the V[n] element (V[n][0]…V[n][m]); F2. Calculate the path c with the highest probability among the nth points: c = R[n][ci]; Among them, ci represents the subscript of the road with the highest probability, and R[n][ci] represents the road with the highest probability in the nth point; F3. Add the road with the highest probability into the one-dimensional array segments[ ]; Take out the index of the previous road that is most likely to be transferred to the current road and reassign it to ci; take out the corresponding road according to the index and assign it to c; F4, repeat step F3, each time executing i-1, until i=0; F5. Add the road with the highest probability of i=0 to the one-dimensional array segments[ ]; then reorder the roads in the array from back to front to obtain the optimal road.

[0036] On the other hand, the present invention further provides an electronic device having a computer program stored thereon, wherein when the computer program is executed by a processor, a vehicle trajectory correction method based on the sanitation field as described in any embodiment of the present invention is implemented.

[0037] The present invention has the following beneficial effects: 1. The present invention ensures data quality by filtering out ordered latitude and longitude coordinate sets with abnormal formats, reducing the error rate and computational burden of subsequent processing. The filtered data is stored in a data warehouse in an orderly manner, which facilitates the rapid retrieval and management of large-scale data. The powerful storage and query capabilities of the data warehouse are used to support efficient processing of massive trajectory data, providing a solid data foundation for subsequent analysis.

[0038] 2. The present invention can more accurately reflect the actual travel direction and structure of the road by converting the ordered longitude and latitude coordinate set into directed node data and constructing a road network directed graph. By marking intersections and extreme points and splitting two-way roads into one-way roads, the disconnection problem in the road network is effectively solved, and the accuracy and practicality of the road network graph are improved. The road network directed graph is repaired based on intersections and extreme points to ensure the connectivity and integrity of the road network graph, providing a reliable basis for subsequent trajectory matching and deviation correction.

[0039] 3. The present invention can quickly locate trajectory points and filter abnormal trajectory points by establishing a hybrid index including density grid index and R-tree grid index, thereby improving the efficiency and accuracy of trajectory processing. The filtered trajectory road is compressed to reduce the amount of data, improve storage and transmission efficiency, and retain the main features and information of the trajectory.

[0040] 4. The present invention searches the road network directed graph through a mixed index and calculates the state space generation probability of each node, providing more comprehensive information support for trajectory matching. The ST-MATCHING global map matching algorithm is used to calculate the transfer probability from each node of the road network directed graph to the next node, thereby improving the accuracy and robustness of trajectory matching. The transfer probability from each node of the road network directed graph to the next node is traversed by a Viterbi-like algorithm, and the path with the maximum final state generation probability is generated, thereby achieving accurate deviation correction of the trajectory. The process of backtracking to obtain the deviation correction path is simple and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The figure is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0044] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0045] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0046] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0047] Embodiment 1: See also Figure 1 The present invention proposes a vehicle trajectory correction method based on the sanitation field, comprising the following specific steps: Obtaining an ordered set of longitude and latitude coordinates according to the trajectory road data, filtering out the ordered set of longitude and latitude coordinates with abnormal formats, and storing the filtered ordered set of longitude and latitude coordinates in a data warehouse; Convert the ordered longitude and latitude coordinate sets in the data warehouse into directed node data, construct a road network directed graph through the directed node data, mark intersections and extreme points according to the road network directed graph; repair the disconnected parts of the road network directed graph based on intersections and extreme points; Establish a hybrid index including a density grid index and an R-tree grid index, filter abnormal trajectory points in the trajectory road, and compress the filtered trajectory road; Search the road network directed graph according to the mixed index and calculate the state space generation probability of each node of the road network directed graph; calculate the transition probability from each node of the road network directed graph to the next node based on the ST-MATCHING global map matching algorithm; The transfer probability from each node to the next node of the directed graph of the road network is traversed through a Viterbi-like algorithm. According to the maximum final state generation probability generated by the traversal, the correction path is obtained by backtracking through the maximum final state generation probability.

[0048] As a preferred implementation, the disconnected parts of the road network directed graph are repaired based on the closest points and intersections, specifically: Mark nodes with out-degree or in-degree greater than 1 in the road network directed graph as intersections, split roads with lengths greater than a preset value at intersections, and use the intersections as new starting points; Split the two-way road of the road network directed graph into two one-way roads that are opposite to each other; Set a judgment threshold, mark two points within the judgment threshold as extremely close points, and merge them into one point; Repair disconnected parts of the directed graph of the road network based on intersections and extreme points.

[0049] As a preferred implementation, a hybrid index including a density grid index and an R-tree grid index is established, specifically: The clustering of directed road network nodes is calculated by a clustering algorithm, and the roads are classified according to the clustering results based on the road network directed graph associated with the road network nodes, and a density grid index is constructed according to the classification results; the clustering algorithm is a K-means clustering algorithm; Build an R-tree grid index for each road segment based on the R-tree; The specific process of hybrid index search road network directed graph is as follows: Set the search range threshold r, trajectory point (x, y) and the maximum number of candidate sections K; Search for the nearest center point between the trajectory point (x, y) and the Kmeans cluster, and take the R-tree grid index associated with the nearest center point cluster; The R-tree grid index is used to quickly search for the trajectory point as the center, and the search range threshold r is used as the length and width to construct the range grid and the R-tree grid index to see if there is an intersection; if there is an intersection, all intersection sections are taken out, and the first K sections closest to the trajectory point (x, y) are filtered out as the search result, and the search result is returned .

[0050] As a preferred embodiment, the method for determining abnormal track points in the track road is: Abnormal points include points where the instantaneous speed of adjacent nodes exceeds a threshold and points where the angle change between adjacent trajectory segments exceeds a threshold; The abnormal points where the instantaneous speed of adjacent nodes exceeds the threshold are obtained by the following method: Let the speed threshold be ; Let two adjacent points be ; Where t represents the timestamp; Instantaneous speed of adjacent nodes The calculation formula is:

[0051] in, Indicates the current time stamp. Indicates the timestamp of the next moment; like ,but is an outlier point; The outliers where the angle change between adjacent trajectory segments exceeds the threshold are obtained by the following method: Let the angle threshold be

[0052] Let any three adjacent trajectory points be in the order of their position in the trajectory path: ; make:

[0053] Among them, a represents the point To point The direction vector of b represents the point To point The direction vector of Mould length

[0054] Mould length

[0055] The angle between direction vector a and direction vector b as follows:

[0056] If the angle , then the current point is an outlier.

[0057] As a preferred implementation, the specific method of using the trajectory compression algorithm to compress the filtered trajectory road is: S1, set the distance threshold to ; S2, command trajectory , where the starting point is , the end point is ; S3, traverse and remove the starting point With the end point The trajectory collection , the traversed points are recorded as points , judgment point To the straight line Vertical distance ; S4. If , then the trajectory Split into ;like , then skip , continue to traverse the next node ; S5. Track With trajectory Execute step S2 respectively as trajectory traj until all points are traversed.

[0058] As a preferred implementation, the calculation method of the state space generation probability of each node of the road network directed graph is: Set the search radius threshold radius; According to the search results Collect road collections:

[0059] in,{ |i=n} represents the kth candidate road corresponding to the nth point; Assume that the probability of each point in the state space follows a normal distribution:

[0060] in, represents weight; State space generation probability

[0061]

[0062] in, Indicate point To candidate road segment The projection distance, The calculation process is expressed as: Let vector Indicate point ; Let vector Indicates road segment Starting point; Let vector Indicates road segment The end point; The road segment vector D is expressed as

[0063]

[0064] in, Represents the vector The result of projection onto vector D. The projection operation is to calculate the projection of vector AB on vector D. The result is a vector parallel to D, representing the component of AB in the direction of D.

[0065] As a preferred implementation, based on the ST-MATCHING global map matching algorithm, the calculation method for calculating the transfer probability from each node of the road network directed graph to the next node is: Calculate the ratio of the distance between two points to the projected road distance

[0066]

[0067] in, It represents the coordinate vector of the current trajectory point from the straight line between the two trajectory points before and after. Represents the coordinate vector of the next trajectory point; represents the shortest path distance between two candidate road segments, Indicates candidate road segments To candidate road segment The shortest path distance between Calculate the cosine similarity between the speed at each point and the speed limit of each road section

[0068]

[0069] in, Indicates the speed limit of the road section. express arrive The average rate of ; Among them, FV ( ) represents the transition probability from each node mapping the road to the next node mapping the road in the road network directed graph, where t represents the node at the current moment, represents the node at the next moment, Represents the state space of the current node ; express In the state space the way, Represents the state space of the next moment , express In the state space the way; Representing the state space within Road transfer to state within The condition of the road.

[0070] As a preferred implementation, the DJSKALA algorithm is used to calculate the candidate road segments. Arrived within the entire road network directed graph The shortest distance between.

[0071] As a preferred implementation, the method for calculating the transition probability from each node to the next node of the directed graph of the road network by traversing the Viterbi-like algorithm is as follows: Starting from the initial node, traverse the state space {r1, r2, ..., rk} at each time t, and calculate the cumulative probability of each possible path from all states at the previous time t-1 to the current time t; By considering the transition probability and observation probability, the path with the largest cumulative probability at each time t is selected, and each state records the previous state of the path and the corresponding maximum probability; When traversing to the last node, select the terminal state rj with the largest cumulative probability. At this time, the optimal path to reach this state and its probability have been recorded; Starting from the terminal state rj, trace back along the recorded optimal path, and gradually find the maximum possible path ri at each time t-1 until you trace back to the initial state and get the optimal path from the starting point to the end point; The specific steps are: Let points be a set of ordered longitude and latitude coordinates (x, y); The specific calculation process of the state space is: Let the road set {r1,…,rk} in the rectangle with the point (x,y) as the center and the length and width as radius be: {r1,……,rk}=search(graph,graph_index,radius,point,k); Among them, search() represents the road network index search function, graph represents the road network directed graph, graph_index represents the R-tree grid index, radius represents the search range, and point represents the longitude and latitude coordinates of the point to be searched; Let R[ ][ ] be the two-dimensional array of search road set; Let S[ ][ ] be the state space two-dimensional array; The specific steps to calculate the state space are: Let i=0, j=0; S1. Calculate the state space probability of each longitude and latitude coordinate point: result=search(graph,graph_index,radius,radius,k),i=i+1; Among them, result represents a road set {r1,...,rk}; Assign each element of the collection to R[i][0] to R[i][k]; The search function returns the nearest k roads. , receive each road with R[i][j], j∈[0,k-1]; S2. Calculate the probability of the jth road searched for each point:

[0072] S3, repeat step S2 until all candidate roads corresponding to the current longitude and latitude coordinates are traversed; S4, let j = 0, and repeat steps S1 and S3 until all longitude and latitude coordinates are traversed; The search function returns the nearest k roads. , S[i][0] represents the probability of r0, S[i][1] represents the probability of r1, and so on; The specific calculation steps of the transition probability matrix are: Let T[ ][ ][ ] be the three-dimensional array of transition probabilities; Let i, j and k be initialized to 0; M1, T[i][j][k]=FV(R[i+1]|R[i]); Among them, step M1 calculates the road R[i][j] corresponding to the current point and the set of all roads corresponding to point i+1 The transition probability of T[i][j][k] corresponds to the transition probability between the jth road of the i-th point and the kth road of the next node; M2, repeat step M1, perform k+1 times each time, until the last candidate road of the next longitude and latitude coordinates corresponding to the current longitude and latitude coordinates is traversed; Among them, the M2 step corresponds to the next point R[i+1] of the current i-th point, that is, the candidate road set of the i+1-th point

[0073] M3, let k = 0, repeat step M2, and execute j + 1 times each time until the last candidate road of the current i-th longitude and latitude coordinates is traversed; Among them, step M3 corresponds to R[i], that is, the candidate road set of the i-th point

[0074] M4, let k=0, j=0, repeat step M3, execute i+1 each time, until all longitude and latitude coordinates are traversed; Among them, step M4 corresponds to the subscript of the corresponding point of points, where T[i][ ][ ] represents the corresponding point of points[i]; The specific calculation steps of the probability matrix are: Let V[ ][ ] be a two-dimensional array of probability matrices; Let path[ ][ ] be a two-dimensional array; Let i=0,j=0,t=0; G1. If t=0, execute step G2, otherwise execute step G3; G2, V[t]=S[t]; G3. If t>1, execute step G4, otherwise execute step G12; G4, let max = -∞; G5. Let alt=ln(V[t-1][j])+ln(T[t-1][j][i])+ln(S[t][i]); Where alt represents the final probability of the cumulative probability state V[t-1][j] of the jth road at the previous node being transferred to the current node; G6. If alt>max, execute step G7, otherwise execute step G9; G7, max=alt; G8, path[t][i]=j; G9, repeat step G5, and execute it once j+1 times until the corresponding probabilities of all candidate roads of the previous longitude and latitude coordinates are traversed; G10, v[t][i]=max; G11, let j = 0, repeat step G4, and execute i + 1 times each time until the corresponding probabilities of all candidate roads at the current longitude and latitude coordinates are traversed; G12, let i=0, j=0, repeat step G1, and execute it once every t+1 until all longitude and latitude coordinates are traversed; The specific calculation steps of the optimal road array are: Let argmax() be the index corresponding to finding the element with the largest value in the set; Let n be the maximum value of the first subscript of the probability matrix V[ ][ ]; Let m be the second maximum subscript of the probability matrix V[ ][ ]; Initialize the one-dimensional array segments[ ]; Let i=n; F1. Let ci=argmax(V[n]); Where ci represents the corresponding subscript of the maximum value in the V[n] element (V[n][0]…V[n][m]); F2. Calculate the path c with the highest probability among the nth points: c = R[n][ci]; Among them, ci represents the subscript of the road with the highest probability, and R[n][ci] represents the road with the highest probability in the nth point; F3. Add the road with the highest probability into the one-dimensional array segments[ ]; Take out the index of the previous road that is most likely to be transferred to the current road and reassign it to ci; take out the corresponding road according to the index and assign it to c; F4, repeat step F3, each time executing i-1, until i=0; F5. Add the road with the highest probability of i=0 to the one-dimensional array segments[ ]; then reorder the roads in the array from back to front to obtain the optimal road.

[0075] Embodiment 2: This embodiment provides an electronic device having a computer program stored thereon. When the computer program is executed by a processor, a vehicle trajectory correction method based on the environmental sanitation field as described in any embodiment of the present invention is implemented.

[0076] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0077] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0078] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0079] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0080] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A vehicle trajectory correction method based on the sanitation field, characterized in that: The specific steps include: Obtaining an ordered set of longitude and latitude coordinates according to the trajectory road data, filtering out the ordered set of longitude and latitude coordinates with abnormal formats, and storing the filtered ordered set of longitude and latitude coordinates in a data warehouse; Convert the ordered longitude and latitude coordinate sets in the data warehouse into directed node data, construct a road network directed graph through the directed node data, mark intersections and extreme points according to the road network directed graph; repair the disconnected parts of the road network directed graph based on intersections and extreme points; Establish a hybrid index including a density grid index and an R-tree grid index, filter abnormal trajectory points in the trajectory road, and compress the filtered trajectory road; Search the road network directed graph according to the mixed index and calculate the state space generation probability of each node of the road network directed graph; Based on the ST-MATCHING global map matching algorithm, the transition probability from each node to the next node in the road network directed graph is calculated; The transfer probability from each node to the next node of the directed graph of the road network is traversed through a Viterbi-like algorithm. According to the maximum final state generation probability generated by the traversal, the correction path is obtained by backtracking through the maximum final state generation probability.

2. According to the vehicle trajectory correction method based on the sanitation field according to claim 1, it is characterized in that: Repair the disconnected parts of the directed graph of the road network based on the closest points and intersections, specifically: Mark nodes with out-degree or in-degree greater than 1 in the road network directed graph as intersections, split roads with lengths greater than a preset value at intersections, and use the intersections as new starting points; Split the two-way road of the road network directed graph into two one-way roads that are opposite to each other; Set a judgment threshold, mark two points within the judgment threshold as extremely close points, and merge them into one point; Repair disconnected parts of the directed graph of the road network based on intersections and extreme points.

3. The vehicle trajectory correction method based on the sanitation field according to claim 1 is characterized in that: Create a hybrid index including a density grid index and an R-tree grid index, specifically: The clustering of directed road network nodes is calculated by a clustering algorithm, and the roads are classified according to the clustering results based on the road network directed graph associated with the road network nodes, and a density grid index is constructed according to the classification results; the clustering algorithm is a K-means clustering algorithm; Build an R-tree grid index for each road segment based on the R-tree; The specific process of hybrid index search road network directed graph is as follows: Set the search range threshold r, trajectory point (x, y) and the maximum number of candidate sections K; Search for the nearest center point between the trajectory point (x, y) and the Kmeans cluster, and take the R-tree grid index associated with the nearest center point cluster; The R-tree grid index is used to quickly search for the trajectory point as the center, and the search range threshold r is used as the length and width to construct the range grid and the R-tree grid index to see if there is an intersection; if there is an intersection, all intersection sections are taken out, and the first K sections closest to the trajectory point (x, y) are filtered out as the search result, and the search result is returned .

4. The vehicle trajectory correction method based on the sanitation field according to claim 1 is characterized in that: The method for judging abnormal track points in the track road is: Abnormal points include points where the instantaneous speed of adjacent nodes exceeds a threshold and points where the angle change between adjacent trajectory segments exceeds a threshold; The abnormal points where the instantaneous speed of adjacent nodes exceeds the threshold are obtained by the following method: Let the speed threshold be ; Let two adjacent points be ; Where t represents the timestamp; Instantaneous speed of adjacent nodes The calculation formula is: in, Indicates the current time stamp. Indicates the timestamp of the next moment; like ,but is an outlier point; The outliers where the angle change between adjacent trajectory segments exceeds the threshold are obtained by the following method: Let the angle threshold be Let any three adjacent trajectory points be in the order of their position in the trajectory path: ; make: Among them, a represents the point To point The direction vector of b represents the point To point The direction vector of Mould length Mould length The angle between direction vector a and direction vector b as follows: If the angle , then the current point is an outlier.

5. The vehicle trajectory correction method based on the sanitation field according to claim 1 is characterized in that: The specific method of using the trajectory compression algorithm to compress the filtered trajectory road is: S1, set the distance threshold to ; S2, command trajectory , where the starting point is , the end point is ; S3, traverse and remove the starting point With the end point The trajectory collection , the traversed points are recorded as points , judgment point To the straight line Vertical distance ; S4. If , then the trajectory Split into ;like , then skip , continue to traverse the next node ; S5. Track With trajectory Execute step S2 respectively as trajectory traj until all points are traversed.

6. The vehicle trajectory correction method based on the sanitation field according to claim 3 is characterized in that: The calculation method of the state space generation probability of each node in the road network directed graph is: Set the search radius threshold radius; According to the search results Collect road collections: in,{ |i=n} represents the kth candidate road corresponding to the nth point; Assume that the probability of each point in the state space follows a normal distribution: in, represents weight; State space generation probability in, Indicate point To candidate road segment The projection distance, The calculation process is expressed as: Let vector Indicate point ; Let vector Indicates road segment Starting point; Let vector Indicates road segment The end point; The road segment vector D is expressed as in, Represents the vector The result of projection onto vector D. The projection operation is to calculate the projection of vector AB on vector D. The result is a vector parallel to D, representing the component of AB in the direction of D.

7. The vehicle trajectory correction method based on the sanitation field according to claim 1 is characterized in that: Based on the ST-MATCHING global map matching algorithm, the calculation method for calculating the transfer probability from each node to the next node in the road network directed graph is: Calculate the ratio of the distance between two points to the projected road distance in, , It represents the coordinate vector of the current trajectory point from the straight line between the two trajectory points before and after. Represents the coordinate vector of the next trajectory point; represents the shortest path distance between two candidate road segments, Indicates candidate road segments To candidate road segment The shortest path distance between Calculate the cosine similarity between the speed at each point and the speed limit of each road section in, Indicates the speed limit of the road section. express arrive The average rate of ; Among them, FV ( ) represents the transition probability from each node mapping the road to the next node mapping the road in the road network directed graph, where t represents the node at the current moment, represents the node at the next moment, Represents the state space of the current node ; express In the state space the way, Represents the state space of the next moment , express In the state space the way; Representing the state space within Road transfer to state within The condition of the road.

8. The vehicle trajectory correction method based on the sanitation field according to claim 7 is characterized in that: Use DJSKALA algorithm to calculate candidate road sections Arrived within the entire road network directed graph The shortest distance between.

9. A vehicle trajectory correction method based on the sanitation field according to claim 6 or 7, characterized in that: The calculation method of the transition probability from each node to the next node of the directed graph of the road network through the Viterbi algorithm is: Starting from the initial node, traverse the state space {r1, r2, ..., rk} at each time t, and calculate the cumulative probability of each possible path from all states at the previous time t-1 to the current time t; By considering the transition probability and observation probability, the path with the largest cumulative probability at each time t is selected, and each state records the previous state of the path and the corresponding maximum probability; When traversing to the last node, select the terminal state rj with the largest cumulative probability. At this time, the optimal path to reach this state and its probability have been recorded; Starting from the terminal state rj, trace back along the recorded optimal path, and gradually find the maximum possible path ri at each time t-1 until you trace back to the initial state and get the optimal path from the starting point to the end point.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, a vehicle trajectory correction method based on the sanitation field is implemented as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Vehicle GPS data map matching method based on hidden markov model

    CN106595680A

  • Road network matching method and device

    CN114664104A

  • Vehicle driving track correction method and device based on road network data

    CN115586557A

  • Vehicle track data processing method, device and equipment and readable storage medium

    CN116975184A

  • Motion track deviation correction method and device, electronic equipment and medium

    CN117029833A

Cited By

  • Vehicle track correction method and system based on map matching

    CN120892508A

  • Vehicle track point space affiliation method based on grid index

    CN121705280A

  • A grid index-based vehicle trajectory point space attribution method

    CN121705280B