Cost function construction method, computer readable storage medium and program product

The cost function of the vehicle decision planning system is constructed through a data-driven method, which solves the problems of randomness caused by personal experience design and lack of physical significance of parameters, and achieves the stability and performance improvement of the system.

CN120256793AActive Publication Date: 2025-07-04ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510706744.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-04
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

In the prior art, the cost function in the vehicle decision planning system depends on personal experience design, resulting in high randomness of the function and lack of physical significance of the parameters, which affects the system stability and performance improvement.

Method used

By constructing an initial cost function containing unknown parameters, obtaining the actual value and cost observations in the driving data set, and using the data-driven method to determine the estimated value of the unknown parameters, forming a target cost function.

Benefits of technology

It eliminates subjective differences among engineers, improves the stability and consistency of the decision-making planning system, provides the physical significance of parameters, and supports function optimization and debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256793A_ABST
    Figure CN120256793A_ABST
Patent Text Reader

Abstract

The invention provides a cost function construction method, a computer readable storage medium and a program product, and the method comprises the steps: determining a corresponding initial cost function according to a target driving variable, and the initial cost function comprises unknown parameters; obtaining a driving data set for the target driving variable, wherein the driving data set comprises an actual value of the target driving variable and a cost observation value corresponding to the actual value; and determining an estimated value of the unknown parameter according to the driving data set, and constructing a target cost function according to the estimated value and the initial cost function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of assisted driving technology, and particularly to a method for constructing a cost function, a computer-readable storage medium, and a program product. Background Art

[0002] In the assisted driving scenario, the Decision and Planning System, as the core component of vehicle assisted driving, can, on the one hand, generate vehicle driving trajectories and speed plans, enabling the vehicle to follow traffic rules and respond to various traffic participants and road condition changes; on the other hand, it can quantify and evaluate the advantages and disadvantages of different driving decisions through a cost function, and then determine the most suitable driving decision from them. Among them, the structural design and parameter configuration of the cost function will directly determine the algorithm efficiency, functional safety, and assisted driving ability of the above-mentioned decision and planning system, and thus affect the quality of related products and user experience satisfaction.

[0003] In related technologies, the cost function in the vehicle decision and planning system is usually designed relying on the personal experience of automotive engineers. However, due to the excessive dependence on personal experience, the cost function has randomness, and the cost functions constructed by engineers at different levels vary greatly, making the above-mentioned decision and planning system unstable. At the same time, the parameter settings in the cost function lack physical meaning, resulting in blind and inefficient subsequent function debugging, and it is difficult to improve performance even with a large amount of time invested. Summary of the Invention

[0004] In view of this, this specification provides a method for constructing a cost function, a computer-readable storage medium, and a program product to solve the deficiencies in related technologies.

[0005] Specifically, this specification is implemented through the following technical solutions: According to the first aspect of this specification, an initial cost function corresponding to the target driving behavior index is provided, and the initial cost function contains unknown parameters; A driving data set for the target driving behavior index is obtained, and the driving data set includes the actual values of the target driving behavior index and their corresponding cost observation values; The estimated values of the unknown parameters are determined according to the driving data set, and a target cost function is constructed based on the estimated values and the initial cost function.

[0006] According to the second aspect of this specification, a device for constructing a cost function is provided, and the device includes: An initial cost function determination unit for determining an initial cost function corresponding to the target driving behavior index, and the initial cost function contains unknown parameters; A driving data set acquisition unit, configured to acquire a driving data set for the target driving behavior index, where the driving data set includes the actual value of the target driving behavior index and its corresponding cost observation value; A target cost function construction unit, configured to determine an estimated value of the unknown parameter according to the driving data set, and construct a target cost function according to the estimated value and the initial cost function.

[0007] According to the third aspect of this specification, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0008] According to the fourth aspect of this specification, a computer program product includes a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In this specification, through a data-driven form, the problems of over-reliance on manual experience and lack of physical meaning of parameters in cost function design are avoided. Specifically, an initial cost function including unknown parameters can be constructed according to the target driving behavior index. At the same time, a driving data set including the actual value of the target driving behavior index and its corresponding cost observation value is acquired, and parameter estimation is performed based on this data set, so as to obtain a mathematically problem that can be quantitatively optimized. Among them, this process effectively eliminates the randomness of the function caused by the subjective differences of engineers, and ensures the high consistency of the cost functions constructed by engineers at different levels through a unified data fitting criterion, significantly improving the stability of the decision-making and planning system. At the same time, the estimated value of the unknown parameter in the initial cost function comes from the internal relationship of the actual driving data, that is, the unknown parameter is given a clear physical meaning, providing a reliable basis for the subsequent understanding, debugging and optimization of the target cost function. Description of the Drawings

