Lane line smoothing method, device, equipment, medium and program product

By determining the fitting position, shape loss function, and flexible constraints, and combining the parameter aggregation function for solution, the problem of inaccurate smoothing of complex curved lane lines is solved, and higher smoothing accuracy is achieved.

CN121639501APending Publication Date: 2026-03-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In the existing technology, the curve smoothing method for complex curved lane lines cannot be accurately represented, resulting in inaccurate smoothing results.

Method used

By determining the fitting location, shape loss function, and flexibility constraints, and combining them with the parameter aggregation function, the parameter values ​​of the fitting parameters are obtained, thereby improving the accuracy of the smoothing process.

Benefits of technology

It can more accurately represent complex and curved lane lines, reduce errors and shape deviations, and improve the accuracy of smoothing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121639501A_ABST
    Figure CN121639501A_ABST
Patent Text Reader

Abstract

The invention discloses a lane line smoothing processing method, device and equipment, a medium and a program product. The method comprises the following steps: determining a fitting position of a position point of a to-be-processed lane line, wherein the fitting position is represented by a plurality of fitting parameters; according to the fitting position, determining a shape loss function between a fitting line represented by the fitting position of the position point and the to-be-processed lane line; according to the position offset between the fitting position of the position point and the original position of the position point in the to-be-processed lane line, determining a flexible constraint condition corresponding to the position point; determining a parameter aggregation function of the flexible constraint parameter corresponding to the to-be-processed lane line based on the flexible constraint parameter corresponding to the position point of the to-be-processed lane line; and based on the flexible constraint condition, solving by combining the shape loss function and the parameter aggregation function to obtain the parameter value of the fitting parameter so as to obtain the smoothed lane line represented by the parameter value. According to the invention, the accuracy of smoothing the lane line can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a lane line smoothing method, apparatus, device, medium, and program product. Background Technology

[0002] Curve smoothing is a technique that smooths the curves between discrete data points, making them more seamless. Curve smoothing has important applications in various fields such as image processing and computer graphics. For example, in virtual map scenarios, smoothing curves such as lane lines can improve visualization, enhance navigation accuracy, improve route planning, and enhance driver assistance functions.

[0003] However, in existing technologies, lane line smoothing methods typically process lane lines directly at their points, such as using linear interpolation. While this method can handle simple curves and straight sections of lane lines, it cannot accurately represent complex, curved lane lines, resulting in inaccurate smoothing results. Summary of the Invention

[0004] This application provides a lane line smoothing method, apparatus, device, medium, and program product that can improve the accuracy of lane line smoothing.

[0005] This application provides a lane line smoothing method, comprising: determining the fitted position of a location point of a lane line to be processed, the fitted position being characterized by multiple fitting parameters; determining a shape loss function between the fitted line represented by the fitted position of the location point and the lane line to be processed based on the fitted position; determining a flexible constraint condition corresponding to the location point based on the positional offset between the fitted position of the location point and the original position of the location point in the lane line to be processed, the flexible constraint condition being characterized by a flexible constraint relationship between the fitted position of the location point and the original position of the location point based on flexible constraint parameters; determining a parameter aggregation function corresponding to the lane line to be processed, the parameter aggregation function being a function obtained by aggregating the flexible constraint parameters corresponding to the location point of the lane line to be processed; and solving the fitting parameters based on the flexible constraint condition, the shape loss function, and the parameter aggregation function to obtain the parameter values ​​of the fitted parameters, thereby obtaining the smoothed lane line represented by the parameter values.

[0006] This application embodiment also provides a lane line smoothing processing device, including: a position determination unit, used to determine the fitted position of a position point of a lane line to be processed, the fitted position being characterized by multiple fitting parameters; a shape loss determination unit, used to determine a shape loss function between the fitted line represented by the fitted position of the position point and the lane line to be processed based on the fitted position; a constraint determination unit, used to determine a flexible constraint condition corresponding to the position point based on the positional offset between the fitted position of the position point and the original position of the position point in the lane line to be processed, the flexible constraint condition being characterized by a flexible constraint relationship between the fitted position of the position point and the original position of the position point based on flexible constraint parameters; a parameter aggregation unit, used to determine a parameter aggregation function corresponding to the lane line to be processed, the parameter aggregation function being a function obtained by aggregating the flexible constraint parameters corresponding to the position point of the lane line to be processed; and a solution unit, used to solve based on the flexible constraint condition, combined with the shape loss function and the parameter aggregation function, to obtain the parameter values ​​of the fitted parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0007] In some implementations, the fitting parameters include polynomial coefficients, and the position determination unit is specifically used to: obtain a point offset parameter of the position point, the point offset parameter being used to represent the position offset between the position point and the endpoint of the lane line to be processed; and based on the point offset parameter, determine a polynomial function corresponding to the position point, the polynomial function characterizing the fitting position of the position point through the polynomial coefficients and the point offset parameter.

[0008] In some implementations, obtaining the point offset parameter of the location point includes: determining the lane line length between the location point and the endpoint on the lane line to be processed; and determining the point offset parameter of the location point based on the lane line length and the total length of the lane line to be processed.

[0009] In some embodiments, the shape loss determination unit is specifically used to: determine the positional difference between the fitted position of the location point and the original position of the location point in the lane line to be processed; and determine the shape loss function between the fitted line represented by the fitted position of the location point and the lane line to be processed based on the positional difference.

[0010] In some implementations, the flexible constraint parameters include flexible constraint variables, and the constraint determination unit is specifically used to: determine the position offset between the fitted position of the position point and the original position of the position point in the lane line to be processed; and determine the offset range of the position offset based on the flexible constraint variables, wherein the flexible constraint condition corresponding to the position point includes the offset range of the position offset corresponding to the position point.

[0011] In some implementations, the flexible constraint variable is adjusted within a range of variable values, and the constraint determination unit is further configured to: obtain an offset threshold, the offset threshold being used to determine the offset range with the flexible constraint variable; and determine the range of variable values ​​of the flexible constraint variable based on the offset threshold.

[0012] In some embodiments, the constraint determination unit is further configured to: obtain the original position of the endpoint of the lane line to be processed and the fitted position of the endpoint; determine endpoint constraint conditions based on the original position of the endpoint and the fitted position of the endpoint, wherein the endpoint constraint conditions constrain the fitted position of the endpoint through the original position of the endpoint, and the endpoint constraint conditions are used to constrain the solution process of the shape loss function and the parameter aggregation function.

[0013] In some implementations, the parameter aggregation unit is specifically used to: sum the flexible constraint parameters corresponding to the location points of the lane line to be processed to obtain the parameter aggregation function corresponding to the lane line to be processed.

[0014] In some embodiments, the lane line smoothing device further includes a smoothing loss determination unit, which is used to: determine a smoothing loss function based on the higher-order term coefficients in the polynomial coefficients, the smoothing loss function being used to solve for the parameter values ​​of the fitting parameters.

[0015] In some embodiments, the lane line smoothing device further includes a lane line generation unit, which is configured to: obtain the number of smoothed position points of the smoothed lane line; determine the parameter value of the point offset parameter corresponding to the smoothed position point based on the number of position points; determine the position of the smoothed position point based on the parameter value of the point offset parameter and the parameter value of the fitting parameter; and generate the smoothed lane line based on the position of the smoothed position point.

[0016] In some implementations, the solving unit is specifically used to: combine the shape loss function and the parameter aggregation function to obtain an objective function; based on the flexible constraint conditions, minimize the objective function to obtain the parameter values ​​of the fitting parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0017] This application also provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute steps in any of the lane line smoothing methods provided in this application.

[0018] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the lane line smoothing methods provided in this application.

[0019] This application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any lane line smoothing method provided in this application.

[0020] This application embodiment can determine the fitted position of a location point of a lane line to be processed, the fitted position being characterized by multiple fitting parameters; based on the fitted position, a shape loss function is determined between the fitted line represented by the fitted position of the location point and the lane line to be processed; based on the positional offset between the fitted position of the location point and the original position of the location point in the lane line to be processed, a flexible constraint condition corresponding to the location point is determined, the flexible constraint condition being based on flexible constraint parameters characterizing the flexible constraint relationship between the fitted position and the original position of the location point; a parameter aggregation function corresponding to the lane line to be processed is determined, the parameter aggregation function being a function obtained by aggregating the flexible constraint parameters corresponding to the location point of the lane line to be processed; based on the flexible constraint condition, the shape loss function and the parameter aggregation function are combined to solve for the parameter values ​​of the fitted parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0021] In this application, unlike existing smoothing methods, multiple fitting parameters characterize the fitted positions of the lane lines to be processed. This allows the fitted lines, characterized by the fitted positions, to approximate not only simple lane lines but also complex, curved lane lines. Furthermore, for each position point on the lane line to be processed, this application can determine flexible constraint conditions based on flexible constraint parameters, such as the maximum allowable deviation or error range between the original position and its fitted position. By controlling the movement distance (i.e., position offset) of each position point on the lane line through flexible constraint conditions, more relaxed restrictions are imposed on the fitted positions, improving the flexibility and robustness of the fitting process. This makes it applicable to the smoothing of both simple and complex curved lane lines, improving the accuracy of lane line smoothing. In addition, this application incorporates the parameter aggregation function of the flexible constraint parameters into the process of solving for the parameter values ​​of the fitted parameters. This helps to more accurately adjust the fitted parameters during the solution process, allowing the fitted lines to better fit the original lane lines, reducing errors and shape deviations, and improving the accuracy of lane line smoothing. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1a This is a schematic diagram of a scenario for the lane line smoothing method provided in an embodiment of this application;

