A trajectory point post number calculation method for low-quality road data

CN123030696APending Publication Date: 2026-11-03BEIJING MUNICIPAL BRIDGE MAINTENANCE MANAGEMENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611051542.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies suffer from accuracy and continuity issues in calculating trajectory point station numbers under low-quality road data conditions. This is especially true in scenarios involving multi-source base map fusion and low-cost terminal acquisition, where traditional methods cannot effectively address problems such as inconsistencies between the road geometry drawing direction and the station number increment direction, ambiguities in trajectory point matching, and error propagation.

Method used

By preprocessing the unique route codes based on road data, duplicate line elements are identified and eliminated to generate a standardized road network. The consistency of line element direction is judged by combining the direction correction factor, and the trajectory point matching is performed by a dual-track matching mechanism. The station number of the trajectory point is calculated by an adaptive interpolation formula.

Benefits of technology

It improves the accuracy and stability of stationing calculation, solves the problems of stationing calculation error and discontinuity under low-quality road data, and is suitable for batch processing of complex road scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030696A_ABST
    Figure CN123030696A_ABST
Patent Text Reader

Abstract

The present application relates to intelligent transportation technology field, disclose a kind of track point stake number calculation method for low quality road data, comprising: original road network is scanned and preprocessed, and identical route coding and repeated spatial position are identified and excluded linear feature;Judge the consistency of the geometric drawing direction of each linear feature and the state incremental direction, and add direction correction factor to linear feature;Vehicle trajectory point sequence is sparsely sampled, and the matching degree of each route and trajectory overall trend is counted by route coding voting mechanism in conjunction with direction enhancement road network, and the dominant route of current trajectory is selected;Vehicle trajectory point sequence is matched point by point using double-track matching mechanism;According to the value of direction correction factor, select forward or reverse linear interpolation formula, obtain the final stake number of each trajectory point.The present application can automatically identify and correct road segment direction logic without pre-uniform road geometry direction, reduce stake number reverse order and boundary jump.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, and more specifically, to a method for calculating trajectory point station numbers for low-quality road data. Background Technology

[0002] In traffic management, highway maintenance, and vehicle trajectory analysis, matching GPS trajectory points to specific roads and further calculating their station numbers are fundamental steps for event localization, damage mapping, inspection record archiving, and mileage statistics. Existing technologies typically calculate trajectory point station numbers using nearest neighbor road segment matching and linear interpolation within the line segment according to the projection ratio.

[0003] The above methods typically imply two prerequisites: first, the road geometry drawing direction must be completely consistent with the stationing increment direction; second, the trajectory point positioning error must be small, and the spatially closest line segment is the actual road the vehicle is traveling on. However, in actual engineering, especially in scenarios involving multi-source base map fusion, historical data inheritance, and low-cost terminal data collection, these two prerequisites are often not met.

[0004] First, road data itself may contain internal inconsistencies. Typical examples include: adjacent line segments on the same route having inconsistent geometric drawing directions; duplicate line elements with completely or nearly overlapping geometric positions but different attributes under the same route code; and adjacent line segments being geometrically continuous but showing reverse or discontinuous station numbers. This can cause problems such as station number reversal, jumps, or even random switching in traditional direct linear interpolation.

[0005] Second, trajectory point matching inherently contains ambiguities. At intersections, overpasses, parallel auxiliary roads, and ramps, a trajectory point may be very close to multiple candidate roads in terms of spatial distance. Judging solely based on the shortest distance at a single point can easily lead to vehicles being mistakenly assigned to non-real roads. If this incorrectly matched result is used as a reference for subsequent points, error propagation will occur, causing continuous distortion in the stationing calculation results for the entire trajectory.

[0006] While existing solutions propose approaches such as nearest point search, road direction verification, trajectory oscillation elimination, and dynamic correction factors, they generally assume that the basic road data is relatively standardized, or primarily address the jitter and projection errors of the trajectory itself. For robust stationing calculations in scenarios with low-quality road data, local positioning drift, overlapping line elements, and disordered geometric directions, there is still a lack of a complete closed-loop method that integrates base map management, route prior extraction, point-by-point anti-interference matching, and direction-adaptive stationing mapping.

[0007] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention

[0008] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a method for calculating trajectory point station numbers for low-quality road data. This method has the advantages of improving the accuracy, continuity, and engineering feasibility of station number calculation. However, it still lacks a complete closed-loop method for robust station number calculation in scenarios with low-quality road data, local positioning drift, overlapping line elements, and disordered geometric directions. This method encompasses base map management, route prior extraction, point-by-point anti-interference matching, and direction-adaptive station number mapping.

[0009] (II) Technical Solution To achieve the aforementioned advantages of improving the accuracy, continuity, and feasibility of stationing calculations, the specific technical solution adopted in this invention is as follows: A method for calculating the station numbers of trajectory points for low-quality road data, comprising: S1. Based on the unique route code of road data, the original road network is scanned and preprocessed to identify and remove line elements with the same route code and duplicate spatial locations, thereby generating a standardized road network. S2. Based on the spatial topological continuity relationship and station number attribute logic of adjacent line elements under the same route in the standardized road network, determine the consistency between the geometric drawing direction and the state increment direction of each line element, and add a direction correction factor to the line element to generate a direction-enhanced road network. S3. Sparsely sample the vehicle trajectory point sequence, combine it with the direction-enhanced road network, and use the route coding voting mechanism to count the matching degree between each route and the overall trend of the trajectory, and select the dominant route of the current trajectory. S4. Combining the direction-enhanced road network with the main route, a dual-track matching mechanism is used to match the vehicle trajectory point sequence point by point. When multiple consecutive trajectory points cannot be matched with the main route, the local nearest neighbor fallback matching is switched to obtain the matching line element information of each trajectory point. S5. Based on the matching line element information, extract the starting station number, ending station number, direction correction factor and geometric length of the target line segment, calculate the projection ratio of the trajectory point on the line element, and select the forward or reverse linear interpolation formula according to the value of the direction correction factor to obtain the final station number of each trajectory point.

[0010] Furthermore, based on the unique route codes of the road data, the original road network is scanned and preprocessed to identify and remove line features with the same route codes and overlapping spatial locations, generating a standardized road network including: S11. Read the road network file, extract the geometric objects and attribute fields corresponding to the line features, map the attributes from different data sources to a unified field, and assign an initial direction correction factor to all line features lacking direction information; the attribute fields include route name, route code, starting station number, and ending station number. S12. Transform all line features to the same local plane projection coordinate system to ensure consistency in the calculation of geometric length, endpoint distance and projection distance; S13. Group all line elements according to route codes, and group all line elements with the same route code value into the same route group. Different route code values ​​correspond to different route groups. S14. For any two line elements within the same route group, calculate the geometric overlap rate. When the geometric overlap rate is greater than the preset overlap rate threshold, determine that the two line elements are duplicate line elements. S15. Generate a standardized road network after deduplication. The line elements in the standardized road network serve as the sole base map for direction consistency judgment and trajectory point matching.

[0011] Furthermore, the formula for calculating the geometric overlap rate is: R g =L overlap / min(L1,L2); In the formula, R g L is the geometric overlap ratio; overlap L1 represents the overlap length of the two line features within the preset buffer tolerance; L2 and L1 represent the geometric lengths of the two line features, respectively.

[0012] Furthermore, based on the spatial topological continuity relationship and stationing attribute logic of adjacent line elements under the same route in the standardized road network, the consistency between the geometric drawing direction and the state increment direction of each line element is determined, and a direction correction factor is added to the line elements to generate a direction-enhanced road network, including: S21. All line elements with the same route code in the standardized road network are divided into the same route group, and all line elements in each route group are sorted in ascending order of starting station number. S22. Obtain the first two adjacent line elements after sorting, and mark them as the first line element and the second line element; calculate the distance from the geometric end point of the first line element to the nearest endpoint of the second line element, and mark it as the end point distance, and the distance from the geometric start point of the first line element to the nearest endpoint of the second line element, and mark it as the start point distance, and calculate the station span of the first line element. S23. The tolerance set is formed by combining the basic tolerance, the product of the median length of adjacent line elements in the current route group and the median coefficient, and the product of the planar positioning accuracy and positioning accuracy coefficient of the known road data or trajectory acquisition equipment. The maximum value in the tolerance set is selected as the direction judgment tolerance. S24. Based on the selected direction, determine the tolerance, combine the preset station continuation tolerance to determine the consistency between the geometric direction of the first line element and the station increment direction, and assign the corresponding direction correction factor to the first line element according to the consistency determination result. S25. If both the endpoint distance and the starting point distance are less than or equal to the direction judgment tolerance, calculate the station connection error with adjacent line elements under the forward and reverse assumptions respectively, and select the direction with the smaller error as the direction correction factor for the line element; if the difference in station error between the two assumptions is less than the station continuation tolerance, mark the line element as pending confirmation. S26. For line elements with selected direction correction factors, propagate the direction label forward along the increasing direction of the route station. For line segments without selected direction correction factors, use the majority direction of the previously selected line segments as the supplementary judgment result. S27. Generate a directional enhancement road network and add a corresponding directional correction factor and directional source mark to each line element; the directional source mark includes direct endpoint continuation judgment, station continuity judgment, intra-group propagation supplement judgment, and pending confirmation.

