Trajectory planning model optimization method for autonomous driving

By acquiring vehicle pose and traffic light information, the candidate trajectory is dynamically and quantitatively evaluated, and a reward score is generated to optimize the trajectory planning model. This solves the problem of insufficient adaptability of trajectory planning methods to complex intersections in traffic light scenarios, and achieves a balance between safety and efficiency.

CN123040887APending Publication Date: 2026-11-06CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611554021.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing vehicle trajectory planning methods in traffic light scenarios have limited adaptability to the dynamic changes of complex intersections, making it difficult to achieve a balance between safety and efficiency, and lacking continuous and detailed assessment of trajectories with different risk levels.

Method used

By acquiring vehicle pose, traffic light information, and multiple candidate trajectories, the scenario in which the vehicle passes through the traffic light and its corresponding first coefficient and speed are determined. Based on this information, a reward score is generated, and the trajectory planning model is optimized using the reward score to achieve dynamic quantitative evaluation of the candidate trajectories.

Benefits of technology

It improves the adaptability of trajectory planning models to complex changes at traffic light intersections, enhances multimodal decision-making capabilities, and achieves a balance between safety constraints and traffic efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123040887A_ABST
    Figure CN123040887A_ABST
Patent Text Reader

Abstract

The application relates to the field of intelligent driving trajectory planning, in particular to a trajectory planning model optimization method for automatic driving. In view of the problems that the existing candidate trajectory evaluation mode is single, it is difficult to continuously quantitatively evaluate different risk trajectories such as approaching a stop line, passing at low speed and stopping in advance, trajectory selection is easy to converge, and the traffic efficiency and safety are difficult to be considered, the application obtains a vehicle pose, traffic light information and multiple candidate trajectories output by a trajectory planning model, identifies a traffic light traffic scene where the vehicle is located in combination with the candidate trajectories and scene information, determines corresponding speed constraint coefficients and target speeds, and generates reward scores of the candidate trajectories according to the speeds, and then optimizes the trajectory planning model by using the scores. The scheme can realize fine-grained evaluation of intersection traffic trajectories, enhance the adaptability of the model to signal changes and complex intersection interference, and improve the diversity of trajectory decision, traffic efficiency and driving safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent driving trajectory planning, and in particular to a trajectory planning model optimization method for autonomous driving. Background Technology

[0002] This application relates to the field of intelligent driving trajectory planning, especially vehicle decision-making and trajectory generation technology in traffic light intersection scenarios.

[0003] However, existing traffic light scenarios mostly employ state machine rules or reinforcement learning combined with traditional optimization methods for vehicle speed and trajectory control, typically making decisions to pass or stop based on traffic light status, countdown timers, and lane information. These methods have limited adaptability to the dynamic changes at complex intersections and lack the ability to continuously and meticulously evaluate trajectories of varying risk levels, easily leading to simplistic candidate trajectory decisions and failing to balance traffic efficiency with safety constraints.

[0004] Therefore, how to dynamically quantify and evaluate candidate trajectories in traffic light scenarios to improve multimodal decision-making capabilities and achieve a balance between safety and efficiency is the technical problem that this application needs to solve. Summary of the Invention

[0005] This application provides a trajectory planning model optimization method for autonomous driving to solve the aforementioned technical problems. This method targets traffic light intersection scenarios, analyzing the adaptability of multiple candidate trajectories generated by the trajectory planning model to the traffic light passage scenario, based on vehicle pose, traffic signal information, and other relevant data. This analysis forms an evaluation criterion for model optimization, enabling the trajectory planning model to better balance traffic efficiency and driving safety.

[0006] In a first aspect, embodiments of this application provide a trajectory planning model optimization method for autonomous driving, including:

[0007] The vehicle's pose information, traffic light information, and multiple candidate trajectories are obtained. The traffic light information includes at least one of the following: traffic light status, remaining countdown time, stop line location information, and the direction of the traffic light indicator. The candidate trajectories are generated by the trajectory planning model.

[0008] Based on at least one of the candidate trajectory, pose information and traffic light information, determine the first scenario of each candidate trajectory, where the first scenario is the scenario of a vehicle passing through a traffic light;

[0009] Determine the first coefficient and first speed corresponding to the first scenario of the vehicle, where the first speed is the preset target speed in the first scenario;

[0010] Based on multiple candidate trajectories, the first velocity, and the first coefficient, the reward score for each candidate trajectory is determined.

[0011] The trajectory planning model is optimized based on reward scoring.

[0012] In one possible embodiment, the first scenario includes at least one of a second scenario and a third scenario, wherein the second scenario is that the rear wheels of the vehicle have not crossed the stop line, and the third scenario is that the rear wheels of the vehicle have crossed the stop line.

[0013] In one possible embodiment, the second scenario includes one of a fourth scenario, a fifth scenario, or a sixth scenario, wherein the fourth scenario is a traffic light in a green state, the fifth scenario is a traffic light in a yellow state, and the sixth scenario is a traffic light in a red state.

[0014] In one possible embodiment, the third scenario includes one of the seventh scenario, the eighth scenario, the ninth scenario, or the tenth scenario, where the seventh scenario is a straight-ahead direction, the eighth scenario is a left turn direction, the ninth scenario is a right turn direction, and the tenth scenario is a U-turn direction.

[0015] In one possible embodiment, it also includes:

[0016] Determine the first distance, the second distance, and the third distance. The first distance is the distance from the vehicle to the stop line, the second distance is the distance from the vehicle to the stop line when it stops based on a preset acceleration, and the third distance is the distance from the vehicle to the stop line when it stops based on the maximum acceleration.

[0017] In one possible embodiment, the sixth scenario includes at least one of the eleventh and twelfth scenarios, wherein the eleventh scenario is when the traffic light is green when the vehicle approaches the stop line based on its current speed, and the twelfth scenario is when the traffic light is red when the vehicle approaches the stop line based on its current speed.

[0018] In one possible embodiment, the twelfth scenario includes at least one of the thirteenth and fourteenth scenarios, wherein the thirteenth scenario is when the first distance is less than the second distance and the first distance is greater than the third distance, and the fourteenth scenario is when the first distance is less than the third distance.

[0019] In one possible embodiment, the first coefficient corresponding to the thirteenth scenario is less than the first coefficient corresponding to the fourteenth scenario.

[0020] In one possible embodiment, determining the first speed corresponding to the first scenario of the vehicle includes:

[0021] Based on the first identifier, the vehicle is determined to be at a first speed corresponding to at least one of the seventh, eighth, or tenth scenarios, and the first identifier is used to indicate whether the vehicle can pass.

[0022] In one possible embodiment, the first identifier is determined based on a preset passage rule and the traffic light status within a preset first time range.

[0023] In one possible embodiment, determining the first speed corresponding to at least one of the seventh, eighth, or tenth scenarios based on the first identifier includes:

[0024] If the first sign indicates that the vehicle can pass, then the first speed is determined to be the vehicle's current speed; otherwise, it is 0.

[0025] In one possible embodiment, a reward score for each candidate trajectory is determined based on multiple candidate trajectories, a first velocity, and a first coefficient, including:

[0026] Extract the second velocity from the candidate trajectory;

[0027] The reward score is determined based on the first speed, the second speed, and the first coefficient.

[0028] In one possible embodiment, the second velocity is the weighted average velocity of multiple trajectory points within a preset second time range in the candidate trajectory.

[0029] In one possible embodiment, the reward score is determined based on the first speed, the second speed, and the first coefficient, including:

[0030] Determine the cost score based on the first speed, the second speed, and the first coefficient;

[0031] Input the cost score into the preset reward function to determine the reward score.

[0032] In one possible embodiment, the cost score is determined based on the first speed, the second speed, and the first coefficient, including:

[0033] The first speed, the second speed, and the first coefficient are input into the cost scoring model to obtain the cost score. The cost scoring model is used to quantify the deviation between the second speed and the first speed.

[0034] In one possible implementation, the cost scoring model is shown in the following formula:

[0035]

[0036] Where score is the cost rating, k scale The first weighting coefficient is used to control the reward score when the first speed and the second speed are the same. traj For the second velocity, v set Let k be the first velocity and k be the first coefficient.