[0010] In order to more clearly illustrate the technical solutions of this specification, the drawings required for the implementation examples or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some implementation examples of this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0011] Figure 1 is a flowchart of a method for constructing a cost function shown in an open embodiment of this specification; Figures 2a to 2f is a schematic diagram of the visualized target cost function shown in an open embodiment of this specification; Figure 3 is a schematic diagram of the architecture of a cost function construction system shown in an open embodiment of this specification; Figure 4 It is a schematic structural diagram of an electronic device shown in an embodiment of this specification; Figure 5 It is a block diagram of a device for constructing a cost function shown in an embodiment of this specification. Specific embodiments

[0012] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of this specification.

[0013] The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit this specification. The singular forms "a", "the", and "said" used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0014] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0015] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this specification are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for the user to select authorization or rejection.

[0016] Figure 1 It is a flowchart of a method for constructing a cost function shown in an exemplary embodiment disclosed in this specification. The method may specifically include the following steps: Step S102, determine a corresponding initial cost function according to the target driving behavior index, and the initial cost function contains unknown parameters.

[0017] In the vehicle decision-making planning system, the requirements for driving decisions are usually based on the three dimensions of safety, comfort and efficiency. Therefore, the cost functions used to quantify and evaluate the corresponding driving decisions can also be divided into the above three types, namely safety cost function, comfort cost function and efficiency cost function. Among them, each type of cost function can be affected by one or more driving behavior indicators, such as the lateral distance between the oncoming vehicle (or the same-direction vehicle in the adjacent lane), the following distance, the lateral offset of the vehicle, acceleration (acc) and jerk, passability and static obstacle distance, etc.

[0018] The solution of this specification can first construct a corresponding initial cost function based on the above-mentioned target driving behavior index. In addition to the independent variable and the dependent variable, the initial cost function also contains unknown parameters to be determined, such as the parameters a, b, c in the function y=ax2+bx+c, or a in the function y=ax. Therefore, compared with the fixed function whose parameters are all known, the function containing unknown parameters can be called a generalized function in this specification. The core of this step is to establish a mathematical relationship between the cost and the driving behavior index based on the initial cost function, laying the foundation for subsequent data-driven optimization.

[0019] The above-mentioned initial cost function can be specifically determined based on a function template corresponding to the above-mentioned target driving behavior index, so as to ensure that the initial cost function can reasonably adapt to different driving requirements.

[0020] In one embodiment, a corresponding driving behavior index set can be determined according to a preset cost function design target. For the above driving behavior index set, at least one driving behavior index can be selected as the above target driving behavior index, and a corresponding initial cost function can be determined according to the above target driving behavior index and a function template. The above function template can maintain a corresponding relationship between each driving behavior index and a function structure. Among them, the so-called cost function design target can be regarded as the above requirements for driving decision-making, that is, safety design target, comfort design target and efficiency design target. Different cost function design targets correspond to different driving behavior index sets. For example, the safety design target corresponds to a driving behavior index set including the above lateral distance between the oncoming vehicle (or the same-direction vehicle in the adjacent lane), the following distance, and the static obstacle distance; the comfort design target corresponds to a driving behavior index set including the lateral offset, acceleration and jerk of the vehicle; and the efficiency design target corresponds to a driving behavior index set including the unit travel time and passability.

[0021] From a predefined set of driving behavior metrics, at least one metric can be selected as a target driving behavior metric through predefined screening rules such as black and white lists, multi-objective priorities, etc. At the same time, based on a predefined function template, the selected target driving behavior metric can be mapped to a corresponding function structure, where the function structure of the initial cost function can be constrained by the function template to ensure clear physical meanings of the parameters, and the above function structure can adopt linear functions and / or non-linear functions, so as to flexibly adapt to diverse driving scenarios. For example: when the target driving behavior of following distance belongs to the safety design goal, the function template can indicate a non-linear function such as the logistic function (also known as Sigmoid) or the exponential function as the initial cost function to accurately depict the risk change in different following distance intervals and the trend of vehicle driving safety; or, when the target driving behavior of acceleration belongs to the comfort design goal, the function template can indicate a polynomial function such as quadratic or quartic terms as the initial cost function to smoothly quantify the accumulation of discomfort and more precisely reflect the relationship between the vehicle driving state and the user's driving comfort; or, when the target driving behavior of unit travel time belongs to the efficiency design goal, the function template can indicate a linear function such as a piecewise function as the initial cost function to facilitate the direct association of time / distance loss.

