Fence curve modeling method for automatic driving, storage medium and electronic equipment

By employing methods such as static-dynamic separation, coordinate system alignment, RANSAC fitting, and polynomial model switching, the problem of fence curve modeling under dynamic environments and curvature variations was solved, achieving high-precision and robust fence curve modeling.

CN121010733APending Publication Date: 2025-11-25SHANGHAI BAOLONG AUTOMOTIVE TECH (ANHUI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511045187.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing fence curve modeling technology based on millimeter-wave radar is subject to interference from dynamic targets in dynamic environments, making it difficult to adapt to curvature changes. Furthermore, the discontinuity of point cloud data leads to modeling failure, making it unable to effectively handle complex road conditions.

Method used

By separating static and dynamic objects and aligning coordinate systems to eliminate interference from dynamic targets, the RANSAC algorithm is used to fit a second-order polynomial model. Combined with least squares optimization and switching to a third-order polynomial model, dynamic point cloud fusion and missing data compensation are performed to adapt to complex road conditions and dynamic environments.

Benefits of technology

It improves the accuracy and robustness of fence curve modeling, adapts to complex road conditions and dynamic environments, and provides high-precision fence curve modeling results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010733A_ABST
    Figure CN121010733A_ABST
Patent Text Reader

Abstract

The invention provides a fence curve modeling method for automatic driving, a storage medium and electronic equipment. The method comprises the following steps: preprocessing original point cloud data to obtain a point cloud data set; fitting a second-order polynomial model based on the point cloud data set to obtain fence point cloud data; calculating a second-order derivative mean value of the continuous multi-frame fence point cloud data, and judging whether a current road is a high-curvature area based on the second-order derivative mean value and the road curvature: if not, determining the second-order polynomial model as a final fence curve model, if yes, fitting a third-order polynomial model based on the point cloud data set, and if not, determining the second-order polynomial model as the final fence curve model; and determining whether the final fence curve model is the second-order polynomial model or the third-order polynomial model based on preset selection conditions of the second-order polynomial model and the third-order polynomial model. According to the method, the precision and robustness of fence curve modeling can be effectively improved, and the method adapts to complex road conditions and dynamic environments.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent driving, and particularly relates to the technical field of fence curve modeling in automatic driving. BACKGROUND

[0002] Millimeter wave radar, as an important environmental perception sensor, has been widely used in automatic driving technology. However, the existing fence curve modeling technology based on millimeter wave radar has some deficiencies. First, in a dynamic environment, dynamic targets such as vehicles and pedestrians will interfere with the fence point cloud, affecting the modeling accuracy. Second, the existing technology is not adaptive to curvature changes, making it difficult to accurately fit high-curvature areas. In addition, due to the discontinuity of point cloud data, there may be point cloud missing in some scenarios, leading to modeling failure.

[0003] The existence of the above problems makes it difficult for the existing technology to effectively handle fence curve modeling in complex road conditions in automatic driving, and the modeling accuracy and robustness need to be improved. Therefore, there is an urgent need for a new fence curve modeling method that can adapt to dynamic environments, curvature changes, and point cloud missing, to improve the environmental perception ability of the automatic driving system. SUMMARY

[0004] The present application provides a fence curve modeling method for automatic driving, a storage medium and an electronic device, for improving the accuracy and robustness of fence curve modeling.

[0005] In a first aspect, an embodiment of the present application provides a fence curve modeling method for automatic driving, comprising: preprocessing original point cloud data to obtain a point cloud data set; fitting a second-order polynomial model based on the point cloud data set to obtain fence point cloud data; calculating the second-order derivative mean of continuous multiple frames of the fence point cloud data, and determining whether the current road is a high-curvature area based on the second-order derivative mean and the road curvature; if not, confirming the second-order polynomial model as the final fence curve model; if yes, fitting a third-order polynomial model based on the point cloud data set, and determining whether the final fence curve model is the second-order polynomial model or the third-order polynomial model based on a preset selection condition of the second-order polynomial model and the third-order polynomial model.

[0006] In an implementation manner of the first aspect, the preprocessing of the original point cloud data includes dynamic and static separation processing of the original point cloud data, and the dynamic and static separation processing includes: calculating the point cloud radial velocity based on the original point cloud data; determining dynamic point cloud data and static point cloud data in the original point cloud data based on the point cloud radial velocity, the vehicle speed and the speed threshold; obtaining the static point cloud data in the original point cloud data, and determining the set composed of the static point cloud data as the point cloud data set.

[0007] In an implementation form of the first aspect, the pre-processing of the original point cloud data further comprises a coordinate system alignment processing of the original point cloud data, the coordinate system alignment processing comprising: obtaining a vehicle speed and a heading angle of the ego vehicle; and converting a current coordinate of the original point cloud data to a vehicle global coordinate system based on the vehicle speed and the heading angle of the ego vehicle.

[0008] In an implementation form of the first aspect, the fitting of the second-order polynomial model based on the point cloud dataset to obtain the fence point cloud data comprises: randomly selecting a plurality of point cloud data meeting a preset lateral coordinate range from the point cloud dataset; solving coefficients of the second-order polynomial model based on the plurality of point cloud data; obtaining a vertical distance of each of the point cloud data to a parabola corresponding to the second-order polynomial model, and determining whether each of the point cloud data is an inlier based on the vertical distance; updating the coefficients of the second-order polynomial model based on a number of the inliers; and iteratively performing the above steps until a preset iteration termination condition or an iteration number is reached, and determining all the inliers obtained as the fence point cloud data.

[0009] In an implementation form of the first aspect, the updating of the second-order polynomial model further comprises: converting coordinates of historical fence point cloud data into a current ego vehicle coordinate system based on ego vehicle motion parameters, denoted as compensated point cloud data; merging the compensated point cloud data and the fence point cloud data of a current frame into a fusion point cloud dataset, and configuring weights for the compensated point cloud data and the fence point cloud data respectively to form a fusion point cloud weight matrix; constructing a fusion point cloud lateral coordinate matrix and a fusion point cloud longitudinal coordinate matrix based on the fusion point cloud dataset, and performing weighted least squares optimization based on the fusion point cloud lateral coordinate matrix, the fusion point cloud longitudinal coordinate matrix and the fusion point cloud weight matrix; and updating the coefficients of the second-order polynomial model according to a result of the weighted least squares optimization.

[0010] In an implementation form of the first aspect, the weighted least squares optimization is:

[0011] solving β = (X T WX) -1 X T WY = [a, b, c] T ; wherein W is the fusion point cloud weight matrix, X is the fusion point cloud longitudinal coordinate matrix, Y is the fusion point cloud longitudinal coordinate matrix, and a, b and c are coefficients of the second-order polynomial model respectively, wherein a is a second derivative, b is a first derivative, and c is a constant.

[0012] In one implementation of the first aspect, determining whether the current road is a high curvature region based on the mean of the second derivative and the road curvature includes: if the absolute value of the difference between the current second derivative and the mean of the second derivative is greater than a difference threshold, and the road curvature is greater than a curvature threshold, then the current road is determined to be a high curvature region.

[0013] In one implementation of the first aspect, the method further includes: determining whether the current second derivative is less than a derivative threshold; in response to the current second derivative being less than the derivative threshold, performing linear least squares fitting on the point cloud dataset to obtain a linear model, and confirming the linear model as the final fence curve model.

[0014] In a second aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fence curve modeling method for autonomous driving as described in any one of the first aspects of this application.

[0015] Thirdly, embodiments of this application provide an electronic device, the electronic device including a processor and a memory; the memory stores program instructions; the processor is used to run the program instructions to execute the fence curve modeling method for autonomous driving as described in any one of the first aspects of this application.

[0016] The fence curve modeling method for autonomous driving provided in this application has the following beneficial effects:

[0017] This application can effectively improve the accuracy and robustness of fence curve modeling, and adapt to complex road conditions and dynamic environments. Attached Figure Description

[0018] Figure 1 The diagram shown is an overall flowchart of a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0019] Figure 2 The flowchart shown is a process for separating static and dynamic elements in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0020] Figure 3 The diagram shown is a schematic representation of the principle of coordinate system alignment processing in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0021] Figure 4 The flowchart shown is a process for obtaining fence point cloud data by fitting a second-order polynomial model in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0022] Figure 5The flowchart shown is a process for integrating and updating the second-order polynomial model in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0023] Figure 6 The diagram shown is a schematic representation of the principle of determining high curvature regions in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0024] Figure 7 The flowchart shown is a process for a fence curve model used when the road is a straight line in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0025] Figure 8 The diagram shown is a structural schematic of an electronic device according to an embodiment of this application.