[0037] Secondly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0038] The memory stores the instructions that the computer executes;

[0039] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0040] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0041] By acquiring vehicle pose information, traffic light information, and multiple candidate trajectories, and combining the candidate trajectories with scene information to determine whether a vehicle is in a traffic light passage scenario and the corresponding first coefficient and first speed, the risk and traffic characteristics of different candidate trajectories in this scenario can be dynamically quantified. Furthermore, based on multiple candidate trajectories, the first speed, and the first coefficient, the reward score of each candidate trajectory is determined, and the trajectory planning model is optimized accordingly. This improves the model's adaptability to complex changes at traffic light intersections, enhances the multimodal decision-making ability of candidate trajectories, and achieves a balance between safety constraints and traffic efficiency. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0043] Figure 1 A schematic diagram illustrating an application scenario of the trajectory planning model optimization method for autonomous driving provided in this application embodiment;

[0044] Figure 2 A flowchart illustrating the trajectory planning model optimization method for autonomous driving provided in this application embodiment. Figure 1 ;

[0045] Figure 3 A flowchart illustrating the trajectory planning model optimization method for autonomous driving provided in this application embodiment. Figure 2 ;

[0046] Figure 4 A schematic diagram of the structure of the trajectory planning model optimization device for autonomous driving provided in an embodiment of this application;

[0047] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0048] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0050] This system targets the field of autonomous driving trajectory planning and vehicle control, specifically addressing decision-making and driving control when a vehicle approaches an urban road intersection. The system typically consists of an onboard perception module, a localization module, a trajectory planning model, and a control module. The perception module acquires information such as vehicle pose, traffic light status, stop line position, and lane direction. Based on this, the trajectory planning model generates multiple candidate trajectories, and the control module then outputs vehicle speed and steering commands according to the trajectories.

[0051] Figure 1 This is a schematic diagram illustrating an application scenario of the trajectory planning model optimization method for autonomous driving provided in the embodiments of this application, such as... Figure 1 As shown, when a vehicle approaches an intersection along its current lane, it can choose different routes based on navigation intent and traffic light signal status. When going straight, it can continue straight through the intersection along its current lane; when turning left, it can smoothly curve within the intersection and enter the left-hand cross road; when turning right, it can follow the right-hand curb to enter the right-hand cross road; when making a U-turn, it can complete a U-turn at the intersection and return to the original oncoming lane. Simultaneously, the four corner traffic lights control the right-of-way for each direction, and the vehicle also needs to determine whether to wait for pedestrians at the stop line.

[0052] Current traffic light scenarios often employ state machine rules or reinforcement learning combined with traditional optimization methods for control. They typically determine whether a vehicle should proceed or stop based on the traffic light status, remaining countdown time, and lane information, and then uniformly filter or perform binary evaluation on candidate trajectories. This approach has limited adaptability to the dynamic changes at complex intersections and struggles to provide continuous and refined scoring for trajectories with varying risk levels, such as approaching the stop line, passing at low speed, or braking prematurely. Candidate trajectories tend to converge towards the same decision. With the occurrence of intersection signal changes, pedestrian crossings, and interference from non-motorized vehicles, traditional rules struggle to maintain stable trajectory selection, easily leading to decreased traffic efficiency or insufficient safety constraints.

[0053] To address the aforementioned technical challenges, and to resolve the issues of insufficient continuous quantitative evaluation of candidate trajectories, difficulty in distinguishing different risk levels, and in guiding the trajectory planning model to make diverse decisions, the system introduces a scenario-related evaluation mechanism between traffic light information and candidate trajectories. This mechanism uses vehicle pose, traffic light status, and candidate trajectories as scoring criteria to determine the first coefficient and first speed corresponding to the traffic light passage scenario. Based on this, a reward score is generated for each candidate trajectory, which is then used to optimize the trajectory planning model. This processing path links speed constraints, signal status constraints, and trajectory difference evaluation in intersection traffic, enabling the trajectory planning model to provide more granular feedback on different candidate trajectories under traffic light scenarios.

[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0055] Figure 2 A flowchart illustrating the trajectory planning model optimization method for autonomous driving provided in this application embodiment. Figure 1 The methods described above in the embodiments of this application can be applied to any electronic device. For example... Figure 2 As shown, the method includes:

[0056] S201. Obtain vehicle pose information, traffic light information, and multiple candidate trajectories. The traffic light information includes at least one of the following: traffic light status, remaining countdown time, stop line location information, and direction of traffic light indicator. The candidate trajectories are generated by the trajectory planning model.

[0057] For example, vehicle pose information can be obtained by fusing onboard positioning module with inertial measurement unit, wheel speed information, and high-precision map coordinates, used to characterize the vehicle's position, heading angle, and speed state in the current road coordinate system; traffic light information can be obtained by onboard perception module through camera recognition of traffic light color, remaining countdown, stop line position, and lane direction corresponding to the traffic light, or by vehicle-to-infrastructure communication unit receiving traffic light phase and countdown information from roadside unit; multiple candidate trajectories are generated by trajectory planning model based on the vehicle's current state, road topology, and traffic rules, with each candidate trajectory consisting of several discrete trajectory points, corresponding speed profiles, or spatiotemporal sequences. Here, pose information describes the vehicle's actual motion state relative to the road and signal control area, traffic light information describes the current intersection signal constraints, and candidate trajectories describe different combinations of driving paths and speeds output by the trajectory planning model. During implementation, the aforementioned information can be simultaneously collected from perception and positioning results within the same planning cycle, and packaged into a unified data input for transmission to subsequent scene determination and scoring modules. In one possible embodiment, if some traffic light information is temporarily unavailable, subsequent processing can be completed solely based on the acquired traffic light status or remaining countdown time, enabling the method to adapt to different sensor configurations and communication conditions. Based on the above analysis, this step incorporates vehicle status, signal control status, and trajectory candidate set into the optimization input, allowing subsequent processing to no longer rely solely on a single signal status but to perform refined evaluations of the candidate trajectories themselves.

[0058] S202. Based on at least one of the candidate trajectory, pose information and traffic light information, determine the first scenario of each candidate trajectory, wherein the first scenario is the scenario of a vehicle passing through a traffic light.

[0059] For example, scenario determination can be based on a comprehensive assessment of the spatial extension direction, endpoint position, and vehicle pose information of candidate trajectories. When a candidate trajectory extends towards the intersection control area in terms of its movement trend, and the traffic light status, remaining countdown time, or lane direction corresponding to its expected arrival time meets the vehicle passage conditions, the candidate trajectory can be classified into the first scenario. The first scenario here is not a generalized classification of all intersection trajectories, but rather an identification based on the specific context of a vehicle passing through a traffic light control area, used to distinguish between through-trajectory trajectories and waiting-trajectory trajectories, lane-changing trajectories, or other non-through-trajectory trajectories. In implementation, the vehicle's current lateral and longitudinal relationship relative to the intersection control area can be determined first based on pose information, and then the predicted movement trajectory of the candidate trajectory can be combined to calculate whether it will enter the control area and the corresponding signal status upon entry. In another implementation, the applicable lane can be determined first based on the direction of the traffic light markings, and then the trajectory pointing to the intersection exit can be selected from the candidate trajectories corresponding to the applicable lane, thus classifying it as the first scenario. If the candidate trajectory contains multiple trajectory points, the intersection relationship between the trajectory points and the road centerline and the control area boundary can also be used to identify whether there is a driving intention to pass through the intersection. Through the above processing, the first scenario is clearly mapped to a trajectory category related to traffic light passage. Subsequent scoring no longer uses the same evaluation benchmark for all candidate trajectories, but instead performs directional modeling based on the current intersection traffic status.

[0060] S203. Determine the first coefficient and first speed corresponding to the vehicle in the first scenario. The first speed is the preset target speed in the first scenario.