[0022] In addition to the Sigmoid, exponential, polynomial function, and piecewise function mentioned above, in fact, the function structure of the above initial cost function can also be determined based on spline curves or neural network construction methods. Among them, spline curves have good smoothness and continuity, can more naturally describe the relationship between the target driving behavior metric and the corresponding cost observation value, and similar to the sigmoid curve and polynomial curve, can flexibly adapt to the cost change trend in different driving scenarios. The above neural network can automatically learn complex features and relationships in the data through multiple hidden layers. When dealing with complex driving scenarios such as multi-vehicle interaction and pedestrian interference on urban roads, the neural network can construct a high-precision initial cost function from a large amount of actual driving data.

[0023] Of course, the corresponding relationship between the above driving behavior metrics and the function structure can be adjusted according to the actual scenario or business requirements. For example, the following distance can correspond to the safety design goal and / or the comfort design goal separately or simultaneously, and the same driving behavior metric under different design goals can also correspond to different function templates respectively, which are not restricted in this specification.

[0024] Taking Table 1 as an example below, the corresponding relationship between different driving behavior metrics and the function structure will be introduced.

[0025] Table 1

[0026] Among them, for the cost functions corresponding to the two driving behavior indicators of the lateral distance from oncoming vehicles and the distance from obstacles, both adopt the sigmoid curve, which can smoothly describe the change of the corresponding cost y with the variable x based on the parameter b1, ensuring a continuous transition of the cost within a reasonable range and adapting to the safety assessment in complex scenarios. For the function structures corresponding to the three driving behavior indicators of lateral offset, acceleration, and jerk, all three adopt cubic polynomials to ensure the function is continuously differentiable, and at the same time fit the influence of the three on comfort, and the parameters k1~k6 are used to adjust and match the human perception of the changes in lateral offset, acceleration, and jerk in different directions. For the cost function corresponding to the driving behavior indicator of passability, it adopts a piecewise linear structure. The shorter the distance x, the worse the passability; when it exceeds maxTrajLength, the cost is 0, reflecting the efficient passing of the vehicle.

[0027] Step S204, obtain a driving data set for the target driving behavior indicator, where the driving data set includes the actual values of the target driving behavior indicator and their corresponding cost observation values.

[0028] After determining the initial cost function, in order to determine the values of the unknown parameters therein, a driving data set including the actual values of the target driving behavior indicator and their corresponding cost observation values can be collected. Among them, the source of the driving data set can include real road tests, driving simulators, or historical driving logs, and it is ensured to cover various different driving scenarios such as urban roads, highways, communities, and parking lots. The above driving data set contains rich driving behaviors, including operations such as acceleration, deceleration, steering, following, and avoidance in different scenarios. It can record the actual values of the above behaviors corresponding to the target driving behavior indicator, and at the same time record the corresponding cost observation values, so as to construct a driving data set with a "behavior-cost" pair structure based on the two, providing a data basis for calculating the unknown parameters in the subsequent steps. The above cost observation values, as the cost results obtained based on actual observations, can be indirectly calibrated through expert rule scoring, passenger comfort feedback, or energy consumption efficiency indicators, or can be generated by a preset multi-objective optimization model, which is not limited in this specification.

[0029] Taking the following example of the following distance in a highway vehicle-following scenario and the cost observation value determined based on the safety score, the actual values of the driving data set can be represented array-wise as [10, 15, 20, 25, 30], and the cost observation values are [0.95, 0.85, 0.7, 0.5, 0.3]. Among them, the values of the two arrays correspond one by one in order. Assuming the initial cost function is the Sigmoid function, as the following distance gradually increases from 10 meters to 30 meters, its safety score as the cost observation value gradually decreases from a high cost representing high risk to a low cost representing low risk.

[0030] In addition, considering that the diversity and integrity of data directly affect the accuracy of parameter estimation, data cleaning and normalization processing can be adopted to eliminate noise and unify the dimension, forming a high-quality driving data set.

[0031] Step 206, determine the estimated value of the unknown parameter according to the driving data set, and construct a target cost function according to the estimated value and the initial cost function.

[0032] Based on the obtained driving data set, the estimated value of the unknown parameter in the initial cost function can be calculated. Finally, substitute the estimated value into the initial cost function to obtain a new target cost function. This target cost function has both theoretical rationality and data adaptability, can accurately reflect the mapping relationship between driving behavior and comprehensive cost, and provides an interpretable quantitative evaluation basis for the vehicle system.

[0033] For the determination process of the estimated value, in this specification, it can be implemented in different ways according to actual needs to balance data adaptability and the solution efficiency of complex scenarios.