[0026] Component designation explanation

[0027] 100 Electronic devices

[0028] 101 Memory

[0029] 102 processor

[0030] 103 Monitor

[0031] S100~S500 Steps

[0032] Steps S110~S130

[0033] Steps S210~S290

[0034] S601~S602 Steps Detailed Implementation

[0035] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0036] The existing modeling of fence curves for autonomous driving has the following drawbacks:

[0037] 1. In dynamic environments, dynamic targets such as vehicles and pedestrians can interfere with fence point clouds and affect modeling accuracy;

[0038] 2. Existing technologies are not adaptable enough to curvature changes and are difficult to accurately fit fence curves in high curvature regions;

[0039] 3. Due to the discontinuity of point cloud data, point cloud data may be missing in certain scenarios, causing the fence curve modeling to fail.

[0040] 4. Existing technologies cannot effectively handle fence curve modeling under complex road conditions, and both modeling accuracy and robustness need to be improved.

[0041] The purpose of this embodiment is to overcome the problems existing in current fence curve modeling for autonomous driving, such as fence point clouds being disturbed by dynamic targets in dynamic environments, difficulty adapting to curvature changes, and modeling failure due to missing point clouds. This embodiment provides a fence curve modeling method for autonomous driving, with specific objectives including:

[0042] 1. Through preprocessing steps such as static / dynamic separation and coordinate system alignment, the interference of dynamic targets on the fence point cloud is effectively eliminated, thus improving the modeling accuracy;