[0061] For example, the first speed can be directly set according to the target traffic demand when the vehicle passes through the traffic light control area in the first scenario. For instance, when the traffic conditions are met and the vehicle is close to the intersection, the first speed can be set to a target value corresponding to the low-speed and smooth passage required to pass through the intersection. When the vehicle is far from the intersection, the first speed can also correspond to the control speed before approaching the intersection, used to constrain the speed change pattern of the candidate trajectory before entering the intersection. The first coefficient is used to characterize the adjustment intensity of the reward score in the first scenario. Its value can be determined by at least one of the traffic light status, remaining countdown time, location information, and signal direction, and can reflect the degree of constraint of the current passage scenario. When the signal status indicates that passage is allowed and there is sufficient remaining time, the first coefficient can be configured to amplify the weight of the degree of matching between the trajectory and the target speed. When the remaining time is short, the vehicle is close to the intersection, or there is a stronger constraint between the signal direction and the vehicle's direction of travel, the first coefficient can be configured to increase the weight of the scoring sensitivity, thereby making the subsequent reward score more strictly distinguish between different candidate trajectories. During implementation, the first speed and the first coefficient can be obtained from a preset mapping table or control parameter table, or they can be calculated by rules. For example, the corresponding speed and coefficient parameters can be determined based on the distance range of the vehicle from the intersection, the remaining time range of the signal, and lane direction constraints. This step abstracts the first scenario into a calculable speed target and weight coefficient, so that the evaluation benchmark of the through trajectory has a unified and adjustable quantitative reference, and subsequent trajectory scores can be compared under the same control context.

[0062] S204. Based on multiple candidate trajectories, the first velocity, and the first coefficient, determine the reward score for each candidate trajectory.

[0063] For example, the reward score can be calculated based on the speed profile of the candidate trajectory, the arrival time, and the degree of deviation from the first speed. The first coefficient is used to adjust the score change magnitude corresponding to the degree of deviation. In specific implementation, key motion parameters of each candidate trajectory in the first scenario can be extracted, including average speed, peak speed, speed change rate before entering the control area, and the expected duration of passing through the intersection. These parameters are compared with the first speed to generate speed matching items. The matching items are then weighted using the first coefficient to obtain the reward score of the corresponding candidate trajectory. If the speed state of a candidate trajectory is closer to the first speed and its motion trend is consistent with the first scenario, the reward score of the candidate trajectory can be set to a higher value. If a candidate trajectory deviates significantly from the first speed, or exhibits speed fluctuations that do not meet the traffic control requirements when entering the first scenario, the corresponding reward score can be reduced. In implementation, the reward score can also be further modified by combining at least one of the traffic light information. For example, the score of a candidate trajectory that still passes through the control area when the traffic conditions are not met can be significantly reduced, while the score of the candidate trajectory can be increased accordingly when the traffic conditions are met and the passage process is smooth. By establishing a continuous quantitative relationship between candidate trajectories and the first velocity, the scoring results are no longer limited to a binary judgment of whether or not to pass. Instead, they can distinguish different trajectory patterns such as approaching the control area, passing at low speed, speed fluctuation, and stable passage, thereby providing more discernible feedback signals for model optimization.

[0064] S205. Optimize the trajectory planning model based on reward scoring.

[0065] For example, the trajectory planning model can be a trajectory generation model in the form of a neural network, or a planning model that includes cost function parameters. After receiving the reward scores corresponding to each candidate trajectory, the reward scores can be used as training feedback or online adjustment signals to update model parameters, trajectory generation weights, or cost term coefficients. In specific implementation, candidate trajectories with higher reward scores can be used as positive feedback samples, enabling the model to increase the generation probability of trajectories corresponding to that type in subsequent planning; for candidate trajectories with lower reward scores, they can be used as negative feedback samples, enabling the model to reduce its preference for that type of trajectory generation method. If the trajectory planning model adopts an iterative optimization approach, the reward scores of different candidate trajectories can be continuously accumulated over multiple planning cycles, and the model parameters can be adjusted according to a preset learning rate or update rule, so that the model gradually forms a stable output strategy for traffic light passage scenarios. In implementation, the optimization process can be executed in real time on the vehicle, or the candidate trajectories, reward scores, and corresponding scene features can be uploaded to the cloud training environment for offline updates, and then the updated model parameters can be distributed to the vehicle for deployment. Through this step, the trajectory planning model can obtain continuous and distinguishable reward feedback in traffic light scenarios, and map this feedback to the model parameter update, so that the subsequently generated candidate trajectories are more in line with the traffic constraints and speed control requirements of the current intersection.

[0066] Based on the above analysis, this application provides a trajectory planning model optimization method for autonomous driving. By acquiring vehicle pose information, traffic light information, and multiple candidate trajectories, it identifies the first scenario of the vehicle passing through the traffic light, determines the corresponding first coefficient and first speed, and generates a reward score for each candidate trajectory. This reward score is then used to optimize the trajectory planning model, enabling the model to form a continuous and quantitative trajectory evaluation and feedback mechanism around the traffic light scenario. It should be understood that the above example is merely illustrative and not limiting.

[0067] Based on the foregoing embodiments, the first scenario further includes at least one of the second scenario and the third scenario, wherein the second scenario is that the rear wheels of the vehicle have not crossed the stop line, and the third scenario is that the rear wheels of the vehicle have crossed the stop line.

[0068] A stop line is a ground marking placed at the front of the approach lane at a road intersection to indicate that vehicles should stop and wait. If the rear wheels have not crossed the stop line, it means the rear axle tires are still in front of the stop line; if the rear wheels have crossed the stop line, it means the rear axle tires have passed the stop line and entered the area behind it. Combining vehicle pose information, stop line location information, and candidate trajectories, the longitudinal position of the vehicle relative to the stop line can be divided into the two scenarios mentioned above, and based on this, it can be determined whether the current candidate trajectory corresponds to a pre-stop line control state or a post-stop line passage state.

[0069] In its implementation, the system calculates the directed distance from the center point of the rear wheel to the parking line based on the vehicle's center pose, wheelbase parameters, and the coordinates of the parking line in the map coordinate system, all output by the positioning module. If this distance is positive and the rear wheel profile does not cross the parking line, it is classified as the second scenario. If the distance is zero or negative and the rear wheel profile is already behind the parking line, it is classified as the third scenario. The wheelbase parameters can be obtained from vehicle calibration data, and the parking line position information can be determined from a high-precision map or visual recognition results. Once these two parameters are matched in the same coordinate system, the crossing status can be determined. In practical applications, other models or implementations can be selected for the relevant positioning accuracy, wheelbase parameters, and parking line extraction methods; this application does not limit these options.

[0070] This scenario segmentation method enables vehicles to distinguish between different operating states before and after the stop line when approaching a traffic light intersection, mapping these different states to subdivided scenarios within the same first scenario. This provides a stable state basis for subsequent trajectory scoring based on traffic light status, initial speed, and initial coefficient. Therefore, the system can differentiate candidate trajectories for deceleration, stopping, or low-speed approach before the stop line, and differentiate candidate trajectories for continuing through the intersection after crossing the line. This ensures that reward scores are based on clear positional states, thereby improving the trajectory planning model's adaptability to traffic light passage scenarios.

[0071] Based on the foregoing embodiments, the second scenario further includes one of the fourth, fifth, or sixth scenarios, wherein the fourth scenario is that the traffic light is green, the fifth scenario is that the traffic light is yellow, and the sixth scenario is that the traffic light is red.

[0072] The second scenario represents the traffic light status when a vehicle approaches or is located within the intersection's passage determination area. The fourth, fifth, and sixth scenarios correspond to green, yellow, and red light statuses, respectively. Traffic light statuses can be obtained through visual recognition of images captured by an onboard camera, or by matching and confirming signal light information received from roadside facilities or high-precision maps via the onboard communication unit. The system converts the recognition results into discrete scenario labels, which, along with vehicle pose, stop line position, and candidate trajectories, participate in subsequent scoring calculations. A green light indicates that the vehicle has normal passage conditions, a yellow light indicates the signal transition phase, and a red light indicates a prohibited passage phase. These three together constitute a complete definition of the second scenario.

[0073] In its implementation, the vehicle-mounted perception module uses a forward-facing camera and a traffic light recognition algorithm to classify traffic light colors. The recognition results are then aligned with the timestamps and location data and written into the scene determination unit. When the recognition confidence level is lower than a preset threshold, consistency verification is performed by combining results from multiple consecutive frames, and the stable result is used as the current traffic light state. After receiving the scene label, the trajectory planning model associates it with the corresponding first coefficient and first speed, and calculates a reward score for each candidate trajectory. This implementation allows traffic light states to participate in trajectory evaluation as a unified scene variable, thereby enabling candidate trajectories under different signal states to receive differentiated feedback.