[0024] Figure 1b This is a schematic flowchart of the lane line smoothing method provided in the embodiments of this application;

[0025] Figure 2a This is a schematic flowchart of a lane line smoothing method provided in another embodiment of this application;

[0026] Figure 2b This is a schematic diagram of the lane line to be processed provided in the embodiments of this application;

[0027] Figure 2c This is a schematic diagram of the process for generating smoothed lane lines provided in an embodiment of this application;

[0028] Figure 3 This is a schematic diagram of the lane line smoothing device provided in the embodiments of this application;

[0029] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] This application provides a lane line smoothing method, apparatus, device, medium, and program product.

[0032] Specifically, the lane line smoothing device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0033] In some embodiments, the lane smoothing device may also be integrated into multiple electronic devices, such as multiple servers, with multiple servers implementing the lane smoothing method of this application.

[0034] In some embodiments, the terminal can also be used as a server to implement some or all of the functions of a server.

[0035] For example, refer to Figure 1a This lane line smoothing method is integrated into a server. The server determines the fitted position of the location points of the lane line to be processed, which is characterized by multiple fitting parameters. Based on the fitted position, it determines the shape loss function between the fitted line (represented by the fitted position) and the lane line to be processed. Based on the positional offset between the fitted position and the original position of the location point within the lane line, it determines the corresponding flexible constraint conditions. These flexible constraint conditions characterize the flexible constraint relationship between the fitted position and the original position of the location point, based on flexible constraint parameters. It then determines the parameter aggregation function corresponding to the lane line to be processed, which is a function obtained by aggregating the flexible constraint parameters corresponding to the location points of the lane line. Based on the flexible constraint conditions, and combining the shape loss function and the parameter aggregation function, it solves to obtain the parameter values ​​of the fitted parameters, thus obtaining the smoothed lane line represented by these parameter values.

[0036] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0037] The following sections provide detailed descriptions. It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments. It is understood that in the specific embodiments of this application, data related to lane lines, lane line data, location, and other user-related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0038] In this embodiment, a lane line smoothing method is provided, such as... Figure 1b As shown, the specific process of this lane line smoothing method can be as follows:

[0039] 110. Determine the fitting position of the location points of the lane line to be processed. The fitting position is characterized by multiple fitting parameters.

[0040] The lane lines to be processed refer to the lane lines that need to be smoothed. These lane lines can be lane edge lines, lane dividing lines, or lane center lines from the map data. The location points of the lane lines to be processed refer to points on those lane lines, such as shape points.

[0041] Fitting refers to finding a curve through a mathematical model that accurately represents the distribution of data points. The fitting position refers to the location of a point on the curve (i.e., the fitting line) obtained by fitting the lane line to be processed; this fitting position corresponds to the location of the lane line to be processed. The line characterized by the fitting position can be called the fitting line; in other words, the fitting line is the line obtained by fitting the lane line to be processed.

[0042] Among them, fitting parameters refer to parameters used to characterize the fitting position. Fitting parameters may include, but are not limited to, one or more of the coefficients, slopes, intercepts, and control points of the fitted line.

[0043] For example, a series of fitted position points can be obtained by fitting the lane line to be processed using a specific algorithm. The position of the position point on the fitted line corresponding to the position point of the lane line to be processed is the fitted position of that position point. The specific algorithm may include, but is not limited to, one or more of specific polynomial fitting, curve fitting, spline fitting, etc.

[0044] In some implementations, the lane line to be processed can be approximated using a polynomial function, thus representing the lane line approximately using a polynomial function. The relative position of a point is represented by the position offset between its location and its endpoints in the polynomial function. Polynomial coefficients control the position of the location points corresponding to different offset parameters, thereby controlling the shape and characteristics of the lane line and achieving precise characterization and control of the fitted position. Specifically, the fitting parameters include polynomial coefficients, and determining the fitted position of the location points of the lane line to be processed includes:

[0045] Obtain the point offset parameter of the location point. The point offset parameter is used to represent the position offset between the location point and the endpoint of the lane line to be processed.

[0046] Based on the point offset parameter, the polynomial function corresponding to the position point is determined. The polynomial function characterizes the fitted position of the position point through the polynomial coefficients and the point offset parameter.

[0047] In this context, a polynomial function refers to a function expression containing multiple terms. In this embodiment, the point offset parameter can be used to characterize the position of a fitted point relative to the fitted position of an endpoint. The endpoint can include one or more of a start point or an end point. In this embodiment, the point offset parameter can be a variable of a polynomial, allowing the polynomial coefficients to control the fitted position of the position point corresponding to different point offset parameters, thereby controlling the shape of the polynomial and lane line features.

[0048] For example, the point offset parameter is used to represent the positional offset between a location point and the starting point of the lane line to be processed. For instance, the point offset parameter can be t, 0 ≤ t ≤ 1, where t = 0 for the starting point and t = 1 for the ending point. The point offset parameter t of each location point is determined sequentially from the starting point position based on the number of location points at equal intervals, so that the corresponding fitting position can be determined based on the parameter value of the point offset parameter. For example, in this embodiment, an nth-degree polynomial function can be established to fit the lane line to be processed, to obtain the fitting position (x(t), y(t)) of the location points of the lane line to be processed represented by the following nth-degree polynomial function:

[0049]

[0050] In the above formula, x(t) and y(t) are the XY coordinate components of the fitted position, and the value range of the point offset parameter t is 0≤t≤1. The coefficients are polynomial coefficients, meaning there are 2(n+1) polynomial coefficients for any point on the lane line to be processed. The order (degree) n of the polynomial function can be set according to actual needs or application scenarios, and this embodiment does not impose any restrictions.

[0051] In this way, any point P of the lane line to be processed can be... i The fitted position is represented in the form of the XY coordinate components as follows:

[0052] Therefore, for any point on the lane line to be processed, given any point offset parameter t, 0≤t≤1, the coordinates (x(t0), y(t0)) of the corresponding fitted position can be calculated. For example, for any lane line to be processed, based on the range of the point offset parameter from 0 to 1, the point offset parameters t of 5 points can be determined at equal intervals as 0, 0.2, 0.4, 0.6, 0.8, and 1. These point offset parameters t can be substituted into the polynomial function mentioned above to calculate the representation of the fitted position (x(t0), y(t0)) of each point.

[0053] In some implementations, the positional offset of a point relative to an endpoint on the lane line to be processed can be quantitatively determined based on the relative length of the lane line length between the point and the endpoint and the total length of the lane line to be processed, so as to accurately reflect the position of the point on the lane line to be processed. Simultaneously, the positional offset of the point relative to the endpoint can be used as the positional offset of the fitted position of the point relative to the endpoint (i.e., the point offset parameter), so that the fitted position of the point is close to its original position, improving the accuracy of the fitting. Specifically, obtaining the point offset parameter of the point includes:

[0054] Determine the length of the lane line between the location point and the endpoint on the lane line to be processed;

[0055] The point offset parameters of the location point are determined based on the lane line length and the total length of the lane lines to be processed.

[0056] The lane length refers to the distance between two points along the lane line to be processed. The total length of the lane line to be processed refers to the length along the lane line from the start point to the end point, i.e., the overall length of the lane line to be processed.