[0043] 2. The RANSAC algorithm is used to detect fence point clouds, and combined with least squares optimization, which can accurately fit the second-order polynomial model and adapt to curvature changes.

[0044] 3. A third-order polynomial model adaptation mechanism is introduced, which can switch to a higher-order model, improving the fitting ability to high curvature regions.

[0045] 4. Through dynamic point cloud fusion and update strategies, the effective fusion of historical point clouds and current point clouds is achieved, improving the continuity and stability of modeling;

[0046] 5. Design a straight line segment detection and point cloud missing compensation mechanism to handle degraded scenes and avoid modeling failure;

[0047] 6. The overall algorithm has strong robustness and can adapt to complex road conditions and dynamic environments, providing high-precision fence curve modeling results for autonomous driving systems.

[0048] The following will refer to the appendices in the embodiments of this application. Figure 1 To be continued Figure 8 This application provides a detailed description of the technical solutions in its embodiments. This allows those skilled in the art to understand and implement the fence curve modeling method for autonomous driving without inventive effort.

[0049] Figure 1 This is a flowchart illustrating a fence curve modeling method for autonomous driving, as shown in an embodiment of this application. Figure 1 As shown, the fence curve modeling method for autonomous driving provided in this application includes the following steps S100 to S500.

[0050] Step S100: Preprocess the raw point cloud data to obtain a point cloud dataset;

[0051] Step S200: Fit a second-order polynomial model based on the point cloud dataset to obtain fence point cloud data;

[0052] Step S300: Calculate the mean of the second derivatives of the fence point cloud data for multiple consecutive frames, and determine whether the current road is a high curvature region based on the mean of the second derivatives and the road curvature. If not, continue to step S400; if yes, continue to step S500.

[0053] Step S400: Confirm the second-order polynomial model as the final fence curve model;

[0054] Step S500: Fit a third-order polynomial model based on the point cloud dataset, and determine whether the final fence curve model is the second-order polynomial model or the third-order polynomial model based on the preset selection conditions of the second-order polynomial model and the third-order polynomial model.

[0055] The fence curve modeling method for autonomous driving in this embodiment effectively overcomes the shortcomings of existing technologies and improves the accuracy and robustness of fence curve modeling by organically combining various methods such as static-dynamic separation, coordinate alignment, RANSAC fitting, least squares optimization, dynamic fusion update, high-order model switching, and degradation processing, thus adapting to complex road conditions and dynamic environments.

[0056] The following is in conjunction with the appendix Figure 2 To be continued Figure 7 The steps S100 to S500 of the fence curve modeling method for autonomous driving in this embodiment will be described in detail.

[0057] Step S100: Preprocess the raw point cloud data to obtain a point cloud dataset.

[0058] In this embodiment, the preprocessing of the raw point cloud data includes performing dynamic-static separation on the raw point cloud data. Dynamic-static separation uses Doppler velocity filtering to remove dynamic target point clouds and retains static fence point clouds.

[0059] Figure 2 The flowchart shown is a process for separating static and dynamic elements in a fence curve modeling method for autonomous driving, according to an embodiment of this application. Figure 2 As shown, in one implementation of this embodiment, the dynamic-static separation process includes:

[0060] Step S110: Calculate the radial velocity of the point cloud based on the original point cloud data;

[0061] Step S120: Based on the radial velocity of the point cloud, the vehicle speed, and the speed threshold, determine the dynamic point cloud data and static point cloud data in the original point cloud data;