[0074] Because the second scenario is refined into three states—green light, yellow light, and red light—the system can map different control intentions such as proceeding, decelerating, and stopping onto the same evaluation framework. This allows the trajectory planning model to form a clearer selection criterion for candidate trajectories near intersections. Consequently, the trajectory output by the model maintains consistency with the current signal state, and the trajectory scoring results can more accurately reflect the constraints of vehicles passing through intersections, thereby improving the state matching degree and control stability of the trajectory planning results.

[0075] In one possible implementation, the third scenario includes one of the seventh, eighth, ninth, or tenth scenarios, where the seventh scenario is a straight-ahead direction, the eighth scenario is a left turn direction, the ninth scenario is a right turn direction, and the tenth scenario is a U-turn direction.

[0076] In this embodiment, the third scenario represents the vehicle's direction of travel after crossing the stop line. The direction information is determined by the onboard positioning module in conjunction with the lane topology in a high-precision map and the extension relationship of the current lane centerline. When the vehicle's current trajectory aligns with the extension direction of the target lane, the direction is determined to be straight; when the geometric angle of the trajectory relative to the target lane points to the left-hand turning area, the direction is determined to be left-turning; when the geometric angle of the trajectory relative to the target lane points to the right-hand turning area, the direction is determined to be right-turning; when the trajectory needs to complete an approximately semi-circular turn and return to the opposite direction, the direction is determined to be a U-turn. The direction recognition result can be jointly determined by the candidate trajectory endpoint orientation, heading angle change, and semantic matching results with the intersection lanes output by the trajectory planning model, thereby mapping different travel intentions to corresponding scenario identifiers.

[0077] In practical implementation, the system can establish direction classification rules based on traffic light directions, lane guidance arrows, and the connection relationships between intersection entrance and exit lanes. It then discriminates candidate trajectories based on features such as lateral displacement, heading angle increment, and target lane matching degree, ultimately outputting the specific type in the third scenario. If the system uses a model recognition approach, it can utilize a pre-trained scene classification network to fuse and encode vehicle pose, trajectory sequence, and lane semantics, outputting scene labels for straight ahead, left turn, right turn, or U-turn. This label, linked to the reward scoring module, allows different first coefficient and first speed values ​​to correspond to different directional scenarios, facilitating differentiated control outputs from the trajectory planning model based on the direction of travel.

[0078] By subdividing the third scenario into straight, left turn, right turn, and U-turn, the system can map vehicle behavior at intersections after crossing the stop line to more specific directional categories and associate different speed constraints with trajectory evaluation weights accordingly. This allows straight, turning, and U-turn trajectories to receive reward feedback consistent with their traffic semantics during trajectory planning model optimization, thereby improving the consistency of candidate trajectory determination and the model's adaptability to changes in intersection direction.

[0079] One possible implementation also includes:

[0080] Determine the first distance, the second distance, and the third distance. The first distance is the distance from the vehicle to the stop line, the second distance is the distance from the vehicle to the stop line when it stops based on a preset acceleration, and the third distance is the distance from the vehicle to the stop line when it stops based on the maximum acceleration.

[0081] In this embodiment, the first distance characterizes the actual interval between the vehicle and the stop line at the current moment. It is typically calculated using the vehicle pose output by the positioning module and the stop line coordinates in a high-precision map. The calculation can take the normal distance from the vehicle's rear axle center point or a reference point to the stop line to match the kinematic model used for vehicle braking decisions. The second distance characterizes the spatial length required for the vehicle to complete braking under a preset acceleration condition. The preset acceleration can be set as a fixed deceleration value or a time-varying deceleration curve based on the vehicle's current speed, road adhesion coefficient, and comfort braking constraints, and the corresponding stopping distance is obtained by combining the uniform deceleration motion relationship. The third distance characterizes the shortest distance required for the vehicle to stop to the stop line under maximum acceleration conditions. The maximum acceleration can be taken as the maximum deceleration limit allowed by the vehicle's braking system, and calculated by combining the tire adhesion limit, braking response time, and current speed. These distance values ​​can be updated in real-time by the controller after receiving pose information and used as input for trajectory scoring, braking feasibility judgment, and stopping decisions in traffic light scenarios.

[0082] When the first distance is less than the second distance, the system can determine that the current trajectory requires early deceleration or braking. When the first distance is between the second and third distances, the system can determine whether it is permissible to complete the passage with a preset acceleration based on the traffic light status and remaining time. When the first distance is greater than the third distance, it indicates that the vehicle still has sufficient reaction space under the condition of meeting maximum braking capacity. By unifying the actual distance, preset deceleration distance, and limit deceleration distance into the same evaluation framework, the system can quantify the passage boundary during the vehicle's approach to the stop line and output continuous constraint information to the trajectory planning model. This allows the reward score to distinguish different braking risk levels, thus enabling the candidate trajectory to receive feedback that better matches the vehicle's dynamic capabilities when approaching the stop line.

[0083] After adopting the above distance determination method, the vehicle's judgment on the passability near the stop line is no longer limited to a single threshold, but can form hierarchical constraints according to different braking capabilities. Based on this, the trajectory planning model can generate control results that match the current speed, braking margin and signal status, thereby improving the continuity of candidate trajectory evaluation and the accuracy of braking decisions.

[0084] Based on the aforementioned embodiments, the sixth scenario further includes at least one of the eleventh and twelfth scenarios, wherein the eleventh scenario is when the traffic light is green when the vehicle reaches the stop line based on the current speed, and the twelfth scenario is when the traffic light is red when the vehicle reaches the stop line based on the current speed.

[0085] The vehicle's state at the stop line based on its current speed refers to the state at which the vehicle reaches the stop line while maintaining its current motion characteristics, calculated based on its current speed, the distance between its current position and the stop line, and its current acceleration. A green traffic light indicates that the signal still allows passage when the vehicle reaches the stop line; a red traffic light indicates that the signal has entered a prohibited state when the vehicle reaches the stop line. The stop line can be determined by the vehicle's positioning information and the stop line coordinates in a high-precision road map. The current speed can be obtained from vehicle speed sensors, wheel speed signals, or fused positioning results. The traffic light status can be determined by visual recognition, roadside communication, or a high-precision map combined with perception results. This sixth scenario is used to classify the feasibility of passage when a vehicle approaches the stop line and correlate it with the score of candidate trajectories to distinguish between scenarios where continued passage at the current speed is possible and scenarios requiring braking to a stop. In practical applications, other models or implementations can be selected for the state recognition model, positioning algorithm, or communication method used; this application does not limit this selection.

[0086] During operation, after acquiring vehicle pose, traffic light information, and candidate trajectories, the system combines the current speed and the distance from the vehicle to the stop line to determine the traffic light status corresponding to the vehicle's arrival at the stop line at the current speed, and categorizes it into the sixth scenario. If the determination result is a green light, it means that the vehicle is still in a traffic signal state where passage is permitted when reaching the stop line at the current speed; if the determination result is a red light, it means that the vehicle has entered a traffic signal state where stopping is required when reaching the stop line at the current speed. Based on this, the system passes the passage constraints under the sixth scenario to subsequent reward scoring calculations, enabling the trajectory planning model to generate differentiated responses for candidate trajectories such as continuing to pass, decelerating, or braking to a stop.

[0087] By incorporating the green and red light states when a vehicle arrives at the stop line based on its current speed into the same scenario classification, the traffic light's scenario determination can be more closely aligned with the signal constraints of the vehicle's actual arrival time. This enhances the ability of candidate trajectory scores to distinguish critical traffic situations, enabling the trajectory planning model to output trajectory selection results that better match the traffic signal state when approaching the stop line.

[0088] In one possible implementation, the twelfth scenario includes at least one of the thirteenth and fourteenth scenarios, where the thirteenth scenario is when the first distance is less than the second distance and the first distance is greater than the third distance, and the fourteenth scenario is when the first distance is less than the third distance.