[0057] For example, we can assume that the lane line to be processed can be composed of m shape points (i.e., position points) P i (x i ,y i The lane lines are formed by P1(X1,Y1). P1(X1,Y1) is the starting point of the lane lines. m (X m ,Y mIf ) is the endpoint of the lane line, then the total length L of the lane line to be processed can be... For any point P of the lane line to be processed i (x i ,y i The corresponding point offset parameter t i It can be calculated as follows:

[0058] First, for any point P on the lane line to be processed... i P can be calculated i The distance (i.e., lane length) from the starting point P1 along the direction of travel of the lane line. i :

[0059] Secondly, the length of the lane line can be l i Divide by the total length L of the processed lane lines to obtain the lane line length l. i The proportion of the total length L, i.e. The location point P is obtained. i The corresponding point offset parameter t i .

[0060] Therefore, the location point P i Point offset parameter t i The physical meaning of this location point P is i The distance from the starting point P1 along the direction of travel of the lane line to be processed is the proportion of the total length of the lane line to be processed. Similarly, the point offset parameters corresponding to each of the m positions along the lane line to be processed can be calculated. Since the point offset parameter of a position point is consistent with the proportion of that position point to the length of the lane line to be processed, it accurately reflects the position of that position point on the lane line to be processed.

[0061] 120. Based on the fitting position, determine the shape loss function between the fitted line representing the fitting position of the position point and the lane line to be processed.

[0062] The shape loss function is a function used to evaluate the difference in shape (i.e., shape loss) between the fitted line representing the fitted position and the lane line to be processed.

[0063] For example, the shape loss of the fitted line, characterized by the fitted position, and the lane line to be processed can be calculated by combining the positional differences between the positions of all or part of the position points on the lane line to be processed and the fitted positions of the position points.

[0064] In some implementations, the deviation in lane line shape can be accurately quantified by comparing the positional difference between the fitted position and the original position of the location points of the lane line to be processed, thereby reflecting the true shape loss and obtaining the shape loss function of the lane line to be processed. Specifically, based on the fitted position, the shape loss function between the fitted line represented by the fitted position point and the lane line to be processed is determined, including:

[0065] Determine the positional difference between the fitted position of the location point and its original position in the lane line to be processed;

[0066] Based on the positional differences, determine the shape loss function between the fitted line representing the fitted position of the location point and the lane line to be processed.

[0067] The positional difference between the fitted position and the original position of a location point can be calculated based on one or more of the following methods: Euclidean distance, Manhattan distance, relative position difference, and distance squared.

[0068] For example, for any point P of the lane line to be processed i It is possible to calculate the original position P of this location point on the lane line to be processed. i (X i ,Y i ) and its corresponding fitting position point p i Fitting position (p) ix ,p iy The square of the distance between the two points is taken as the positional difference f of that point. i ,in Similarly, the positional differences of each point on the lane line to be processed can be calculated. Then, the positional differences of all points on the lane line to be processed are summed to obtain the shape loss function of the lane line to be processed.

[0069] 130. Based on the positional offset between the fitted position of the position point and the original position of the position point in the lane line to be processed, determine the flexible constraint conditions corresponding to the position point. The flexible constraint conditions characterize the flexible constraint relationship between the fitted position of the position point and the original position of the position point based on the flexible constraint parameters.

[0070] Here, the original position refers to the location of a point on the lane line to be processed. It is understandable that for any point on the lane line to be processed, the position of that point after fitting (i.e., the fitted position) may shift relative to the original position. Position offset is used to measure the degree of deviation between the fitted position and the original position of the same point on the lane line to be processed.

[0071] In this context, flexible constraints refer to restrictions placed on the fitted position of a location point to satisfy specific constraints. In this embodiment, such specific constraints are flexible constraints. Flexible constraints refer to restricting the fitted position in a relaxed manner (such as adjustable constraints), allowing for a certain degree of deviation. For example, flexible constraints can be one or more restrictions related to parameter value ranges, relative relationships, or limiting conditions.

[0072] In this context, flexible constraint relationships refer to the flexible constraints imposed on the fitted position based on the original position of a location point. Flexible constraint parameters are parameters used to define and control flexible constraint relationships. For example, flexible constraint parameters can be slack variables such as the maximum allowable deviation or error range, to transform strict flexible constraint conditions into a more relaxed form of flexible constraint.

[0073] For example, flexible constraint parameters can be set for the location points of the lane line to be processed. The flexible constraint parameters for different location points can be the same or different, depending on the application scenario and actual needs. For instance, for each location point of the lane line to be processed, the maximum allowable deviation or error range of the original position of that location point relative to its fitted position can be determined based on the flexible constraint parameters, and this can be used as the flexible constraint for that location point. The flexible constraints corresponding to all location points can be used as the flexible constraint conditions for the lane line to be processed.

[0074] To ensure that the fitted line does not significantly alter the shape of the original lane line, the movement distance (i.e., position offset) of each point on the lane line can be controlled. For example, a given maximum position offset threshold can be used to constrain the position offset between the fitted position and the original position of a point on the lane line. Exemplarily, the constraint can include an offset distance constraint, which directly constrains the position offset between the fitted position and the original position of the point on the lane line. For example, any point P on the lane line... i The original position (X) i ,Y i ) and the corresponding fitting position point p on the fitting line i Fitting position (p) ix ,p iy For example, the offset distance constraint should be satisfied: Right now: in, and Is the location point P allowed? i The maximum distance the XY coordinate components can move (i.e., the maximum position offset threshold) can be a fixed parameter value given by the user, such as 1 meter. The maximum position offset threshold can be different or the same for different locations.

[0075] Among the constraints mentioned above, using fixed parameter values ​​to constrain the positional offset between the fitted position and the original position is a relatively "rigid" constraint. For example, if the fitted line is limited to a quadratic polynomial, and D is... i When a very small value (e.g., 0.1 meters) is set, for lane lines with complex shapes, this constraint will cause the fitted curve to not be a quadratic polynomial curve within a given range of movement, resulting in a large error in the fitted curve.

[0076] To address this, this application proposes flexible constraints based on flexible constraint parameters to increase the degrees of freedom for adjustment during fitting. Compared to rigid constraints, the flexible constraints in this application can more flexibly find the optimal solution during the optimization process, thereby reducing fitting errors and improving fitting accuracy. Simultaneously, flexible constraints enable the fitted lines to more accurately match the actual shape of the original lane lines, thus improving fitting precision.

[0077] For example, in some implementations, flexible constraint parameters include flexible constraint variables. Flexible constraint variables are variable parameters, such as slack variables, used to define and control flexible constraint relationships.

[0078] In some implementations, the offset range between the fitted position and the original position of a location point can be determined based on flexible constraint variables. This achieves flexible constraint on the position offset, reduces fitting error, improves fitting accuracy, and thus enhances the accuracy of the smoothing results. Specifically, based on the position offset between the fitted position and the original position of the location point within the lane line to be processed, the corresponding flexible constraint conditions for the location point are determined, including:

[0079] Determine the positional offset between the fitted position of the location point and its original position in the lane line to be processed;

[0080] Based on flexible constraint variables, the offset range of the position offset is determined. The flexible constraint conditions corresponding to the position point include the offset range of the position offset corresponding to the position point.

[0081] The offset range refers to the range of offsets determined by the flexible constraint parameters. The offset ranges for different locations can be the same or different.

[0082] For example, for any point on the lane line to be processed, the difference between the fitted position and the original position can be used as the position offset. The range of this position offset can be defined using flexible constraint variables. Since the flexible constraint variables are not fixed parameter values, but rather variable parameters that can be adjusted within a range, the position offset can be kept within the offset range of the flexible constraints, allowing for a flexible constraint fitting process.

[0083] In some implementations, the flexible constraint parameters include sub-flexible constraint parameters corresponding to the coordinate components. These sub-flexible constraint parameters constrain the flexible constraint relationship between the fitted position and the original position, achieving finer and more accurate constraints to improve fitting accuracy. For example, for any position point P of the lane line to be processed... i The corresponding position offset can include the position offset in the X coordinate component. and the position offset on the Y-coordinate component in, and To fit the coordinate components of the position, X i and Y i These are the coordinate components of the original position. Flexible constraint parameters (such as slack variables) can be used. and Define the range of position offsets corresponding to each coordinate component, where and These are the sub-flexible constraint parameters corresponding to the X-coordinate components and the Y-coordinate components, respectively.

[0084] In some implementations, flexible constraint parameters are used to determine the boundaries of the offset range of the position offset. For example, flexible constraint parameters can be used to determine the maximum and minimum values ​​of the position offset.

[0085] In some implementations, the offset range of the position offset can be determined based on a preset offset threshold and flexible constraint parameters, thus providing a clear flexible tolerance range for the position offset. Simultaneously, determining the offset range based on a preset offset threshold can avoid over-adjustment, making the optimization process more efficient and helping to reach the fitting target more quickly. Here, the offset threshold refers to the threshold of the maximum offset amount used to determine the position offset. For example, the offset threshold can be the maximum position offset threshold, and the offset thresholds corresponding to different position points can be the same or different. For example, position point P... i The corresponding position offset can be expressed as:

[0086] in, and Is the location point P allowed? i The maximum distance the X and Y coordinate components move (i.e., the maximum position offset threshold). By adding a flexible constraint parameter to limit the range of position offset, the original "rigid" constraint is transformed into a "flexible" constraint. The upper limit can be greater than The lower limit can be less than

[0087] In some implementations, the flexible constraint variable is adjusted within a range of values. The range of values ​​refers to the interval within which the flexible constraint variable can be adjusted.

[0088] In some implementations, the flexible constraint condition also includes a range of variable values ​​for the flexible constraint parameter. This range constrains the range of the flexible constraint parameter to indirectly constrain the positional offset between the fitted position of the location point and its original position within the lane line to be processed. For example, flexible parameter constraints... and All are non-negative numbers, and the range of variable values ​​for the flexible parameter constraints is: and The maximum values ​​of the sub-flexible constraint parameters in the X and Y coordinate components.

[0089] For example, in some implementations, the range of values ​​for the flexible constraint variables can be determined based on a preset offset threshold. This allows for simultaneous constraint of both the offset range of the position offset and the flexible constraint parameters based on the preset offset threshold, enabling more precise control of the position offset and avoiding over-adjustment or under-adjustment. Specifically, determining the flexible constraint conditions corresponding to the position point based on the position offset between the fitted position of the position point and its original position in the lane line to be processed further includes:

[0090] Obtain the offset threshold, which is used to determine the offset range in conjunction with the flexible constraint variables;

[0091] The range of values ​​for flexible constraint variables is determined based on the offset threshold.

[0092] For example, it can be based on the maximum position offset threshold. and Determine the maximum values ​​of the sub-flexible constraint variables in the X and Y coordinate components respectively. and This is to determine the range of values ​​for the flexible constraint variables. For example, five times the maximum position offset threshold can be taken as the sub-flexible constraint variable.

[0093] 140. Determine the parameter aggregation function corresponding to the lane line to be processed. The parameter aggregation function is a function obtained by aggregating the flexible constraint parameters corresponding to the location points of the lane line to be processed.

[0094] The parameter aggregation function for flexible constraint parameters refers to the function obtained by aggregating (e.g., merging or integrating) the flexible constraint parameters corresponding to the location points of the lane lines to be processed. This parameter aggregation function can represent a comprehensive index of the flexible constraint parameters corresponding to the location points of the lane lines to be processed, so as to measure the overall level of the flexible constraint parameters corresponding to the location points of the lane lines to be processed. For example, the aggregation methods of flexible constraint parameters may include, but are not limited to, summation, weighted summation, overall error measurement, or other methods.

[0095] For example, the flexible constraint parameters corresponding to all location points of the lane line to be processed can be summed, weighted summed, or aggregated in other ways to obtain a parameter aggregation function of the flexible constraint parameters represented by a function.

[0096] In some implementations, the overall level of the flexible constraint parameters corresponding to the lane line to be processed can be determined by summing the flexible constraint parameters corresponding to the location points of the lane line to be processed using a parameter aggregation function. Specifically, determining the parameter aggregation function corresponding to the lane line to be processed includes:

[0097] The flexible constraint parameters corresponding to the location points of the lane lines to be processed are summed to obtain the parameter aggregation function corresponding to the lane lines to be processed.

[0098] For example, the flexible constraint parameters corresponding to each location point of the lane line to be processed can be summed to obtain a parameter aggregation function representing the flexible constraint parameters corresponding to the lane line to be processed. If the lane line to be processed has m location points, the sub-flexible constraint parameters corresponding to the X and Y coordinate components of these m location points can be summed. and Adding them together, we get function V3, which is a parametric aggregation function:

[0099] 150. Based on the flexible constraint conditions, the shape loss function and parameter aggregation function are combined to solve the problem and obtain the parameter values ​​of the fitted parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0100] The solution process can be viewed as an optimization process, such as minimizing the shape loss function and the parameter aggregation function of the flexibility constraint parameters. Through this optimization process, the fitted line representing the fitted position can be continuously adjusted to make it closer to the original lane line to be processed, that is, the smoothed lane line represented by the parameter values ​​of the fitted parameters is closer to the original lane line to be processed.

