A road condition determination method and apparatus
By segmenting and matching features of elevated roads, tunnels, and parallel roads, the problem of trajectory matching difficulties under complex road networks has been solved, enabling accurate acquisition of road traffic status and improving the stability of traffic status recognition and navigation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DITU (BEIJING) TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-19
AI Technical Summary
In complex road networks with elevated roads, tunnels, and parallel roads, existing technologies suffer from decreased positioning accuracy, leading to difficulties in trajectory matching and affecting the accuracy of traffic status recognition and navigation. Furthermore, traditional algorithms tend to ignore road conditions, resulting in incorrect trajectory point binding and impacting the accuracy and stability of the application.
By acquiring the combination of road segments to be processed, dividing it into multiple sub-segments, obtaining the first feature based on historical trajectory data of a longer duration, determining the number of clusters and features using Gaussian mixture distribution and Bayesian information criterion, obtaining the matching probability based on real-time trajectory data of a shorter duration, and using the confidence interval mechanism of sub-segments for matching verification to ensure accuracy.
Accurate acquisition of road traffic status improves the accuracy and stability of subsequent applications, solves problems such as positioning noise, error accumulation and multi-scenario adaptability, and enhances the reliability of parallel road segment matching.
Smart Images

Figure CN122245098A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for determining road conditions. Background Technology
[0002] With the development of urban three-dimensional transportation networks, elevated roads, tunnels and parallel roads are becoming increasingly common. However, due to building obstruction and signal noise, positioning accuracy has decreased, making it difficult to match trajectories on parallel road sections, which seriously affects traffic status recognition and navigation accuracy.
[0003] Existing technologies often employ optimized geometric algorithms, multi-dimensional feature fusion, or deep learning models for trajectory binding. These methods improve matching reliability in complex road networks and adapt to trajectory data with different sampling rates by introducing heading angles, topological constraints, or training with massive amounts of data. However, existing technologies tend to overlook road traffic conditions, causing trajectory points to be incorrectly bound to inaccessible paths, affecting the accuracy and stability of subsequent applications. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a road condition determination method and apparatus that can accurately obtain the road traffic status and effectively ensure the accuracy and stability of subsequent applications.
[0005] In a first aspect, embodiments of the present invention provide a method for determining road conditions, the method comprising: Obtain a combination of road segments to be processed, which includes multiple road segments that are close in distance and travel in the same or roughly the same direction. The target road segment is determined from the plurality of road segments; The target road segment is divided into multiple sub-segments; First historical trajectory data is obtained based on a first duration, and a first feature of the target road segment is obtained based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-road segment. Second historical trajectory data is obtained based on a second duration, wherein the first duration is longer than the second duration; The matching result between the second historical trajectory data and the target road segment is obtained based on the historical trajectory distribution parameters. The traffic status of the target road segment is determined based on the matching results.
[0006] In some embodiments, segmenting the target road segment to obtain multiple sub-segments includes: The target road segment is divided into segments according to a predetermined distance.
[0007] In some embodiments, the first historical trajectory data includes at least one first trajectory passing through the target road segment, and the first trajectory includes a plurality of first trajectory points.
[0008] In some embodiments, obtaining the first feature of the target road segment based on the first historical trajectory data includes: Project each of the first trajectory points onto the target road segment to obtain the first projection point corresponding to each first trajectory point; The sub-segment where the first trajectory point is located is determined based on the position of the first projection point in the target road segment; The first feature is obtained based on the vertical distance from the first trajectory point in each sub-segment to the target segment.
[0009] In some embodiments, obtaining the first feature based on the vertical distance from the first trajectory point in each sub-segment to the target segment includes: For the vertical distance of the first trajectory point of each sub-segment, a Gaussian mixture distribution is used to model the distance, and the number of clusters and the first feature corresponding to the sub-segment are determined using the Bayesian information criterion. The historical trajectory distribution parameters include the mean, weight, and variance of each cluster.
[0010] In some embodiments, the second historical trajectory data includes at least one second trajectory, and the second trajectory includes a plurality of second trajectory points.
[0011] In some embodiments, obtaining the matching result of the second historical trajectory data and the target road segment based on the first feature includes: Project each of the second trajectory points onto the target road segment to obtain the second projection point corresponding to each of the second trajectory points; The sub-segment where the second trajectory point is located is determined based on the position of the second projection point in the target road segment; The second feature is obtained based on the vertical distance from the second trajectory point in each sub-segment to the target segment, and the second feature is the average value of the vertical distance from each second trajectory point to the target segment; The matching probability of each sub-segment is obtained based on the second feature and the first feature; The matching result between the second historical trajectory data and the target road segment is obtained based on the matching probability of each sub-road segment.
[0012] In some embodiments, obtaining the matching probability of each sub-road segment based on the second feature and the first feature includes: Iterate through the second features of each sub-segment to obtain the target's second feature; The matching probability between the trajectory point corresponding to the second feature of the target and each sub-road segment is calculated based on the second feature of the target and the first feature of each sub-road segment. Obtain the matching probability of the sub-road segment with the same sub-road segment index as the second feature of the target; In response to the matching probability being greater than or equal to a predetermined threshold, it is determined that the trajectory point corresponding to the second feature of the target is matched with a sub-segment with the same sub-segment index.
[0013] Secondly, embodiments of the present invention provide a road condition determination device, the device comprising: The road segment combination acquisition unit is used to acquire road segment combinations to be processed, wherein the road segment combinations to be processed include multiple road segments, the multiple road segments are close in distance and have the same or roughly the same direction of travel; The target road segment determination unit is used to determine the target road segment among the plurality of road segments; A road segmentation unit is used to divide the target road segment into multiple sub-road segments; The first feature acquisition unit is used to acquire first historical trajectory data based on a first duration, and acquire a first feature of the target road segment based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-road segment. The second trajectory acquisition unit is used to acquire second historical trajectory data based on a second duration, wherein the first duration is longer than the second duration. The matching probability acquisition unit is used to acquire the matching probability between the second historical trajectory data and the target road segment based on the historical trajectory distribution parameters. A communication status determination unit is used to determine the traffic status of the target road segment based on the matching probability.
[0014] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.
[0015] Fourthly, embodiments of the present invention provide a computer program product comprising a computer program, wherein when the computer program is run on a computer, the computer executes the method described in the first aspect above.
[0016] Fifthly, embodiments of the present invention provide a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method described in the first aspect.
[0017] The technical solution of this invention obtains a combination of road segments to be processed, which includes multiple road segments that are close in distance and have the same or roughly the same direction of travel. A target road segment is determined from these multiple road segments, and the target road segment is divided into multiple sub-segments. First historical trajectory data is obtained based on a relatively long first time period, and a first feature of the target road segment is obtained based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-segment. Second historical trajectory data is obtained based on a relatively short second time period, and the matching probability between the second historical trajectory data and the target road segment is obtained based on the historical trajectory distribution parameters. The traffic status of the target road segment is determined based on the matching probability. Therefore, the traffic status of the road can be accurately obtained, effectively ensuring the accuracy and stability of subsequent applications. Attached Figure Description
[0018] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which: Figure 1 This is a flowchart of the road condition determination method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the passage path according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the combination of road segments to be processed according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a sub-road segment according to an embodiment of the present invention; Figure 5 This is a flowchart of obtaining the first feature according to an embodiment of the present invention; Figure 6 This is a schematic diagram of trajectory point projection according to an embodiment of the present invention; Figure 7 This is a flowchart of an embodiment of the present invention for obtaining the matching probability of the second historical trajectory data and the target road segment based on historical trajectory distribution parameters; Figure 8 This is a flowchart illustrating how the matching probability of each sub-road segment is obtained based on the second feature and the first feature, according to an embodiment of the present invention. Figure 9 This is a schematic diagram of the confidence intervals according to an embodiment of the present invention; Figure 10 This is a schematic diagram of a road condition determination device according to an embodiment of the present invention; Figure 11 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0019] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0020] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0021] Furthermore, it should be understood that in the following description, "circuit" refers to a conductive loop consisting of at least one element or sub-circuit connected by electrical or electromagnetic connections. When an element or circuit is said to be "connected" to another element or "connected" between two nodes, it can be directly coupled or connected to another element, or there may be intermediate elements. The connection between elements can be physical, logical, or a combination thereof. Conversely, when an element is said to be "directly coupled to" or "directly connected" to another element, it means that there are no intermediate elements between them.
[0022] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0023] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0024] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.
[0025] With urban development and the expansion of transportation infrastructure, elevated highways, multi-lane main roads, and tunnels are becoming increasingly common. Simultaneously, due to road maintenance, accidents, and traffic control measures such as flow restrictions, road conditions are changing more flexibly. In real life, long detours caused by missing intersections are common. However, because parallel roads are spatially very close, and the presence of tall buildings in cities can affect positioning accuracy, matching parallel road segments is difficult and less accurate than matching ordinary road segments. This presents a significant challenge to behavior recognition and traffic flow anomaly identification in parallel road scenarios, relying on traditional matching and road-binding techniques.
[0026] Parallel road segments, due to their similar directions and close spacing, are prone to spatial overlap of trajectory points, often leading to mismatches and multiple bindings in traditional matching technologies. Currently, industry research on trajectory matching technologies for this scenario focuses on optimizing traditional algorithms, integrating multi-dimensional features, and innovating matching processes to improve matching accuracy and reliability. However, the following problems still persist: The road network topology and merging process suffer from matching vulnerabilities: Parallel road segments often possess complex topologies with multiple layers (such as elevated and ground levels) and multiple entrances / exits. Existing algorithms tend to overlook the three-dimensional accessibility of road segments when processing such structures. For example, when merging road segments, traditional methods often only refer to latitude, longitude, and heading, easily leading to incorrect connections between elevated and ground-level parallel road segments. Furthermore, in the generation and matching of parallel road segments, redundant edges and false road segments are easily generated due to noise interference. These problems become more pronounced the closer the distance between parallel road segments, thus affecting the accuracy of downstream applications such as navigation.
[0027] Location noise and sampling defects cause matching confusion: On the one hand, GPS (Global Positioning System) devices are easily blocked by signals in urban canyons and under overpasses, generating location noise that causes trajectory points to shift to the middle area between two parallel road segments. For scenarios with close proximity, such as elevated roads and ground-level roads, or underpasses and ground-level roads, existing clustering or geometric matching algorithms struggle to distinguish the affiliation of these trajectory points, easily leading to misconnections of road segments. On the other hand, if the trajectory sampling rate is low (e.g., sampling once every 30 seconds), the distance between consecutive trajectory points may exceed 400 meters, and signal loss can also cause missing samples, making the trajectory unable to accurately reflect the road shape, and causing disconnections or mismatches in the matching of parallel road segments.
[0028] Traditional algorithms are prone to a trade-off between error accumulation and efficiency: Traditional algorithms only associate adjacent candidate points during matching. If a trajectory point is mismatched in a parallel road segment, subsequent nodes will continue to calculate based on this error, resulting in error accumulation problems such as Z-shaped errors. While deep learning algorithms are suitable for sparse trajectories, they rely on massive amounts of labeled data, resulting in high training costs. Furthermore, in special parallel scenarios such as elevated roads and ground-level roads, their generalization ability is insufficient, making it difficult to achieve a balance between accuracy and efficiency.
[0029] Challenges in adaptability to various scenarios and threshold setting: Parallel road segments vary greatly across different scenarios. For example, wide-spaced parallel auxiliary roads on urban main roads differ from narrow-spaced parallel side roads around residential areas, requiring different parameters for matching algorithms. However, existing algorithms often use fixed values for parameters such as distance thresholds and directional weights, making it difficult to adapt to scenarios with varying road network densities. For instance, in narrow-spaced parallel road segments, a fixed Euclidean distance threshold can lead to excessive selection of candidate road segments, increasing the probability of false matches; while in wide-spaced scenarios, it may miss candidate road segments.
[0030] Therefore, embodiments of the present invention provide a method and apparatus for determining road conditions to solve the above-mentioned problems.
[0031] Figure 1 This is a flowchart of a road condition determination method according to an embodiment of the present invention. Figure 1 As shown, the road state determination method of this invention includes the following steps: Step S100: Obtain the combination of road segments to be processed.
[0032] In this embodiment, road segment combinations that meet certain conditions are selected from road network data as road segment combinations to be processed. The road segment combinations to be processed include multiple road segments that are close in distance and travel in the same or roughly the same direction. That is, a road segment combination that meets the conditions is one where multiple road segments are close in distance and travel in the same or roughly the same direction. Furthermore, the multiple road segments in the road segment combinations to be processed serve the same traffic corridor and bear similar travel demands and traffic flow management functions. Here, "close in distance" means that the distance between road segments is less than or equal to a predetermined distance, which can be set according to actual conditions, for example, 200 meters, 300 meters, etc.
[0033] Furthermore, to facilitate subsequent processing, this embodiment of the invention selects a version of the path shape as the central reference and fits the actual travel path into a line segment.
[0034] Figure 2 This is a schematic diagram of the travel path according to an embodiment of the present invention. For example... Figure 2 As shown, the road network includes four paths: L1, L2, L3, and L4. These four paths are close to each other and travel in the same or roughly the same direction. These paths serve the same traffic corridor, handling similar travel demands and traffic flow management functions. However, the traffic status of each path may differ at different times or in different scenarios. For example, a path may become impassable due to congestion or traffic control, potentially preventing normal travel if a user is subsequently scheduled to use that path. The purpose of this invention is to determine the traffic status of each path in real time based on the vehicle's historical travel trajectory, providing a basis for subsequent planning.
[0035] After fitting these four paths to straight lines, the geometric shape of the paths is obtained, which is the combination of road segments to be processed. Specifically, Figure 3 This is a schematic diagram of the combination of road segments to be processed according to an embodiment of the present invention.
[0036] Step S200: Determine the target road segment among the multiple road segments.
[0037] In this embodiment, a target road segment is determined from among multiple road segments in the combination of road segments to be processed. The target road segment is the one whose traffic status needs to be determined in this instance. The determination of the target road segment is based on actual circumstances.
[0038] For example, all road segments in the combination of road segments to be processed can be used as target road segments, and one segment can be processed at a time. Alternatively, road segments requiring priority processing can be selected as target road segments based on the actual situation of the road network.
[0039] Step S300: Divide the target road segment into multiple sub-segments.
[0040] In this embodiment, after determining the target road segment, the target road segment is divided into multiple sub-segments. Specifically, the target road segment is divided according to the shape of the road network. Specifically, the target road segment is divided according to a predetermined distance. The predetermined distance can be preset according to actual needs, for example, it can be selected as 5 meters, 10 meters, 20 meters, etc.
[0041] Furthermore, when segmenting the target road segment, it is necessary to consider the road segments that are directly or indirectly connected to it. For example, when determining the start and end points of the target road segment, it is necessary to consider the range of a predetermined distance (e.g., 300 meters) before the start point and a predetermined distance (e.g., 300 meters) after the end point.
[0042] by Figure 3 Taking the combination of road segments to be processed as an example, if the target road segment is L4, when segmenting L4, it is necessary to consider not only L4 itself, but also some road segments in L5, L6 and L1. Figure 4 This is a schematic diagram of a sub-road segment according to an embodiment of the present invention. Figure 4 The diagram shows the segmentation when the target road segment is L2. Segmentation is initiated from the direction of travel. At the break line, if the distance of the last segment is insufficient, it can be merged into the previous segment or treated as a separate segment.
[0043] Step S400: Obtain first historical trajectory data based on the first duration, and obtain the first feature of the target road segment based on the first historical trajectory data.
[0044] In this embodiment, a ride-hailing platform is used as an example. The driving routes of each ride-hailing vehicle can be obtained as the first historical trajectory data, where the first duration is set to a relatively long period, such as 1 day, 2 days, or 3 days. Then, the first historical trajectory data is obtained based on the first duration. This first historical trajectory data includes at least one first trajectory passing through the target road segment, and each first trajectory includes multiple first trajectory points. A first feature of the target road segment is obtained based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters for each sub-road segment.
[0045] Figure 5 This is a flowchart illustrating the acquisition of the first feature according to an embodiment of the present invention. For example... Figure 5 As shown, obtaining the first feature of the target road segment based on the first historical trajectory data includes the following steps: Step S410: Project each of the first trajectory points onto the target road segment to obtain the first projection point corresponding to each first trajectory point.
[0046] In this embodiment, each of the first trajectory points is projected onto the target road segment to obtain a first projection point corresponding to each first trajectory point. Specifically, a perpendicular line is drawn from the first trajectory point to the target road segment, and the foot of the perpendicular is the first projection point corresponding to the first trajectory point.
[0047] Step S420: Determine the sub-segment where the first trajectory point is located based on the position of the first projection point in the target road segment.
[0048] In this embodiment, the sub-road segment where the first projection point is located is taken as the sub-road segment where the first trajectory point is located.
[0049] Figure 6 This is a schematic diagram of trajectory point projection according to an embodiment of the present invention. For example... Figure 6 As shown, for the first trajectory points P1-P7, the first projection points corresponding to P2-P6 fall in the sub-segment LA2, so the sub-segment where the first trajectory points P2-P6 are located is LA2.
[0050] Step S430: Obtain the first feature based on the vertical distance from the first trajectory point in each sub-segment to the target segment.
[0051] In this embodiment, after obtaining the first trajectory points corresponding to each sub-road segment, the vertical distance from each first trajectory point to the target road segment is determined. Then, the first feature is obtained based on the vertical distance. The first feature includes historical trajectory distribution parameters for each sub-road segment. Specifically, for the vertical distance of the first trajectory points of each sub-road segment, a Gaussian mixture distribution is used to model the distance, and the number of clusters and the first feature corresponding to the sub-road segment are determined using the Bayesian information criterion. The historical trajectory distribution parameters include the mean, weight, and variance of each cluster. For the vertical distance, the direction of travel on the target road segment is used, with the left side being negative and the right side being positive.
[0052] Specifically, for one of the sub-segments, the vertical distances of each first trajectory point of the sub-segment are used as an array. It is assumed that the array is composed of a weighted combination of multiple Gaussian distributions (each Gaussian distribution represents a cluster). Each Gaussian distribution has its own mean and variance, and the weight represents the proportion of the Gaussian distribution in the total population. The sum of the weight values of each Gaussian distribution is 1.
[0053] First, set the maximum number of clusters K. max For example, 3, 5, etc. Starting from K=1 to K... max For each K value, perform the following steps: The Expectation-Maximization (EM) algorithm is used to estimate the parameters of a Gaussian Mixture Model (GMM): The mean, variance, and weights of each cluster are randomly initialized. Based on the current parameters, the posterior probability of each sample point belonging to each cluster is calculated. The mean, variance, and weights of each cluster are updated using the posterior probability. This process is iterated until the parameters converge, yielding the optimal parameters for that given K value. For each K value, the above steps are repeated to obtain the optimal parameters for each K value.
[0054] Then, the optimal K value is selected based on the optimal parameters of each K value using the Bayesian information criterion, thereby obtaining the number of clusters corresponding to the sub-segment and the mean, weight and variance of each cluster.
[0055] Therefore, in order to complete the semantics of different roads in a two-dimensional map, the shape of the road network of flat road segments deviates significantly from the actual traffic shape. This difference manifests as: relative distance distortion, shape distortion, and positional offset. This invention introduces a relative representation mechanism: for a road segment with a specific shape in the road network, it first ignores whether its trajectory distribution completely corresponds to the more realistic one. Instead, based on the idea that "even if there is an offset, it won't be too far off," it constructs a local feature distribution centered on the road segment. This mechanism is called the local relative representation mechanism for parallel road segments, or the second feature. Furthermore, although noise and sampling defects in parallel road segment localization are known challenges, this invention can still obtain a relatively stable distribution for a specified parallel road area segment through a longer observation time interval (first duration). This distribution can also be used as a priori distribution, and the nearest trajectory's behavior on the priori distribution can help predict its match.
[0056] Furthermore, if there are multiple first trajectories in the first historical trajectory data, the multiple first trajectories can be merged into a denser trajectory before performing the above steps to obtain the first feature.
[0057] Step S500: Obtain second historical trajectory data based on the second duration, wherein the first duration is longer than the second duration.
[0058] In this embodiment, a ride-hailing platform is used as an example. The driving routes of each ride-hailing vehicle can be obtained as the second historical trajectory data. The second duration is set to a short duration to reflect the current road traffic status, such as 15 minutes or 30 minutes. Then, the second historical trajectory data is obtained based on the second duration. The second historical trajectory data includes at least one second trajectory, and the second trajectory includes multiple second trajectory points.
[0059] Step S600: Obtain the matching result between the second historical trajectory data and the target road segment based on the historical trajectory distribution parameters.
[0060] In this embodiment, the matching result between the second historical trajectory data and the target road segment is obtained according to the historical trajectory distribution parameters. The matching result includes the matching result between the second historical trajectory data and each sub-segment in the target road segment.
[0061] Figure 7 This is a flowchart illustrating the process of obtaining the matching result between the second historical trajectory data and the target road segment based on historical trajectory distribution parameters, according to an embodiment of the present invention. Figure 7 As shown, obtaining the matching result between the second historical trajectory data and the target road segment based on the historical trajectory distribution parameters includes the following steps: Step S610: Project each of the second trajectory points onto the target road segment to obtain the second projection point corresponding to each of the second trajectory points.
[0062] In this embodiment, each of the second trajectory points is projected onto the target road segment to obtain a second projection point corresponding to each second trajectory point. Specifically, a perpendicular line is drawn from the second trajectory point to the target road segment, and the foot of the perpendicular is the second projection point corresponding to the second trajectory point.
[0063] Step S620: Determine the sub-segment where the second trajectory point is located based on the position of the second projection point in the target road segment.
[0064] In this embodiment, the sub-road segment where the second projection point is located is taken as the sub-road segment where the corresponding second trajectory point is located.
[0065] Step S630: Obtain the second feature based on the vertical distance from the second trajectory point in each sub-segment to the target segment.
[0066] In this embodiment, after obtaining the second trajectory points corresponding to each sub-road segment, the vertical distance from each second trajectory point to the target road segment is determined, and then the second feature is obtained based on the vertical distance. The second feature is the average value of the vertical distances from each second trajectory point to the target road segment. For the vertical distance, the direction of travel on the target road segment is used, with the left side being negative and the right side being positive.
[0067] by Figure 6 Taking the trajectory points in the target road segment as an example, assuming there are five second trajectory points P2-P6 in sub-road segment LA2, the vertical distance from each of the five trajectory points to the target road segment is obtained, and the average value of the vertical distance is calculated to obtain the second feature.
[0068] In some embodiments, if the number of second trajectory points in a certain sub-segment is less than a predetermined number (e.g., 5), trajectory points can be inserted using cyclic difference until the predetermined number is reached. After inserting the trajectory points, the second feature is calculated. The trajectory points can be inserted using methods such as linear interpolation, polynomial interpolation, or spline interpolation.
[0069] Step S640: Obtain the matching probability of each sub-segment based on the second feature and the first feature.
[0070] In this embodiment, after calculating the second feature of each sub-road segment, the matching probability of each sub-road segment is obtained based on the second feature and the first feature.
[0071] Figure 8 This is a flowchart illustrating how the matching probability of each sub-road segment is obtained based on the second feature and the first feature, according to an embodiment of the present invention. For example... Figure 8As shown, obtaining the matching probability of each sub-road segment based on the second feature and the first feature includes the following steps: Step S641: Traverse the second features of each sub-segment to obtain the target second feature.
[0072] In this embodiment, each sub-segment needs to be matched separately. First, the second features of each sub-segment are traversed, and a second feature is obtained as the target second feature.
[0073] Step S642: Calculate the matching probability between the trajectory point corresponding to the second feature of the target and each sub-road segment based on the second feature of the target and the first feature of each sub-road segment.
[0074] In this embodiment, the target second feature is calculated with the second features of each sub-road segment to obtain the matching probability between the trajectory point corresponding to the target second feature and each sub-road segment.
[0075] Specifically, as mentioned above, the second feature includes the number of clusters and the mean, weight, and variance of each cluster. Assume that for a certain sub-segment, the number of clusters is N, and the weight of the i-th (i=1, 2, ..., N) cluster is w. i The mean is μ i The variance is σ i If the second feature of the target is x, then the formula for calculating the matching probability between the second feature of the target and the i-th sub-road segment is:
[0076] in:
[0077] Therefore, the matching probability between the second feature of the target and the i-th sub-segment can be obtained.
[0078] Repeat the above steps, adjusting the value of i each time, until the matching probability between the target's second feature and each sub-segment is calculated.
[0079] In some embodiments, after calculating the matching probability between the target's second feature and each sub-road segment, all matching probabilities are normalized so that the sum of all probabilities is 1.
[0080] Normalization can be achieved using softmax. The softmax function transforms a set of arbitrary real numbers into a probability distribution such that each output value is between 0 and 1, and the sum of all outputs is 1. Assuming there are M sub-road segments, the matching probability between the target's second feature and the M sub-road segments can be calculated using the above method, denoted as (P...). B1 P B2 P B3 ..., PBM The normalization calculation formula is:
[0081] After the current target second feature is processed, the next second feature is selected as the target second feature, and the above steps are repeated until the positions of all second features have been calculated.
[0082] Step S643: Obtain the matching probability of the sub-road segment with the same sub-road segment index as the second feature of the target.
[0083] In this embodiment, the sub-road segment index corresponding to the second feature of the target currently being processed is obtained, and the matching probability corresponding to the sub-road segment index is obtained.
[0084] Step S644: In response to the matching probability being greater than or equal to a predetermined threshold, determine that the trajectory point corresponding to the second feature of the target is matched with a sub-road segment with the same sub-road segment index.
[0085] In this embodiment, in response to the matching probability obtained in step S643 being greater than or equal to a predetermined threshold (e.g., 60%), it indicates that the location of the second trajectory corresponding to the target second feature has significant distinguishability, and it is determined that the trajectory point corresponding to the target second feature matches the sub-road segment with the same sub-road segment index. Further, determining that the trajectory point corresponding to the target second feature matches the sub-road segment with the same sub-road segment index involves: identifying multiple second trajectory points corresponding to the target second feature as matching the sub-road segment with the same sub-road segment index.
[0086] For example, assuming that the projection point of the second trajectory point corresponding to the second feature of the target being processed is in the fifth sub-segment, and the matching probability between the second feature of the target and the fifth sub-segment is calculated to be greater than a predetermined threshold, then it is determined that the second trajectory matches the fifth sub-segment.
[0087] In some embodiments, to further improve accuracy, the matched sub-segments can also be verified.
[0088] In step S400, after obtaining the first features of each sub-road segment, confidence intervals under different confidence thresholds for the sub-road segment are obtained based on the first features. For ease of explanation, this embodiment of the invention uses an example where the number of clusters in the first feature of a certain sub-road segment is 1. Figure 9 This is a schematic diagram of the confidence interval in an embodiment of the present invention. Figure 9 The Gaussian distribution curve of a certain sub-road segment is shown. Several different confidence thresholds are set, and then the confidence intervals corresponding to each confidence threshold are obtained. Figure 9The following explanation uses three confidence thresholds (95%, 80%, and 70%) as examples. As shown in the figure, the confidence interval corresponding to the 95% confidence threshold is [-2, 2], the confidence interval corresponding to the 80% confidence threshold is [-1.5, 1.5], and the confidence interval corresponding to the 70% confidence threshold is [-1, 1]. The above operation is performed on each sub-segment to obtain the confidence intervals corresponding to different confidence thresholds.
[0089] Returning to step S644, in response to the matching probability being greater than or equal to a predetermined threshold, it is determined that the trajectory point corresponding to the second feature of the target matches the sub-road segment with the same sub-road segment index, and then verification is performed through a confidence interval.
[0090] Specifically, in response to the matching probability being greater than or equal to a predetermined threshold, the sub-segment corresponding to the second-highest matching probability is determined. Specifically, as described above, in some embodiments, after calculating the matching probability between the target second feature and each sub-segment, all matching probabilities are normalized so that the sum of all probabilities is 1. By reasonably setting a predetermined threshold (e.g., greater than 50%), the probability of the sub-segment with the same sub-segment index as the trajectory point is maximized when the matching probability is greater than or equal to the predetermined threshold. Then, the sub-segment with the second-highest matching probability is obtained. The sub-segment with the same sub-segment index as the trajectory point is designated as the first sub-segment, and the sub-segment with the second-highest matching probability is designated as the second sub-segment.
[0091] The second feature is detected within the confidence interval of the first sub-segment, in order to Figure 9 Taking an example, assuming the value of the second feature is between [-2, -1.5) or (1.5, 2], a confidence interval of 95% can be determined. Assuming the value is between [-1.5, -1) or (1, 1.5], a confidence interval of 80% can be determined. Assuming the value is between [-1, 1], a confidence interval of 70% can be determined. The edges of these intervals can be assigned to any adjacent interval; this embodiment of the invention does not impose any restrictions on this. Based on the same principle, the confidence interval of the second feature in the first sub-road segment is detected.
[0092] If the second feature is located within a certain confidence interval of the Gaussian distribution of the first sub-segment and outside the same confidence interval of the Gaussian distribution of the second sub-segment, then the second feature is considered to be clearly located within the Gaussian interval of the first sub-segment, the verification is successful, and it is determined that the trajectory point corresponding to the target second feature matches the sub-segment with the same sub-segment index.
[0093] If the second trajectory point is simultaneously within the same confidence interval of the first and second sub-segments, then the confidence interval of the next confidence threshold is determined sequentially. If it is still impossible to distinguish even up to the lowest confidence threshold, then it is considered to have high confusion and cannot be distinguished, and the verification fails.
[0094] For second features with a matching probability less than a predetermined threshold or with verification failure, the corresponding sub-segment is marked as a mismatch.
[0095] Therefore, each of the second features is processed one by one to obtain the matching result between the second trajectory and each sub-segment.
[0096] Therefore, to address the challenges of positioning noise, error accumulation, multi-scenario adaptability, and threshold setting, this invention introduces a confidence interval mechanism for sub-road segments. The entire parallel road segment is divided into sub-segments, and statistical distributions are performed on each sub-segment. Similarly, each sub-segment has its own confidence interval, calculated at commonly used confidence levels such as 70%, 80%, and 95%. In practice, each sub-segment is matched with its own results and features. The matching result of a single sub-segment is unaffected by its upstream and downstream components, avoiding error accumulation. Different scenarios can use confidence intervals at different confidence levels through an adaptive approach, also solving the problem of difficulty in determining thresholds.
[0097] Step S650: Obtain the matching probability between the second historical trajectory data and the target road segment based on the matching probability of each sub-road segment.
[0098] In this embodiment, the matching results of each sub-road segment are used as the matching probability between the second historical trajectory data and the target road segment.
[0099] For example, assuming a match result of "matched" is marked as 1 and a match result of "not matched" is marked as 0, the matching probability of the second historical trajectory data with the target road segment can be represented as a string. The string contains multiple 0 or 1 characters, and the length of the string is the same as the length of the sub-road segment. Each character represents the matching result of the corresponding sub-road segment. For example, assuming there are 5 sub-road segments, the second sub-road segment does not match, and the other sub-road segments match, then the matching probability of the second historical trajectory data with the target road segment is (1, 0, 1, 1, 1).
[0100] Step S700: Determine the traffic status of the target road segment based on the matching result.
[0101] In this embodiment, the number of sub-road segments with a matching result of "matched" is counted. If the ratio of the number of matched sub-road segments to the total number of sub-road segments is greater than a predetermined value, the second historical trajectory data is considered to be the trajectory data of the target road segment. Since the second historical trajectory data is relatively recent, the traffic status of the target road segment can be considered to be passable. Conversely, the traffic status of the target road segment can be considered to be impassable.
[0102] In some embodiments, when there are multiple second trajectories in the second historical trajectory data, each second trajectory can be processed separately to obtain the traffic status of each second trajectory relative to the target road segment. Then, the traffic statuses of multiple second trajectories relative to the target road segment are arranged in chronological order to obtain the actual trajectory matching results of orders planned to the target road segment over a continuous period of time.
[0103] For example, suppose there are seven second trajectories. The traffic status of the target path is determined to be passable based on the first to fourth second trajectories, and impassable based on the fifth to seventh second trajectories. The actual trajectory matching results of orders planned to the target road segment over a continuous period can be recorded as (1, 1, 1, 1, 0, 0, 0). This allows for a more intuitive understanding of the traffic status of the target road segment.
[0104] This invention provides an embodiment of a road segment combination to be processed, comprising multiple road segments that are close in distance and travel in the same or roughly the same direction. A target road segment is determined from these segments, and the target road segment is further divided into multiple sub-segments. First historical trajectory data is acquired based on a relatively long first time period, and a first feature of the target road segment is obtained based on this first historical trajectory data. The first feature includes historical trajectory distribution parameters for each sub-segment. Second historical trajectory data is acquired based on a relatively short second time period, and the matching probability between the second historical trajectory data and the target road segment is calculated based on the historical trajectory distribution parameters. The traffic status of the target road segment is then determined based on the matching probability. This allows for accurate acquisition of road traffic status, effectively ensuring the accuracy and stability of subsequent applications.
[0105] Figure 10 This is a schematic diagram of a road condition determination device according to an embodiment of the present invention. Figure 10As shown, the road state determination device includes: a road segment combination acquisition unit 101, a target road segment determination unit 102, a road segment splitting unit 103, a first feature acquisition unit 104, a second trajectory acquisition unit 105, a matching probability acquisition unit 106, and a communication state determination unit 107. The road segment combination acquisition unit 101 acquires road segment combinations to be processed, which include multiple road segments that are close in distance and travel in the same or roughly the same direction. The target road segment determination unit 102 determines a target road segment from the multiple road segments. The road segment splitting unit 103 segments the target road segment to obtain multiple sub-segments. The first feature acquisition unit 104 acquires first historical trajectory data based on a first duration and acquires a first feature of the target road segment based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-segment. The second trajectory acquisition unit 105 acquires second historical trajectory data based on a second duration, where the first duration is longer than the second duration. The matching probability acquisition unit 106 is used to acquire the matching probability between the second historical trajectory data and the target road segment based on the historical trajectory distribution parameters. The communication status determination unit 107 is used to determine the traffic status of the target road segment based on the matching probability.
[0106] This invention provides an embodiment of a road segment combination to be processed, comprising multiple road segments that are close in distance and travel in the same or roughly the same direction. A target road segment is determined from these segments, and the target road segment is further divided into multiple sub-segments. First historical trajectory data is acquired based on a relatively long first time period, and a first feature of the target road segment is obtained based on this first historical trajectory data. The first feature includes historical trajectory distribution parameters for each sub-segment. Second historical trajectory data is acquired based on a relatively short second time period, and the matching probability between the second historical trajectory data and the target road segment is calculated based on the historical trajectory distribution parameters. The traffic status of the target road segment is then determined based on the matching probability. This allows for accurate acquisition of road traffic status, effectively ensuring the accuracy and stability of subsequent applications.
[0107] Figure 11 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (For example...) Figure 11 As shown, Figure 11The illustrated electronic device is a general-purpose data processing device, comprising a general-purpose computer hardware architecture, including at least a processor 111 and a memory 112. The processor 111 and memory 112 are connected via a bus 113. The memory 112 is adapted to store instructions or programs executable by the processor 111. The processor 111 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 111 executes the instructions stored in the memory 112, thereby performing the method flow of the embodiments of the present invention as described above to process data and control other devices. The bus 113 connects the aforementioned components together, and also connects these components to a display controller 114, a display device, and an input / output (I / O) device 115. The input / output (I / O) device 115 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 115 is connected to the system via an input / output (I / O) controller 116.
[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.
[0110] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.
[0111] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.
[0112] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0113] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0114] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A road state determination method characterized by comprising: The method includes: Obtain a combination of road segments to be processed, which includes multiple road segments that are close in distance and travel in the same or roughly the same direction. The target road segment is determined from the plurality of road segments; The target road segment is divided into multiple sub-segments; First historical trajectory data is obtained based on a first duration, and a first feature of the target road segment is obtained based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-road segment. Second historical trajectory data is obtained based on a second duration, wherein the first duration is longer than the second duration; The matching result between the second historical trajectory data and the target road segment is obtained based on the historical trajectory distribution parameters. The traffic status of the target road segment is determined based on the matching results.
2. The method of claim 1, wherein, The step of segmenting the target road segment to obtain multiple sub-segments includes: The target road segment is divided into segments according to a predetermined distance.
3. The method of claim 1, wherein, The first historical trajectory data includes at least one first trajectory that passes through the target road segment, and the first trajectory includes multiple first trajectory points.
4. The method of claim 3, wherein, The step of obtaining the first feature of the target road segment based on the first historical trajectory data includes: Project each of the first trajectory points onto the target road segment to obtain the first projection point corresponding to each first trajectory point; The sub-segment where the first trajectory point is located is determined based on the position of the first projection point in the target road segment; The first feature is obtained based on the vertical distance from the first trajectory point in each sub-segment to the target segment.
5. The method of claim 4, wherein, The step of obtaining the first feature based on the vertical distance from the first trajectory point in each sub-segment to the target segment includes: For the vertical distance of the first trajectory point of each sub-segment, a Gaussian mixture distribution is used to model the distance, and the number of clusters and the first feature corresponding to the sub-segment are determined using the Bayesian information criterion. The historical trajectory distribution parameters include the mean, weight, and variance of each cluster.
6. The method of claim 5, wherein, The second historical trajectory data includes at least one second trajectory, and the second trajectory includes multiple second trajectory points.
7. The method of claim 6, wherein, The step of obtaining the matching result between the second historical trajectory data and the target road segment based on the first feature includes: Project each of the second trajectory points onto the target road segment to obtain the second projection point corresponding to each of the second trajectory points; The sub-segment where the second trajectory point is located is determined based on the position of the second projection point in the target road segment; The second feature is obtained based on the vertical distance from the second trajectory point in each sub-segment to the target segment, and the second feature is the average value of the vertical distance from each second trajectory point to the target segment; The matching probability of each sub-segment is obtained based on the second feature and the first feature; The matching result between the second historical trajectory data and the target road segment is obtained based on the matching probability of each sub-road segment.
8. The method of claim 7, wherein, The step of obtaining the matching probability of each sub-road segment based on the second feature and the first feature includes: Iterate through the second features of each sub-segment to obtain the target's second feature; The matching probability between the trajectory point corresponding to the second feature of the target and each sub-road segment is calculated based on the second feature of the target and the first feature of each sub-road segment. Obtain the matching probability of the sub-road segment with the same sub-road segment index as the second feature of the target; In response to the matching probability being greater than or equal to a predetermined threshold, it is determined that the trajectory point corresponding to the second feature of the target is matched with a sub-segment with the same sub-segment index.
9. A road state determining apparatus characterized by comprising: The device includes: The road segment combination acquisition unit is used to acquire road segment combinations to be processed, wherein the road segment combinations to be processed include multiple road segments, the multiple road segments are close in distance and have the same or roughly the same direction of travel; The target road segment determination unit is used to determine the target road segment among the plurality of road segments; A road segmentation unit is used to divide the target road segment into multiple sub-road segments; The first feature acquisition unit is used to acquire first historical trajectory data based on a first duration, and acquire a first feature of the target road segment based on the first historical trajectory data. The first feature includes historical trajectory distribution parameters of each sub-road segment. The second trajectory acquisition unit is used to acquire second historical trajectory data based on a second duration, wherein the first duration is longer than the second duration. The matching probability acquisition unit is used to obtain the matching result between the second historical trajectory data and the target road segment based on the historical trajectory distribution parameters. A communication status determination unit is used to determine the traffic status of the target road segment based on the matching probability.
10. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-8.
11. A computer program product comprising a computer program, characterized in that, When the computer program is run on a computer, the computer performs the method according to any one of claims 1-8.
12. A computer readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-8.