[0013] Furthermore, based on the selected direction tolerance, and combined with the preset station continuation tolerance, the consistency between the geometric direction of the first-line element and the station increment direction is determined. Based on the consistency determination result, a corresponding direction correction factor is assigned to the first-line element, including: S241. Calculate the absolute value of the difference between the end station of the first line element and the starting station of the second line element. If the absolute value of the difference is less than or equal to the preset station continuation tolerance, then it is determined that the end station of the first line element and the starting station of the second line element satisfy a continuous or near-continuous relationship. S242. When the endpoint distance is less than or equal to the direction judgment tolerance and the endpoint station number of the first line element and the starting station number of the second line element satisfy a continuous or nearly continuous relationship, the geometric direction of the first line element is determined to be consistent with the station number increment direction, and the direction correction factor of the first line element is set to 1. S243. When the starting distance is less than or equal to the direction judgment tolerance and the stationing connection error between the first line element and the second line element is smaller under the reverse assumption, the geometric direction of the first line element is determined to be opposite to the stationing increment direction, and the direction correction factor of the first line element is set to -1.

[0014] Furthermore, sparse sampling is performed on the vehicle trajectory point sequence, and combined with the direction-enhanced road network, a route coding voting mechanism is used to statistically analyze the matching degree between each route and the overall trend of the trajectory, selecting the dominant routes of the current trajectory, including: S31. Obtain the trajectory point sequence of the vehicle navigation and perform sparse sampling according to the preset sampling step size; S32. Establish the sampling point retrieval radius of the candidate road for each sampling point obtained by sparse sampling, and search for candidate line elements within the sampling point retrieval range where the sampling point retrieval radius is located. S33. Within the retrieval range of the sampling point, find the candidate line element that is closest to the current sampling point. If the closest line element exists, the route code to which the closest line element belongs is counted as one vote. If no candidate element is found within the retrieval range, the sampling point will not participate in the voting statistics. S34. Summarize the voting results of all sampling points and count the cumulative votes for each route code; the higher the cumulative votes, the higher the consistency between the current route and the overall trend of the trajectory. S35. The route code with the highest cumulative votes is set as the dominant route. When multiple route codes have the same cumulative votes, the route with the smallest average distance between the corresponding sampling point and the matching line element is selected first. S36. If the highest cumulative vote count is less than the preset first proportion of the total number of sampling points, or the vote difference between the highest cumulative vote count and the second highest cumulative vote count is less than the preset second proportion of the total number of sampling points, it is determined that no dominant route has been formed, and local nearest matching and continuity verification are performed on the point-to-point matching.

[0015] Furthermore, combining the directional enhancement road network with the dominant route, a dual-track matching mechanism is adopted to perform point-by-point matching of the vehicle trajectory point sequence. When multiple consecutive trajectory points cannot be matched with the dominant route, the system switches to local nearest neighbor fallback matching to obtain the matching line element information for each trajectory point, including: S41. For the trajectory point where the current vehicle is located, establish the trajectory point search radius, and search for candidate line elements within the trajectory point search range of the trajectory point search radius to form a candidate set; S42. If the dominant route has been selected, then select line elements whose route codes are equal to the dominant route from the candidate set to form a priority candidate subset for the main route. S43. If the primary road priority candidate subset is not empty, then select the line feature with the closest spatial distance to the trajectory point in the primary road priority candidate subset as the current matching result. S44. When any preset fallback judgment condition is met, enter the fallback matching mode; S45. In the fallback matching mode, select the line feature with the closest spatial distance to the current trajectory point from the candidate set as the current matching result; S46. Output the matching line feature information of the current trajectory point, including the route code of the matching line feature, the projection position of the trajectory point on the line feature, and whether the current matching is in the fallback matching mode. S47. For the matching results of adjacent trajectory points under the same route code, if the matching line element changes or the corresponding station number changes in the opposite direction within a preset time period, the current trajectory point is marked as a point to be reviewed, and the candidate line element that is closest to the same dominant route is reselected.

[0016] Furthermore, the criteria for determining the undercarriage include the absence of candidate line elements corresponding to the dominant route within the trajectory point retrieval radius and the failure to match a dominant route for multiple consecutive trajectory points.

[0017] Furthermore, based on the matching line feature information, the starting station number, ending station number, direction correction factor, and geometric length of the target line segment are extracted. The projection ratio of the trajectory points on the line features is calculated, and a forward or reverse linear interpolation formula is selected according to the value of the direction correction factor to obtain the final station number of each trajectory point, including: S51. Based on the matching line feature information, obtain the key attributes of the target line segment; the key attributes include the starting station number, the ending station number, the direction correction factor, and the geometric length. S52. Project the trajectory points vertically onto the target line segment to obtain the projected points and the cumulative distance of the projected points from the geometric starting point of the line segment along the geometric direction of the line segment. Divide the cumulative distance by the set length of the target line segment to calculate the projection ratio of the trajectory points. S53. If the direction correction factor of the target line segment is 1, the station number of the current trajectory point is calculated using the forward station number calculation formula. If the direction correction factor of the target line segment is -1, the station number of the current trajectory point is calculated using the reverse station number calculation formula, so as to achieve unified station number mapping for line segments with different geometric directions. S54. Use the calculated station number as the final station number output value of the current trajectory point, and use a unified unit conversion method to convert the station number output value into the station number display format corresponding to the business. S55. For the calculated trajectory point chainage sequence, perform anomaly detection in combination with the chainage change trend of adjacent trajectory points. When an abnormal jump is detected between the chainage of any trajectory point and the chainage of the adjacent trajectory points, mark the trajectory point as an anomaly point and perform waiting line element selection within the current trajectory point retrieval range to update the matching result and chainage value of the trajectory point.

[0018] Furthermore, the formula for calculating the forward station number is: Z(p i )=QDZH(s)+u·[ZDZH(s)-QDZH(s)]; The formula for calculating the reverse station number is: Z(p i )=ZDZH(s)-u·[ZDZH(s)-QDZH(s)]; In the formula, Z(p) i ) represents the trajectory point p i The station number; QDZH(s) represents the starting station number of the target line segment s; ZDZH(s) represents the ending station number of the target line segment s; u represents the projection scale.

[0019] (III) Beneficial Effects Compared with existing technologies, this invention provides a method for calculating trajectory point station numbers for low-quality road data, which has the following advantages: (1) The present invention can automatically identify and correct the direction logic of road segments without prior manual unification of road geometry, thereby reducing station number reversal and boundary jump caused by incorrect base map direction.

[0020] (2) By using a hierarchical mechanism of global dominant route pre-scanning, main road priority constraint and local optimal fallback, the macro-route trend of the entire trajectory is introduced into the point-by-point matching process, which can suppress mismatches caused by single-point nearest neighbors in intersection, grade-separated and parallel auxiliary road areas.

[0021] (3) By using adaptive endpoint connection tolerance, station number connection tolerance, optional distance-weighted voting and continuous non-matching trigger rules, the stability of direction judgment, dominant route judgment and fallback switching is improved, while maintaining simple process, interpretable parameters and low engineering implementation cost.

[0022] (4) By introducing the direction adaptive interpolation formula and the projection ratio truncation mechanism, the consistency between the station calculation and the road attributes is guaranteed, and the impact of single-point anomalies or line segment direction errors on the station results is reduced.

[0023] (5) The present invention forms a closed-loop method from base map governance, direction correction, global prior extraction, point-by-point matching to station mapping, which is suitable for batch engineering processing scenarios with low road data quality, errors in trajectory point collection, and complex road scenes. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a method for calculating trajectory point station numbers for low-quality road data according to an embodiment of the present invention; Figure 2 This is a schematic diagram of station number positioning according to an embodiment of the present invention; Figure 3 This is a schematic diagram of station number lookup according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the calculation of the station number of the panoramic patrol trajectory according to an embodiment of the present invention; Figure 5 This is a schematic diagram of multi-patrol trajectory station number calculation and comparison according to an embodiment of the present invention. Detailed Implementation