[0062] Step S130: Obtain static point cloud data from the original point cloud data, and determine the set of static point cloud data as a point cloud dataset.

[0063] The process of determining dynamic and static point cloud data in the original point cloud data based on the point cloud radial velocity, vehicle speed, and speed threshold includes: obtaining the absolute value of the difference between the point cloud radial velocity and the vehicle speed, and comparing the absolute value of the difference with the speed threshold. If the absolute value of the difference is greater than the speed threshold, the data points in the original point cloud data are determined to be dynamic point cloud data; if the absolute value of the difference is less than or equal to the speed threshold, the data points in the original point cloud data are determined to be static point cloud data. Then, the static point cloud data is obtained, and the set of static point cloud data is determined as a point cloud dataset.

[0064] Specifically, calculate the radial velocity of the point cloud. Where r t r is the target distance in the current frame. t-1 Let |v| be the target distance in the previous frame, and Δt be the radar frame interval. radial -v ego cosθ|>v th If v is a dynamic point, then it is determined to be a dynamic point. radial v is the radial velocity of the point cloud. ego v is the vehicle's speed, θ is the point cloud azimuth angle, and v th Let v be a velocity threshold, for example, 1.0 m / s. Retain values ​​that satisfy |v radial |≤v th Let the points be denoted as set P. static ={(x i ,y i )}.

[0065] In this embodiment, the preprocessing of the original point cloud data further includes coordinate system alignment of the original point cloud data. Figure 3 This diagram illustrates the principle of coordinate system alignment processing in a fence curve modeling method for autonomous driving, according to an embodiment of this application. Figure 3 As shown, in one implementation of this embodiment, the coordinate system alignment process includes:

[0066] Obtain the vehicle's speed and heading angle; based on the vehicle's speed and heading angle, transform the current coordinates of the original point cloud data to the vehicle's global coordinate system.

[0067] In this embodiment, the coordinate system alignment process transforms the point cloud data to the global coordinate system using a coordinate transformation formula, eliminating the influence of the vehicle's motion. The coordinate transformation formula is as follows:

[0068]

[0069] Where ψ(τ) is the heading angle of the vehicle at time τ, x global y global Let x be the coordinates of the point cloud data in the vehicle's global coordinate system. radar y radar The coordinates of the point cloud data in the current relative coordinate system.

[0070] The discretization transformation is as follows:

[0071] This embodiment employs coordinate transformation to convert absolute coordinate system data into data within the vehicle's local coordinate system, improving the flexibility and accuracy of data processing. Therefore, through preprocessing steps such as static / dynamic separation and coordinate system alignment, this embodiment effectively eliminates the interference of dynamic targets on the fence point cloud, removes the influence of vehicle motion, and improves modeling accuracy.

[0072] Step S200: Fit a second-order polynomial model based on the point cloud dataset to obtain fence point cloud data.

[0073] In this embodiment, the RANSAC algorithm is preferably used to detect the fence point cloud and fit a second-order polynomial model. RANSAC (Random Sample Consensus) is an iterative method for estimating mathematical model parameters from data containing noise and outliers. In RANSAC, data is divided into inliers and outliers; inliers are real data that conform to the model distribution, such as valid points in the fence point cloud. Outliers are noise or outliers, such as mismatched points or interference points from other objects. A small number of samples (minimum sample set) are randomly selected from the data to fit an initial model. The error between all data points and the model is calculated, and points with errors less than a threshold are marked as inliers. The sampling and verification process is repeated, and the model with the largest number of inliers and the smallest error is selected as the final result.

[0074] Figure 4 The flowchart shown is a process for obtaining fence point cloud data by fitting a second-order polynomial model in a fence curve modeling method for autonomous driving, according to an embodiment of this application. Figure 4 As shown, in one implementation of this embodiment, the step of fitting a second-order polynomial model based on the point cloud dataset to obtain fence point cloud data includes:

[0075] Step S210: Randomly select multiple point cloud data that conform to a preset horizontal coordinate range from the point cloud dataset;

[0076] Step S220: Solve for the coefficients of the second-order polynomial model based on the multiple point cloud data;

[0077] Step S230: Obtain the vertical distance from each point cloud data to the parabola corresponding to the second-order polynomial model, and determine whether each point cloud data is an interior point data based on the vertical distance;

[0078] Step S240: Update the coefficients of the second-order polynomial model based on the number of interior point data;

[0079] Step S250: Iteratively execute the above steps until the preset iteration termination condition or iteration number is reached, and determine all the acquired interior point data as the fence point cloud data.