[0034] In one embodiment, a loss function is constructed based on the actual values in the above driving data set and their corresponding cost observation values, and the loss function is minimized through a numerical optimization algorithm to determine the above predicted values. This embodiment can quantify the deviation between the predicted value of the initial cost function and the actual cost observation value by constructing a loss function, and use a numerical optimization algorithm to iteratively solve for the optimal parameters as the above predicted values. Among them, according to the characteristics of the target driving behavior index, Mean Squared Error (MSE), Cross-Entropy, or Huber loss, etc. can be selected as the optimization objective; as for the above numerical optimization algorithm, it includes both first-order gradient methods such as Stochastic Gradient Descent (SGD), Adam algorithm, etc. that are applicable to large-scale data and non-linear cost functions, and second-order derivative methods such as Newton's method, quasi-Newton method, and Levenberg-Marquardt (LM) algorithm that use derivative information to accelerate high-precision parameter convergence, and also includes global optimization methods such as genetic algorithm, particle swarm optimization algorithm, etc. that support jumping out of local optima. In short, this embodiment makes the physical meaning of unknown parameters clear through direct data-driven optimization, and is applicable to the efficient solution of differentiable cost functions, which can be summarized as a method for determining unknown parameters based on an identification algorithm.

[0035] In another embodiment, the policy network or reward function of the reinforcement learning framework is initialized according to the above driving data set, and the above predicted values are determined according to the above reinforcement learning framework. This embodiment can model the calculation problem of unknown parameters as a Markov Decision Process (MDP), and dynamically optimize the parameters through the interaction between the agent and the environment. Among them, the above policy network can output parameter adjustment actions such as parameter increments, and the initial policy can be pre-trained based on the data in the driving data set; the above reward function can be designed based on the matching degree between the cost observation value and the predicted value. At the same time, the Actor-Critic framework or Proximal Policy Optimization (PPO) can be used to update the predicted values of unknown parameters through preset policy gradients. For example, in a highway scenario, the agent can try different unknown parameters of speed and acceleration related cost functions. If the decision result enables the vehicle to maintain efficient driving while ensuring safety and a certain degree of comfort, a positive reward is obtained, otherwise a penalty is received. After a large number of iterative trainings, the above agent can find the unknown parameters of the cost function suitable for this scenario. This method gets rid of the dependence on expert driving data and pays more attention to autonomous exploration and optimization in the actual environment.

[0036] In another embodiment, a probability model of the above initial cost function is constructed based on the above cost observation values, and the posterior distribution of unknown parameters is iteratively updated through a Bayesian optimization framework to determine the above estimated value. This embodiment can construct a probability surrogate model to guide the search for unknown parameters for a black-box or high-cost evaluation cost function. For the probability model, it can make a prior distribution assumption for the parameter space, and then continuously update the posterior distribution according to the existing observation data, so as to determine the next parameter point that is most likely to optimize the initial cost function for testing. For example, when determining the unknown parameters of the comfort cost function, the prior distribution of the unknown parameters can be assumed first, and then the comfort effects corresponding to different combinations of unknown parameters are tested in different driving scenarios. According to these observation results, the posterior distribution of the parameters is updated, and the optimal unknown parameter value, that is, the above estimated value, is gradually approximated.

[0037] After obtaining the estimated value, it can be substituted into the initial cost function to obtain the final target cost function, and at the same time, a visual analysis of the target cost function is performed to generate a graphical interface for characterizing the corresponding relationship between the actual value of the target driving behavior index and the corresponding cost observation value, so as to facilitate developers to intuitively verify the rationality of the estimated value of the parameters and improve the debugging efficiency and decision interpretability. Among them, the target cost function can be input into a preset visualization engine, and a dynamic curve of the function output changing with the target driving behavior index is generated through numerical simulation. For example, for the target cost function corresponding to the target driving behavior index of following distance, a distribution diagram of cost function values at different following distances can be drawn, and the preset safety threshold critical point can be marked to intuitively reflect the non-linear penalty characteristic of the function for dangerous distances. At the same time, parameter adjustment controls such as sliders and input boxes can be embedded in the above graphical interface, and users are allowed to dynamically modify the parameter values in the target cost function, and the fitting effect comparison between the updated function curve and the driving data set is rendered in real time. For example, when adjusting the weight coefficient of the trajectory smoothness function, the interface synchronously displays the sensitivity distribution of the parameter change to the cost calculation result of the historical trajectory data to assist in verifying the parameter rationality.

[0038] In addition, through the visualization module, abnormal data points deviating from the prediction range of the target cost function in the driving data set can be identified and marked in the graphical interface in the form of highlighter or pop-up prompt. For example, if the cost observation value in the emergency braking scenario is significantly higher than the cost prediction value in the function, a visual alarm is triggered to prompt that the function structure or parameter settings need to be re-evaluated.