[0026] This invention aims to provide a method and system for calculating trajectory point station numbers for low-quality road data. The core solution of this invention includes two key processing modules: a road data preprocessing and direction consistency judgment module, and an anti-interference trajectory matching and direction-adaptive station number calculation module. Compared to simple nearest neighbor matching and direct linear interpolation, this invention focuses on solving three frequently occurring and interconnected problems in engineering: first, the geometric drawing direction of line segments on the same route is inconsistent with the station number increment direction; second, repeated lines, parallel lines, or intersection areas cause unstable nearest neighbor matching for single points; and third, the station number calculation after matching does not adaptively correct based on the actual direction of the line segments. All the above processing revolves around the purpose of trajectory point station number calculation, without changing the original road data production process, making it easy to implement on existing GIS road base maps and patrol trajectory data.

[0027] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the trajectory point stationing calculation method for low-quality road data according to an embodiment of the present invention includes: S1. Based on the unique route code of the road data, the original road network is scanned and preprocessed to identify and remove line elements with the same route code and duplicate spatial locations, thereby generating a standardized road network.

[0028] This process involves scanning and preprocessing the original road network based on unique route codes (e.g., LXBM) in the road data. In actual data, due to data production or fusion processes, there may be line features with completely identical geometries. This module automatically identifies these line segments with the same route code and overlapping spatial locations, merging them into a single line feature. This step eliminates data redundancy, ensures the uniqueness of geometric features on each route, and avoids wasted computational resources and potential ambiguity caused by data duplication during subsequent matching.

[0029] In the description of this invention, scanning and preprocessing the original road network based on the unique route codes of road data, identifying and eliminating line features with the same route codes and duplicate spatial locations, and generating a standardized road network includes: S11. Read the road network file, extract the geometric objects and attribute fields corresponding to the line features, map the attributes from different data sources to a unified field, and assign an initial direction correction factor to all line features lacking direction information; the attribute fields include route name, route code, starting station number, and ending station number.

[0030] Specifically, multiple road network files are read, meaning the geometric objects and attribute fields in multiple road vector files are read separately. Fields such as route name, route code, starting station, and ending station from different data sources are mapped to unified field names, including at least LXMC, LXBM, QDZH, ZDZH, and geometry. For data lacking direction information, the direction correction factor FX=1 is initialized as the default value to be corrected.

[0031] S12. Transform all line features to the same local plane projection coordinate system to ensure consistency in the calculation of geometric length, endpoint distance and projection distance.

[0032] Specifically, a unified spatial benchmark is established by converting all road data to the same projected coordinate system to ensure that geometric lengths, endpoint distances, and projected distances of trajectory points can be calculated at the same spatial scale. If the original data is in a geographic coordinate system, it is first converted to a planar projected coordinate system suitable for local distance measurement.

[0033] S13. Group all line elements according to route codes, and group all line elements with the same route code value into the same route group. Different route code values ​​correspond to different route groups.

[0034] Specifically, all line features are grouped according to the route code LXBM. This means reading the LXBM attribute field of each line feature and grouping all line features with the same LXBM value into the same route group; different LXBM values ​​correspond to different route groups. Each route group contains all line segments under that route code, which are used for subsequent duplicate line removal, direction consistency judgment, and station continuity verification within the group.

[0035] S14. For any two line elements within the same route group, calculate the geometric overlap rate. When the geometric overlap rate is greater than the preset overlap rate threshold, determine that the two line elements are duplicate line elements.

[0036] Specifically, for any two line elements under the same route code, if their geometric overlap rate R g Greater than the preset threshold τ g If so, it is determined to be a repeating line element. The geometric overlap rate R g It can be represented as: R g =L overlap / min(L1,L2), where L overlap L1 represents the overlap length of the two line features within the preset buffer tolerance, and L2 represents the geometric lengths of the two line features, respectively.

[0037] Preferably, τ gThe tolerance can be 0.95–1.00, with a buffer tolerance of 1–5m, or 1–2 times the planar accuracy of the road data. For duplicate line features, prioritize retaining the one with higher attribute completeness, richer geometric points, and a length more consistent with the station span; delete or merge the remaining line features into the attribute candidate set. The attribute completeness can be determined by the existence and parsing of six fields: route code, route name, starting station, ending station, road grade, and effective geometry; the consistency of length with station span can be compared by the magnitude of |L-(ZDZH-QDZH)|. This method avoids random absorption of duplicate line features in subsequent matching.

[0038] In the description of this invention, the formula for calculating the geometric overlap rate is as follows: R g =L overlap / min(L1,L2); In the formula, R g L is the geometric overlap ratio; overlap L1 represents the overlap length of the two line features within the preset buffer tolerance; L2 and L1 represent the geometric lengths of the two line features, respectively.

[0039] S15. Generate a standardized road network after deduplication. The deduplicated road line elements serve as the sole input base map for subsequent direction consistency judgment and trajectory point matching. This step eliminates the random snapping problem caused by duplicate line elements.

[0040] S2. Based on the spatial topological continuity relationship and station number attribute logic of adjacent line elements under the same route in the standardized road network, determine the consistency between the geometric drawing direction and the state increment direction of each line element, and add a direction correction factor to the line element to generate a direction-enhanced road network.

[0041] Specifically, automatic direction consistency determination is the core step in resolving directional inconsistencies within road data. For multiple consecutive line elements (hereinafter referred to as line segments, representing the same meaning) belonging to the same route (i.e., the same LXBM), this module automatically determines whether the geometric drawing direction of each line element is consistent with its stationing increment direction by analyzing the logic between their spatial topological relationship and stationing attribute.

[0042] It should be noted that in this invention, "line element" and "line segment" refer to the same road vector data object, differing only in their descriptive perspective. "Line element" is a standard GIS term referring to a complete data unit containing spatial geometric coordinates and business attributes such as route code, starting station number, and ending station number. "Line segment" is a commonly used term in engineering, focusing on describing the spatial geometric shape, topological relationship, and geometric features such as length and direction of the data object. In other words, the "line element" referred to in this invention refers to a data unit in road vector data that contains spatial geometric coordinates and business attributes such as route code, starting station number, and ending station number. For ease of description of its geometric shape, it may also be called a "line segment" in some scenarios; unless otherwise specified, both refer to the same road vector data object.

[0043] The specific judgment logic is as follows: First, all line segments under the route are sorted according to their starting station number (QDZH). Then, the first two line elements after sorting (marked as the first line element and the second line element; since line elements and line segments represent the same meaning, they will be referred to as line segment A and line segment B below) are analyzed. In ideal standard data, the geometric endpoint of line segment A should be spatially connected to the geometric starting point of line segment B within the tolerance range, and the station number of the endpoint of line segment A should be equal to the station number of the starting point of line segment B.

[0044] The system determines the direction of line segment A by calculating the distance between its geometric endpoints: if the geometric endpoint of line segment A is closest to any endpoint of line segment B and the distance is within tolerance, then the geometric direction of line segment A is considered to be consistent with its stationing increment direction; conversely, if the geometric starting point of line segment A is closest to the endpoint of line segment B, then the geometric direction of line segment A is considered to be opposite. The system records this determination as a "direction correction factor" (denoted as FX), where FX=1 indicates consistent direction and FX=-1 indicates opposite direction. This FX factor will be attached as a key attribute to each line feature for adaptive direction correction during subsequent stationing calculations.

[0045] In the description of this invention, based on the spatial topological continuity relationship and stationing attribute logic of adjacent line elements under the same route in a standardized road network, the consistency between the geometric drawing direction and the state increment direction of each line element is determined, and a direction correction factor is added to the line element to generate a direction-enhanced road network, including: S21. All line elements with the same route code in the standardized road network are divided into the same route group, and all line elements in each route group are sorted in ascending order of starting station number.

[0046] Specifically, for each route code, the set of line elements (corresponding to the route group) is sorted in ascending order by the starting station number QDZH. For a route group containing only one line element, it is temporarily marked as FX=1; if subsequent trajectory matching finds that its station number conflicts with the actual direction of travel, a second correction can be performed.

[0047] S22. Obtain the first two adjacent line elements after sorting, and mark them as the first line element and the second line element; calculate the distance from the geometric end point of the first line element to the nearest endpoint of the second line element, and mark it as the end point distance, and the distance from the geometric start point of the first line element to the nearest endpoint of the second line element, and mark it as the start point distance, and calculate the station span of the first line element.