[0089] The first distance is used to characterize the actual distance between the vehicle's current front end or reference point and the stop line. The second distance is used to characterize the braking distance corresponding to the vehicle decelerating to the stop line with a preset acceleration. The third distance is used to characterize the limit braking distance corresponding to the vehicle decelerating to the stop line with maximum acceleration. The thirteenth scenario corresponds to the vehicle still having normal braking margin, but has entered a relatively urgent approach to the stop line. In this case, the first distance is less than the second distance and greater than the third distance, indicating that if the vehicle is controlled according to the preset deceleration, it can still complete the deceleration constraint before the stop line. The fourteenth scenario corresponds to the vehicle entering a higher-risk approach state. When the first distance is less than the third distance, it indicates that even if braking with maximum acceleration, the vehicle's braking margin before reaching the stop line is insufficient. Therefore, this situation needs to be identified as a stronger constraint scenario.

[0090] In the specific implementation, the vehicle positioning module outputs the vehicle coordinates in real time and calculates the first distance by combining them with the parking line map coordinates; the controller calculates the second distance based on the current speed, preset braking acceleration, and vehicle dynamics model, and calculates the third distance based on the maximum braking acceleration and the same dynamics model. The scene judgment module compares the first distance with the second and third distances. When the first distance is less than the second distance and greater than the third distance, it outputs the thirteenth scene identifier; when the first distance is less than the third distance, it outputs the fourteenth scene identifier and passes the corresponding result to the subsequent reward scoring generation unit. To adapt to different vehicle models and different braking performance, the preset acceleration and maximum acceleration can be given by a calibration parameter table. In practical applications, other calibration forms can also be selected for this parameter table, which is not limited in this application.

[0091] By matching the distance to the stop line with the braking distance under different braking capacities, the system can subdivide the state of a vehicle approaching the stop line into different risk levels and generate differentiated scenario labels for candidate trajectories accordingly. This allows the reward scores corresponding to different trajectories to more accurately reflect the current braking margin and traffic risk during trajectory planning model optimization, thereby improving the model's adaptability to traffic light scenarios and the continuity of trajectory selection.

[0092] In one possible implementation, the first coefficient corresponding to the thirteenth scenario is less than the first coefficient corresponding to the fourteenth scenario.

[0093] The first coefficient characterizes the risk weight or constraint strength of a vehicle's passage between the vehicle and the stop line in a traffic light scenario. A smaller first coefficient indicates a higher degree of constraint allowing the vehicle to pass closer to the safety margin in the corresponding scenario; a larger first coefficient indicates a stronger constraint on the vehicle to decelerate, stop, or maintain a more conservative passage state in the corresponding scenario. The thirteenth scenario corresponds to a situation where there is still a certain safe buffer distance between the vehicle and the stop line, and the vehicle, if it continues forward in the current state, still has the conditions to complete a controlled passage or controlled deceleration before the stop line. The fourteenth scenario corresponds to a situation where the vehicle is closer to the stop line, has less braking margin, or is more likely to trigger a risk of crossing the line if it continues forward. Therefore, after scenario determination, the system sets the first coefficient for the thirteenth scenario to be smaller than the first coefficient for the fourteenth scenario, ensuring that scenarios with different risk levels are differentiated in the reward score calculation.

[0094] In practical implementation, the first coefficient can be jointly determined by the scene classification module based on vehicle pose information, traffic light status, stop line position, and vehicle current speed, and written into the scene parameter table for the reward scoring module to call. This parameter table can be stored in the onboard controller's storage unit, represented in floating-point or fixed-point form, and the coefficient value range can be configured to be between zero and one or a wider continuous interval. For the thirteenth scene, the coefficient can be set to a smaller first value, for example, corresponding to a vehicle that can maintain a relatively stable traffic rhythm; for the fourteenth scene, the coefficient can be set to a larger second value, for example, corresponding to a vehicle that requires stronger deceleration penalties or stricter stopping constraints. Through this coefficient mapping relationship, when generating reward scores for each candidate trajectory, the system will apply different levels of constraint weighting to different scenes, thereby enabling the trajectory planning model to generate an output that matches the scene risk during training or online updates.

[0095] During operation, the vehicle first determines its position relative to the stop line based on sensor and positioning results, and then identifies the current scenario type by combining the traffic light status. The scenario type is then mapped to a corresponding first coefficient. When the identification result is scenario thirteen, the system uses a smaller first coefficient to weight the tendency of candidate trajectories to proceed; when the identification result is scenario fourteen, the system uses a larger first coefficient to more strongly suppress the tendency of candidate trajectories to proceed. Because the first coefficients differ between the two scenario types, the reward score will numerically reflect different bias directions, thereby driving the trajectory planning model to output a trajectory distribution consistent with the scenario risk.

[0096] After adopting this coefficient setting method, different risk stages under the same traffic light passage scenario can be continuously distinguished, the scores of candidate trajectories will not be concentrated on a single decision, and the trajectory planning model can form feedback of different intensities for states of approaching the stop line and higher risk of crossing the line, ultimately enabling vehicles to have a clearer scenario distinction capability in traffic control near intersections.

[0097] In one possible implementation, determining the first speed corresponding to the first scenario includes: determining the first speed corresponding to at least one of the seventh, eighth, or tenth scenarios based on a first identifier, wherein the first identifier is used to indicate whether the vehicle can pass.

[0098] The first indicator can be generated by the onboard perception module based on the traffic light status, stop line position, vehicle current position, and road direction information. This first indicator signifies whether the vehicle has permission to proceed at the target intersection. When the first indicator indicates that passage is permitted, the controller outputs the target speed corresponding to the seventh, eighth, or tenth scenario as the first speed. The seventh scenario corresponds to straight-ahead travel, the eighth scenario to left-turn travel, and the tenth scenario to U-turn travel. The first speed can be pre-stored in a speed mapping table, configured according to different traffic scenarios. The speed values ​​corresponding to straight-ahead, left-turn, and U-turn travel can be set based on road speed limits, lane curvature, turning radius, and traffic signal constraints, and can be represented by integer or floating-point scalar values. The controller directly retrieves these values ​​based on the current scenario.

[0099] In implementation, the first indicator can be determined jointly by the red, green, or yellow light status and whether the vehicle has crossed the stop line, or it can be corrected by combining the lane direction recognition result. When the recognition result indicates that the vehicle is allowed to continue in the current lane direction, the system determines the first speed corresponding to that direction; when the recognition result indicates that the vehicle does not meet the conditions for passage, it maintains the stopping speed or a low waiting speed. The aforementioned first speed is used as the benchmark input for subsequent reward score calculation, enabling different candidate trajectories to obtain speed constraints that match their scenario when the passage permission conditions are met.

[0100] In this embodiment, a first identifier establishes a correspondence between the discrete passage permission of "whether passage is permitted" and the specific scene speed. This allows the first speed to be updated synchronously as the scene changes from straight ahead to left turn or U-turn, thus providing a consistent speed benchmark for subsequent trajectory scoring. This method enables the trajectory planning model to quickly match the target speed based on the passage permission at traffic light intersections and form a control output adapted to the current road scene accordingly.

[0101] In one possible implementation, the first identifier is determined based on preset passage rules and the traffic light status within a preset first time range.

[0102] In this embodiment, rules are used to characterize whether a vehicle meets the passage conditions in a traffic light scenario. The first time range can be a preset observation interval before the traffic light state changes, or a continuous sampling interval during the process of the vehicle approaching the stop line. Within this time range, the system acquires the traffic light state sequence at fixed intervals and matches the state sequence with preset passage rules. When the traffic light state meets the conditions of continuous green lights, remaining within the passage judgment interval after turning from green to yellow, or meeting other preset passage conditions, a first identifier indicating that the vehicle can pass is generated. When the traffic light state meets the conditions of prohibiting passage within the time range, a first identifier indicating that the vehicle cannot pass is generated. The first identifier can be output in the form of a binary flag, an enumerated flag, or a logical variable, and serves as the input basis for subsequently determining the first speed.