[0039] The following introduces the visualized target cost function in Figures 2a to 2f in combination with the initial cost function in Table 1: As Figure 2aAs shown, the abscissa ego2objLatDistance represents the lateral distance between the host vehicle and the oncoming vehicle, with the unit of meter; the ordinate ego2objLatSafetyCost represents the predicted cost value of the lateral distance from the oncoming vehicle (hereinafter simply referred to as cost for the convenience of discussion). The curve ego2objLatSafetyCostFunction can show the change of the above cost with the distance, that is, the cost function. The marked points such as (-1.2, 0.80) indicate that when the lateral distance is small, such as -1.2 meters, the safety cost is 0.80, which means that the lateral distance from the oncoming vehicle is close at this time and the safety risk is high; as the distance increases, such as when the distance is 0.4 meters, the cost drops to 0.17, indicating that the safety risk is low when the distance is large enough and the cost begins to approach 0. The asterisk-marked points originalSamples are data points representing the actual values in the driving data set and their corresponding cost observation values. Combining with the curve can reflect the difference between the cost observation value and the predicted cost value under the same actual value.

[0040] As Figure 2b shown, the abscissa toEnvObstacleMinDistance is the minimum distance from the obstacle in the environment, with the unit of meter, and the ordinate toEnvSafetyCost is the safety cost related to the distance from the obstacle. The curve toEnvSafetyCostbia indicates the change of the cost with the distance from the obstacle, that is, the cost function. The marked points such as (-1.0, 1.00) indicate that when the distance is close, such as -1.0 meters, the safety cost is 1.00, that is, the danger is high when close to the obstacle; as the distance increases, such as when the distance reaches 1.4 meters, the cost is 0.00, indicating that the safety risk is low when the distance from the obstacle is far enough and the cost approaches 0.

[0041] As Figure 2c shown, the abscissa offset is the vehicle lateral offset, with the unit of meter, and the ordinate offsetCost is the lateral offset cost. The curve offsetCostFunction reflects the relationship between the cost and the offset, that is, the cost function. The marked point (0.0, 0.00) indicates that when the offset is at the ideal position of 0, the cost is 0.00; when offset in the positive or negative direction, such as when offset to -2.0 meters or 1.0 meters, the cost will increase, indicating that the farther the vehicle deviates from the ideal position, the greater the impact on the ride comfort and the higher the cost.

[0042] As Figure 2dAs shown in the figure, the horizontal axis acceleration is the acceleration, in meters per second squared, and the vertical axis comfortAccCost is the comfort cost for acceleration. The curve comfortAccCostFunction reflects the cost changing with acceleration, that is, the cost function. The marked point (0.0, 0.00) indicates that when the offset is the ideal position 0, the cost is 0.00; the marked points such as (-3.0, 2.85) and (2.0, 3.00) indicate that the absolute value of acceleration increases and the cost increases, which also indicates that the human body prefers steady acceleration.

[0043] like Figure 2e As shown in the figure, the horizontal coordinate acceleration is the acceleration in meters per second squared, the vertical coordinate jerk is the jerk in meters per second cubed, and the vertical coordinate comfortCost is the comfort cost under the combined effect of acc and jerk. The surface shows the impact of the simultaneous changes in acceleration and jerk on the comfort cost. The closer to the origin of the coordinate, the smoother the changes in acceleration and jerk, and the lower the comfort cost; the farther away from the origin, the greater the cost, reflecting the human body's preference for smooth changes in acceleration and jerk. When the changes in the two are not smooth, the cost of driving comfort increases.

[0044] like Figure 2f As shown in the figure, the horizontal axis trajectoryLength is the trajectory length in meters, and the vertical axis passabilityCost is the passability cost. The broken line shows the relationship between trajectory length and passability cost, that is, the cost function. The marked points such as (-1.5, 1.00) and (11.5, 0.00) show that when the trajectory length is short, such as 1.0 meter or a small positive value, the cost is high, indicating that the short trajectory is difficult to pass; as the trajectory length increases, the cost decreases, and the cost is 0.00 at 11.5 meters, which means that long trajectories are more conducive to passing, and short trajectories have poor passability and high costs.