[0080] In this embodiment, if the vertical distance from the point cloud data to the parabola corresponding to the second-order polynomial model is less than a distance threshold, it is determined to be an interior point; otherwise, it is determined to be an exterior point.

[0081] Specifically, in this embodiment, the RANSAC algorithm is used to detect the fence point cloud and fit a second-order polynomial model. The RANSAC parameter configuration is as follows: maximum number of iterations N. max =500, interior point distance threshold d th =0.2m, minimum number of interior points N min_inliers =5.

[0082] A single iteration process includes:

[0083] 1) Point cloud dataset P obtained after preprocessing static Three points (x1, y1), (x2, y2), and (x3, y3) are randomly selected without replacement. If the horizontal coordinate range of these three points is |max(x1, y1), then the maximum value of each point is 1. i )-min(x i If | < 2.0m, then resample;

[0084] 2) Solve the second-order polynomial model y = ax based on the three points in 1). 2 The coefficients a, b, c of +bx+c;

[0085] 3) For each point (x) obtained i ,y i ), calculate its perpendicular distance d to the parabola. i If d i <d th If the current number of interior points N is obtained based on the three points (x1, y1), (x2, y2), and (x3, y3), then it is marked as an interior point. inliers >N best_inliers N best_inliers To find the optimal number of interior points, update the optimal model parameter a based on a, b, and c. best_inliers ,b best_inliers ,c best_inliers and Nbest_inliers If not, do not update, and instead obtain the next group of 3 points and make a judgment.

[0086] The iteration termination condition is: the ratio of the optimal number of interior points to the current number of interior points is greater than a preset value, for example, N. best_inliers / N inliers The iteration terminates when the value is greater than 0.8, or when the number of iterations reaches the iteration threshold N. max The set of interior points acquired in this study is fence point cloud data, which is referred to as historical point cloud for ease of calculation.

[0087] In this embodiment, the RANSAC algorithm is used to detect the fence point cloud, and combined with least squares optimization, which can accurately fit the second-order polynomial model and adapt to curvature changes.

[0088] Furthermore, in this embodiment, if a second-order polynomial model is fitted based on the point cloud dataset and no fence point cloud data is detected, that is, if no valid interior points are detected in the current frame point cloud, the method further includes starting Kalman filter prediction, performing point cloud missing compensation, and re-detecting and obtaining fence point cloud data after preprocessing based on the supplemented point cloud data.

[0089] The Kalman filter prediction includes: extrapolation based on historical point clouds, including setting the state vector of the historical point clouds. State transition matrix of historical point cloud To achieve point cloud missing value compensation, y represents the current displacement or position state of the system. The first derivative of y represents velocity. Let y represent the second derivative of y, i.e., acceleration, and Δt represent the time step. Based on the supplemented point cloud, steps S100 and S200 are re-executed to obtain the corresponding second-order polynomial model as the final output, without further processing of higher-order and degenerate scenes. In this embodiment, the point cloud missing compensation mechanism can handle degenerate scenes and avoid modeling failure.

[0090] In this embodiment, if no valid interior points are detected for several consecutive frames or more, point cloud missing point compensation will not be performed. For example, if no valid interior points are detected for three consecutive frames or more, it indicates that the vehicle has left the fence area, and fence pushing is not required.

[0091] In this embodiment, the method further includes fusing and updating the second-order polynomial model. Figure 5 The flowchart shown is a process for fencing curve modeling method for autonomous driving according to an embodiment of this application, involving the fusion and updating of the second-order polynomial model. Figure 5 As shown, in one implementation of this embodiment, fusing and updating the second-order polynomial model includes:

[0092] Step S260: Based on the vehicle's motion parameters, the coordinates of the historical fence point cloud data are transformed to the current vehicle coordinate system, and this is recorded as the compensated point cloud data.

[0093] Step S270: Based on merging the compensated point cloud data and the fence point cloud data of the current frame into a fused point cloud dataset, and configuring weights for the compensated point cloud data and the fence point cloud data respectively, a fused point cloud weight matrix is ​​formed.

[0094] Step S280: Construct a fused point cloud horizontal coordinate matrix and a fused point cloud vertical coordinate matrix based on the fused point cloud dataset, and perform weighted least squares optimization based on the fused point cloud horizontal coordinate matrix, the fused point cloud vertical coordinate matrix, and the fused point cloud weight matrix.

[0095] Step S290: Update the coefficients of the second-order polynomial model based on the results of the weighted least squares optimization.

[0096] In one implementation of this embodiment, the weighted least squares optimization is as follows:

[0097] Solve for β = (X) T WX) -1 X T WY = [a, b, c] T Where W is the weight matrix of the fused point cloud, X is the ordinate matrix of the fused point cloud, Y is the ordinate matrix of the fused point cloud, and a, b, c are the coefficients of the second-order polynomial model, where a is the second derivative, b is the first derivative, and c is a constant.

[0098] For example, obtaining the vehicle's motion parameter Δx ego Δy ego And Δψ, to perform motion compensation on the historical point cloud, and to perform coordinate transformation on the historical point cloud to transform its coordinates to the current vehicle coordinate system.

[0099] The coordinate transformation formula is: Rotation matrix Where, Δx ego Δy ego These represent the vehicle displacement obtained through the vehicle's body system; Δψ represents the change in heading angle obtained through the vehicle's body system; x new y new The x-coordinate represents the new coordinates after the transformation, which is the position value in the target coordinate system; old y old This represents the position value in the original coordinate system, which is the initial coordinate to be transformed.

[0100] The motion-compensated historical point cloud P history_pred With the current interior set S inliers Merge into P fusedPoint cloud collection.

[0101] Then assign weights, for example, assign historical point weights W. history =0.7, current point weight W current =1.0, weight matrix W = diag(W history ,...,W current ), perform weighted least squares optimization, β=(X T WX) -1 X T WY. The least squares optimization method is as follows:

[0102] For P fused Constructing a matrix Solve for β = (X) T WX) -1 X T WY = [a, b, c] T , which are the parameters of the final second-order polynomial model. If X T WX is close to a singular matrix, so SVD decomposition is used instead of direct inversion. a is the second derivative, b is the first derivative, and c is a constant. When X... T When the WX moment is close to singular (i.e., the determinant is close to zero and the condition number is very large), direct inversion will lead to numerical instability or calculation failure.

[0103] Singular Value Decomposition (SVD) decomposes a matrix into A = UΣVT, where Σ is a diagonal matrix containing the singular values ​​of the matrix. SVD can identify the rank and numerical stability of a matrix, avoiding the numerical problems of direct inversion.

[0104] In this embodiment, a dynamic point cloud fusion and update strategy is used to effectively fuse historical point clouds with current point clouds, thereby improving the continuity and stability of modeling.

[0105] Step S300: Calculate the mean of the second derivatives of the fence point cloud data for multiple consecutive frames, and determine whether the current road is a high curvature region based on the mean of the second derivatives and the road curvature. If not, proceed to step S400 to confirm the second-order polynomial model as the final fence curve model. If yes, proceed to step S500 to fit a third-order polynomial model based on the point cloud dataset, and determine whether the final fence curve model is the second-order polynomial model or the third-order polynomial model based on the preset selection conditions of the second-order polynomial model and the third-order polynomial model.

[0106] In this embodiment, it is based on the mean of the second derivative. To adapt to different road conditions, the final fence curve model is confirmed, for example, by calculating the mean of the second derivatives 'a' over five consecutive frames.

[0107] Figure 6This diagram illustrates the principle of determining high curvature regions in a fence curve modeling method for autonomous driving, according to an embodiment of this application. Figure 6 As shown, in one implementation of this embodiment, determining whether the current road is a high curvature region based on the mean of the second derivative and the road curvature includes: if the absolute value of the difference between the current second derivative and the mean of the second derivative is greater than a difference threshold, and the road curvature is greater than a curvature threshold, then the current road is determined to be a high curvature region.

[0108] For example, if And |κ|>0.1m -1 ,in If the curvature is high, it is determined to be a high curvature region, indicating that the current road may be a complex road such as an S-shaped road, and the second-order polynomial model cannot meet the actual needs. This triggers the fitting of the third-order polynomial model, that is, the high-order model is adapted to the current road.

[0109] For example, RANSAC is upgraded to randomly selecting 4 points and constructing a system of equations:

[0110] Solve for (a, b, c, d) using SVD decomposition. Determine whether the final fence curve model is the second-order polynomial model or the third-order polynomial model as follows: If If so, choose the third-order polynomial model; otherwise, choose the second-order polynomial model. i Represents the actual value of the vertical axis. This represents the ordinate value obtained by fitting a third-order polynomial equation. This represents the ordinate value obtained by fitting a second-order polynomial equation. By comparing the error between the actual value of y and the value obtained by fitting the polynomial equation, it can be determined whether to use a second-order or third-order polynomial model to more accurately describe the curvature of the road. If the error is small, the corresponding model is selected as the final fence curve model.

[0111] In this embodiment, a third-order polynomial model adaptation mechanism is introduced, which can switch to a higher-order model and improve the fitting ability to high curvature regions.