[0048] Specifically, for the sorted adjacent line segments A and B, calculate the distance d from the geometric endpoint of A to the nearest endpoint of B. end And the distance d from the geometric starting point of A to the nearest endpoint of B. start At the same time, calculate the station number span ΔzA=ZDZH(A)-QDZH(A) of line segment A.

[0049] S23. The tolerance set is formed by combining the basic tolerance, the product of the median length of adjacent line elements in the current route group and the median coefficient, and the product of the planar positioning accuracy and positioning accuracy coefficient of the known road data or trajectory acquisition equipment. The maximum value in the tolerance set is selected as the direction judgment tolerance.

[0050] Specifically, to avoid instability in direction judgment due to different road scales, an adaptive rule can be adopted for direction judgment tolerance: ε dir =max(ε0,α·L med ), where ε0 is the basic tolerance, preferably 2m to 5m; L med This is the median length of adjacent line segments within the current route group; α is preferably between 0.01 and 0.03. If the road data or the planar positioning accuracy σ of the trajectory acquisition equipment is known... gps ε can also be used dir =max(ε0,α·L med ,β·σ gps ), where β is preferably between 1.0 and 2.0. This tolerance is mainly used to determine whether the endpoints of adjacent line segments can be considered as spatial continuation.

[0051] S24. Based on the selected direction, determine the tolerance, combine the preset station continuation tolerance to determine the consistency between the geometric direction of the first line element and the station increment direction, and assign the corresponding direction correction factor to the first line element according to the consistency determination result.

[0052] Specifically, when d end ≤ε dir Furthermore, the end station number of A and the start station number of B satisfy a continuous or near-continuous relationship, i.e., |ZDZH(A)-QDZH(B)|≤ε z When d is in the direction of station number increase, determine that the geometric direction of A is consistent with the direction of station number increase, and let FX(A) = 1; when d start ≤ε dirFurthermore, under the reverse assumption, the stationing connection error between A and B is smaller. Therefore, the geometric direction of A is determined to be opposite to the stationing increment direction, and FX(A) = -1. Where ε z The chainage continuity tolerance is used to determine whether the starting and ending chainages of adjacent line segments can be considered continuous, preferably between 5m and 20m. If there are known chainage breaks or fixed gaps in the route, the chainage offset should be deducted before applying ε. z judge.

[0053] In the description of this invention, based on the selected direction judgment tolerance, combined with the preset station continuation tolerance, the consistency between the geometric direction of the first line element and the station increment direction is determined, and according to the consistency judgment result, a corresponding direction correction factor is assigned to the first line element, including: S241. Calculate the absolute value of the difference between the end station number of the first line element and the starting station number of the second line element. If the absolute value of the difference is less than or equal to the preset station number continuation tolerance, then it is determined that the end station number of the first line element and the starting station number of the second line element satisfy a continuous or near-continuous relationship.

[0054] S242. When the endpoint distance is less than or equal to the direction judgment tolerance and the endpoint station number of the first line element and the starting station number of the second line element satisfy a continuous or nearly continuous relationship, the geometric direction of the first line element is determined to be consistent with the station number increment direction, and the direction correction factor of the first line element is set to 1.

[0055] S243. When the starting distance is less than or equal to the direction judgment tolerance and the stationing connection error between the first line element and the second line element is smaller under the reverse assumption, the geometric direction of the first line element is determined to be opposite to the stationing increment direction, and the direction correction factor of the first line element is set to -1.

[0056] Specifically, for adjacent first-line element A and second-line element B, positive and negative assumptions are established respectively. The positive assumption means that the geometric drawing direction of the first-line element A is consistent with the stationing increment direction, that is, the geometric starting point of A corresponds to the starting stationing number QDZH(A), and the geometric ending point of A corresponds to the ending stationing number ZDZH(A); the negative assumption means that the geometric drawing direction of the first-line element A is opposite to the stationing increment direction, that is, the geometric starting point of A corresponds to the ending stationing number ZDZH(A), and the geometric ending point of A corresponds to the starting stationing number QDZH(A).

[0057] Under different directional assumptions, the station numbers corresponding to the spatial connection endpoints of the first line element A and the second line element B are compared, and the absolute value of the difference between the two station numbers is taken as the station connection error. If the station connection error under the forward assumption is less than the station connection error under the reverse assumption, then the geometric direction of A is determined to be consistent with the station increment direction; if the station connection error under the reverse assumption is less than the station connection error under the forward assumption, then the geometric direction of A is determined to be opposite to the station increment direction.

[0058] S25. If both the endpoint distance and the starting point distance are less than or equal to the direction judgment tolerance, calculate the station connection error with adjacent line elements under the forward and reverse assumptions respectively, and select the direction with the smaller error as the direction correction factor for the line element; if the difference in station error between the two assumptions is less than the station continuation tolerance, mark the line element as pending confirmation.

[0059] Specifically, if d exists simultaneously end ≤ε dir and d start ≤ε dir This indicates that the line segment may be located in a ring road, ramp junction area, or local geometric overlap area. In this case, FX is not directly determined, but a station continuity priority rule is introduced: the station connection error with adjacent line segments is calculated under both forward and reverse assumptions, and the direction with the smaller error is selected as the FX of the line segment. If the error difference between the two directions is less than ε... z If the line segment is not confirmed, it will be marked as a line segment to be confirmed. In the subsequent trajectory matching stage, the direction of the line segments that have been confirmed before and after the same route will be used to make supplementary judgments.

[0060] S26. For line elements with selected direction correction factors, propagate the direction label forward along the increasing direction of the route station. For line segments without selected direction correction factors, use the majority direction of the previously selected line segments as the supplementary judgment result.

[0061] Specifically, for line segments with a known FX, their direction labels are propagated forward along the increasing route station direction; for line segments not yet directly determined, the majority of the directions of the preceding and following determined line segments are used as supplementary judgment results. This method avoids the instability caused by only the first two line segments being judged and all other line segments being assumed to be positive.

[0062] For line features with determined direction correction factors, they are sorted in ascending order of station numbers under the same route code, and their direction correction factors are propagated to subsequent adjacent line features as direction labels. If the spatial endpoint distance between adjacent line features is less than or equal to the direction judgment tolerance, and the station number continuation error is less than or equal to the station number continuation tolerance, then they are considered to be propagable. For line features whose direction correction factors cannot be directly determined, line features with determined direction correction factors are selected within a preset number range before and after them, and the number of FX=1 and FX=-1 is counted. The one with the larger number is used as the supplementary direction correction factor for that line feature; if the two numbers are the same or the difference is less than a preset threshold, it is kept in a pending confirmation state.

[0063] S27. Generate a directional enhancement road network and add a corresponding directional correction factor and directional source mark to each line element; the directional source mark includes direct endpoint continuation judgment, station continuity judgment, intra-group propagation supplement judgment, and pending confirmation.

[0064] Specifically, after completing the above judgments, a direction correction factor FX and a direction source marker are added to each line element. The direction source marker can include four categories: direct endpoint continuation judgment, station continuity judgment, intra-group propagation supplementary judgment, and pending confirmation. Subsequent station calculations can complete the direction adaptive interpolation solely based on FX, and the direction source marker is used for result verification and manual spot checks.

[0065] S3. Sparsely sample the vehicle trajectory point sequence, combine it with the direction-enhanced road network, and use the route coding voting mechanism to count the matching degree between each route and the overall trend of the trajectory, and select the dominant route of the current trajectory.

[0066] Specifically, before starting the fine-grained point-by-point matching calculation, a rapid global analysis is first performed on the entire trajectory to determine the dominant route most likely to be taken by the vehicle. This step is implemented using sparse sampling and route coding voting, aiming to suppress the interference of local drift points on the matching results by using the macro trend of the entire trajectory. This step does not introduce complex models, but only provides a lightweight route prior before point-by-point matching.

[0067] In the description of this invention, sparse sampling is performed on the vehicle trajectory point sequence, and the matching degree between each route and the overall trend of the trajectory is statistically analyzed through a route coding voting mechanism in conjunction with the direction-enhanced road network. The dominant route of the current trajectory is selected, including: S31. Obtain the trajectory point sequence of vehicle navigation and perform sparse sampling according to the preset sampling step size.

[0068] Specifically, the input trajectory point sequence is sparsely sampled according to a preset sampling step size k.