[0045] At this point, the estimated values ​​of the unknown parameters can be saved and written into the code software for subsequent testing and evaluation. For the target cost function, the preliminary construction process has been completed, such as Figure 3 As shown in the local offline design process in one embodiment, the process can be implemented by a server, wherein the server can be a physical server including an independent host, or the server can be a virtual server carried by a host cluster. During operation, the server can be responsible for storing and managing the expert driving data set as a driving data set, and provide computing support for parameter estimation methods based on, for example, identification algorithms. At the same time, it also supports the image visualization of the target cost function, that is, by calculating and generating a dynamic curve and a graphical interface of the cost function, and then feedback optimization is performed on the initial cost function or the expert driving data set corresponding to multiple target driving behavior indicators.

[0046] After constructing the target cost function, it can be verified and iteratively optimized through an online virtual simulation platform and / or an offline real vehicle program to ensure its robustness and generalization ability in actual driving scenarios. Specifically, the target cost function can be integrated into simulation environments such as CARLA and Prescan. Subsequently, diverse test scenarios including extreme weather, complex traffic flows, and edge cases such as emergency braking or malfunctioning vehicles are constructed. Driving behavior metrics are recorded through simulation logs to verify the decision-making rationality of the cost function in the virtual environment. Alternatively, the target cost function can be deployed to the decision-making and planning system of a real vehicle. Sensor data such as lidar point clouds, camera images, and millimeter-wave radar signals, as well as driving behavior feedback such as driver takeover frequency and passenger comfort scores, are collected in a closed test site and on open roads. Subsequently, an adaptive filtering algorithm such as a Kalman filter or an incremental learning model is run in real time using an in-vehicle computing unit to achieve the effect of dynamically adjusting the current parameters of the cost function according to real vehicle data. Of course, the virtual simulation platform and the offline real vehicle program can also collaboratively process the cost function across platforms.

[0047] Still taking Figure 3 as an example, after the local offline design process in the figure, the target cost function and its estimated values can be written into the engineering code for testing to enter the real vehicle online testing process. This process can rely on two testing platforms, Software-in-the-Loop (SiL) and Hardware-in-the-Loop (HiL), to comprehensively test the performance of the cost function. Among them, SiL testing focuses on verifying the cost function in the real vehicle and real scenario. HiL testing takes local data playback as the core. The data recorded in the SiL test is played back on the HiL platform, and detailed charts of vehicle behavior and cost are generated with the help of analysis tools such as Excel and professional drawing software as the output analysis results. Based on this, engineers can deeply analyze the performance of the cost function under different working conditions, judge whether it meets the requirements of safety, comfort, and efficiency, and further provide support for the feedback optimization of the function. It can be understood that this process can be implemented based on the same server device as the local offline design process, or it can be independently deployed on other server devices.

[0048] It is worth mentioning that the estimated values in the above-mentioned target cost function are only used as a general parameter, and the cost function construction method in this specification can further support personalized parameter customization for each user.

[0049] In one embodiment, first, a personal driving data set of a target user can be obtained, and a customized value of the unknown parameter can be determined based on the above-mentioned estimated value and the personal driving data set. Then, a customized cost function can be constructed according to the customized value and the initial cost function. Among them, compared with the driving data set in the previous text, the personal driving data set in this embodiment is basically the same as the driving data set in terms of content. The difference is that the personal driving data set can be obtained by collecting the long-term driving data of the target user through an On-Board Diagnostics (OBD) system, an intelligent cockpit system, or a mobile application (APP). The personal driving data set can be sent to the above-mentioned server again to be used for re-determining the customized value for the individual user. At the same time, substituting the customized value into the initial cost function can generate a user-specific customized cost function, so as to adapt to the driving styles of different users.

[0050] At the same time, based on the user's driving preferences and vehicle performance constraints, a customized range of the estimated value can also be determined, so that among the customized values determined based on the personal driving data set, it is within the customized range of the estimated value to prevent the customization from deviating from the safety boundary. Among them, based on the user's driving preferences, users can be at least divided into aggressive users and conservative users. For example, for the former, the safety distance threshold can be appropriately relaxed and higher acceleration can be allowed; for the latter, the safety threshold can be tightened to limit the jerk amplitude. The above-mentioned vehicle performance can be reflected in the vehicle's power performance, braking ability, and steering ability. For example, according to the upper limit of the motor torque or the fuel economy curve, the feasible region of the acceleration parameter can be set, or the maximum allowable following time can be deduced based on the braking distance.