[0103] The traffic light status within the first time frame refers to the set of states obtained by continuously recording the red, yellow, and green light statuses within a preset time window. Rules can be derived from road traffic regulations, intersection control strategies, or pre-configured passage thresholds for the target intersection. In practical applications, state sampling is performed by vehicle-mounted cameras, roadside units, or fusion perception modules, and then sent to the rule-determination unit after state stability verification to reduce the impact of single-frame false detections on the first sign. In practical applications, this determination unit can also employ temporal buffering and threshold filtering to improve the stability of the sign output; this application does not limit this approach.

[0104] In this way, the first indicator directly reflects the vehicle's passage permission status at the current intersection and establishes a connection with the subsequent first speed determination process. When the first indicator indicates that the vehicle can pass, the system will generate a matching target speed based on the corresponding scenario; when the first indicator indicates that the vehicle cannot pass, it will guide the candidate trajectory to converge towards deceleration, stopping, or maintaining safety constraints, thus ensuring that the traffic light status and trajectory planning results form consistent control logic. This method makes passage judgment no longer dependent on a single moment's signal, but rather on the state changes within a first time range, thereby making the output passage indicator more stable and providing a more accurate scenario basis for the reward scoring of subsequent candidate trajectories.

[0105] Based on the foregoing embodiments, further, based on the first identifier, determining the first speed corresponding to at least one of the seventh, eighth, or tenth scenarios of the vehicle includes: if the first identifier indicates that the vehicle can pass, then determining the first speed as the current speed of the vehicle; otherwise, determining it as 0.

[0106] The first indicator indicates whether the vehicle is permitted to continue driving under the current traffic light conditions. It is determined by the vehicle's current lane direction, the traffic light status, and a judgment result matching the passage rules. The seventh scenario corresponds to straight-ahead passage, the eighth to left-turn passage, and the tenth to U-turn passage; all three are scenarios where the vehicle can continue to pass when signal and directional constraints are met. The vehicle's current speed is obtained by fusing information from the onboard positioning module and wheel speed, using the real-time speed value within the current control cycle as the base value for the first speed. If the first indicator indicates the vehicle is in a passable state, the current speed is used as the first speed; if the first indicator indicates the vehicle does not meet the passable conditions, the first speed is set to 0, serving as the speed input for subsequent reward scoring or trajectory constraints.

[0107] In practical implementation, the first identifier can be determined by a rule engine based on preset rules and traffic light status within a preset time range. The rule engine can be deployed within the vehicle controller or trajectory planning module and outputs the passage permission result by reading lane direction, traffic light color, and phase information. The current speed can be a scalar value of the vehicle's longitudinal speed or a speed value after low-pass filtering to reduce the impact of short-term fluctuations on the first speed. If a specific controller model is used to implement this determination function, a model with real-time vehicle condition acquisition and logical determination capabilities can be selected, provided that the interface protocol is met. In practical applications, other models can also be selected for this component, and this application does not limit this.

[0108] In scenarios seven, eight, or ten, the speed input remains consistent with the vehicle's real-time driving status, and zero speed is output when the road is impassable, thus providing a unified speed benchmark for subsequent trajectory scoring. Since the first speed has a definite value in both passable and impassable states, it enables the trajectory planning model to provide stable feedback on the current intersection conditions and allows the reward score to more accurately reflect the matching relationship between the candidate trajectory and the signal constraints.

[0109] Figure 3 A flowchart illustrating the trajectory planning model optimization method for autonomous driving provided in this application embodiment. Figure 2 .like Figure 3 As shown, the method includes:

[0110] S301. Obtain vehicle pose information, traffic light information, and multiple candidate trajectories. The traffic light information includes at least one of the following: traffic light status, remaining countdown time, stop line location information, and direction of traffic light indicator. The candidate trajectories are generated by the trajectory planning model.

[0111] S302. Based on at least one of the candidate trajectory, pose information and traffic light information, determine the first scenario of each candidate trajectory, wherein the first scenario is the scenario of a vehicle passing through a traffic light.

[0112] S303. Determine the first coefficient and first speed corresponding to the first scenario of the vehicle. The first speed is the preset target speed in the first scenario.

[0113] S304. Extract the second velocity from the candidate trajectory;

[0114] S305. Determine the reward score based on the first speed, the second speed, and the first coefficient.

[0115] In this embodiment, the second speed is used to characterize the travel speed of the candidate trajectory at its corresponding time or corresponding segment. This speed can be directly read from the speed sequence of each sampling point in the candidate trajectory, or it can be calculated from the displacement and time interval of the trajectory points. The first speed is used to characterize the target travel speed of the vehicle in the traffic light passage scenario, and the first coefficient is used to characterize the weight strength of speed deviation, traffic risk or parking constraint in the current scenario. Both can be determined by the trajectory planning module in combination with the traffic light status, the stop line position and the vehicle pose.

[0116] During the calculation of the reward score, the system compares the extracted second speed with the first speed and weights the degree of speed deviation using a first coefficient to generate a score value for the corresponding candidate trajectory. Specifically, if the second speed of the candidate trajectory is closer to the first speed, the speed consistency of the candidate trajectory is higher, and a larger reward score can be assigned; if the second speed of the candidate trajectory deviates significantly from the first speed, the reward score is reduced accordingly. The first coefficient can be used to adjust the impact of this deviation on the scoring result, ensuring that the speed constraint strength of the candidate trajectory remains consistent under different traffic conditions.

[0117] In practical implementation, the reward score can be output by the trajectory evaluator according to a preset scoring function. The scoring function can adopt a linear weighted form, an exponential decay form, or a piecewise penalty form, where the difference between the first and second velocities serves as the main input, and the first coefficient is used as a weight parameter in the calculation. The trajectory evaluator performs the above calculation for each candidate trajectory, thereby obtaining a reward score corresponding to each of the multiple candidate trajectories. This score is then used for parameter updates or trajectory selection in subsequent trajectory planning models. Using this method, the system can continuously quantify the speed conformity of different candidate trajectories, and the output results can more accurately reflect the trajectory's adaptability to traffic light scenarios.

[0118] S306. Optimize the trajectory planning model based on reward scoring.

[0119] In one possible implementation, the second velocity is the weighted average velocity of multiple trajectory points within a preset second time range in the candidate trajectory.

[0120] The second time range characterizes the motion segment of the candidate trajectory within a short-time prediction interval, and multiple trajectory points are discrete position points of the candidate trajectory sampled sequentially within this time range. The weighted average velocity is calculated based on the displacement between adjacent trajectory points and the corresponding time interval, and different trajectory points are assigned weights related to their time position. The weights can be determined according to time decay, distance decay, or curve smoothing rules, so that trajectory points closer to the current moment contribute more to the second velocity. The weighted average velocity can be obtained by weighted summation of the instantaneous velocities of each trajectory point and then normalization, or by segmented weighted averaging of the velocities of the trajectory segments. The weight coefficients and normalization methods used can be determined by a preset parameter table. In practical applications, other calculation methods can also be selected, and this application does not limit them.

[0121] In practical implementation, the candidate trajectory output by the trajectory planning model is first discretized into multiple continuous trajectory points, and the set of trajectory points falling within the second time range is extracted. Then, the corresponding velocity value is calculated based on the time marker, velocity vector, or displacement of adjacent points for each trajectory point, and then combined with preset weights to generate a second velocity. If the second time range corresponds to a short time interval when the vehicle approaches the stop line, the second velocity can represent the actual passing trend of the candidate trajectory when approaching the intersection. If there are acceleration and deceleration changes in the trajectory within the second time range, the velocity fluctuations are smoothed through a weighted method, thereby outputting a velocity representation consistent with the overall driving state of the trajectory.

[0122] The second speed, as the velocity feature input of the candidate trajectory, participates in the reward score calculation along with the first speed and the first coefficient. This ensures that the score reflects not only the instantaneous velocity of the trajectory but also its continuous motion trend over a short period. When the candidate trajectory maintains stable passage within the second time range, the second speed matches the target passage speed more closely; conversely, when the candidate trajectory exhibits significant deceleration or stagnation within this time range, the second speed decreases accordingly. This allows the reward score to continuously distinguish between different candidate trajectories and feeds it back to the trajectory planning model for optimization, thereby making the model output more consistent with the speed constraints and traffic control requirements of traffic light scenarios.