[0069] Preferably, when the sampling time interval between adjacent trajectory points is no more than 2s, or the average distance between adjacent trajectory points is no more than 10m, the trajectory point sampling can be considered relatively dense, and k is taken as 10 to 30; when the sampling time interval between adjacent trajectory points is greater than 2s, or the average distance between adjacent trajectory points is greater than 10m, the trajectory point sampling can be considered relatively sparse, and k is taken as 3 to 10.

[0070] S32. Establish the sampling point retrieval radius of candidate roads for each sampling point obtained by sparse sampling, and search for candidate line elements within the sampling point retrieval range where the sampling point retrieval radius is located.

[0071] Specifically, a candidate road search range is established for each sampling point, with a search radius of R for each sampling point. Vote Search for candidate road segments within the retrieval radius of the sampling points.

[0072] Preferably, R Vote The threshold can be set as a fixed threshold or a graded threshold based on the accuracy of road data, the positioning error of trajectory points, and the experience of road width, for example, 15m to 40m.

[0073] S33. Within the retrieval range of the sampling point, find the candidate line element closest to the current sampling point. If the closest line element exists, the route code to which the closest line element belongs is counted as one vote. If no candidate element is found within the retrieval range, the sampling point will not participate in the voting statistics.

[0074] Specifically, within the retrieval radius of the sampling point, the candidate line segment closest to the sampling point is searched; if the closest line segment exists, the route code LXBM to which the closest line segment belongs is recorded as 1 vote.

[0075] As a preferred method, distance-weighted voting can also be used, with weight w = 1 / (d + δ), where d is the shortest distance from the sampling point to the candidate line segment, and δ is a smoothing constant to prevent the denominator from being zero, preferably between 0.1m and 1m. The closer the distance, the higher the voting weight; if no candidate line segment is found within the search range, the sampling point will not participate in the voting statistics.

[0076] The closest line segment refers to the line segment corresponding to the shortest Euclidean distance from the sampling point to the candidate line segment. The shortest Euclidean distance is obtained by calculating the vertical projection distance from the sampling point to the candidate line segment. When the vertical projection point falls inside the line segment, the vertical projection distance is taken as the point-to-line distance. When the vertical projection point falls outside the line segment, the smaller value between the distance from the sampling point to the two endpoints of the line segment is taken as the point-to-line distance.

[0077] S34. Summarize the voting results of all sampling points and count the cumulative votes for each route code; the higher the cumulative votes, the higher the consistency between the current route and the overall trend of the trajectory.

[0078] Specifically, the voting results for all sampling points are summarized, and the cumulative number of votes for each route code is counted. The higher the number of votes, the greater the consistency between the route and the overall trend of the trajectory.

[0079] S35. The route code with the highest cumulative votes is set as the dominant route. When multiple route codes have the same cumulative votes, the route with the smallest average distance between the corresponding sampling point and the matching line element is selected first.

[0080] Specifically, the route code with the highest cumulative number of votes is determined as the dominant route. If multiple route codes have the same number of votes, the route with the smaller average distance between its corresponding sampling point and the matching line segment is selected first; if the average distance is still close, the continuity of the sampling point hits can be further combined for auxiliary determination.

[0081] S36. If the highest cumulative vote count is less than the preset first proportion of the total number of sampling points, or the vote difference between the highest cumulative vote count and the second highest cumulative vote count is less than the preset second proportion of the total number of sampling points, it is determined that no dominant route has been formed, and local nearest matching and continuity verification are performed on the point-to-point matching.

[0082] Specifically, when the number of votes for the highest-vote route is less than 20% of the total number of sampling points, or the difference in the number of votes between the highest-vote route and the second-highest-vote route is less than 10% of the total number of sampling points, it is determined that a stable dominant route has not been formed. In the state where no stable dominant route is formed, the subsequent point-by-point matching does not impose strong constraints on a certain route, and only performs local nearest matching and continuity check.

[0083] If distance-weighted voting is adopted, the above proportional judgment can be replaced by the proportion of the cumulative weight of the highest route in the total weight and the proportion of the difference between it and the cumulative weight of the second-highest route.

[0084] In an example, let the total number of sampling points be N, the number of votes for the highest-vote route be V1, and the number of votes for the second-highest-vote route be V2. When V1 < N×20%, or V1-V2 < N×10%, it indicates that the trajectory points are dispersedly distributed among multiple route codes, and a stable dominant route cannot be formed yet. At this time, the system does not use a single route code to forcibly filter subsequent matching results, but retains all candidate line elements within the matching radius of the trajectory point, and conducts a comprehensive check based on the spatial nearest distance, the matching continuity of front and rear trajectory points, and the continuity of stake number changes. The above 20% and 10% are preferred thresholds, which can also be adjusted according to road density, trajectory sampling interval and positioning accuracy.

[0085] S4. Combining the direction-enhanced road network and the dominant route, a dual-track matching mechanism is adopted to perform point-by-point matching on the vehicle trajectory point sequence. When multiple consecutive trajectory points cannot be matched to the dominant route, the mechanism switches to local nearest neighbor fallback matching to obtain the matching line element information of each trajectory point.

[0086] Specifically, after the dominant route is established, the present invention introduces a dual-track matching mechanism of main road priority and auxiliary road fallback to perform point-by-point accurate matching on the trajectory sequence from beginning to end. The focus of this mechanism is to prioritize maintaining the continuity of the trajectory route when candidates for the dominant route exist; only when multiple consecutive points cannot be matched to the dominant route, the mechanism switches to local nearest neighbor fallback, so as to be compatible with the situation where the vehicle actually drives into a ramp or an auxiliary road.

[0087] In the description of the present invention, combining the direction-enhanced road network and the dominant route, adopting a dual-track matching mechanism to perform point-by-point matching on the vehicle trajectory point sequence, and switching to local nearest neighbor fallback matching when multiple consecutive trajectory points cannot be matched to the dominant route to obtain the matching line element information of each trajectory point includes: S41. For the trajectory point where the current vehicle is located, establish a trajectory point search radius, search for candidate line elements within the trajectory point search range defined by the trajectory point search radius, and form a candidate set.

[0088] Specifically, for the current trajectory point p t , establish the trajectory point search radius Rmatch Within this range, candidate road segments are searched to form a candidate set C. t Preferably, R match The range can be set based on positioning accuracy and road dimensions, for example, 10m to 30m; in areas with larger positioning errors or wider roads, this range can be appropriately widened. Within radius R... match The space index is used to retrieve all candidate line segments, forming a candidate set C. t .

[0089] S42. If the dominant route has been selected, select line elements from the candidate set whose route codes are equal to the dominant route to form a priority candidate subset for the main route.

[0090] Specifically, a priority subset of primary routes is generated. If the dominant route L* has already been determined in the system, then from C... t The line segments with route codes equal to L* are selected from the data to form the primary route priority candidate subset C. t,main .

[0091] S43. If the primary road priority candidate subset is not empty, then select the line feature with the closest spatial distance to the trajectory point in the primary road priority candidate subset as the current matching result.

[0092] Specifically, if C t,main If the subset is not empty, then select the point p that is the trajectory point in the subset. t The line segment with the closest spatial distance is selected as the current matching result. In this case, even if there are line segments in the candidate set that are closer but do not belong to the dominant route, the line segment corresponding to the dominant route is still selected first, thereby ensuring the continuity of the trajectory on the main road and avoiding mismatches in overlapping roads, intersections or grade-separated structures.

[0093] S44. When any preset fallback judgment condition is met, enter the fallback matching mode.

[0094] Specifically, the fallback matching mode is entered when the following conditions are met: (1) There are no candidate line segments corresponding to the dominant route within the search radius, that is, the primary candidate subset of the main road is empty; (2) Multiple consecutive trajectory points are not matched with the dominant route, indicating that the vehicle may have deviated from the actual route.

[0095] Preferably, the threshold for consecutive non-matches can be set to 2 to 5 points. This setting is used to distinguish between single-point GPS drift and actual vehicle departure from the main road, avoiding immediate route switching due to a single abnormal point.

[0096] S45. In the fallback matching mode, select the line feature with the closest spatial distance to the current trajectory point from the candidate set as the current matching result.

[0097] Specifically, in the fallback mode, in the candidate set C tSelect the trajectory point p t The line segment with the closest spatial distance is used as the current matching result. This strategy is essentially a local nearest neighbor matching, used to adaptively obtain reasonable matching results when a vehicle leaves the main road (such as entering a ramp or auxiliary road).

[0098] S46. Output the matching line feature information of the current trajectory point, including the route code of the matching line feature, the projection position of the trajectory point on the line feature, and whether the current matching is in the fallback matching mode.