[0101] It is understandable that, since the fitted position is represented by the fitted parameters, restricting the fitted position of the location points is equivalent to restricting the fitted parameters, and solving for the fitted position is equivalent to solving for the parameter values ​​of the fitted parameters. Therefore, in the process of solving the shape loss function, flexible constraints can be used to restrict the fitted position of the location points, so that the smoothed lane line represented by the obtained fitted position is close to the original lane line at its endpoints. In this embodiment, the flexible constraint condition based on flexible constraints can impose more relaxed restrictions on the fitted position, thereby improving the flexibility and robustness of the fitting. Furthermore, the parameter aggregation function of the flexible constraint parameters is added to the process of solving for the parameter values ​​of the fitted parameters, incorporating the loss corresponding to the flexible constraint parameters. This helps to more accurately adjust the fitted parameters during the solution process, allowing the fitted line to better fit the original lane line, reducing errors and shape deviations, and improving the accuracy of smoothing the lane line.

[0102] In this embodiment, by adding flexible constraint parameters to limit the range of positional offset, the original rigid constraint is transformed into a flexible constraint. However, it is still desirable for this flexible constraint to be as "hard" as possible, that is, to be as close as possible to the original rigid requirements, minimizing actual deviations, so that the constraint, while flexible, is as strict and precise as possible, maintaining a high level of constraint "strength." To this end, this embodiment also uses the parameter aggregation function of the flexible constraint parameters as the optimization objective, making it as close as possible to the original rigid requirements. This ensures that the constraint, after introducing flexibility, still maintains the strictest and most precise standards possible, thereby minimizing actual deviations during the optimization process.

[0103] For example, in some implementations, the parameter aggregation function of the flexible constraint parameters can be used to penalize the flexible constraint parameters during the solution process. For instance, the parameter aggregation function of the flexible constraint parameters can serve as an LI regularization term based on the flexible constraint parameters, enabling feature selection, where some parameters may be compressed to zero. This makes the flexible constraint parameters as close to zero as possible, achieving the goal of making the constraints as "hard" as possible.

[0104] In some implementations, the parameter aggregation functions of the shape loss function and the flexible constraint function can be combined as the objective function, using this aggregation function as the optimization objective in the optimization process. This ensures that while considering shape loss, the constraints, even after introducing flexibility, maintain the most stringent and accurate standards possible, thereby minimizing actual deviations during optimization. Furthermore, by combining the parameter aggregation functions of the shape loss function and the flexible constraint function, the multi-objective optimization problem is transformed into a single-objective optimization problem, simplifying the optimization process. Specifically, based on the flexible constraint conditions, the shape loss function and the parameter aggregation function are combined to solve for the fitted parameters, resulting in a smoothed lane line represented by these parameter values, including:

[0105] By combining the shape loss function and the parameter aggregation function, the objective function is obtained;

[0106] Based on the flexible constraint, the objective function is minimized to obtain the parameter values ​​of the fitted parameters, which in turn represent the smoothed lane lines.

[0107] Here, the objective function refers to the mathematical expression that needs to be minimized or maximized in the optimization. The objective function is a functional representation of the optimization objective. In the embodiments of this application, the optimal solution of the parameter values ​​of the fitting parameters is obtained by minimizing the objective function.

[0108] For example, the shape loss function V1 and the parameter aggregation function V3 of the flexible constraint parameters can be weighted and summed to obtain the objective function V, such as V = k1V1 + k3V3, where k1 and k3 are the weight coefficients corresponding to the optimization objectives (i.e., the shape loss function and the parameter aggregation function). The larger the coefficient, the more important the corresponding objective. These weight coefficients are hyperparameters and can be manually specified according to different scenarios; for example, k1 = 100 and k3 = 100 can be set. The parameter aggregation function V3 of the flexible constraint parameters can be regarded as the L1 loss corresponding to the flexible constraint parameters.

[0109] Therefore, an optimization algorithm can be used to perform optimization calculations by taking the objective function and flexible constraints as input. The optimization algorithm will attempt to find the values ​​of the fitting parameters that minimize the objective function while simultaneously satisfying the flexible constraints. After iterative calculations, the parameter values ​​of the fitting parameters are finally obtained, and all the parameter values ​​of the fitting parameters are used for the smoothed lane lines. The optimization algorithm can be selected according to actual needs or application scenarios, such as Ipopt (a nonlinear programming optimization solver based on the interior point method) or OSQP (a convex quadratic programming optimization solver based on the operator splitting method), etc.

[0110] When representing the fitted position of a location point using a polynomial function, the choice of the polynomial function's order (i.e., degree) is extremely important. A low order results in a weak expressive power of the curve; a high order may lead to overfitting, meaning the curve is not smooth enough and has excessive bends. In this embodiment, since a polynomial function is used to represent the fitted position of each location point on the lane line to be processed, the preset order n of the polynomial function can be relatively large (e.g., n=9). However, to ensure that the actual effective order is as small as possible, it is desirable that the coefficients of higher-order terms (terms greater than first-order) are as close to 0 as possible. The purpose of lane line smoothing is to minimize the curvature of each fitted location point on the fitted line; if the fitted line is a straight line, the curvature is minimized.

[0111] For example, in some implementations, the curvature representing the fitting position can be minimized by penalizing only the coefficients of higher-order terms (e.g., terms greater than first-order terms) in the fitting parameters, making the fitted line as close to a straight line as possible, thus resulting in a smoother lane line after smoothing. Specifically, before obtaining the smoothed lane line represented by the parameter values ​​by solving based on flexible constraints, combining the shape loss function and the parameter aggregation function, the process further includes:

[0112] Based on the coefficients of higher-order terms in the polynomial coefficients, the smoothing loss function is determined, and the smoothing loss function is used to solve for the parameter values ​​of the fitted parameters.

[0113] The smoothing loss function is a function used to evaluate the smoothness (such as the curvature of interpolation points) of the fitted line representing the fitted position. The smoothing loss function can be used to limit the coefficients of higher-order terms in a polynomial.

[0114] For example, embodiments of this application aim to minimize the coefficients of higher-order terms (i.e., coefficients of higher-order terms) in the fitted parameters, where the coefficients are greater than those of first-order terms. Therefore, the following smoothing loss function V2 based on these higher-order term coefficients is introduced:

[0115]

[0116] In the above formula, the coefficients of the terms greater than one in the X-coordinate and Y-coordinate components of the polynomial function corresponding to each location point are... and The sum of squares is used as the smoothing loss for the fitted line, so that... and All parameters should be minimized. The smoothing loss function V2 can be considered as the L2 loss corresponding to the fitted parameters. It borrows the idea from ridge regression in machine learning, but differs from it. By introducing the smoothing loss function, the coefficients of higher-order terms corresponding to the fitted positions of all points in the lane to be processed are restricted. By penalizing only the coefficients of higher-order terms, the curve can be made as close to a straight line as possible, i.e., the curvature of the curve can be minimized.

[0117] In some implementations, a smoothing loss function can be incorporated into the objective function to penalize the coefficients of higher-order terms (e.g., terms greater than first-order terms) in the fitted parameters, minimizing the curvature of the fitted parameters representing the fitted position and making the fitted line as close to a straight line as possible, resulting in a smoother lane line after smoothing. Specifically, the objective function is obtained by combining the shape loss function and the parameter aggregation function, including: combining the shape loss function, the parameter aggregation function of the flexible constraint parameters, and the smoothing loss function to obtain the objective function.

[0118] For example, the shape loss function V1, the smoothing loss function V2, and the parameter aggregation function V3 of the flexibility constraint parameters can be weighted and summed to obtain the objective function V, such as V = k1V1 + k2V2 + k3V3, where k1, k2, and k3 are the weight coefficients corresponding to the optimization objectives (i.e., the shape loss function, the smoothing loss function, and the parameter aggregation function). These weight coefficients are hyperparameters and can be specified according to different scenarios; for example, k1 = 100, k2 = 1, and k3 = 100 can be set.

[0119] In some implementations, the order of the polynomial function can be determined based on the shape of the lane line to be processed. Selecting a polynomial function of an appropriate order can more accurately fit the actual shape of the lane line and reduce errors.

