Traffic target course angle optimization calculation method and device and computer equipment
By creating a data structure for each tracked target, acquiring and dynamically adjusting the window length in real time, and optimizing the heading angle calculation, the instability problem of the inter-frame difference method under the influence of sensor noise is solved, and a more stable and accurate heading angle calculation is achieved.
Patent Information
- Application Number
- CN202511840116.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, the inter-frame difference method for calculating the heading angle of traffic targets is easily affected by sensor measurement noise and environmental interference, resulting in unstable heading angle calculations and misleading downstream modules, making it difficult to adapt to the needs of different scenarios and target types.
By creating a data structure for each tracked target, real-time information on position, velocity, acceleration, and perceived uncertainty is obtained. The window length is dynamically adjusted, and the heading angle calculation is optimized based on the adaptive window distance. A more stable heading angle that conforms to physical laws is calculated by using the coordinates of the sliding window's start and end points.
This improves the stability and accuracy of heading angle calculation, reduces the impact of positioning noise, ensures that the calculation results conform to the actual motion laws, and provides a reliable basis for subsequent analysis and decision-making.
Smart Images

Figure CN121500978A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to intelligent transportation systems, and more specifically to a method, apparatus, and computer equipment for optimizing the heading angle of traffic targets. Background Technology
[0003] In the development of autonomous driving technology and intelligent transportation systems, accurately and in real-time identifying the motion status of all surrounding traffic participants is crucial for ensuring traffic safety and enabling intelligent decision-making. In particular, the heading angle of a target—the angle between its direction of travel and a reference coordinate system such as the vehicle coordinate system or the global coordinate system—is considered one of the most critical parameters. The heading angle not only directly reflects the target's current motion intention but also plays a decisive role in predicting its future path and assessing collision risk.
[0004] Currently, the main method for calculating a target's heading angle is called the "inter-frame difference method." This method relies on a sequence of target trajectory points continuously output by a sensing system (such as a target tracking module). Specifically, it compares the target's current position (x, y) at timestamp t. t y t ) and its position in the previous frame (x) {t-1} y {t-1} To calculate the heading angle θ t The formula is as follows: θ t =atan 2 ((y t -y {t-1} ), (x t - x {t-1} While this method boasts advantages such as computational simplicity and rapid response, several major problems have emerged in practical applications: Due to sensor measurement noise, environmental interference, and uncertainties in target detection and tracking algorithms, even minute positional deviations can cause drastic fluctuations in the calculated heading angle. The heading angle sequence obtained by the inter-frame difference method often exhibits a jagged pattern, which may mislead downstream modules, such as the prediction module, which might incorrectly determine the target's motion state. When the target's velocity is very low or almost stationary, the inter-frame displacement may be less than the sensor's positioning error, making the heading angle calculation unstable and meaningless. To mitigate the impact of noise, some schemes employ fixed-length sliding windows, but this approach is difficult to adapt to the needs of different scenarios and target types, easily leading to response lag or insufficient filtering.
[0005] Therefore, it is necessary to design a new method that can intelligently adapt to target characteristics and motion state, fundamentally reduce the impact of positioning noise, and directly calculate a more stable heading angle that conforms to physical laws from the original trajectory point sequence. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus and computer equipment for optimizing the calculation of the heading angle of traffic targets.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: a method for optimizing the calculation of the heading angle of traffic targets, comprising: Set the relevant parameters; A data structure is created for each tracked target to store the historical trajectory point sequence, and the latest position, velocity, acceleration, classification and perception uncertainty information are acquired in real time to obtain real-time target data; The window length is dynamically adjusted based on the target real-time data and the relevant parameters to obtain an adaptive window distance; Based on the adaptive window distance, remove the head point from the historical trajectory point sequence until the remaining trajectory length does not exceed the adaptive window distance, and determine the sliding window start point and sliding window end point. The optimized heading angle is calculated using the coordinates of the starting and ending points of the sliding window; Output the heading angle and status information; wherein, the status information includes the latest position, velocity, and acceleration.
[0009] The further technical solution is as follows: the relevant parameters include the reference window distance, speed adjustment strategy, acceleration threshold and scaling factor, uncertainty mapping relationship and global constraint of window distance.
[0010] The further technical solution is as follows: A data structure is created to store the historical trajectory point sequence for each tracked target, and the latest position, velocity, acceleration, classification, and perception uncertainty information are acquired in real time to obtain real-time target data, including: Create a data structure for each tracked target to store the sequence of historical trajectory points; For each target, real-time status information, attribute information, and quality information are acquired to obtain real-time target data. Among them, the attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
[0011] The further technical solution is that each point in the historical trajectory point sequence contains coordinates and a timestamp.
[0012] The further technical solution is as follows: the adaptive window distance is determined by at least two factors among the target's motion state, classification information, and perceptual uncertainty, and is dynamically adjusted through a predefined mapping relationship and calculation formula.
[0013] A further technical solution is as follows: the step of dynamically adjusting the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance includes: Based on the target real-time data, a type benchmark is obtained according to the classification query benchmark mapping table; The adjusted speed is obtained by adjusting the type reference according to the speed through a preset adaptive curve; When the acceleration exceeds the acceleration threshold, the window length is dynamically reduced. The scaling factor is calculated based on the uncertainty metric, and the adjusted speed is adjusted according to the scaling factor to obtain the final window distance; The final window distance is constrained within the global constraint range of window distance to obtain an adaptive window distance.
[0014] The further technical solution is as follows: the calculation of the optimized heading angle using the coordinates of the starting and ending points of the sliding window includes: Using θ=atan2((y e -y s ), (x e -x s )) Calculate the optimized heading angle, where (x s y s (x) represents the coordinates of the starting point of the sliding window; e y e ) represents the coordinates of the end point of the sliding window.
[0015] The present invention also provides a device for optimizing the heading angle of traffic targets, comprising: The setting unit is used to set relevant parameters; The real-time data acquisition unit is used to create a data structure to store the historical trajectory point sequence for each tracked target, and to acquire the latest position, velocity, acceleration, classification and perception uncertainty information in real time to obtain real-time target data; A dynamic adjustment unit is used to dynamically adjust the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance; The sliding window determination unit is used to remove the head point from the historical trajectory point sequence based on the adaptive window distance until the remaining trajectory length does not exceed the adaptive window distance, and to determine the sliding window start point and sliding window end point. The calculation unit is used to calculate the optimized heading angle using the coordinates of the sliding window start point and sliding window end point; The output unit is used to output the heading angle and status information; wherein, the status information includes the latest position, velocity, and acceleration.
[0016] The further technical solution is as follows: the real-time data acquisition unit includes: Create sub-units to create data structures for each tracked target and store historical trajectory point sequences; The data acquisition subunit is used to acquire status information, attribute information, and quality information in real time for each target to obtain real-time target data. The attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
[0017] The present invention also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0018] The advantages of this invention compared to existing technologies are as follows: This invention creates and maintains a data structure containing a sequence of historical trajectory points for each tracked target, and dynamically adjusts the window length based on the latest target position, velocity, acceleration, classification, and perceptual uncertainty information acquired in real time, thus achieving intelligent adaptation to different target characteristics and motion states. Specifically, the adaptive window distance calculated based on this real-time data is used to filter and optimize the original trajectory point sequence, ensuring that only the most representative start and end points are used for heading angle calculation, thereby effectively reducing the impact of positioning noise. This method not only fundamentally improves the stability and accuracy of the calculation results but also ensures that the calculated heading angle better conforms to the actual motion laws of the physical world, outputting the optimized heading angle and its related state information, providing a reliable basis for subsequent analysis and decision-making. Therefore, even in complex and ever-changing traffic scenarios, it can guarantee the accurate grasp and description of the target's motion trend.
[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the traffic target heading angle optimization calculation method provided in an embodiment of the present invention; Figure 2 A schematic diagram of a sub-process of the traffic target heading angle optimization calculation method provided in an embodiment of the present invention; Figure 3 A schematic diagram of a sub-process of the traffic target heading angle optimization calculation method provided in an embodiment of the present invention; Figure 4A schematic block diagram of a traffic target heading angle optimization calculation device provided in an embodiment of the present invention; Figure 5 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0027] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0028] Please see Figure 1 , Figure 1 This is a flowchart illustrating the traffic target heading angle optimization calculation method provided in this embodiment of the invention. This method is applied to a server and dynamically creates and updates a data structure for each tracked target, acquiring its position, velocity, acceleration, and other state information, as well as attribute information such as classification and perception uncertainty, in real time. It uses a multi-factor (such as target type, motion state, and perception quality) fusion strategy to adaptively adjust the window length to select historical trajectory point sequences, effectively personalizing the processing of targets with different characteristics and motion states, thereby intelligently reducing the impact of positioning noise on heading angle calculation. Finally, based on the optimized sliding window start and end coordinates, a more stable heading angle that conforms to physical laws is calculated. This method fundamentally improves the accuracy and reliability of target tracking.
[0029] Figure 1This is a flowchart illustrating the traffic target heading angle optimization calculation method provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S160.
[0030] S110, Set relevant parameters.
[0031] In this embodiment, the relevant parameters include the baseline window distance, velocity adjustment strategy, acceleration threshold and scaling factor, uncertainty mapping relationship, and global constraints on the window distance.
[0032] Setting relevant parameters is a fundamental step in the traffic target heading angle optimization method based on adaptive distance sliding window. These parameters are crucial for ensuring that the algorithm can dynamically adjust the window length according to different target characteristics, motion states, and perception quality, thereby achieving accurate calculation of the heading angle. Specifically, the relevant parameters include, but are not limited to, the following aspects: Reference window distance (L) type This is a preset base window distance value for different types of targets. For example, the baseline window distance will vary depending on the size, speed range, and behavior patterns of different types of traffic targets such as cars, trucks, pedestrians, and bicycles. This parameter provides a starting point for subsequent adaptive adjustments.
[0033] Speed Adjustment Strategy: Defines how the baseline window distance is dynamically adjusted based on the target's current speed. Typically, this adjustment is achieved through a predefined speed-window adaptive curve, which reflects how the window length should change as speed increases or decreases to maintain an optimal balance between smoothness and responsiveness. For example, a larger window may be needed at low speeds to ensure sufficient smoothness, while a smaller window is needed at high speeds to improve sensitivity to rapid steering.
[0034] Acceleration threshold and scaling factor (a) threshold The scaling factor k sets the criteria for determining whether a target is making a sharp turn and the corresponding window length adjustment strategy. When lateral acceleration exceeds a certain threshold, the system automatically reduces the window length to improve the reaction speed to rapidly changing directions. The scaling factor k quantifies the magnitude of this adjustment.
[0035] Uncertainty mapping (α): This establishes a mapping from uncertainty measures (such as covariance and confidence) provided by the positioning or tracking module to the window length scaling factor. High uncertainty implies a more lenient window adjustment strategy to "average down" more noise; conversely, low uncertainty allows for a tighter window setting, improving the accuracy of heading angle calculations.
[0036] Global constraints on window distance ([L) minL max The minimum and maximum limits of the window distance are set to ensure that the window length will not exceed a reasonable range even in extreme cases, thereby maintaining the stability and reliability of the algorithm.
[0037] By comprehensively considering the above parameters, the method in this embodiment can intelligently adapt to various complex traffic scenarios, significantly improving the accuracy and robustness of heading angle calculation, while also enhancing the system's noise resistance and the accuracy of its physical meaning. This process not only improves the performance of target tracking in autonomous driving systems but also provides a solid technical foundation for further applications.
[0038] S120. Create a data structure for each tracked target to store the historical trajectory point sequence, and obtain the latest position, velocity, acceleration, classification and perception uncertainty information in real time to obtain real-time target data.
[0039] In this embodiment, the real-time target data refers to comprehensive information including the latest position, velocity, acceleration, target classification, and perception uncertainty, which is used to dynamically update the historical trajectory point sequence of each tracked target and support subsequent heading angle calculation.
[0040] In one embodiment, please refer to Figure 2 The above-mentioned step S120 may include steps S121 to S122.
[0041] S121. Create a data structure for each tracked target to store the historical trajectory point sequence.
[0042] Each point in the historical trajectory point sequence contains coordinates and a timestamp.
[0043] For each tracked target (such as a car, truck, pedestrian, or bicycle), a separate data structure needs to be created to store its historical trajectory point sequence. Each trajectory point pi contains coordinates (xi, yi) and a timestamp ti, thus recording the target's position information at different times. By maintaining such a dynamically updated historical trajectory point sequence P={p0, p1, p2, ..., pk}, the system can accurately reflect the target's past movement path.
[0044] This data structure enables the system to effectively manage and analyze the target's historical position data, providing the necessary input for subsequent calculations of the displacement vector and heading angle within the sliding window. It can be implemented using arrays, linked lists, or other data structures suitable for dynamically adding elements. The key is to ensure efficient data access and updating capabilities.
[0045] S122. For each target, acquire status information, attribute information, and quality information in real time to obtain real-time target data. Among them, the attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
[0046] To obtain real-time data for the target, the following types of information need to be extracted from the perception system and integrated into the corresponding target's data structure: Status information includes the latest trajectory point pnew, instantaneous velocity v, and lateral acceleration aspeed. This information reflects the target's current motion state.
[0047] Attribute information: This mainly refers to the target classification, such as cars, trucks, etc. Different types of traffic participants may have different motion characteristics and behavioral patterns, making this crucial for adjusting the sliding window parameters.
[0048] Quality information refers to the uncertainty metric U provided by the sensing or tracking module, which measures the reliability of the positioning results. Higher uncertainty means a greater probability of error, which will affect the adjustment strategy of the sliding window length.
[0049] Whenever the sensing system outputs a new position pnew, it should be immediately added to the end of the historical trajectory point sequence P of the corresponding target. This not only maintains the real-time nature of the data but also ensures that the algorithm can accurately calculate the heading angle based on the latest target position.
[0050] By performing steps S121 and S122 as described above, the method of this embodiment can effectively collect and process comprehensive information on each traffic target, laying a solid foundation for subsequent sliding window distance calculation, clipping operations, and final heading angle estimation. This method not only improves calculation accuracy but also enhances the system's ability to cope with complex traffic environments.
[0051] S130. Dynamically adjust the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance.
[0052] In this embodiment, the adaptive window distance refers to the sliding window length obtained by comprehensively considering at least two of the three key factors: the target's motion state (such as velocity and acceleration), classification information (such as cars, trucks, pedestrians, etc.), and perception uncertainty, and dynamically adjusting it by applying predefined mapping relationships and calculation formulas. This dynamic adjustment strategy aims to achieve an optimal balance between smoothness and responsiveness, thereby providing a more accurate and stable heading angle estimate.
[0053] The adaptive window distance is determined by at least two of the following factors: the target's motion state, classification information, and perceptual uncertainty. It is dynamically adjusted through a predefined mapping relationship and calculation formula.
[0054] In one embodiment, please refer to Figure 3 The above-mentioned step S130 may include steps S131 to S135.
[0055] S131. Based on the target real-time data, obtain the type benchmark according to the classification query benchmark mapping table.
[0056] In this embodiment, the type baseline refers to the pre-defined sliding window base distance L_type based on different types of traffic targets (such as cars, trucks, bicycles, or pedestrians). This baseline value reflects the minimum observation distance required for different types of targets under their typical motion conditions and is used to initially determine the sliding window length.
[0057] S132. Adjust the type reference according to the speed using a preset adaptive curve to obtain the adjusted speed.
[0058] In this embodiment, the adjusted speed means adjusting the initial type baseline L_type based on the current target speed using a preset speed-window adaptive curve. This step takes into account the optimal sliding window length variation trend required at different speeds, such as increasing the window size at low speeds to enhance noise resistance and decreasing the window size at high speeds to improve steering sensitivity.
[0059] S133. When the acceleration exceeds the acceleration threshold, the window length is dynamically reduced.
[0060] When the lateral acceleration of the target is detected to exceed a predetermined threshold a threshold In such cases, the system will automatically use a shorter sliding window length to respond more quickly to sudden changes in the target's direction. This is to ensure accurate capture of the target's latest movement trends even during rapid turns or other turbulent maneuvers.
[0061] S134. Calculate the scaling factor based on the uncertainty metric, and adjust the adjusted speed according to the scaling factor to obtain the final window distance.
[0062] In this embodiment, the final window distance is obtained by further multiplying the adjusted velocity by a scaling factor α based on positioning uncertainty. Higher uncertainty leads to a larger α value, which in turn increases the sliding window length to mitigate the impact of potential measurement errors on the results.
[0063] S135. Constrain the final window distance within the global constraint range of window distance to obtain an adaptive window distance.
[0064] The final step is to impose a physical constraint on the calculated final window distance, ensuring it falls between a preset minimum value L_min and a maximum value L_max. This guarantees that regardless of changes in input conditions, the sliding window length remains within a reasonable range, effectively filtering out noise while promptly reflecting the actual movement of the target.
[0065] Through the above process, this method can intelligently adapt to various traffic scenarios and target characteristics, providing a solid foundation for accurate calculation of heading angles.
[0066] S140. Based on the adaptive window distance, remove the head point from the historical trajectory point sequence until the remaining trajectory length does not exceed the adaptive window distance, and determine the sliding window start point and sliding window end point.
[0067] The goal is to dynamically adjust the historical trajectory point sequence P of each target based on the adaptive window distance L calculated in the previous step (S130), ensuring that the total length of the trajectory it contains does not exceed L. A simplified implementation is to ensure that p start to p end The straight-line distance is close to L, but the best approach is to use the cumulative trajectory distance, as it more accurately reflects the actual movement path of the target.
[0068] The specific steps are as follows: First, obtain the current target trajectory point sequence P = {p0, p1, ..., p...} k}, where each point p i All include coordinates (x) i y i ) and timestamp t i .
[0069] Starting from the beginning of sequence P, the Euclidean distances between adjacent points are accumulated one by one until the adaptive window distance L is reached or exceeded. This process involves calculating the cumulative trajectory length from the first point to the last point.
[0070] If the cumulative trajectory length exceeds L, the earliest point is removed one by one from the beginning of sequence P until the cumulative trajectory length of the remaining trajectory point sequence is exactly less than or equal to L. This ensures that the total trajectory length formed by all points within the sliding window meets the preset adaptive window distance L.
[0071] After the above cropping, the earliest point in the remaining trajectory point sequence is the starting point of the sliding window, pstart = (x s y s The newly added point is the endpoint of the sliding window, pend = (x e y e ).
[0072] S150. Calculate the optimized heading angle using the coordinates of the starting and ending points of the sliding window.
[0073] In this embodiment, θ=atan2((y e -y s ), (x e -x s )) Calculate the optimized heading angle, where (x s y s (x) represents the coordinates of the starting point of the sliding window; e y e ) represents the coordinates of the sliding window's endpoint. Here, the atan2 function is used to calculate the two parameters (y...). e -y s ) and (x e -x s The arctangent of the target's heading angle is returned as an angle value, representing the direction from the starting point to the ending point. This angle is the optimized heading angle of the target at the current moment, which represents the dominant motion trend of the target on the sliding window distance scale.
[0074] S160, Output the heading angle and status information; wherein, the status information includes the latest position, speed, and acceleration.
[0075] The final step is to output the calculated heading angle and target status information to the downstream modules. Status information typically includes, but is not limited to, the following: Latest location: Current trajectory point p new Position coordinates (x) new y new ).
[0076] Velocity v: The instantaneous velocity of the target.
[0077] acceleration a speed : The lateral acceleration of the target.
[0078] This information is crucial for subsequent advanced functions such as data fusion, behavior prediction, and path planning. By updating and providing accurate target heading angles and other state information in real time, the system can better understand and respond to the behavioral patterns of various targets in the traffic environment, thereby supporting safer and more efficient autonomous driving decisions.
[0079] The system waits to receive the next trajectory point and repeats steps S120 to S160 to achieve adaptive sliding window updates and real-time, continuous calculation of heading angle.
[0080] This embodiment breaks through the limitations of traditional "inter-frame difference" and proposes a novel "adaptive distance sliding window" method for calculating heading angle. Its core concept is that within a very short time or small spatial range, the true direction of motion of a traffic target is usually relatively stable and continuous. Therefore, compared to relying on the positional information of two adjacent frames that may be affected by noise, this embodiment suggests examining the overall displacement vector of the target within a physically meaningful distance segment to more accurately determine its heading angle.
[0081] In practical implementation, the method in this embodiment maintains a dynamic queue of position points (i.e., a "distance sliding window") for each target. This queue continuously absorbs new trajectory points and ensures that the total trajectory length formed by these points remains within a sliding window distance L that is dynamically adjusted based on factors such as target type, current motion state, and positioning uncertainty. The direction of the line connecting the start and end points within the sliding window is calculated to represent the target's heading angle at the current moment. This method uses a macroscopic displacement to average out microscopic positioning jitter, thereby extracting the target's dominant motion trend at the sliding window distance scale.
[0082] Compared to existing technologies, the heading angle optimization method based on adaptive distance sliding window provided in this embodiment exhibits significant advantages: Intelligent and scene-adaptive capabilities: The greatest innovation of the method in this embodiment lies in its breaking the limitation of a fixed window and adopting a multi-factor fusion decision-making mechanism, which endows the heading angle calculation system with intelligence. The system can dynamically select the optimal calculation strategy based on factors such as the target's identity, behavior, and perceived quality, thus performing excellently in various complex traffic environments.
[0083] Strong noise resistance and smoothing capabilities: A major advantage of this method lies in its inherent smoothing mechanism. By extending the computational basis from adjacent points to a distance, anomalous fluctuations at single or a few locations are effectively diluted and smoothed out. Since a significant impact on the direction of the line connecting the start and end points requires consistent errors at multiple consecutive points, this is rarely seen in the context of random noise. Experiments show that this method can effectively eliminate over 98% of high-frequency jitter in the heading angle sequence, resulting in a very smooth output curve.
[0084] The method provides a clear physical meaning and conforms to the laws of motion: the heading angle calculated by this method reflects the "average direction" or "dominant trend" of the target over its most recent travel distance. This is closer to the actual kinematic characteristics of rigid objects such as vehicles in the real world—their direction does not change drastically on the millisecond or centimeter level. Therefore, the calculation results better reflect the true motion state of the target.
[0085] Robustness at low speeds: Since the sliding window is based on distance rather than time, even at low target speeds, accumulating a distance of L meters requires a relatively long time. This means that the sliding window contains more data points from more frames, enhancing the averaging effect against noise and providing a more stable heading angle estimate than the inter-frame difference method even at low speeds or in creeping conditions.
[0086] Improved accuracy and reliability: By introducing perceived uncertainty as an adjustment factor, the method in this embodiment is essentially a confidence-based optimization method. When the perception system lacks confidence, the algorithm automatically adopts a more conservative (i.e., smoother) strategy, thereby improving the reliability and robustness of the overall output.
[0087] The algorithm is highly efficient and practical for engineering applications: Although it adopts adaptive logic, the core computation mainly involves simple arithmetic operations and logical judgments, without complex iterative operations. The computational overhead is small, making it very suitable for deployment in real-time embedded systems such as autonomous driving domain controllers and edge computing units.
[0088] In summary, the method of this embodiment not only proposes a new paradigm for calculating heading angle in theory, but also demonstrates many superior performances in practical applications, making it applicable to a wide range of traffic scenarios and technical environments.
[0089] The aforementioned method for optimizing the heading angle of traffic targets achieves intelligent adaptation to different target characteristics and motion states by creating and maintaining a data structure containing a sequence of historical trajectory points for each tracked target. It dynamically adjusts the window length based on real-time acquired information on the target's latest position, velocity, acceleration, classification, and perceptual uncertainties. Specifically, the adaptive window distance calculated based on this real-time data is used to filter and optimize the original trajectory point sequence, ensuring that only the most representative start and end points are used for heading angle calculation, thus effectively reducing the impact of positioning noise. This method not only fundamentally improves the stability and accuracy of the calculation results but also ensures that the calculated heading angle better conforms to the actual motion laws of the physical world. The output includes the optimized heading angle and its related state information, providing a reliable basis for subsequent analysis and decision-making. Therefore, even in complex and ever-changing traffic scenarios, it can guarantee an accurate grasp and description of the target's motion trend.
[0090] Figure 4 This is a schematic block diagram of a traffic target heading angle optimization calculation device 300 provided in an embodiment of the present invention. Figure 4 As shown, corresponding to the above-described traffic target heading angle optimization calculation method, the present invention also provides a traffic target heading angle optimization calculation device 300. This traffic target heading angle optimization calculation device 300 includes a unit for executing the above-described traffic target heading angle optimization calculation method, and the device can be configured in a server. Specifically, please refer to... Figure 4The traffic target heading angle optimization calculation device 300 includes a setting unit 301, a real-time data acquisition unit 302, a dynamic adjustment unit 303, a sliding window determination unit 304, a calculation unit 305, and an output unit 306.
[0091] The system comprises: a setting unit 301 for setting relevant parameters; a real-time data acquisition unit 302 for creating a data structure to store historical trajectory point sequences for each tracked target, and acquiring the latest position, velocity, acceleration, classification, and perception uncertainty information in real time to obtain real-time target data; a dynamic adjustment unit 303 for dynamically adjusting the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance; a sliding window determination unit 304 for removing the head point from the historical trajectory point sequence based on the adaptive window distance until the remaining trajectory length does not exceed the adaptive window distance, and determining the sliding window start point and sliding window end point; a calculation unit 305 for calculating the optimized heading angle using the coordinates of the sliding window start point and sliding window end point; and an output unit 306 for outputting the heading angle and status information, wherein the status information includes the latest position, velocity, and acceleration.
[0092] In one embodiment, the real-time data acquisition unit 302 includes: A sub-unit is created to create a data structure for each tracked target and store the historical trajectory point sequence. A data acquisition sub-unit is used to acquire status information, attribute information, and quality information in real time for each target to obtain real-time target data. The attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
[0093] In one embodiment, the dynamic adjustment unit 303 includes: The system comprises the following sub-units: a type query sub-unit, used to obtain a type benchmark based on the target real-time data according to a classification query benchmark mapping table; a speed adjustment sub-unit, used to adjust the type benchmark according to the speed using a preset adaptive curve to obtain the adjusted speed; a shrinking sub-unit, used to dynamically shrink the window length when the acceleration exceeds an acceleration threshold; a final distance determination sub-unit, used to calculate a scaling factor based on an uncertainty metric and adjust the adjusted speed according to the scaling factor to obtain the final window distance; and a constraint sub-unit, used to constrain the final window distance within a global constraint range of window distances to obtain an adaptive window distance.
[0094] In one embodiment, the calculation unit 305 is used to utilize θ=atan2((y e -y s ), (x e -x s)) Calculate the optimized heading angle, where (x s y s (x) represents the coordinates of the starting point of the sliding window; e y e ) represents the coordinates of the end point of the sliding window.
[0095] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned traffic target heading angle optimization calculation device 300 and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0096] The aforementioned traffic target heading angle optimization calculation device 300 can be implemented as a computer program, which can perform calculations such as... Figure 5 It runs on the computer device shown.
[0097] Please see Figure 5 , Figure 5 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0098] See Figure 5 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0099] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for optimizing the heading angle of a traffic target.
[0100] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0101] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a traffic target heading angle optimization calculation method.
[0102] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0103] The processor 502 is used to run the computer program 5032 stored in the memory to implement all the steps of the traffic target heading angle optimization calculation method.
[0104] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0105] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0106] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform all steps of the traffic target heading angle optimization calculation method.
[0107] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0108] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0109] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0110] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0111] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0112] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for optimizing the calculation of the heading angle of a traffic target, characterized in that, include: Set the relevant parameters; A data structure is created for each tracked target to store the historical trajectory point sequence, and the latest position, velocity, acceleration, classification and perception uncertainty information are acquired in real time to obtain real-time target data; The window length is dynamically adjusted based on the target real-time data and the relevant parameters to obtain an adaptive window distance; Based on the adaptive window distance, remove the head point from the historical trajectory point sequence until the remaining trajectory length does not exceed the adaptive window distance, and determine the sliding window start point and sliding window end point. The optimized heading angle is calculated using the coordinates of the starting and ending points of the sliding window; Output the heading angle and status information; wherein, the status information includes the latest position, velocity, and acceleration.
2. The method for optimizing the calculation of the heading angle of a traffic target according to claim 1, characterized in that, The relevant parameters include the baseline window distance, velocity adjustment strategy, acceleration threshold and scaling factor, uncertainty mapping relationship, and global constraints on the window distance.
3. The method for optimizing the calculation of the heading angle of a traffic target according to claim 2, characterized in that, The process involves creating a data structure to store historical trajectory point sequences for each tracked target, and acquiring the latest position, velocity, acceleration, classification, and perceptual uncertainty information in real time to obtain real-time target data, including: Create a data structure for each tracked target to store the sequence of historical trajectory points; For each target, real-time status information, attribute information, and quality information are acquired to obtain real-time target data. Among them, the attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
4. The method for optimizing the calculation of the heading angle of a traffic target according to claim 3, characterized in that, Each point in the historical trajectory point sequence contains coordinates and a timestamp.
5. The method for optimizing the calculation of the heading angle of a traffic target according to claim 4, characterized in that, The adaptive window distance is determined by at least two of the following factors: the target's motion state, classification information, and perceptual uncertainty, and is dynamically adjusted through a predefined mapping relationship and calculation formula.
6. The method for optimizing the calculation of the heading angle of a traffic target according to claim 1, characterized in that, The step of dynamically adjusting the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance includes: Based on the target real-time data, a type benchmark is obtained according to the classification query benchmark mapping table; The adjusted speed is obtained by adjusting the type reference according to the speed through a preset adaptive curve; When the acceleration exceeds the acceleration threshold, the window length is dynamically reduced. The scaling factor is calculated based on the uncertainty metric, and the adjusted speed is adjusted according to the scaling factor to obtain the final window distance; The final window distance is constrained within the global constraint range of window distance to obtain an adaptive window distance.
7. The method for optimizing the calculation of the heading angle of a traffic target according to claim 1, characterized in that, The calculation of the optimized heading angle using the coordinates of the sliding window's start and end points includes: Using θ=atan2((y e -y s ), (x e -x s )) Calculate the optimized heading angle, where (x s y s (x) represents the coordinates of the starting point of the sliding window; e y e ) represents the coordinates of the end point of the sliding window.
8. A device for optimizing the heading angle of a traffic target, characterized in that, include: The setting unit is used to set relevant parameters; The real-time data acquisition unit is used to create a data structure to store the historical trajectory point sequence for each tracked target, and to acquire the latest position, velocity, acceleration, classification and perception uncertainty information in real time to obtain real-time target data; A dynamic adjustment unit is used to dynamically adjust the window length based on the target real-time data and the relevant parameters to obtain an adaptive window distance; The sliding window determination unit is used to remove the head point from the historical trajectory point sequence based on the adaptive window distance until the remaining trajectory length does not exceed the adaptive window distance, and to determine the sliding window start point and sliding window end point. The calculation unit is used to calculate the optimized heading angle using the coordinates of the sliding window start point and sliding window end point; The output unit is used to output the heading angle and status information; wherein, the status information includes the latest position, velocity, and acceleration.
9. The traffic target heading angle optimization calculation device according to claim 8, characterized in that, The real-time data acquisition unit includes: Create sub-units to create data structures for each tracked target and store historical trajectory point sequences; The data acquisition subunit is used to acquire status information, attribute information, and quality information in real time for each target to obtain real-time target data. The attribute information includes target classification, and the quality information includes uncertainty measurement. When a new location is output by the perception system, the new location is added to the end of the historical trajectory point sequence of the corresponding target.
10. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