[0099] Specifically, the matching line segment information (matching line element information) of the current trajectory point is output, including: (1) the route code of the matching line segment; (2) the projection position of the trajectory point on the line segment; and (3) whether the current matching is in catch-all mode. This information will be used for subsequent stationing calculation and continuity verification.

[0100] S47. For the matching results of adjacent trajectory points under the same route code, if the matching line element changes or the corresponding station number changes in the opposite direction within a preset time period, the current trajectory point is marked as a point to be reviewed, and the candidate line element that is closest to the same dominant route is reselected.

[0101] Specifically, a simple continuity check is performed. For matching results of adjacent trajectory points under the same route code, if the matched line segment frequently switches back and forth, or if the corresponding station number shows a significant reverse jump within a short period of time, the current point is marked as a point to be checked, and candidate line segments that are closer together within the same main route are selected first. This check is only used to handle a small number of abnormal points and does not change the basic process of prioritizing the main route and using fallback matching.

[0102] S5. Based on the matching line element information, extract the starting station number, ending station number, direction correction factor and geometric length of the target line segment, calculate the projection ratio of the trajectory point on the line element, and select the forward or reverse linear interpolation formula according to the value of the direction correction factor to obtain the final station number of each trajectory point.

[0103] Specifically, after successfully matching and attaching the trajectory point to a specific road segment, the system immediately performs the corresponding stationing calculation. The calculation process comprehensively utilizes the starting stationing (QDZH), ending stationing (ZDZH), total geometric length of the segment, the projection position of the trajectory point on the segment (expressed proportionally), and the direction correction factor (FX) in the inherent properties of the road, and completes the final mileage mapping through a direction-adaptive linear interpolation formula.

[0104] Specifically, the system strictly determines the reference direction for interpolation based on the value of FX: if FX = 1 (positive direction), then proportional interpolation is performed from QDZH to ZDZH; if FX = -1 (negative direction), then interpolation is performed from ZDZH to QDZH. This strategy ensures that regardless of the geometric drawing direction of the underlying road network vector data, the system can dynamically calculate station numbers that conform to the logically increasing (or decreasing) sequence of the real physical world, guaranteeing the rigor and accuracy of the mileage data.

[0105] In the description of this invention, based on the matching line element information, the starting station number, ending station number, direction correction factor, and geometric length of the target line segment are extracted. The projection ratio of the trajectory point on the line element is calculated, and a forward or reverse linear interpolation formula is selected based on the value of the direction correction factor to obtain the final station number of each trajectory point, including: S51. Based on the matching line element information, obtain the key attributes of the target line segment; the key attributes include the starting station number, the ending station number, the direction correction factor, and the geometric length.

[0106] Specifically, for a successfully matched target line segment s, its starting station number QDZH(s), ending station number ZDZH(s), direction correction factor FX(s), and geometric length L(s) are extracted. Among them, QDZH and ZDZH can be uniformly converted to meters; if the original data is in kilometer and meter format, it is first converted to absolute mileage value.

[0107] S52. Project the trajectory points vertically onto the target line segment to obtain the projection points and the cumulative distance of the projection points from the geometric starting point of the line segment along the geometric direction of the line segment. Divide the cumulative distance by the set length of the target line segment to calculate the projection ratio of the trajectory points.

[0108] Specifically, the trajectory point p i Projecting perpendicularly onto the target line segment s, we obtain the projection point q. i And the cumulative distance l of the projection point from the geometric starting point of the line segment along the geometric direction of the line segment. proj Define the projection scale u=l proj / L(s) is used to limit the value to the interval [0,1], i.e., u=min(1,max(0,u)). This ratio is used to represent the relative position of the trajectory point on the line segment; when the projected point falls outside the line segment, the truncation rule is used to avoid outliers caused by extrapolation of the station number.

[0109] S53. If the direction correction factor of the target line segment is 1, the station number of the current trajectory point is calculated using the forward station number calculation formula. If the direction correction factor of the target line segment is -1, the station number of the current trajectory point is calculated using the reverse station number calculation formula, so as to achieve a unified station number mapping for line segments with different geometric directions.

[0110] Specifically, it performs adaptive basic linear interpolation.

[0111] In the description of this invention, the formula for calculating the forward station number is: Z(p i )=QDZH(s)+u·[ZDZH(s)-QDZH(s)]; The formula for calculating the reverse station number is: Z(p i )=ZDZH(s)-u·[ZDZH(s)-QDZH(s)]; In the formula, Z(p) i ) represents the trajectory point p i The station number; QDZH(s) represents the starting station number of the target line segment s; ZDZH(s) represents the ending station number of the target line segment s; u represents the projection scale.

[0112] The above method enables a unified station number mapping for line segments with different geometric directions, avoiding station number reversal or jumps caused by inconsistent underlying data directions.

[0113] S54. Use the calculated station number as the final station number output value of the current trajectory point, and use a unified unit conversion method to convert the station number output value into the station number display format corresponding to the business.

[0114] Specifically, the calculated Z(p) i This will be output as the final station number value for that trajectory point. If the original data is in kilometer and meter format, it will first be converted to metric absolute station numbers for calculation, and then converted to the station number display format required by the business during output. In practical applications, the station numbers of adjacent trajectory points should usually show a continuous changing trend; when individual points have positioning drift, anomaly marking or verification can be performed by combining the results of adjacent points, but this will not affect the above basic interpolation calculation process.

[0115] S55. For the calculated trajectory point chainage sequence, perform anomaly detection in combination with the chainage change trend of adjacent trajectory points. When an abnormal jump is detected between the chainage of any trajectory point and the chainage of the adjacent trajectory points, mark the trajectory point as an anomaly point and perform waiting line element selection within the current trajectory point retrieval range to update the matching result and chainage value of the trajectory point.

[0116] Specifically, for the calculated trajectory point station sequence, simple anomaly detection can be performed by combining the station change trends of adjacent trajectory points. When an abnormal jump in the station of an individual trajectory point compared with its preceding and following adjacent points is detected, the point can be marked as an anomaly, and its matching line segment can be checked first to see if it is located in the boundary area of ​​overlapping roads, intersections, or ramps. If the matching is confirmed to be an anomaly, return to S4 to re-perform candidate line segment selection within the current search range to update the matching result and station value of the trajectory point.

[0117] In another embodiment of the present invention, a trajectory point stationing calculation system for low-quality road data is also provided. The system includes a road data preprocessing and direction consistency judgment module and an anti-interference trajectory matching and stationing calculation module. The road data preprocessing and direction consistency judgment module includes: The data cleaning and merging module is used to scan and preprocess the original road network based on the unique route codes of road data, identify and remove line elements with the same route codes and duplicate spatial locations, and generate a standardized road network. The automatic direction consistency judgment module is used to determine the consistency between the geometric drawing direction and the state increment direction of each line element based on the spatial topological continuity relationship and station attribute logic of adjacent line elements under the same route in the standardized road network, and to add a direction correction factor to the line element to generate a direction-enhanced road network. The anti-interference trajectory matching and stationing calculation module includes: The global dominant route pre-scanning and voting locking module is used to sparsely sample the vehicle trajectory point sequence, combine it with the direction-enhanced road network, and use the route coding voting mechanism to count the matching degree between each route and the overall trend of the trajectory, and select the dominant route of the current trajectory. The point-by-point precise matching module is used to combine the direction-enhanced road network with the main route and adopt a dual-track matching mechanism to perform point-by-point matching of the vehicle trajectory point sequence. When multiple consecutive trajectory points cannot be matched with the main route, it switches to local nearest neighbor fallback matching to obtain the matching line element information of each trajectory point. The direction-adaptive stationing calculation module is used to extract the starting station, ending station, direction correction factor, and geometric length of the target line segment based on the matching line feature information, calculate the projection ratio of the trajectory point on the line feature, and select the forward or reverse linear interpolation formula according to the value of the direction correction factor to obtain the final station of each trajectory point.

[0118] The entire system works by starting with the preprocessing of basic road network data. After the original vector road network is loaded, it first goes through the road data preprocessing and direction consistency judgment module. By removing or merging redundant elements and performing automated direction judgment, each line segment is labeled with a direction correction factor (FX), thereby outputting an enhanced road network dataset with structured attributes.

[0119] Subsequently, the system reads the vehicle's GPS trajectory file and first enters the global dominant route pre-scanning stage. In this stage, the system performs equally spaced sampling of the current entire trajectory point sequence, uses spatial indexing for fast range lookup, and votes or distance-weighted voting based on the route codes of candidate line segments to pre-determine the more stable dominant route of the trajectory, providing lightweight global prior constraints for subsequent processing.