[0112] In addition, this embodiment also includes a fence curve model constructed when the road is a straight line. Figure 7 The flowchart shown is a process for a fence curve model used when the road is a straight line in a fence curve modeling method for autonomous driving according to an embodiment of this application.

[0113] like Figure 7 As shown, in one implementation of this embodiment, it further includes:

[0114] Step S601: Determine whether the current second derivative is less than the derivative threshold;

[0115] In step S602, in response to the current second derivative being less than the derivative threshold, linear least squares fitting is performed on the point cloud dataset to obtain a linear model, and the linear model is confirmed as the final fence curve model.

[0116] For example, when |a| < 0.01, it indicates that the current road is a straight line and the road conditions are relatively simple. Therefore, a second-order polynomial model is unnecessary. To reduce computational load, it degenerates into a linear model y = bx + c, and directly applies P... fused Linear least squares fitting is used. If the above conditions are not met, the second-order polynomial model obtained in the above steps is used as the final fence curve model. In this embodiment, the line segment detection mechanism can handle degenerate scenarios and avoid modeling failure.

[0117] The fence curve modeling method in this embodiment has strong robustness and can adapt to complex road conditions and dynamic environments, providing high-precision fence curve modeling results for autonomous driving systems.

[0118] The protection scope of the fence curve modeling method for autonomous driving described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the protection scope of this application.

[0119] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the fence curve modeling method for autonomous driving provided in any embodiment of this application.

[0120] In the embodiments of this application, any combination of one or more storage media can be used. The storage medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0121] This application also provides an electronic device. Figure 8The diagram shown is a structural schematic of the electronic device 100 provided in an embodiment of this application. In some embodiments, the electronic device may be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), or other terminal device. Furthermore, the fence curve modeling method for autonomous driving provided in this application can also be applied to databases, servers, and service response systems based on terminal artificial intelligence. This application does not impose any limitations on the specific application scenarios of the fence curve modeling method for autonomous driving.

[0122] like Figure 8 As shown, the electronic device 100 provided in this application embodiment includes a memory 101 and a processor 102.

[0123] The memory 101 is used to store computer programs; preferably, the memory 101 includes various media that can store program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk.

[0124] Specifically, memory 101 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. Electronic device 100 may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 101 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0125] The processor 102 is connected to the memory 101 and is used to execute the computer program stored in the memory 101 so that the electronic device 100 executes the fence curve modeling method for autonomous driving provided in any embodiment of this application.

[0126] Optionally, the processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0127] Optionally, in this embodiment, the electronic device 100 may further include a display 103. The display 103 is communicatively connected to the memory 101 and the processor 102, and is used to display a GUI interface related to the fence curve modeling method for autonomous driving.

[0128] In summary, this application employs a dynamic-static separation and coordinate system alignment approach for preprocessing the original point cloud data. Dynamic-static separation uses Doppler velocity filtering to remove dynamic target point clouds while retaining static fence point clouds. Coordinate system alignment transforms the point cloud to the global coordinate system using a coordinate transformation formula, eliminating the influence of vehicle motion. This application utilizes the RANSAC algorithm to detect the fence point cloud, fits a second-order polynomial model, and obtains the optimal model parameters through multiple iterations to adapt to curvature changes. This application performs weighted least squares optimization on the interior point set output by RANSAC, constructs matrix equations, and solves for the final second-order polynomial model parameters, improving efficiency. Model accuracy: This application performs motion compensation on historical point clouds, merges them with the current point cloud, and assigns weights based on spatiotemporal correlation for weighted least squares fusion, achieving dynamic updates and effectively integrating historical and current point clouds, thus improving the continuity and stability of modeling. This application uses curvature change detection to determine whether a high-curvature region has been entered; if so, it triggers a third-order polynomial model fitting, improving the fitting ability for high-curvature regions. In this application, when a straight line segment is detected, it degenerates into a linear model for fitting; when no valid interior points are detected for multiple consecutive frames, Kalman filter prediction is initiated to compensate for missing point clouds and avoid modeling failure. Therefore, this application organically combines multiple methods such as dynamic-static separation, coordinate alignment, RANSAC fitting, least squares optimization, dynamic fusion update, high-order model switching, and degradation processing. The overall algorithm has strong robustness, effectively overcoming the shortcomings of existing technologies, improving the accuracy and robustness of fence curve modeling, adapting to complex road conditions and dynamic environments, and providing high-precision fence curve modeling results for autonomous driving systems. Therefore, this application effectively overcomes the various shortcomings of the prior art and has high industrial application value.