[0120] For example, for the objective function V = k1V1 + k2V2 + k3V3, if the lane line to be processed is very close to a straight line, then the points at each location do not need to move a large distance to fit the straight line represented by a first-order polynomial. Therefore, it will not trigger an increase in the flexibility constraint parameters, and the flexibility constraint parameters are all 0. Although higher-order polynomials may also fit the positions of each point in addition to the first-order polynomial, the first-order polynomial represents the optimal fitted line because the coefficients of the higher-order terms are restricted.

[0121] That is, in some implementations, when the lane line to be processed is similar to a straight line, the polynomial function is a first-order polynomial, that is, the order of the polynomial function is 1. In this case, the polynomial coefficients (i.e., the corresponding fitting parameters) of the higher-order terms of the polynomial function are 0.

[0122] For example, if the lane line to be processed is very close to a parabola, then the points at each location do not need to move a large distance to fit the parabola represented by the quadratic polynomial. Therefore, it will not trigger an increase in the flexibility constraint parameters, which will all be 0. Although higher-order polynomials besides quadratic polynomials may also fit the positions of each point, first-order polynomials cannot fit these points well. Because the degree of higher-order terms is limited, the parabola represented by the quadratic polynomial is the optimal fitting line.

[0123] That is, in some implementations, when the lane line to be processed is similar to a parabola, the polynomial function is a quadratic polynomial, that is, the order of the polynomial function is 2.

[0124] For example, if the lane line deviates significantly from a parabola, each location point needs to be moved a certain distance to fit a polynomial-represented line. In practical applications, the goal is to find the optimal polynomial curve by minimizing the number of location points moved. For instance, a curve represented by a polynomial of the lowest possible order is preferred. However, the distance moved by some location points within the polynomial-represented curve may exceed the maximum allowable distance. This triggers an increase in the flexibility constraint parameters, meaning some flexibility constraint parameters become greater than 0. Since the L1 loss (the aggregation function of the flexibility constraint parameters) corresponding to the flexibility constraint parameters has a relatively large weight, the order of the polynomial can be increased (increasing the complexity of the curve) to minimize the L1 loss.

[0125] That is, in some implementations, when the lane line to be processed is similar to both straight lines and parabolas, the order of the polynomial function is greater than 2. In this case, a low-order polynomial (such as a third-order polynomial) can be selected to fit the lane line to be processed to determine the fitted position of the location point. If the positional offset between the fitted position and the original position of the location point does not exceed a preset offset value, then the low-order polynomial is used as the polynomial function corresponding to the location point. If the positional offset between the fitted position and the original position of the location point exceeds the preset offset value, then the order of the low-order polynomial is increased, and the polynomial with the increased order is used as the low-order polynomial. The execution steps are returned to select a low-order polynomial (such as a third-order polynomial) to fit the lane line to be processed, and subsequent steps are repeated until the positional offset between the fitted position and the original position of the location point does not exceed the preset offset value. Finally, the polynomial with the increased order is used as the polynomial function corresponding to the location point.

[0126] Therefore, the method proposed in this application has a certain degree of "intelligence". It will try to find a low-order polynomial function for fitting. If the low-order polynomial moves too far for individual points, it cannot meet the requirements. The order of the polynomial can be increased because the higher the order, the stronger the ability to fit the points and the smaller the distance the points move.

[0127] In some implementations, start-point and end-point constraints can be added during the solution process to ensure that the position of the endpoint of the smoothed lane line corresponding to the original lane line is consistent with the original lane line, thereby ensuring that the overall shape of the smoothed lane line is consistent with the original lane line and avoiding shape deformation of the smoothed lane line. Specifically, before obtaining the smoothed lane line represented by the parameter values ​​by solving based on flexible constraint conditions, combined with shape loss function and parameter aggregation function, the process further includes:

[0128] Obtain the original position of the endpoints of the lane lines to be processed, and the fitted position of the endpoints;

[0129] Based on the original position and the fitted position of the endpoint, the endpoint constraints are determined. The endpoint constraints constrain the fitted position of the endpoint through the original position of the endpoint. The endpoint constraints are used to constrain the solution process of the shape loss function and the parameter aggregation function.

[0130] For example, the endpoints of the lane line to be processed include the start and end points, and the endpoint constraints include start and end point constraints. The point offset parameter t=0 corresponding to the start point can be substituted into the polynomial function to obtain the fitted position of the start point represented by the fitted parameters. The original coordinates of the starting point P1 are (X1, Y1). At this point, we want the starting point of the fitted line to also be the starting point of the original lane line to be processed. That is, we can use starting point constraints to ensure the starting point's position is consistent before and after fitting, such as the starting point constraint as follows: This starting point constraint is implemented by ensuring that the coordinate components of the fitted position and the original position are equal, thus constraining the starting point of the fitted line.

[0131] For example, the point offset parameter t = 1.0 corresponding to the endpoint can be substituted into the polynomial function to obtain... as well as That is, the fitting position of the endpoint represented by the fitting parameters is End point R m The original position is (X m ,Y m At this point, we want the endpoint of the fitted line to also be the endpoint of the original lane line to be processed. That is, we can use endpoint constraints to ensure the endpoint positions before and after fitting are consistent. For example, the endpoint constraint could be: This endpoint constraint is implemented by ensuring that the corresponding coordinate components of the fitted position and the original position of the endpoint are equal, thereby constraining the endpoint of the fitted line.

[0132] In some implementations, the shape loss at the start and end points is zero due to start and end point constraints. This allows for the exclusion of differences between the start and end points in the shape loss function, simplifying the shape loss calculation process and improving processing efficiency. Specifically, determining the shape loss function between the fitted line representing the fitted position of the position point and the lane line to be processed, based on the positional differences, includes: determining the shape loss function of the lane line to be processed based on the positional differences of the target position point, where the target position point is any position point in the lane line to be processed, excluding the endpoints.

[0133] For example, the shape loss function of the lane line to be processed can be determined by considering only the positional differences of points other than the endpoints of the lane line. Thus, the shape loss function V1 of the lane line to be processed can be the sum of the squared distances between the fitted positions and the original positions of the points other than the endpoints of the lane line, such as:

[0134] Right now

[0135] In the above formula, among the m position points of the lane line to be processed, only the position differences of the position points after the start point and before the end point of the lane line to be processed, i.e., the position differences of all position points from i=2 to i=m-1, are calculated. Then, the calculated position differences (i.e., the squared distances) of all position points from i=2 to i=m-1 are summed as the shape loss function of the lane line to be processed.

[0136] In some implementations, due to the limitations of start-point and end-point constraints, there are no corresponding flexible constraint parameters at the start and end points. Therefore, the flexible constraint parameters of points other than the endpoints of the lane line to be processed can be added together to obtain a parameter aggregation function representing the flexible constraint parameters of the lane line to be processed. Specifically, the process of adding the flexible constraint parameters of the points corresponding to the lane lines to be processed to obtain the parameter aggregation function includes: adding the flexible constraint parameters of the target points of the lane lines to be processed, where the target points are the points other than the endpoints of the lane lines to be processed.

[0137] For example, if the lane line to be processed has m location points, the sub-flexible constraint parameters are derived from the X and Y coordinate components of the location points other than the endpoints. and Adding them together, we get function V3, which is a parametric aggregation function:

[0138] The smoothed lane line can be a fitted line represented by the fitted position (the position of the smoothed position point) indicated by the parameter values ​​of the finally solved fitting parameters, or a line determined by other methods. In the embodiments of this application, the smoothed position points can be set flexibly, dynamically, and efficiently by setting or adjusting any number of smoothed position points, so as to dynamically adjust the smoothing effect of the smoothed lane line. For example, in some implementations, after obtaining the smoothed lane line represented by the parameter values ​​by solving based on flexible constraints, combined with shape loss function and parameter aggregation function, the method further includes:

[0139] Get the number of smoothed position points of the lane lines after smoothing;

[0140] Based on the number of location points, determine the parameter value of the point offset parameter corresponding to the smoothed location point;

[0141] The position of the smoothed point is determined based on the parameter values ​​of the point offset parameter and the parameter values ​​of the fitting parameter.

[0142] Based on the position of the smoothed location point, generate the smoothed lane line.

[0143] Here, a smoothed position point refers to a point (i.e., a position point) on the lane line after smoothing. For example, a smoothed lane line can be obtained (generated) by connecting smoothed position points. In this embodiment, a smoothed position point can be a point corresponding to the position point of the lane line to be processed (i.e., a fitted position point). A smoothed position point can also be a point unrelated to the position point of the lane line to be processed. Thus, after obtaining the parameter values ​​of the fitted parameters, the smoothed position points can be customized according to the application scenario or actual needs. By setting or adjusting any number of smoothed position points, the smoothed position points can be flexibly, dynamically, and efficiently set for the smoothed lane line to dynamically adjust the smoothing effect of the smoothed lane line.

[0144] For example, after solving for the fitted parameters After determining the parameter values, any number of smoothed position points can be dynamically interpolated according to the required lane line smoothness, thereby achieving the goal of smoothing the lane lines. For example, if we want to generate 101 shape points (i.e., smoothed position points) equidistantly based on the fitted lines, the equidistant step size of the smoothed position points is 0.01. Therefore, the position offset parameters of the 101 smoothed position points are t = 0, 0.01, 0.02, ..., 0.99, 1.0. For each t above, the corresponding 101 new points (i.e., smoothed position points) can be calculated according to the following formula: Connecting these 101 new points sequentially creates the smoothed lane lines.

[0145] The lane line smoothing processing scheme provided in this application embodiment can be applied to various lane line processing scenarios. For example, taking lane line processing in a map as an example, the fitting position of the location point of the lane line to be processed can be determined, and the fitting position is characterized by multiple fitting parameters; based on the fitting position, the shape loss function between the fitting line represented by the fitting position of the location point and the lane line to be processed can be determined; based on the positional offset between the fitting position of the location point and the original position of the location point in the lane line to be processed, the flexible constraint condition corresponding to the location point can be determined, and the flexible constraint condition is based on the flexible constraint parameter representing the flexible constraint relationship between the fitting position of the location point and the original position of the location point; the parameter aggregation function corresponding to the lane line to be processed can be determined, and the parameter aggregation function is a function obtained by aggregating the flexible constraint parameters corresponding to the location point of the lane line to be processed; based on the flexible constraint condition, the shape loss function and the parameter aggregation function are solved to obtain the parameter values ​​of the fitting parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0146] As can be seen from the above, the embodiments of this application differ from existing smoothing methods. They characterize the fitted positions of the lane lines to be processed using multiple fitting parameters, enabling the fitted lines to approximate not only simple lane lines but also complex, curved lane lines. Furthermore, for each position point of the lane line to be processed, the embodiments of this application can determine flexible constraint conditions based on flexible constraint parameters, such as the maximum allowable deviation or error range of the original position relative to its fitted position. By controlling the movement distance (i.e., position offset) of each position point on the lane line through flexible constraint conditions, more relaxed restrictions are imposed on the fitted positions, improving the flexibility and robustness of the fitting process. This allows for smoothing both simple and complex curved lane lines, improving the accuracy of lane line smoothing. In addition, the embodiments of this application incorporate the parameter aggregation function of the flexible constraint parameters into the process of solving for the parameter values ​​of the fitted parameters. This helps to more accurately adjust the fitted parameters during the solution process, enabling the fitted lines to better fit the original lane lines, reducing errors and shape deviations, and improving the accuracy of lane line smoothing.