[0123] In one possible implementation, the reward score is determined based on the first speed, the second speed, and the first coefficient, including: determining the cost score based on the first speed, the second speed, and the first coefficient; and inputting the cost score into a preset reward function to determine the reward score.

[0124] The first speed characterizes the target speed of the vehicle passing through a traffic light scenario, the second speed characterizes the speed of the candidate trajectory within a preset time range, and the first coefficient characterizes the traffic constraint strength in the current scenario. These three parameters together constitute the input parameters for the cost score. The preset reward function can be configured as a monotonic mapping function or a function containing piecewise penalty and smoothing terms. Its input is the cost score, and its output is the reward score used for trajectory optimization.

[0125] In its implementation, the cost score is determined by the deviation term between the first and second velocities and the adjustment term of the first coefficient. The deviation term reflects the degree of deviation of the candidate trajectory's velocity from the target velocity, while the adjustment term reflects the constraint weight of velocity deviation under different traffic light scenarios. After receiving the cost score, the reward function maps smaller costs to higher rewards and larger costs to lower rewards, thus granting larger reward scores to candidate trajectories with a higher match to the current scenario. If the candidate trajectory's velocity change within a preset time range is closer to the first velocity and has a smaller cost score under the scenario constraints represented by the first coefficient, a higher reward score can be obtained after mapping by the reward function.

[0126] In practical applications, the reward function can be pre-stored in the vehicle controller or trajectory planning module, and can be implemented using a lookup table, analytical expression, or neural network approximation method. When using an analytical expression, the corresponding reward output interval can be set according to the range of cost scores to ensure the comparability of scores between different candidate trajectories. In practical applications, the reward function can also be selected in other forms, which are not limited in this application.

[0127] By first converting the first velocity, second velocity, and first coefficient into cost scores, and then outputting reward scores by the reward function, the trajectory planning model can obtain continuously adjustable evaluation signals, and the target velocity constraint and scene coefficient constraint can be uniformly mapped to the same scoring space, thereby enabling the differences between candidate trajectories to be represented in a more refined manner.

[0128] In one possible implementation, a cost score is determined based on a first speed, a second speed, and a first coefficient, including: inputting the first speed, the second speed, and the first coefficient into a cost score model to obtain a cost score, wherein the cost score model is used to quantify the deviation between the second speed and the first speed.

[0129] The first speed characterizes the target speed of the vehicle in a traffic light scenario, the second speed characterizes the actual trajectory speed characteristics of the candidate trajectory within a preset time range, and the first coefficient characterizes the constraint strength in the current traffic light scenario. The cost scoring model can be constructed as a numerical model with an input layer, a feature mapping layer, and an output layer. The input layer receives the first speed, the second speed, and the first coefficient. The feature mapping layer performs a nonlinear mapping on the speed difference and its correlation with the scenario coefficient. The output layer provides the cost score. This model can be implemented using a neural network model, a regression model, or a scoring model with weighted parameters. In practical applications, other models can also be selected for this component, and this application does not limit this selection.

[0130] In its implementation, the system first normalizes the first velocity, second velocity, and first coefficient to the same dimension, ensuring they are within a comparable numerical range. The normalized parameters are then fed into the cost scoring model, which outputs a corresponding cost score based on the degree of deviation of the second velocity from the first velocity. The first coefficient, after participating in the model's calculation, allows for scenario-based adjustments to the score under the same velocity deviation, ensuring the score reflects both velocity consistency and the strength of traffic constraints. The cost score can serve as an intermediate evaluation metric for candidate trajectories, inputting into the subsequent reward function and characterizing the degree of matching between the trajectory velocity and the target velocity.

[0131] In terms of working principle, the cost scoring model quantifies the deviation between the first speed and the second speed to establish a correspondence between the speed performance of the candidate trajectory and the target speed. When the second speed is closer to the first speed, the output cost score is lower or more in line with the preset mapping relationship, so that the subsequent reward calculation can more accurately distinguish the speed matching of different candidate trajectories.

[0132] With this specific implementation, candidate trajectories are no longer judged solely based on discrete rules, but instead can obtain continuous cost evaluation. This allows for a more refined representation of speed deviations in traffic light scenarios, enables stable differentiation of differences between candidate trajectories, and provides more discernible feedback signals for the optimization of trajectory planning models.

[0133] In one possible implementation, the cost scoring model is shown in the following formula:

[0134]

[0135] Where score is the cost rating, k scale The first weighting coefficient is used to control the reward score when the first speed and the second speed are the same. traj For the second velocity, v set Let k be the first velocity and k be the first coefficient.

[0136] In this embodiment, the score in the cost scoring model is used to characterize the degree of deviation between the candidate trajectory and the target travel speed, k scale Used to adjust the scoring intensity when speeds are consistent, v traj The second velocity, v, is extracted from the candidate trajectory. set The first speed, k, corresponds to the speed determined in the traffic light passage scenario. The second speed is used to control the magnitude of the deviation penalty. It can be obtained by weighted averaging of the speeds of multiple trajectory points within a preset second time range. The weighting coefficient can be set to decrease according to the time distance between the trajectory point and the current moment, thus allowing the cost score to reflect the true speed trend of the candidate trajectory within a short period. The first speed can be directly taken from the vehicle's current speed, or it can be taken when passage is permitted and set to zero when passage is not permitted. The first weighting coefficient k... scale Different values ​​can be preset based on different scenarios such as the vehicle being in front of the parking line, near the parking line, or crossing the parking line. These values ​​are then input into the cost scoring model along with the first coefficient k to obtain continuous quantitative constraints on the second speed.

[0137] In practical applications, the cost scoring model can be implemented by the onboard controller using floating-point operations. Model parameters can be stored in non-volatile memory and retrieved in real-time during the trajectory planning cycle. After receiving the velocity sequence corresponding to the candidate trajectory, the controller first performs time alignment and sampling smoothing on the velocity sequence, then calculates the second velocity and substitutes it into the formula with the first velocity to output the score. If the second velocity of the candidate trajectory is consistent with the first velocity, then in k... scale The input corresponds to a higher reward score under certain conditions. If the deviation between the two increases, the score increases with the effect of k, thus decreasing the reward score. In practical applications, other models of this component can also be selected, and this application does not limit this.

[0138] By introducing a cost-scoring model, the system can convert the speed consistency of candidate trajectories into a computable continuous score, enabling the trajectory planning model to provide clear feedback for different trajectories such as approaching the stop line, passing at a constant speed, and decelerating. As a result, the trajectory planning model can obtain finer-grained optimization signals in traffic light scenarios, the evaluation results of candidate trajectories are more stable, and the tendency for trajectory selection to become discretized is suppressed.

[0139] Figure 4 This is a schematic diagram of the structure of the trajectory planning model optimization device for autonomous driving provided in the embodiments of this application, as shown below. Figure 4 As shown, the trajectory planning model optimization device 40 for autonomous driving provided in this embodiment includes:

[0140] The acquisition module 401 is used to acquire the vehicle's pose information, traffic light information, and multiple candidate trajectories. The traffic light information includes at least one of the following: traffic light status, remaining countdown time, stop line position information, and the direction of the traffic light indicator. The candidate trajectories are generated by the trajectory planning model.

[0141] The processing module 402 is used to determine a first scenario for each candidate trajectory based on at least one of candidate trajectory, pose information and traffic light information, wherein the first scenario is the scenario of a vehicle passing through a traffic light;

[0142] The processing module 402 is also used to determine the first coefficient and the first speed corresponding to the vehicle in the first scenario, wherein the first speed is a preset target speed in the first scenario;

[0143] The processing module 402 is also used to determine the reward score for each candidate trajectory based on multiple candidate trajectories, the first velocity, and the first coefficient;

[0144] Optimization module 403 is used to optimize the trajectory planning model based on reward scoring.

[0145] In one possible embodiment, the first scenario includes at least one of a second scenario and a third scenario, wherein the second scenario is that the rear wheels of the vehicle have not crossed the stop line, and the third scenario is that the rear wheels of the vehicle have crossed the stop line.

[0146] In one possible embodiment, the second scenario includes one of a fourth scenario, a fifth scenario, or a sixth scenario, wherein the fourth scenario is a traffic light in a green state, the fifth scenario is a traffic light in a yellow state, and the sixth scenario is a traffic light in a red state.