[0051] Still taking Figure 3 as an example, it can be seen that the above-mentioned local offline design and real vehicle online test processes both belong to the cost function design and research and development stage. Corresponding to this is the vehicle data closed-loop system. As shown in the figure, during actual driving of mass-produced vehicles, the behavior data during the driving process can be obtained through user takeover data collection to form the above-mentioned personal driving data set, such as the actual values of target driving behavior indicators such as lateral offset, acceleration, and distance from obstacles, and their corresponding cost observation values. At the same time, the vehicle can feedback this data set to the cost function design and research and development link to provide actual scenario data for the function structure definition, parameter estimation, etc. of the above-mentioned generalized function, and finally be used to construct and optimize the customized cost function. Among them, the optimized customized cost function can be updated to mass-produced vehicles through Over-the-Air Technology (OTA) so that they can apply the new customized cost function. The vehicle continues to run under the new customized cost function, collects the user's driving data again to form a new personal driving data set, and repeats the above process.

[0052] Figure 4 is a schematic structural diagram of an electronic device in an exemplary embodiment. Please refer to Figure 4 , at the hardware level, the electronic device includes a processor 402, an internal bus 410, a network interface 404, a memory 406, and a non-volatile memory 408. Of course, it may also include other required hardware. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a detection device for risk codes at the logical level. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and can also be hardware or a logic device.

[0053] Figure 5 A block diagram of a device for constructing a cost function shown in an embodiment of this specification. Please refer to Figure 5 , this device can be applied to a device as shown in Figure 4 to implement the technical solution described in this specification. This device includes: An initial cost function determination unit 502, configured to determine a corresponding initial cost function according to a target driving behavior index, where the initial cost function includes unknown parameters; A driving data set acquisition unit 504, configured to acquire a driving data set for the target driving behavior index, where the driving data set includes the actual value of the target driving behavior index and its corresponding cost observation value; A target cost function construction unit 506, configured to determine an estimated value of the unknown parameter according to the driving data set, and construct a target cost function according to the estimated value and the initial cost function.

[0054] Optionally, the initial cost function determination unit 502 is specifically configured to: Determine a set of driving behavior indices corresponding to the designed target of the cost function according to a preset cost function; Select at least one driving behavior index from the set of driving behavior indices as the target driving behavior index; Determine a corresponding initial cost function according to the target driving behavior index and a function template; the function template maintains the corresponding relationship between each driving behavior index and a function structure.

[0055] Optionally, the function structure adopts a linear function and / or a non-linear function.

[0056] Optionally, the target cost function construction unit 506 is specifically configured to: Construct a loss function based on the actual values in the driving data set and their corresponding cost observations, and minimize the loss function through a numerical optimization algorithm to determine the estimated values; or, Initialize the policy network or reward function of the reinforcement learning framework according to the driving data set, and determine the estimated values according to the reinforcement learning framework; or, Construct a probability model of the initial cost function based on the cost observations, and iteratively update the posterior distribution of the parameters through the Bayesian optimization framework to determine the estimated values.

[0057] Optionally, the device further includes: A personal driving data set acquisition unit, configured to acquire a personal driving data set of a target user; A customized cost function construction unit, determines a customized value of the unknown parameter based on the estimated value and the personal driving data set, and constructs a customized cost function according to the customized value and the initial cost function.

[0058] Optionally, the customized cost function construction unit is specifically configured to: Determine a customized range for the estimated value according to the driving preference information of the target user and the vehicle information of the target vehicle driven by the user; Determine the customized value of the unknown parameter based on the personal driving data set, and the customized value is within the customized range of the estimated value.

[0059] Optionally, the device further includes: A function visualization unit, configured to perform visual analysis on the target cost function to generate a graphical interface for characterizing the corresponding relationship between the actual values of the target driving behavior indicators and the corresponding cost observations.

[0060] Optionally, the device further includes: A function testing unit, configured to input the target cost function into an online virtual simulation platform and / or an offline real vehicle program to test and optimize the target cost function.

[0061] The implementation processes of the functions and roles of each unit in the above device are specifically detailed in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.

[0062] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. A person of ordinary skill in the art can understand and implement it without creative efforts.

[0063] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor realizes the steps of the method as described in any of the above embodiments by running the executable instructions.

[0064] Based on the same concept as the above method, this specification also provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method as described in any of the above embodiments are realized.

[0065] Based on the same concept as the above method, this specification also provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the method as described in any of the above embodiments are realized.

[0066] The embodiments of the subject matter and functional operations described in this specification can be implemented in the following: digital electronic circuits, tangible computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules in computer program instructions encoded on a tangible non-transitory program carrier to be executed by a data processing device or to control the operation of a data processing device. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for execution by a data processing device. A computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

[0067] The processes and logical flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform the corresponding functions by operating on input data and generating output. The processes and logical flows can also be performed by, for example, FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit) of special logic circuits, and the apparatus can also be implemented as special logic circuits.

[0068] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Generally, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, etc., or the computer will be operatively coupled to such mass storage devices to receive data from them or transfer data to them, or both. However, a computer is not necessarily required to have such devices. In addition, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name just a few.