[0147] The method described in the above embodiments will be further described in detail below.

[0148] In this embodiment, the method of this application embodiment will be described in detail using virtual map data as an example.

[0149] In this embodiment, the optimization model (i.e., the objective function V) can be minimized and solved as follows:

[0150]

[0151] In the above formula, min represents minimizing the solution. By minimizing the objective function V, the fitting parameters can be obtained. The parameter values, and the obtained flexible constraint parameters The parameter values ​​are given. This optimization model is a convex quadratic programming model, which has high solution efficiency and can be solved using open-source optimization solvers such as Ipopt or OSQP.

[0152] The minimization process is subject to the following constraints, including endpoint constraints and flexible constraints: Endpoint constraints include starting point constraints: And including endpoint constraints: Flexible constraints include offset distance constraints:

[0153] And including flexible parameter constraints (such as slack variable constraints):

[0154] Specifically, such as Figure 2a As shown, the specific process of a lane line smoothing method is as follows:

[0155] 210. Obtain the point offset parameter of the location point. The point offset parameter is used to represent the position offset between the location point and the endpoint of the lane line to be processed.

[0156] For example, such as Figure 2b The lane line to be processed is shown, which consists of four shape points (i.e., position points) (A(x)). A ,y A B(x) B ,y B ), C(x) C ,y C ), D(x D ,y D The figure shows the point offset parameter t for each shape point, as marked in the figure. The point offset parameters t for A, B, C, and D are 1, 0.66, 0.33, and 0, respectively.

[0157] 220. Based on the point offset parameter, determine the polynomial function corresponding to the position point. The polynomial function characterizes the fitted position of the position point through the polynomial coefficients and the point offset parameter.

[0158] For example, assuming the order of the polynomial is 3, the optimization variable (i.e., the polynomial coefficients) is:

[0159] 230. Based on the fitting position, determine the shape loss function between the fitted line representing the fitting position of the position point and the lane line to be processed.

[0160] For example, the shape loss function is:

[0161] 240. Determine the smoothing loss function based on the coefficients of the higher-order terms in the polynomial coefficients.

[0162] For example, the L2 loss (i.e., the smoothing loss function) corresponding to the polynomial coefficients is:

[0163] 250. Determine the flexible constraint conditions corresponding to the location point based on the positional offset between the fitted position of the location point and the original position of the location point in the lane line to be processed.

[0164] 260. Determine the parameter aggregation function corresponding to the lane line to be processed. The parameter aggregation function is a function obtained by aggregating the flexible constraint parameters corresponding to the location points of the lane line to be processed.

[0165] Flexible constraints characterize the flexible constraint relationship between the fitted position and the original position of a location point based on flexible constraint parameters. For example, the L1 loss (i.e., the parameter aggregation function of the flexible constraint parameters) corresponding to the flexible constraint parameters is: Flexible constraints include offset distance constraints and flexible parameter constraints:

[0166] The distance constraint equation (i.e., offset distance constraint) is as follows:

[0167] The slack variable constraint equation (i.e., flexible parameter constraint) is as follows:

[0168] 270. Determine the endpoint constraints based on the original position and the fitted position of the endpoints.

[0169] Endpoint constraints constrain the fitted position of the endpoints based on their original positions. For example, endpoint constraints include start and end point constraints. The start constraint is: The endpoint constraint is:

[0170] 280. By combining the shape loss function, the parameter aggregation function of the flexible constraint parameters, and the smoothing loss function, the objective function is obtained.

[0171] 290. Based on the flexible constraint and the endpoint constraint, minimize the objective function to obtain the parameter values ​​of the fitted parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0172] For example, the optimization model (i.e., the objective function V) is:

[0173]

[0174] The fitting parameters can be obtained by minimizing the objective function V. The parameter values, and the flexible constraint parameters obtained by solving. The parameter value.

[0175] The minimization process is subject to the following constraints, including endpoint constraints and flexible constraints:

[0176] It should be noted that polynomial functions have the following advantages when representing curves: 1. Flexibility: Polynomial functions can fit various complex curve shapes. By changing the order of the polynomial, the complexity of the model can be controlled to adapt to different data distributions, i.e., strong expressive power. 2. Ease of computation: The computation of polynomial functions is generally simpler and faster than other complex functions (such as neural networks). This makes them very useful when computational resources are limited.

[0177] However, polynomial functions also have some drawbacks: 1. Order selection: Choosing the order of a polynomial function is an important issue. Too low an order may not fit the data well (weak expressive power); too high an order may lead to overfitting, i.e., the curve is not smooth enough and has too many bends. 2. Regularization: To prevent overfitting, regularization terms, such as L1 regularization (Lasso) or L2 regularization (Ridge), can be introduced during the optimization process.

[0178] Therefore, to address the aforementioned shortcomings, this application embodiment approximates the entire lane line to be processed using a single-segment polynomial function, which provides a stronger expressive capability for the fitted line compared to a multi-segment polynomial function. However, this application embodiment further enhances the single-segment polynomial function by adding regularization terms (i.e., L1 loss corresponding to the flexible constraint parameters and L2 loss corresponding to the polynomial coefficients) to minimize complexity while maximizing the expressive capability of the fitted line.

[0179] In this embodiment, by incorporating the L1 loss corresponding to the flexible constraint parameters, the parameter aggregation function of the flexible constraint parameters is also used as the optimization objective to make it as close as possible to the original rigidity requirement, even if the position of the location point shifts. The upper limit should be no greater than The lower limit should be no less than The threshold value for offsetting i is set to ensure that the constraints, after the introduction of flexibility, still maintain the most stringent and accurate standards possible, thereby minimizing actual deviations during the optimization process.

[0180] 300. Based on the parameter values ​​of the fitted parameters, generate smoothed lane lines.

[0181] For example, such as Figure 2c The process for generating smoothed lane lines is shown. Step 300 may include steps A1 to A4, as detailed below:

[0182] A1. Obtain the number of smoothed position points of the lane line after smoothing.

[0183] A2. Determine the parameter value of the point offset parameter corresponding to the smoothed position point based on the number of position points;

[0184] A3. Based on the parameter values ​​of the point offset parameter and the parameter values ​​of the fitting parameter, determine the position of the smoothed location point;

[0185] A4. Based on the position of the smoothed location point, generate the smoothed lane line.

[0186] For example, in the solution obtained Next, if five new location points are to be generated at equal intervals (i.e., smoothed location points on the processed lane line), the point offset parameters of these five location points are set to 0, 0.25, 0.5, 0.75, and 1, respectively. The coordinates of each location point can then be represented as: p1(X... A ,Y A ), p5(X D ,Y D Among them, due to endpoint constraints, the position of the starting point (X) among the smoothed position points. A ,Y A ) represents the original position of the starting point A, and the position of the ending point (X) D ,Y D Let be the original position of the original endpoint D. Substituting the parameter values ​​of the obtained fitting parameters into the corresponding coordinate representation, we can obtain the coordinate positions of position points p1, p2, p3, p4, and p5. Connecting the coordinate positions of position points p1, p2, p3, p4, and p5 forms the smoothed lane line.

[0187] As can be seen from the above, the embodiments of this application approximate the lane line to be processed using a single-segment polynomial function. Compared with multi-segment polynomial functions, a multi-objective optimization model is established to describe the shape loss of the lane line before and after polynomial fitting. By solving this multi-objective optimization model, the optimal polynomial coefficients can be obtained.