[0120] Since the main route has been established during the pre-scanning phase, a main road priority constraint strategy can be implemented from the initial starting point of the trajectory: for each newly arriving trajectory point, a match is preferentially sought in the line segment set of the main route. This strategy can shield against local distance interference from some intersections, overpasses, or parallel auxiliary roads, maintaining the continuity of the trajectory on the main line. Only when multiple consecutive trajectory points cannot be matched with the main route within the set tolerance radius will the system trigger a fallback mechanism, reverting to the nearest available match in the entire road network to accommodate situations where vehicles actually enter ramps or auxiliary roads.

[0121] Whenever a trajectory point successfully attaches to the target line segment, the direction-adaptive stationing calculation module immediately intervenes. This module comprehensively utilizes the starting and ending station numbers (QDZH, ZDZH) of the matching line segment, the geometric length, the projection position ratio of the current trajectory point, and the pre-processed direction correction factor (FX) to accurately calculate the physical mileage station number of the point through a direction-adaptive linear interpolation algorithm and output it in real time.

[0122] Through the seamless collaboration of the above modules (global pre-scanning, dual-track constraint matching, and adaptive mileage mapping), the system completely eliminates chain matching errors caused by local coordinate drift, and finally efficiently outputs an enhanced trajectory dataset that is coherent from beginning to end and has precise station number attributes for each trajectory point.

[0123] Implementation Example: Taking the patrol data of a city's expressway as an example. For example... Figures 2-5 A section of urban expressway and its on / off ramps, approximately 18.6 km long, was selected as the test road. The base map data was derived from the fusion of historical maintenance base maps and current inspection base maps. Within this area, there were 17 line segments with inconsistent geometric directions under the same route code, 9 sets of repeated or nearly repeated line elements, and 11 intersections overlapping with upper and lower road levels. During a single daytime inspection, the patrol vehicle collected 3240 trajectory points at approximately 1 second intervals, with an estimated terminal planar positioning accuracy of approximately 8 meters.

[0124] First, the system performs data cleaning and merging on the road base map, removing or merging 9 sets of duplicate line elements to obtain a standardized set of route segments. Then, it performs direction consistency judgment on line segments under the same route code, automatically generating a direction correction factor FX. The results identified 14 line segments with opposite directions, and the remaining line segments were re-determined based on their adjacency relationships, thus forming route segment data with unified directions.

[0125] Sparse sampling was performed on 3240 trajectory points with a step size of 20, resulting in 162 sampling points. For each sampling point, the nearest road segment was found within a fixed search radius (e.g., 20m~30m), and its corresponding route code was counted as one vote. The voting results of all sampling points were statistically analyzed, and the route code with the most votes was determined as the dominant route for that trajectory.

[0126] During the point-to-point matching phase, the system prioritizes searching for candidate matches for each trajectory point within the main route segment. When vehicles travel continuously on the main line, most trajectory points can find the nearest segment within the main route range, and the system continuously outputs the main road priority matching results, thus ensuring the continuity of the trajectory on the main road. When vehicles enter the ramp area, some trajectory points cannot find candidate segments within the main route range. The system automatically switches to the fallback matching mode, selecting the nearest segment within the current search range as the matching result, thereby completing a natural transition from the main line to the ramp.

[0127] After matching the trajectory points with the line segments, the system performs adaptive linear interpolation to calculate the station number based on the line segment's starting station number (QDZH), ending station number (ZDZH), direction correction factor (FX), and the projection ratio of the trajectory points onto the line segment. For line segments with the same geometric direction as the station direction, forward interpolation is used; for line segments with opposite directions, reverse interpolation is automatically used, thus avoiding the station number reversal problem caused by inconsistent base map directions.

[0128] After processing by this method, the output is an enhanced trajectory data that is continuous from beginning to end, searchable by route code, and with each trajectory point accompanied by a station number. Compared with the nearest neighbor-based matching method, this method exhibits better stability in overlapping road areas, intersection areas, and mainline-ramp connection areas. Compared with methods that only perform ordinary linear interpolation, this method can automatically select the forward or reverse station number mapping formula based on the direction correction factor FX, reducing station number reversal, jumps, and mislocations caused by inconsistent base map directions. The results show that this method can stably complete the station number calculation of trajectory points under low-quality road data conditions.

[0129] In summary, this invention utilizes the aforementioned technical solutions to automatically assess and correct road direction consistency based on spatial topology and stationing logic. It proposes a method to automatically generate a direction correction factor FX by leveraging the spatial endpoint continuity relationship of adjacent line segments, the stationing continuity relationship between start and end points, and stationing connection errors. This is a core technical prerequisite for solving the problem of geometrically drawn direction confusion in the underlying non-standardized vector road network. A global dominant route prior extraction technique based on sparse sampling and route coding voting mechanism is also proposed. Before formal point-to-point matching, the relatively stable dominant route of the trajectory is pre-locked by macroscopic sampling and spatial range querying of the trajectory sequence. This technique protects the core idea of ​​using global route priors to resist local coordinate drift and avoid intersection matching ambiguities. A dual-track precise matching method integrating global prior constraints and adaptive fallback is also proposed. This method includes a dominant route priority search and a local nearest neighbor fallback mechanism triggered when multiple consecutive trajectory points cannot match the dominant route, which can take into account both the continuity of the main line and the actual departure of vehicles from the main road. An adaptive stationing interpolation calculation model integrating the direction correction factor FX, projection scale u, and start / end station numbers QDZH / ZDZH is implemented. This technique protects the core calculation logic of the algorithm, which can still dynamically correct deviations and output the correct station number even when the geometrically drawn direction contradicts the actual mileage logic.

[0130] The above methods are integrated into a complete system for robust stationing calculation of low-quality road data.