[0129] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for modeling fence curves for autonomous driving, characterized in that, include: Preprocess the raw point cloud data to obtain a point cloud dataset; Based on the point cloud dataset, a second-order polynomial model is fitted to obtain fence point cloud data; Calculate the mean of the second derivatives of the fence point cloud data over multiple consecutive frames, and determine whether the current road is a high-curvature region based on the mean of the second derivatives and the road curvature: If not, then the second-order polynomial model is confirmed as the final fence curve model; If so, a third-order polynomial model is fitted based on the point cloud dataset, and the final fence curve model is determined to be either the second-order polynomial model or the third-order polynomial model based on the preset selection conditions of the second-order polynomial model and the third-order polynomial model.

2. The fence curve modeling method for autonomous driving according to claim 1, characterized in that, The preprocessing of the raw point cloud data includes performing static / dynamic separation processing on the raw point cloud data, which includes: Calculate the radial velocity of the point cloud based on the original point cloud data; Based on the radial velocity of the point cloud, the vehicle speed, and the speed threshold, determine the dynamic point cloud data and static point cloud data in the original point cloud data; Obtain static point cloud data from the original point cloud data, and determine the set of static point cloud data as a point cloud dataset.

3. The fence curve modeling method for autonomous driving according to claim 1 or 2, characterized in that, The preprocessing of the raw point cloud data also includes coordinate system alignment of the raw point cloud data, which includes: Obtain the vehicle's speed and heading angle; Based on the vehicle's speed and heading angle, the current coordinates of the original point cloud data are transformed to the vehicle's global coordinate system.

4. The fence curve modeling method for autonomous driving according to claim 1, characterized in that, The process of fitting a second-order polynomial model based on the point cloud dataset to obtain fence point cloud data includes: Randomly select multiple point cloud data that conform to a preset horizontal coordinate range from the point cloud dataset; The coefficients of the second-order polynomial model are solved based on multiple point cloud data. Obtain the vertical distance from each of the point cloud data to the parabola corresponding to the second-order polynomial model, and determine whether each of the point cloud data is an interior point based on the vertical distance; The coefficients of the second-order polynomial model are updated based on the number of interior point data. The above steps are executed iteratively until the preset iteration termination condition or iteration number is reached, and all the acquired interior point data are determined as the fence point cloud data.

5. The fence curve modeling method for autonomous driving according to claim 1 or 4, characterized in that, It also includes fusing and updating the second-order polynomial model, including: Based on the vehicle's motion parameters, the coordinates of the historical fence point cloud data are transformed to the current vehicle coordinate system, and this is denoted as the compensated point cloud data. The compensated point cloud data and the fence point cloud data of the current frame are merged into a fused point cloud dataset, and weights are configured for the compensated point cloud data and the fence point cloud data respectively to form a fused point cloud weight matrix. Based on the fused point cloud dataset, construct the fused point cloud x-coordinate matrix and the fused point cloud y-coordinate matrix, and perform weighted least squares optimization based on the fused point cloud x-coordinate matrix, the fused point cloud y-coordinate matrix and the fused point cloud weight matrix. The coefficients of the second-order polynomial model are updated based on the results of the weighted least squares optimization.

6. The fence curve modeling method for autonomous driving according to claim 5, characterized in that, The weighted least squares optimization is as follows: Solve for β=(X T WX) -1 X T WY=[a,b,c] T ; Where W is the weight matrix of the fused point cloud, X is the ordinate matrix of the fused point cloud, Y is the ordinate matrix of the fused point cloud, and a, b, c are the coefficients of the second-order polynomial model, where a is the second derivative, b is the first derivative, and c is a constant.

7. The fence curve modeling method for autonomous driving according to claim 1, characterized in that, The step of determining whether the current road is a high curvature region based on the mean of the second derivative and the road curvature includes: If the absolute value of the difference between the current second derivative and the mean of the second derivative is greater than the difference threshold, and the road curvature is greater than the curvature threshold, then the current road is determined to be a high curvature region.

8. The fence curve modeling method for autonomous driving according to claim 1, characterized in that, Also includes: Determine whether the current second derivative is less than the derivative threshold; In response to the current second derivative being less than the derivative threshold, linear least squares fitting is performed on the point cloud dataset to obtain a linear model, and the linear model is confirmed as the final fence curve model.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the fence curve modeling method for autonomous driving as described in any one of claims 1 to 8.

10. An electronic device, characterized in that, The electronic device includes: Processor and memory; The memory stores program instructions; The processor is configured to run the program instructions to execute the fence curve modeling method for autonomous driving as described in any one of claims 1 to 8.