[0147] In one possible embodiment, the third scenario includes one of the seventh scenario, the eighth scenario, the ninth scenario, or the tenth scenario, where the seventh scenario is a straight-ahead direction, the eighth scenario is a left turn direction, the ninth scenario is a right turn direction, and the tenth scenario is a U-turn direction.

[0148] In one possible embodiment, it also includes:

[0149] Determine the first distance, the second distance, and the third distance. The first distance is the distance from the vehicle to the stop line, the second distance is the distance from the vehicle to the stop line when it stops based on a preset acceleration, and the third distance is the distance from the vehicle to the stop line when it stops based on the maximum acceleration.

[0150] In one possible embodiment, the sixth scenario includes at least one of the eleventh and twelfth scenarios, wherein the eleventh scenario is when the traffic light is green when the vehicle approaches the stop line based on its current speed, and the twelfth scenario is when the traffic light is red when the vehicle approaches the stop line based on its current speed.

[0151] In one possible embodiment, the twelfth scenario includes at least one of the thirteenth and fourteenth scenarios, wherein the thirteenth scenario is when the first distance is less than the second distance and the first distance is greater than the third distance, and the fourteenth scenario is when the first distance is less than the third distance.

[0152] In one possible embodiment, the first coefficient corresponding to the thirteenth scenario is less than the first coefficient corresponding to the fourteenth scenario.

[0153] In one possible embodiment, determining the first speed corresponding to the first scenario of the vehicle includes:

[0154] Based on the first identifier, the vehicle is determined to be at a first speed corresponding to at least one of the seventh, eighth, or tenth scenarios, and the first identifier is used to indicate whether the vehicle can pass.

[0155] In one possible embodiment, the first identifier is determined based on a preset passage rule and the traffic light status within a preset first time range.

[0156] In one possible embodiment, determining the first speed corresponding to at least one of the seventh, eighth, or tenth scenarios based on the first identifier includes:

[0157] If the first sign indicates that the vehicle can pass, then the first speed is determined to be the vehicle's current speed; otherwise, it is 0.

[0158] In one possible embodiment, a reward score for each candidate trajectory is determined based on multiple candidate trajectories, a first velocity, and a first coefficient, including:

[0159] Extract the second velocity from the candidate trajectory;

[0160] The reward score is determined based on the first speed, the second speed, and the first coefficient.

[0161] In one possible embodiment, the second velocity is the weighted average velocity of multiple trajectory points within a preset second time range in the candidate trajectory.

[0162] In one possible embodiment, the reward score is determined based on the first speed, the second speed, and the first coefficient, including:

[0163] Determine the cost score based on the first speed, the second speed, and the first coefficient;

[0164] Input the cost score into the preset reward function to determine the reward score.

[0165] In one possible embodiment, the cost score is determined based on the first speed, the second speed, and the first coefficient, including:

[0166] The first speed, the second speed, and the first coefficient are input into the cost scoring model to obtain the cost score. The cost scoring model is used to quantify the deviation between the second speed and the first speed.

[0167] In one possible implementation, the cost scoring model is shown in the following formula:

[0168]

[0169] Where score is the cost rating, k scale The first weighting coefficient is used to control the reward score when the first speed and the second speed are the same. traj For the second velocity, v set Let k be the first velocity and k be the first coefficient.

[0170] The trajectory planning model optimization device for autonomous driving provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0171] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.

[0172] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0173] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0174] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0175] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0176] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0177] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0178] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0179] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0180] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0181] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0182] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0183] In addition, the functional units in the various embodiments of the present 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.

[0184] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a 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, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0185] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0186] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A trajectory planning model optimization method for autonomous driving, characterized in that, include: The vehicle's pose information, traffic light information, and multiple candidate trajectories are obtained. The traffic light information includes at least one of the following: traffic light status, remaining countdown time, stop line position information, and direction of traffic light indicator. The candidate trajectories are generated by a trajectory planning model. Based on at least one of the candidate trajectory, pose information, and traffic light information, a first scenario is determined for each candidate trajectory, wherein the first scenario is the scenario in which the vehicle passes through a traffic light; Determine the first coefficient and first speed corresponding to the first scenario of the vehicle, wherein the first speed is a preset target speed in the first scenario; Based on the multiple candidate trajectories, the first velocity, and the first coefficient, a reward score is determined for each candidate trajectory; The trajectory planning model is optimized based on the reward score.

2. The method according to claim 1, characterized in that, The first scenario includes at least one of the second scenario and the third scenario, wherein the second scenario is that the rear wheels of the vehicle have not crossed the stop line, and the third scenario is that the rear wheels of the vehicle have crossed the stop line.

3. The method according to claim 2, characterized in that, The second scenario includes one of the fourth, fifth, or sixth scenarios, wherein the fourth scenario is that the traffic light is green, the fifth scenario is that the traffic light is yellow, and the sixth scenario is that the traffic light is red.

4. The method according to claim 2, characterized in that, The third scenario includes one of the seventh, eighth, ninth, or tenth scenarios, wherein the seventh scenario is a straight-ahead direction, the eighth scenario is a left turn, the ninth scenario is a right turn, and the tenth scenario is a U-turn.

5. The method according to claim 3, characterized in that, Also includes: A first distance, a second distance, and a third distance are determined. The first distance is the distance from the vehicle to the stop line, the second distance is the distance from the vehicle to the stop line when it brakes based on a preset acceleration, and the third distance is the distance from the vehicle to the stop line when it brakes based on the maximum acceleration.

6. The method according to claim 5, characterized in that, The sixth scenario includes at least one of the eleventh and twelfth scenarios. The eleventh scenario is when the vehicle reaches the stop line based on its current speed and the traffic light is green. The twelfth scenario is when the vehicle reaches the stop line based on its current speed and the traffic light is red.

7. The method according to claim 6, characterized in that, The twelfth scenario includes at least one of the thirteenth and fourteenth scenarios, wherein the thirteenth scenario is when the first distance is less than the second distance and the first distance is greater than the third distance, and the fourteenth scenario is when the first distance is less than the third distance.

8. The method according to claim 7, characterized in that, The first coefficient corresponding to the thirteenth scenario is less than the first coefficient corresponding to the fourteenth scenario.

9. The method according to claim 4, characterized in that, Determining that the vehicle is at a first speed corresponding to the first scenario includes: Based on the first identifier, the vehicle is determined to be at a first speed corresponding to at least one of the seventh scenario, the eighth scenario, or the tenth scenario, and the first identifier is used to indicate whether the vehicle can pass.

10. The method according to claim 9, characterized in that, The first identifier is determined based on preset passage rules and the traffic light status within a preset first time range.

11. The method according to claim 9, characterized in that, The step of determining the first speed corresponding to at least one of the seventh scenario, the eighth scenario, or the tenth scenario based on the first identifier includes: If the first identifier indicates that the vehicle can pass, then the first speed is determined to be the current speed of the vehicle; otherwise, it is 0.

12. The method according to claim 1, characterized in that, The step of determining the reward score for each candidate trajectory based on the multiple candidate trajectories, the first velocity, and the first coefficient includes: Extract the second velocity from the candidate trajectory; The reward score is determined based on the first speed, the second speed, and the first coefficient.

13. The method according to claim 12, characterized in that, The second velocity is the weighted average velocity of multiple trajectory points within a preset second time range in the candidate trajectory.

14. The method according to claim 12, characterized in that, The determination of the reward score based on the first speed, the second speed, and the first coefficient includes: Based on the first speed, the second speed, and the first coefficient, a cost score is determined; The cost score is input into a preset reward function to determine the reward score.

15. The method according to claim 14, characterized in that, The determination of the cost score based on the first speed, the second speed, and the first coefficient includes: The first speed, the second speed, and the first coefficient are input into the cost scoring model to obtain a cost score. The cost scoring model is used to quantify the deviation between the second speed and the first speed.

16. The method according to claim 15, characterized in that, The cost scoring model is shown in the following formula: Where score is the cost rating, k scale The first weighting coefficient is used to control the reward score when the first speed and the second speed are the same. traj For the second velocity, v set Let k be the first velocity and k be the first coefficient.

17. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-16.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-16.