[0069] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as including semiconductor memory devices (such as EPROM, EEPROM, and flash memory devices), magnetic disks (such as internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special logic circuits.

[0070] Although this specification contains many specific implementation details, these should not be construed as limiting the scope of any invention or the scope of what is claimed, but rather are mainly used to describe the features of specific embodiments of a particular invention. Certain features described in multiple embodiments in this specification can also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment can also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may operate in certain combinations as described above and are even initially claimed as such, one or more features from a claimed combination can in some cases be removed from that combination, and the claimed combination can be directed to a sub-combination or a variation of a sub-combination.

[0071] Similarly, although the operations are depicted in the drawings in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or sequentially, or that all illustrated operations be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Additionally, the separation of various system modules and components in the above-described embodiments should not be construed as required in all embodiments, and it should be understood that the program components and systems described can generally be integrated together in a single software product or packaged into multiple software products.

[0072] Thus, particular embodiments of the subject matter have been described. Additionally, the processes depicted in the drawings are not necessarily in the particular order or sequential order shown to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.

[0073] The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification shall be included within the scope of protection of this specification.

Claims

1. A method for constructing a cost function, characterized in that, The method includes: Determining a corresponding initial cost function according to a target driving behavior index, where the initial cost function contains unknown parameters; Obtaining a driving data set for the target driving behavior index, where the driving data set includes the actual values of the target driving behavior index and their corresponding cost observation values; Determining an estimated value of the unknown parameter according to the driving data set, and constructing a target cost function according to the estimated value and the initial cost function.

2. The method according to claim 1, wherein The determining a corresponding initial cost function according to a target driving behavior index includes: Determining a corresponding set of driving behavior indexes according to a preset target for cost function design; Selecting at least one driving behavior index from the set of driving behavior indexes as the target driving behavior index; Determining a corresponding initial cost function according to the target driving behavior index and a function template; the function template maintains the corresponding relationship between each driving behavior index and a function structure.

3. The method according to claim 2, wherein The function structure adopts a linear function and / or a non-linear function.

4. The method according to claim 1, wherein The determining an estimated value of the unknown parameter according to the driving data set includes: Constructing a loss function according to the actual values and their corresponding cost observation values in the driving data set, and minimizing the loss function through a numerical optimization algorithm to determine the estimated value; or, Initializing a policy network or a reward function of a reinforcement learning framework according to the driving data set, and determining the estimated value according to the reinforcement learning framework; or, Constructing a probability model of the initial cost function based on the cost observation values, and iteratively updating the posterior distribution of the parameters through a Bayesian optimization framework to determine the estimated value.

5. The method according to claim 1, characterized in that The method further includes: Obtaining a personal driving data set of a target user; Determining a customized value of the unknown parameter based on the estimated value and the personal driving data set, and constructing a customized cost function according to the customized value and the initial cost function.

6. The method according to claim 5, wherein The determining a customized value of the unknown parameter based on the estimated value and the personal driving data set includes: Determining a customized range for the estimated value according to the driving preference information of the target user and the vehicle information of the target vehicle driven by the user; Determining a customized value of the unknown parameter based on the personal driving data set, where the customized value is within the customized range of the estimated value.

7. The method according to claim 1, wherein The method further includes: Performing visual analysis on the target cost function to generate a graphical interface for characterizing the corresponding relationship between the actual values of the target driving behavior index and the corresponding cost observation values.

8. The method according to claim 1, characterized in that The method further includes: Inputting the target cost function into an online virtual simulation platform and / or an offline real vehicle program to test and optimize the target cost function.

9. An apparatus for constructing a cost function, characterized in that, The device includes: An initial cost function determination unit, configured to determine a corresponding initial cost function according to a target driving behavior index, where the initial cost function contains unknown parameters; A driving data set acquisition unit, configured to obtain a driving data set for the target driving behavior index, where the driving data set includes the actual values of the target driving behavior index and their corresponding cost observation values; A target cost function construction unit is configured to determine an estimated value of the unknown parameter according to the driving data set, and construct a target cost function according to the estimated value and the initial cost function.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer program product, characterized in that, It includes a computer program / instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Old driver safe travel path planning method considering travel cost

    CN117490717A

  • Automatic driving comprehensive decision evaluation method and device considering multiple types of driving elements

    CN117668413A

  • Vehicle, vehicle automatic driving control method and device and medium

    CN118560503A

  • Self-adaptive cruise expected function safety test evaluation method and device in curve scene

    CN119126741A

  • Personal driving style learning for autonomous driving

    US20200216094A1