[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for calculating the station number of trajectory points for low-quality road data, characterized in that, include: S1. Based on the unique route code of road data, the original road network is scanned and preprocessed to identify and remove line elements with the same route code and duplicate spatial locations, thereby generating a standardized road network. S2. Based on the spatial topological continuity relationship and station number attribute logic of adjacent line elements under the same route in the standardized road network, determine the consistency between the geometric drawing direction and the state increment direction of each line element, and add a direction correction factor to the line element to generate a direction-enhanced road network. S3. Sparsely sample the vehicle trajectory point sequence, combine it with the direction-enhanced road network, and use the route coding voting mechanism to count the matching degree between each route and the overall trend of the trajectory, and select the dominant route of the current trajectory. S4. Combining the enhanced road network with the dominant route, a dual-track matching mechanism is used to match the vehicle trajectory point sequence point by point. When multiple consecutive trajectory points cannot be matched with the dominant route, the local nearest neighbor fallback matching is switched to obtain the matching line element information of each trajectory point. S5. Based on the matching line element information, extract the starting station number, ending station number, direction correction factor and geometric length of the target line segment, calculate the projection ratio of the trajectory point on the line element, and select the forward or reverse linear interpolation formula according to the value of the direction correction factor to obtain the final station number of each trajectory point.

2. The method for calculating trajectory point station numbers for low-quality road data according to claim 1, characterized in that, The unique route coding based on road data involves scanning and preprocessing the original road network, identifying and eliminating line features with the same route code and duplicate spatial locations, and generating a standardized road network, including: S11. Read the road network file, extract the geometric objects and attribute fields corresponding to the line features, map the attributes from different data sources to a unified field, and assign an initial direction correction factor to all line features lacking direction information; the attribute fields include route name, route code, starting station number, and ending station number. S12. Transform all line features to the same local plane projection coordinate system to ensure consistency in the calculation of geometric length, endpoint distance and projection distance; S13. Group all line elements according to route codes, and group all line elements with the same route code value into the same route group. Different route code values ​​correspond to different route groups. S14. For any two line elements within the same route group, calculate the geometric overlap rate. When the geometric overlap rate is greater than the preset overlap rate threshold, determine that the two line elements are duplicate line elements. S15. Generate a standardized road network after deduplication. The line elements in the standardized road network serve as the sole base map for direction consistency judgment and trajectory point matching.

3. The method for calculating trajectory point station numbers for low-quality road data according to claim 2, characterized in that, The formula for calculating the geometric overlap rate is: R g =L overlap / min(L1,L2); In the formula, R g L is the geometric overlap ratio; overlap L1 represents the overlap length of the two line features within the preset buffer tolerance; L2 and L1 represent the geometric lengths of the two line features, respectively.

4. The method for calculating trajectory point station numbers for low-quality road data according to claim 1, characterized in that, The process of determining the consistency between the geometric drawing direction and the state increment direction of each line element based on the spatial topological continuity relationship and stationing attribute logic of adjacent line elements under the same route in the standardized road network, and adding a direction correction factor to the line elements to generate a direction-enhanced road network includes: S21. All line elements with the same route code in the standardized road network are divided into the same route group, and all line elements in each route group are sorted in ascending order of starting station number. S22. Obtain the first two adjacent line elements after sorting, and mark them as the first line element and the second line element; calculate the distance from the geometric end point of the first line element to the nearest endpoint of the second line element, and mark it as the end point distance, and the distance from the geometric start point of the first line element to the nearest endpoint of the second line element, and mark it as the start point distance, and calculate the station span of the first line element. S23. The tolerance set is formed by combining the basic tolerance, the product of the median length of adjacent line elements in the current route group and the median coefficient, and the product of the planar positioning accuracy and positioning accuracy coefficient of the known road data or trajectory acquisition equipment. The maximum value in the tolerance set is selected as the direction judgment tolerance. S24. Based on the selected direction, determine the tolerance, combine the preset station continuation tolerance to determine the consistency between the geometric direction of the first line element and the station increment direction, and assign the corresponding direction correction factor to the first line element according to the consistency determination result. S25. If both the endpoint distance and the starting point distance are less than or equal to the direction judgment tolerance, calculate the station connection error with adjacent line elements under the forward and reverse assumptions respectively, and select the direction with the smaller error as the direction correction factor for the line element; if the difference in station error between the two assumptions is less than the station continuation tolerance, mark the line element as pending confirmation. S26. For line elements with selected direction correction factors, propagate the direction label forward along the increasing direction of the route station. For line segments without selected direction correction factors, use the majority direction of the previously selected line segments as the supplementary judgment result. S27. Generate a directional enhancement road network and add a corresponding directional correction factor and directional source mark to each line element; the directional source mark includes direct endpoint continuation judgment, station continuity judgment, intra-group propagation supplement judgment, and pending confirmation.

5. The method for calculating trajectory point station numbers for low-quality road data according to claim 4, characterized in that, The process of determining the consistency between the geometric direction of the first line element and the stationing increment direction based on the selected direction tolerance, combined with the preset stationing continuation tolerance, and assigning a corresponding direction correction factor to the first line element according to the consistency determination result includes: S241. Calculate the absolute value of the difference between the end station of the first line element and the starting station of the second line element. If the absolute value of the difference is less than or equal to the preset station continuation tolerance, then it is determined that the end station of the first line element and the starting station of the second line element satisfy a continuous or near-continuous relationship. S242. When the endpoint distance is less than or equal to the direction judgment tolerance and the endpoint station number of the first line element and the starting station number of the second line element satisfy a continuous or nearly continuous relationship, the geometric direction of the first line element is determined to be consistent with the station number increment direction, and the direction correction factor of the first line element is set to 1. S243. When the starting distance is less than or equal to the direction judgment tolerance and the stationing connection error between the first line element and the second line element is smaller under the reverse assumption, the geometric direction of the first line element is determined to be opposite to the stationing increment direction, and the direction correction factor of the first line element is set to -1.

6. The method for calculating trajectory point station numbers for low-quality road data according to claim 1, characterized in that, The process of sparsely sampling the vehicle trajectory point sequence, combining it with the direction-enhanced road network, and using a route coding voting mechanism to statistically analyze the matching degree between each route and the overall trend of the trajectory, to select the dominant route of the current trajectory includes: S31. Obtain the trajectory point sequence of the vehicle navigation and perform sparse sampling according to the preset sampling step size. S32. Establish the sampling point retrieval radius of the candidate road for each sampling point obtained by sparse sampling, and search for candidate line elements within the sampling point retrieval range where the sampling point retrieval radius is located. S33. Within the retrieval range of the sampling point, find the candidate line element that is closest to the current sampling point. If the closest line element exists, the route code to which the closest line element belongs is counted as one vote. If no candidate element is found within the retrieval range, the sampling point will not participate in the voting statistics. S34. Summarize the voting results of all sampling points and count the cumulative votes for each route code; the higher the cumulative votes, the higher the consistency between the current route and the overall trend of the trajectory. S35. The route code with the highest cumulative votes is set as the dominant route. When multiple route codes have the same cumulative votes, the route with the smallest average distance between the corresponding sampling point and the matching line element is selected first. S36. If the highest cumulative vote count is less than the preset first proportion of the total number of sampling points, or the vote difference between the highest cumulative vote count and the second highest cumulative vote count is less than the preset second proportion of the total number of sampling points, it is determined that no dominant route has been formed, and local nearest matching and continuity verification are performed on the point-to-point matching.

7. The method for calculating trajectory point station numbers for low-quality road data according to claim 1, characterized in that, The method combines the enhanced road network with the dominant route, and employs a dual-track matching mechanism to perform point-by-point matching on the vehicle trajectory point sequence. When multiple consecutive trajectory points cannot be matched with the dominant route, it switches to local nearest neighbor fallback matching. The matching line element information for each trajectory point includes: S41. For the trajectory point where the current vehicle is located, establish the trajectory point search radius, and search for candidate line elements within the trajectory point search range of the trajectory point search radius to form a candidate set; S42. If the dominant route has been selected, then select line elements whose route codes are equal to the dominant route from the candidate set to form a priority candidate subset for the main route. S43. If the primary road priority candidate subset is not empty, then select the line feature with the closest spatial distance to the trajectory point in the primary road priority candidate subset as the current matching result. S44. When any preset fallback judgment condition is met, enter the fallback matching mode; S45. In the fallback matching mode, select the line feature with the closest spatial distance to the current trajectory point from the candidate set as the current matching result; S46. Output the matching line feature information of the current trajectory point, including the route code of the matching line feature, the projection position of the trajectory point on the line feature, and whether the current matching is in the fallback matching mode. S47. For the matching results of adjacent trajectory points under the same route code, if the matching line element changes or the corresponding station number changes in the opposite direction within a preset time period, the current trajectory point is marked as a point to be reviewed, and the candidate line element that is closest to the same dominant route is reselected.

8. The method for calculating trajectory point station numbers for low-quality road data according to claim 7, characterized in that, The criteria for determining the bottom-line determination include the absence of candidate line elements corresponding to the dominant route within the trajectory point search radius and the failure to match a dominant route for multiple consecutive trajectory points.

9. The method for calculating trajectory point station numbers for low-quality road data according to claim 1, characterized in that, The process involves extracting the starting station number, ending station number, direction correction factor, and geometric length of the target line segment based on the matching line element information; calculating the projection ratio of the trajectory points on the line elements; and selecting a forward or reverse linear interpolation formula based on the value of the direction correction factor to obtain the final station number of each trajectory point, including: S51. Based on the matching line feature information, obtain the key attributes of the target line segment; the key attributes include the starting station number, the ending station number, the direction correction factor, and the geometric length; S52. Project the trajectory points vertically onto the target line segment to obtain the projected points and the cumulative distance of the projected points from the geometric starting point of the line segment along the geometric direction of the line segment. Divide the cumulative distance by the set length of the target line segment to calculate the projection ratio of the trajectory points. S53. If the direction correction factor of the target line segment is 1, the station number of the current trajectory point is calculated using the forward station number calculation formula. If the direction correction factor of the target line segment is -1, the station number of the current trajectory point is calculated using the reverse station number calculation formula, so as to achieve unified station number mapping for line segments with different geometric directions. S54. Use the calculated station number as the final station number output value of the current trajectory point, and use a unified unit conversion method to convert the station number output value into the station number display format corresponding to the business. S55. For the calculated trajectory point chainage sequence, perform anomaly detection in combination with the chainage change trend of adjacent trajectory points. When an abnormal jump is detected between the chainage of any trajectory point and the chainage of the adjacent trajectory points, mark the trajectory point as an anomaly point and perform waiting line element selection within the current trajectory point retrieval range to update the matching result and chainage value of the trajectory point.

10. A method for calculating trajectory point station numbers for low-quality road data according to claim 9, characterized in that, The formula for calculating the forward station number is as follows: Z(p i )=QDZH(s)+u·[ZDZH(s)-QDZH(s)]; The formula for calculating the reverse station number is: Z(p i )=ZDZH(s)-u·[ZDZH(s)-QDZH(s)]; In the formula, Z(p) i ) represents the trajectory point p i The station number; QDZH(s) represents the starting station number of the target line segment s; ZDZH(s) represents the ending station number of the target line segment s; u represents the projection scale.