[0188] This application embodiment enhances the expressive power of the fitted lines through a single-segment polynomial function. Simultaneously, to limit the complexity of the polynomial function, two types of regularization loss functions are introduced (i.e., L1 loss corresponding to the flexible constraint parameters and L2 loss corresponding to the fitting parameters) to limit complexity (e.g., limiting the order). Thus, based on this multi-objective optimization model, this application embodiment comprehensively considers the limitations of the fitted line's expressive power and complexity, and the optimization algorithm automatically selects a polynomial function with the strongest expressive power and the lowest possible complexity. The solved coefficients can then be used to reconstruct the smooth lane line shape, achieving the goal of smoothing lane lines and improving the rendering effect of roads and lane lines in the virtual map.

[0189] To better implement the above methods, this application also provides a lane line smoothing device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer; the server can be a single server or a server cluster composed of multiple servers.

[0190] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the lane line smoothing device specifically integrated into the server as an example.

[0191] For example, such as Figure 3 As shown, the lane line smoothing device may include a position determination unit 310, a shape loss determination unit 320, a constraint determination unit 330, a parameter aggregation unit 340, and a solution unit 350, as follows:

[0192] (I) Location Determination Unit 310

[0193] The fitting position is used to determine the location of the lane line to be processed. The fitting position is characterized by multiple fitting parameters.

[0194] In some implementations, the fitting parameters include polynomial coefficients, and the position determination unit is specifically used to: obtain the point offset parameters of the position point, which represent the position offset between the position point and the endpoint of the lane line to be processed; and determine the polynomial function corresponding to the position point based on the point offset parameters, wherein the polynomial function characterizes the fitted position of the position point through the polynomial coefficients and the point offset parameters.

[0195] In some implementations, obtaining the point offset parameter of the location point includes: determining the lane line length between the location point and the endpoint on the lane line to be processed; and determining the point offset parameter of the location point based on the lane line length and the total length of the lane line to be processed.

[0196] (II) Shape Loss Determination Unit 320

[0197] The shape loss function used to determine the shape loss between the fitted line and the lane line to be processed, based on the fitted position, is used to determine the fitted position of the location point.

[0198] In some implementations, the shape loss determination unit is specifically used to: determine the positional difference between the fitted position of the location point and the original position of the location point in the lane line to be processed; and, based on the positional difference, determine the shape loss function between the fitted line representing the fitted position of the location point and the lane line to be processed.

[0199] (III) Constraint Determination Unit 330

[0200] This is used to determine the flexible constraint conditions corresponding to a location point based on the positional offset between the fitted position and the original position of the location point in the lane line to be processed. The flexible constraint conditions characterize the flexible constraint relationship between the fitted position and the original position of the location point based on the flexible constraint parameters.

[0201] In some implementations, the flexible constraint parameters include flexible constraint variables, and the constraint determination unit is specifically used to: determine the positional offset between the fitted position of the position point and the original position of the position point in the lane line to be processed; and determine the offset range of the positional offset based on the flexible constraint variables, wherein the flexible constraint conditions corresponding to the position point include the offset range of the positional offset corresponding to the position point.

[0202] In some implementations, the flexible constraint variable is adjusted within a range of variable values. The constraint determination unit is further used to: obtain an offset threshold, which is used to determine the offset range with the flexible constraint variable; and determine the range of variable values ​​of the flexible constraint variable based on the offset threshold.

[0203] In some implementations, the constraint determination unit is further used to: obtain the original position of the endpoint of the lane line to be processed and the fitted position of the endpoint; determine the endpoint constraint conditions based on the original position and the fitted position of the endpoint, wherein the endpoint constraint conditions constrain the fitted position of the endpoint through the original position of the endpoint, and the endpoint constraint conditions are used to constrain the solution process of the shape loss function and the parameter aggregation function.

[0204] (iv) Parameter aggregation unit 340

[0205] The parameter aggregation function is used to determine the parameter aggregation function corresponding to the lane line to be processed. The parameter aggregation function is a function obtained by aggregating the flexible constraint parameters corresponding to the location points of the lane line to be processed.

[0206] In some implementations, the parameter aggregation unit is specifically used to: sum the flexible constraint parameters corresponding to the location points of the lane line to be processed, and obtain the parameter aggregation function corresponding to the lane line to be processed.

[0207] (V) Solving Unit 350

[0208] This method uses flexible constraints, combined with shape loss function and parameter aggregation function, to solve for the parameter values ​​of the fitted parameters, thereby obtaining the smoothed lane lines represented by the parameter values.

[0209] In some embodiments, the lane line smoothing device further includes a smoothing loss determination unit, which is used to: determine a smoothing loss function based on the coefficients of higher-order terms in the polynomial coefficients, and the smoothing loss function is used to solve for the parameter values ​​of the fitted parameters.

[0210] In some embodiments, the lane line smoothing device further includes a lane line generation unit, which is used to: obtain the number of smoothed position points of the lane line; determine the parameter value of the point offset parameter corresponding to the smoothed position point based on the number of position points; determine the position of the smoothed position point based on the parameter value of the point offset parameter and the parameter value of the fitting parameter; and generate the smoothed lane line based on the position of the smoothed position point.

[0211] In some implementations, the solving unit is specifically used to: combine the shape loss function and the parameter aggregation function to obtain the objective function; based on the flexible constraint conditions, minimize the objective function to obtain the parameter values ​​of the fitted parameters, so as to obtain the smoothed lane line represented by the parameter values.

[0212] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0213] As described above, the lane line smoothing device of this embodiment includes a position determination unit, a shape loss determination unit, a constraint determination unit, a parameter aggregation unit, and a solution unit. Specifically, the position determination unit determines the fitted position of the position point of the lane line to be processed, and the fitted position is characterized by multiple fitting parameters; the shape loss determination unit determines the shape loss function between the fitted line represented by the fitted position of the position point and the lane line to be processed, based on the fitted position; the constraint determination unit determines the flexible constraint condition corresponding to the position point based on the positional offset between the fitted position and the original position of the position point in the lane line to be processed, and the flexible constraint condition characterizes the flexible constraint relationship between the fitted position and the original position of the position point based on flexible constraint parameters; the parameter aggregation unit determines the parameter aggregation function corresponding to the lane line to be processed, which is a function obtained by aggregating the flexible constraint parameters corresponding to the position point of the lane line to be processed; and the solution unit solves the problem based on the flexible constraint condition, combined with the shape loss function and the parameter aggregation function, to obtain the parameter values ​​of the fitted parameters, thereby obtaining the smoothed lane line represented by the parameter values.

[0214] Therefore, this application embodiment differs from existing smoothing methods by using multiple fitting parameters to characterize the fitted positions of the lane lines to be processed. This allows the fitted lines, characterized by the fitted positions, to approximate not only simple lane lines but also complex, curved lane lines. Furthermore, this application embodiment, for each position point of the lane line to be processed, can determine flexible constraint conditions based on flexible constraint parameters, such as the maximum allowable deviation or error range of the original position relative to its fitted position. By controlling the movement distance (i.e., position offset) of each position point on the lane line through flexible constraint conditions, more relaxed restrictions are imposed on the fitted positions, improving the flexibility and robustness of the fitting process. This makes it applicable to the smoothing of both simple and complex curved lane lines, improving the accuracy of lane line smoothing. In addition, this application embodiment incorporates the parameter aggregation function of the flexible constraint parameters into the process of solving for the parameter values ​​of the fitted parameters. This helps to more accurately adjust the fitted parameters during the solution process, allowing the fitted lines to better fit the original lane lines, reducing errors and shape deviations, and improving the accuracy of lane line smoothing.

[0215] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.

[0216] In some embodiments, the lane line smoothing device can also be integrated into multiple electronic devices, such as multiple servers, with multiple servers implementing the lane line smoothing method of this application.

[0217] In this embodiment, a server will be used as an example for detailed description. For example, ... Figure 4 As shown, it illustrates a schematic diagram of the server structure involved in an embodiment of this application. Specifically:

[0218] The server may include components such as a processor 410 with one or more processing cores, a memory 420 with one or more computer-readable storage media, a power supply 430, an input module 440, and a communication module 450. Those skilled in the art will understand that... Figure 4 The server architecture shown does not constitute a limitation on the server and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein:

[0219] Processor 410 is the control center of the server, connecting various parts of the server via various interfaces and lines. It performs various server functions and processes data by running or executing software programs and / or modules stored in memory 420, and by calling data stored in memory 420. In some embodiments, processor 410 may include one or more processing cores; in some embodiments, processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 410.

[0220] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 420 may also include a memory controller to provide the processor 410 with access to the memory 420.

[0221] The server also includes a power supply 430 that supplies power to the various components. In some embodiments, the power supply 430 can be logically connected to the processor 410 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 430 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0222] The server may also include an input module 440, which can be used to receive input numeric or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0223] The server may also include a communication module 450. In some embodiments, the communication module 450 may include a wireless module, through which the server can perform short-range wireless transmission, thereby providing users with wireless broadband internet access. For example, the communication module 450 can be used to help users send and receive emails, browse web pages, and access streaming media.

[0224] Although not shown, the server may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 410 in the server loads the executable files corresponding to the processes of one or more applications into the memory 420 according to the following instructions, and the processor 410 runs the applications stored in the memory 420 to realize various functions, as follows:

[0225] The process involves determining the fitted position of the location points of the lane line to be processed, characterized by multiple fitting parameters. Based on the fitted position, a shape loss function is determined between the fitted line represented by the fitted position and the lane line to be processed. Based on the positional offset between the fitted position and the original position of the location point within the lane line, flexible constraints are determined, characterized by flexible constraint parameters representing the flexible constraint relationship between the fitted and original positions of the location points. A parameter aggregation function is then determined for the lane line to be processed, obtained by aggregating the flexible constraint parameters corresponding to the location points. Finally, based on the flexible constraints, the shape loss function and the parameter aggregation function are solved to obtain the parameter values ​​of the fitted parameters, resulting in a smoothed lane line represented by these parameter values.

[0226] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0227] As can be seen from the above, the embodiments of this application differ from existing smoothing methods. They characterize the fitted positions of the lane lines to be processed using multiple fitting parameters, enabling the fitted lines to approximate not only simple lane lines but also complex, curved lane lines. Furthermore, for each position point of the lane line to be processed, the embodiments of this application can determine flexible constraint conditions based on flexible constraint parameters, such as the maximum allowable deviation or error range of the original position relative to its fitted position. By controlling the movement distance (i.e., position offset) of each position point on the lane line through flexible constraint conditions, more relaxed restrictions are imposed on the fitted positions, improving the flexibility and robustness of the fitting process. This allows for smoothing both simple and complex curved lane lines, improving the accuracy of lane line smoothing. In addition, the embodiments of this application incorporate the parameter aggregation function of the flexible constraint parameters into the process of solving for the parameter values ​​of the fitted parameters. This helps to more accurately adjust the fitted parameters during the solution process, enabling the fitted lines to better fit the original lane lines, reducing errors and shape deviations, and improving the accuracy of lane line smoothing.

[0228] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0229] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the lane line smoothing methods provided in embodiments of this application. For example, the instructions can execute the following steps:

[0230] The process involves determining the fitted position of the location points of the lane line to be processed, characterized by multiple fitting parameters. Based on the fitted position, a shape loss function is determined between the fitted line represented by the fitted position and the lane line to be processed. Based on the positional offset between the fitted position and the original position of the location point within the lane line, flexible constraints are determined, characterized by flexible constraint parameters representing the flexible constraint relationship between the fitted and original positions of the location points. A parameter aggregation function is then determined for the lane line to be processed, obtained by aggregating the flexible constraint parameters corresponding to the location points. Finally, based on the flexible constraints, the shape loss function and the parameter aggregation function are solved to obtain the parameter values ​​of the fitted parameters, resulting in a smoothed lane line represented by these parameter values.

[0231] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0232] According to one aspect of this application, a computer program product or computer program is provided, comprising a computer program or instructions that, when executed by a processor, implement the steps of the methods provided in the various optional implementations of the above embodiments. The computer program / instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instructions from the computer-readable storage medium and executes the computer program / instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0233] Since the instructions stored in the storage medium can execute the steps of any lane line smoothing method provided in the embodiments of this application, the beneficial effects that any lane line smoothing method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0234] The above provides a detailed description of a lane line smoothing method, apparatus, device, medium, and program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A lane line smoothing method characterized by, The method comprises: determining a fitting position of a position point of a to-be-processed lane line, the fitting position being represented by a plurality of fitting parameters; determining, according to the fitting position, a shape loss function between a fitting line represented by the fitting position of the position point and the to-be-processed lane line; determining, according to a position offset between the fitting position of the position point and an original position of the position point in the to-be-processed lane line, a flexible constraint condition corresponding to the position point, the flexible constraint condition representing a flexible constraint relationship between the fitting position of the position point and the original position of the position point based on a flexible constraint parameter; determining a parameter aggregation function corresponding to the to-be-processed lane line, the parameter aggregation function being a function aggregated by the flexible constraint parameters corresponding to the position points of the to-be-processed lane line; solving, based on the flexible constraint condition, the shape loss function and the parameter aggregation function to obtain a parameter value of the fitting parameter, so as to obtain a smoothed lane line represented by the parameter value.

2. The lane line smoothing method of claim 1, wherein, The flexible constraint parameter comprises a flexible constraint variable, and the determining, according to a position offset between the fitting position of the position point and an original position of the position point in the to-be-processed lane line, a flexible constraint condition corresponding to the position point comprises: determining the position offset between the fitting position of the position point and the original position of the position point in the to-be-processed lane line; determining, based on the flexible constraint variable, an offset range of the position offset, and the flexible constraint condition corresponding to the position point comprising the offset range of the position offset corresponding to the position point.

3. The lane line smoothing method of claim 2, wherein, The flexible constraint variable is adjusted within a variable value range, and the determining, according to a position offset between the fitting position of the position point and an original position of the position point in the to-be-processed lane line, a flexible constraint condition corresponding to the position point further comprises: obtaining an offset threshold value, the offset threshold value being used to determine the offset range together with the flexible constraint variable; determining the variable value range of the flexible constraint variable based on the offset threshold value.

4. The lane line smoothing method of claim 1, wherein, The determining a parameter aggregation function corresponding to the to-be-processed lane line comprises: performing summation processing on the flexible constraint parameters corresponding to the position points of the to-be-processed lane line to obtain the parameter aggregation function corresponding to the to-be-processed lane line.

5. The lane line smoothing method of claim 1, wherein, The fitting parameter comprises a polynomial coefficient, and the determining a fitting position of a position point of a to-be-processed lane line comprises: obtaining a point offset parameter of the position point, the point offset parameter being used to represent a position offset between the position point and an end point of the to-be-processed lane line; determining a polynomial function corresponding to the position point based on the point offset parameter, the polynomial function representing a fitting position of the position point by the polynomial coefficient and the point offset parameter.

6. The lane line smoothing method of claim 5, wherein, The obtaining a point offset parameter of the position point comprises: determining a lane line length between the position point and an end point on the to-be-processed lane line; determining the point offset parameter of the position point based on the lane line length and a total length of the to-be-processed lane line.

7. The lane line smoothing method of claim 5, wherein, Before the solving, based on the flexible constraint condition, the shape loss function and the parameter aggregation function, to obtain the parameter value of the fitting parameter, so as to obtain the lane line after smoothing represented by the parameter value, the method further comprises: determining a smoothing loss function according to a high-order term coefficient in the polynomial coefficient, the smoothing loss function being used for solving the parameter value of the fitting parameter.

8. The lane line smoothing method of claim 5, wherein, After the solving, based on the flexible constraint condition, the shape loss function and the parameter aggregation function, to obtain the parameter value of the fitting parameter, so as to obtain the lane line after smoothing represented by the parameter value, the method further comprises: obtaining a position point quantity of a position point of the lane line after smoothing; determining a parameter value of the point offset parameter corresponding to the position point after smoothing according to the position point quantity; determining a position of the position point after smoothing based on the parameter value of the point offset parameter and the parameter value of the fitting parameter; generating the lane line after smoothing based on the position of the position point after smoothing.

9. The lane line smoothing method of claim 1, wherein, The shape loss function between the fitting line represented by the fitting position of the position point and the lane line to be processed according to the fitting position of the position point comprises: determining a position difference between the fitting position of the position point and the original position of the position point in the lane line to be processed; determining the shape loss function between the fitting line represented by the fitting position of the position point and the lane line to be processed according to the position difference.

10. The lane line smoothing method of claim 1, wherein, The solving, based on the flexible constraint condition, the shape loss function and the parameter aggregation function, to obtain the parameter value of the fitting parameter, so as to obtain the lane line after smoothing represented by the parameter value, comprises: obtaining a target function by combining the shape loss function and the parameter aggregation function; minimizing the target function based on the flexible constraint condition to obtain the parameter value of the fitting parameter, so as to obtain the lane line after smoothing represented by the parameter value.

11. The lane line smoothing method according to any one of claims 1 to 10, characterized by, Before the solving, based on the flexible constraint condition, the shape loss function and the parameter aggregation function, to obtain the parameter value of the fitting parameter, so as to obtain the lane line after smoothing represented by the parameter value, the method further comprises: obtaining an original position of an endpoint of the lane line to be processed and a fitting position of the endpoint; determining an endpoint constraint condition based on the original position of the endpoint and the fitting position of the endpoint, the endpoint constraint condition constraining the fitting position of the endpoint by the original position of the endpoint, and the endpoint constraint condition being used for constraining a solving process of the shape loss function and the parameter aggregation function.

12. A lane line smoothing apparatus characterized by comprising: comprise: a position determination unit, configured to determine a fitting position of a position point of a lane line to be processed, the fitting position being represented by a plurality of fitting parameters; a shape loss determination unit, configured to determine a shape loss function between a fitting line represented by the fitting position of the position point and the lane line to be processed according to the fitting position of the position point; The constraint determination unit is configured to determine a flexible constraint condition corresponding to the position point according to a position offset between the fitted position of the position point and an original position of the position point in the lane line to be processed, the flexible constraint condition representing a flexible constraint relationship between the fitted position of the position point and the original position of the position point based on a flexible constraint parameter; The parameter aggregation unit is configured to determine a parameter aggregation function corresponding to the lane line to be processed, the parameter aggregation function being a function aggregated from the flexible constraint parameters corresponding to the position points of the lane line to be processed; The solving unit is configured to solve, based on the flexible constraint condition, the shape loss function and the parameter aggregation function to obtain a parameter value of the fitted parameter, so as to obtain a lane line processed by smoothing and represented by the parameter value.

13. An electronic device, comprising: The processor and the memory are included, and the memory stores a plurality of instructions; the processor loads the instructions from the memory to execute the steps in the lane line smoothing processing method according to any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by the processor to execute the steps in the lane line smoothing processing method according to any one of claims 1-11.

15. A computer program product comprising computer programs or instructions, characterized in that, The computer program or the instructions are executed by the processor to implement the steps in the lane line smoothing processing method according to any one of claims 1-11.