Trajectory prediction method, device and storage medium

By using translation and rotation matrix transformation to determine the trajectory equation at the current moment, the problem of large amount of trajectory prediction calculation in the prior art is solved, efficient trajectory prediction is achieved, and fast and accurate detection and tracking of moving targets is ensured.

CN116380094BActive Publication Date: 2025-08-12WHST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310187271.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2025-08-12
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

In the prior art, trajectory prediction methods require a large number of trajectory point fitting, resulting in large calculations, time-consuming, and affecting the rapid and accurate detection and tracking of moving targets.

Method used

By obtaining the driving data of the moving target to be tested from the previous moment to the current moment and the trajectory equation of the previous moment, the translation and rotation matrix transformation determine the trajectory equation of the current moment, reducing the calculation amount and saving calculation time.

Benefits of technology

The calculation amount of trajectory prediction is reduced, the computing speed is improved, and the fast and accurate detection and tracking of moving targets is ensured, and problems such as untimely avoidance caused by too long calculation time are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116380094B_ABST
    Figure CN116380094B_ABST
Patent Text Reader

Abstract

The present invention provides a trajectory prediction method, device, and storage medium. The method comprises: obtaining driving data of a target moving target from a previous moment to a current moment, as well as a trajectory equation of the target moving target at the previous moment; wherein the previous moment and the current moment are two consecutive moments, and the driving data includes a translation distance and a heading angle; determining the trajectory equation of the target moving target at the current moment based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, and predicting the trajectory of the target moving target based on the trajectory equation at the current moment. The present invention requires only a simple calculation based on the trajectory equation at the previous moment and the driving data from the previous moment to the current moment to obtain the trajectory equation at the current moment, without requiring a fitting calculation, thereby reducing the amount of calculation and saving calculation time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a trajectory prediction method, device and storage medium. Background Art

[0002] Trajectory prediction refers to the use of the current position information of a mobile target, its historical movement trajectory, and other auxiliary information to dynamically evaluate the future position of the mobile target. The mobile target can be a mobile target such as a vehicle, ship, or aircraft.

[0003] In the field of intelligent transportation, trajectory prediction can predict the moving path of a moving target and predict the moving direction of the moving target based on the prediction results, thereby reducing the probability of traffic accidents.

[0004] Currently, trajectory prediction for moving targets is mostly performed by fitting multiple trajectory points to obtain a trajectory equation. To improve the accuracy of the fitted trajectory, a sufficient number of trajectory points are required. However, fitting with a large number of trajectory points results in a high computational load and is time-consuming. Summary of the Invention

[0005] Embodiments of the present invention provide a trajectory prediction method, device, and storage medium to solve the problem of requiring a large amount of calculation when using multi-trajectory point fitting.

[0006] In a first aspect, an embodiment of the present invention provides a trajectory prediction method, comprising:

[0007] Obtaining the travel data of the moving target to be measured from the previous moment to the current moment, as well as the trajectory equation of the moving target to be measured at the previous moment; wherein the previous moment and the current moment are two consecutive moments, and the travel data includes the translation distance and the heading angle;

[0008] Based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, the trajectory equation of the moving target to be measured at the current moment is determined, so as to predict the trajectory of the moving target to be measured according to the trajectory equation at the current moment.

[0009] In one possible implementation, determining the trajectory equation of the moving target to be measured at the current moment based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment includes:

[0010] Performing matrix conversion on the translation distance of the moving target to be measured from the previous moment to the current moment to obtain the translation matrix of the moving target to be measured from the previous moment to the current moment;

[0011] Performing matrix conversion on the heading angle of the moving target to be measured from the previous moment to the current moment to obtain the rotation matrix of the moving target to be measured from the previous moment to the current moment;

[0012] Based on the translation matrix and rotation matrix from the previous moment to the current moment, the trajectory equation of the previous moment is rotated and translated to determine the trajectory equation of the moving target to be measured at the current moment.

[0013] In one possible implementation, based on the translation matrix and the rotation matrix from the previous moment to the current moment, the trajectory equation of the previous moment is rotated and translated to determine the trajectory equation of the moving target to be measured at the current moment, including:

[0014] Convert the trajectory equation of the previous moment into the quadratic matrix of the trajectory of the previous moment;

[0015] Determine the quadratic matrix of the trajectory at the current moment based on the quadratic matrix of the trajectory at the previous moment, the transpose of the translation matrix, the transpose of the rotation matrix, and the product of the translation matrix and the rotation matrix;

[0016] Based on the quadratic matrix of the trajectory at the current moment, the trajectory equation of the moving target to be measured at the current moment is determined.

[0017] In one possible implementation, the translation matrix M is:

[0018]

[0019] The rotation matrix R is:

[0020]

[0021] The trajectory equation at the previous moment is:

[0022] x=c 2,k-1 y 2 +c 1,k-1 y+c 0,k-1 ;

[0023] The quadratic matrix of the trajectory at the previous moment is:

[0024]

[0025] The quadratic matrix of the trajectory at the current moment is:

[0026]

[0027] Among them, x0 is the horizontal coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, y0 is the vertical coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, θ is the heading angle of the moving target to be measured from the previous moment to the current moment, c 2,k-1 is the curvature of the moving target to be measured when the longitudinal distance is 0 at the previous moment, c 1,k-1is the heading angle of the moving target to be measured when the vertical distance is 0 at the previous moment, c 0,k-1 is the position of the moving target to be measured when the vertical distance is 0 at the previous moment, x is the horizontal coordinate of the trajectory equation, and y is the vertical coordinate of the trajectory equation.

[0028] In one possible implementation, the trajectory equation of the moving target to be measured at the previous moment is determined as follows:

[0029] The obtained movement data of the trajectory point at the previous moment is saved in a trajectory set; wherein the movement data at least includes the horizontal coordinate and the vertical coordinate of the trajectory point;

[0030] When the number of trajectory points in the trajectory set is less than a first preset threshold, the trajectory equation is not calculated;

[0031] When the number of trajectory points in the trajectory set is equal to a first preset threshold, fitting all trajectory points in the trajectory set to determine the trajectory equation at the previous moment;

[0032] When the number of trajectory points in the trajectory set is greater than a first preset threshold, the trajectory equation of the previous moment is determined based on the trajectory equation of the previous moment and the driving data from the previous moment to the previous moment; wherein the previous moment is the next adjacent moment of the previous moment.

[0033] In a possible implementation, after obtaining the travel data of the moving target to be measured from the previous moment to the current moment, the method further includes:

[0034] Saving the movement data of the trajectory point at the current moment in a trajectory set; wherein the movement data at least includes the horizontal coordinate and the vertical coordinate of the trajectory point;

[0035] Trajectory prediction methods also include:

[0036] Determine an error value of the trajectory equation at the current moment based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment;

[0037] When the error value is greater than the preset error, all trajectory points in the trajectory set are fitted and the trajectory equation at the current moment is updated.

[0038] In one possible implementation, determining an error value of the trajectory equation at the current moment based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment includes:

[0039] Input the ordinate of the trajectory point at the current moment into the trajectory equation at the current moment to obtain the predicted abscissa of the trajectory point at the current moment;

[0040] An error value of the trajectory equation at the current moment is determined based on a difference between the abscissa of the trajectory point at the current moment and the predicted abscissa of the trajectory point at the current moment.

[0041] After saving the movement data of the current track point in the track set, it also includes:

[0042] When the number of track points in the track set is greater than a second preset threshold, the track point farthest from the current moment is deleted.

[0043] In a second aspect, an embodiment of the present invention provides a trajectory prediction device, comprising:

[0044] A data acquisition module is used to obtain the driving data of the moving target to be measured from the previous moment to the current moment, as well as the trajectory equation of the moving target to be measured at the previous moment; wherein the previous moment and the current moment are two consecutive moments, and the driving data includes the translation distance and the heading angle;

[0045] The trajectory determination module is used to determine the trajectory equation of the moving target to be measured at the current moment based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, so as to predict the trajectory of the moving target to be measured according to the trajectory equation at the current moment.

[0046] In one possible implementation, a trajectory determination module is configured to perform matrix conversion on a translation distance of the moving target to be measured from a previous moment to a current moment to obtain a translation matrix of the moving target to be measured from the previous moment to the current moment;

[0047] Performing matrix conversion on the heading angle of the moving target to be measured from the previous moment to the current moment to obtain the rotation matrix of the moving target to be measured from the previous moment to the current moment;

[0048] Based on the translation matrix and rotation matrix from the previous moment to the current moment, the trajectory equation of the previous moment is rotated and translated to determine the trajectory equation of the moving target to be measured at the current moment.

[0049] In a possible implementation, a trajectory determination module is configured to convert a trajectory equation at a previous moment into a quadratic matrix of the trajectory at the previous moment;

[0050] Determine the quadratic matrix of the trajectory at the current moment based on the quadratic matrix of the trajectory at the previous moment, the transpose of the translation matrix, the transpose of the rotation matrix, and the product of the translation matrix and the rotation matrix;

[0051] Based on the quadratic matrix of the trajectory at the current moment, the trajectory equation of the moving target to be measured at the current moment is determined.

[0052] In one possible implementation, the translation matrix M is:

[0053]

[0054] The rotation matrix R is:

[0055]

[0056] The trajectory equation at the previous moment is:

[0057] x=c 2,k-1 y 2 +c 1,k-1 y+c 0,k-1 ;

[0058] The quadratic matrix of the trajectory at the previous moment is:

[0059]

[0060] The quadratic matrix of the trajectory at the current moment is:

[0061]

[0062] Among them, x0 is the horizontal coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, y0 is the vertical coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, θ is the heading angle of the moving target to be measured from the previous moment to the current moment, c 2,k-1 is the curvature of the moving target to be measured when the longitudinal distance is 0 at the previous moment, c 1,k-1 is the heading angle of the moving target to be measured when the vertical distance is 0 at the previous moment, c 0,k-1 is the position of the moving target to be measured when the vertical distance is 0 at the previous moment, x is the horizontal coordinate of the trajectory equation, and y is the vertical coordinate of the trajectory equation.

[0063] In a possible implementation, the data acquisition module is configured to store the acquired movement data of the trajectory point at the previous moment in a trajectory set; wherein the movement data includes at least the horizontal coordinate and the vertical coordinate of the trajectory point;

[0064] When the number of trajectory points in the trajectory set is less than a first preset threshold, the trajectory equation is not calculated;

[0065] When the number of trajectory points in the trajectory set is equal to a first preset threshold, fitting all trajectory points in the trajectory set to determine the trajectory equation at the previous moment;

[0066] When the number of trajectory points in the trajectory set is greater than a first preset threshold, the trajectory equation of the previous moment is determined based on the trajectory equation of the previous moment and the driving data from the previous moment to the previous moment, where the previous moment is the next adjacent moment of the previous moment.

[0067] In a possible implementation, the data acquisition module is configured to save the movement data of the trajectory point at the current moment in a trajectory set; wherein the movement data includes at least the horizontal coordinate and the vertical coordinate of the trajectory point;

[0068] A trajectory determination module is used to determine an error value of the trajectory equation at the current moment based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment;

[0069] When the error value is greater than the preset error, all trajectory points in the trajectory set are fitted and the trajectory equation at the current moment is updated.

[0070] In one possible implementation, the trajectory determination module is configured to input the ordinate of the trajectory point at the current moment into the trajectory equation at the current moment to obtain a predicted abscissa of the trajectory point at the current moment;

[0071] An error value of the trajectory equation at the current moment is determined based on a difference between the abscissa of the trajectory point at the current moment and the predicted abscissa of the trajectory point at the current moment.

[0072] In a possible implementation, the data acquisition module is configured to delete the trajectory point farthest from the current moment when the number of trajectory points in the trajectory set is greater than a second preset threshold.

[0073] In a third aspect, an embodiment of the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.

[0074] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0075] An embodiment of the present invention provides a trajectory prediction method, device, and storage medium. First, the driving data of a moving target to be measured from the previous moment to the current moment, as well as the trajectory equation of the moving target to be measured at the previous moment, are obtained. Then, based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, the trajectory equation of the moving target to be measured at the current moment is determined, so as to predict the trajectory of the moving target to be measured based on the trajectory equation at the current moment, without adding a trajectory point at the current moment and then performing a fitting operation using the trajectory point at the current moment and the trajectory points at multiple previous moments to obtain the trajectory equation at the current moment. Since the trajectory equation at the previous moment is obtained based on the operating data at historical moments, after obtaining the driving data at the current moment, it is only necessary to adjust the trajectory equation at the previous moment using the driving data from the previous moment to the current moment to obtain the trajectory equation at the current moment, without the need for re-fitting, thereby reducing the amount of calculation and improving the calculation speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0077] Figure 1 is a flow chart of an implementation of a trajectory prediction method provided by an embodiment of the present invention;

[0078] Figure 2 is a structural diagram of a trajectory prediction device provided by an embodiment of the present invention;

[0079] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0080] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0081] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below with reference to the accompanying drawings.

[0082] As described in the background, trajectory prediction for moving targets is often performed by fitting multiple trajectory points to obtain a trajectory equation. To improve prediction accuracy, a sufficient number of trajectory points is often required. However, fitting with a sufficient number of trajectory points requires considerable computational effort, consuming a significant amount of computational time. In practice, the significant computational time required for trajectory prediction can also lead to other problems. For example, when an autonomous vehicle system uses trajectory prediction for other vehicles as moving targets to achieve automatic avoidance control, if trajectory point fitting consumes a significant amount of time, this can easily lead to problems such as delayed avoidance.

[0083] The present application aims to provide a trajectory prediction method with high computational efficiency to reduce the amount of computation in the trajectory prediction process, thereby avoiding the situation where trajectory prediction consumes a large amount of computational time, affecting the rapid and accurate detection and tracking of mobile targets, or avoiding the situation where trajectory prediction consumes a large amount of computational time, resulting in the inability to timely identify dangerous behaviors of mobile targets.

[0084] In the prior art, a cubic polynomial is usually used to describe the trajectory of a moving target, such as x=c3y 3 +c2y 2 +c1y+c0, y is the longitudinal distance, x is the lateral distance, c0 represents the position of the track when the longitudinal distance is 0, c1 represents the heading angle of the track when the longitudinal distance is 0, c2 represents the curvature of the track when the longitudinal distance is 0, and c3 represents the derivative of the curvature of the track when the longitudinal distance is 0. In general, c3=0, so the trajectory equation is x=c2y 2 +c1y+c0.

[0085] Then, according to the known coordinates of all trajectory points from time 1 to time N (x i ,y i ), i = 1, ..., N, and the trajectory equation is determined by solving the values of the trajectory coefficients c0, c1, and c2. Currently, the commonly used algorithm is to determine the trajectory coefficients by fitting the trajectory points.

[0086] The calculation process of fitting the trajectory point at time k is:

[0087]

[0088] make We can get X=YC,

[0089] Trajectory coefficient C=(Y T Y) -1 Y T X.

[0090] As can be seen from the above expression, calculating the trajectory coefficient C requires 21 × N multiplications and (12 × N)-6 additions, where N is the number of trajectory points. The larger N is, the more computation is required, and the longer the calculation time is.

[0091] In order to solve the problems existing in the prior art, the embodiments of the present invention provide a trajectory prediction method, device and storage medium. The trajectory prediction method provided by the embodiments of the present invention is first introduced below.

[0092] See also Figure 1 , which shows a flow chart of the implementation of the trajectory prediction method provided by an embodiment of the present invention, and is described in detail as follows:

[0093] Step S110: Acquire the driving data of the moving target to be measured from the previous moment to the current moment, and the trajectory equation of the moving target to be measured at the previous moment.

[0094] The previous moment and the current moment are two consecutive moments, and the driving data includes the translation distance and the heading angle.

[0095] The translation distance and heading angle can be obtained through the self-information of the moving target to be measured at the previous moment and the current moment. The self-information can be obtained through sensors installed on the moving target to be measured, such as radar, laser, light detection and ranging (lidar) or GPS.

[0096] Step S120: Based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, determine the trajectory equation of the moving target to be measured at the current moment, so as to predict the trajectory of the moving target to be measured according to the trajectory equation at the current moment.

[0097] After obtaining the current trajectory point, there's no need to perform a fitting calculation using both the current and previous trajectory points. The trajectory equation for the current moment is obtained through fitting. The trajectory equation for the previous moment is derived based on historical operating data of the target. This trajectory equation accurately reflects the target's trajectory. When determining the current trajectory equation, the previous trajectory equation can be corrected using the driving data from the previous moment to the current moment, eliminating the need for refitting. This reduces computational effort and saves computation time.

[0098] The trajectory prediction method provided by this invention can be used to predict the trajectory of a moving target itself, or it can be used to predict the trajectories of other moving targets in the same scene as the moving target. For example, an autonomous vehicle system can predict the trajectory of the vehicle itself and surrounding vehicles during control to improve driving safety.

[0099] In some implementations, the trajectory equation of the moving target to be measured at the previous moment can be obtained by the following steps:

[0100] Step S1101: Save the acquired movement data of the trajectory point at the previous moment in a trajectory set.

[0101] Specifically, the movement data includes at least the horizontal and vertical coordinates of the trajectory points. The trajectory set can store the movement data of the trajectory points of the mobile target under test over multiple days, or it can store the movement data of the trajectory points of only one day, or it can store the movement data of the trajectory points of only the current trip. In addition, the trajectory set can be used to store not only the movement data of the trajectory points of the mobile target under test itself, but also the movement data of the trajectory points of other mobile objects interacting with it. This is not limited here and can be set according to the actual use scenario.

[0102] Step S1102: Determine the trajectory equation based on the number of trajectory points stored in the trajectory set.

[0103] When the number of track points in a track set is less than a first preset threshold, the track cannot be accurately predicted due to the small number of track points, and therefore the track equation is not calculated. For example, it can be set that when the number of track points in a track set is less than 3, the track equation is not calculated. Of course, the setting of the first preset threshold here can be set according to the user's usage scenario and is not limited here.

[0104] When the number of trajectory points in the trajectory set reaches a first preset threshold, it indicates that the set has a sufficient number of trajectory points for trajectory prediction. Data fitting is then performed using the motion data of all trajectory points in the trajectory set to determine the trajectory equation of the target at the previous moment. This trajectory equation becomes the initial trajectory equation of the target.

[0105] When the number of trajectory points in the trajectory set is greater than a first preset threshold, the trajectory equation at the previous moment is determined by the trajectory equation at the previous moment and the driving data from the previous moment to the previous moment.

[0106] In this embodiment, the trajectory of the target at the previous moment can be determined based on the number of trajectory points in the trajectory set. When the trajectory set contains a sufficient number of trajectory points, the initial trajectory equation of the target can be determined through fitting. As the number of trajectory points in the trajectory set gradually increases, fitting is no longer necessary. The trajectory equation at the previous moment and the driving data from the previous moment to the previous moment can be directly used to determine the trajectory equation at the previous moment, thereby reducing the amount of calculation.

[0107] In some embodiments, the number of track points that can be stored in the track set can also be set. The track points acquired at each moment are stored in the track set. When the number of track points stored in the track set exceeds a second preset threshold, the track point farthest from the current moment is deleted.

[0108] In this embodiment, since the running state of the moving target to be measured will change during the movement process, the trajectory point farthest from the current moment has a weaker impact on the trajectory prediction at the current moment. Therefore, only the trajectory points within a certain time range from the current moment are retained. This not only ensures the accuracy of the prediction, but also reduces the amount of calculation and storage pressure.

[0109] In some embodiments, step S120 may first perform a matrix transformation on the driving data from the previous moment to the current moment, and then determine the trajectory equation of the moving target to be measured at the current moment based on the matrix of the transformed driving data and the trajectory equation at the previous moment.

[0110] In this embodiment, step S120 specifically includes the following steps:

[0111] Step S1201: Perform matrix conversion on the translation distance of the moving target to be measured from the previous moment to the current moment to obtain the translation matrix of the moving target to be measured from the previous moment to the current moment.

[0112] Translation distance from the previous moment to the current moment After matrix conversion, the translation matrix M of the moving target to be measured from the previous moment to the current moment is obtained as follows:

[0113]

[0114] x0 is the horizontal coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, and y0 is the vertical coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment.

[0115] Step S1202: Perform matrix conversion on the heading angle of the moving target to be measured from the previous moment to the current moment to obtain a rotation matrix of the moving target to be measured from the previous moment to the current moment.

[0116] Perform matrix conversion on the heading angle θ from the previous moment to the current moment, and obtain the rotation matrix R of the moving target from the previous moment to the current moment:

[0117]

[0118] Step S1203: Based on the translation matrix and the rotation matrix from the previous moment to the current moment, the trajectory equation of the previous moment is rotated and translated to determine the trajectory equation of the moving target to be measured at the current moment.

[0119] First, convert the trajectory equation of the previous moment into the quadratic matrix of the trajectory of the previous moment. The trajectory equation of the k-1 moment is x=c 2,k-1 y 2 +c 1,k-1 y+c 0,k-1 , convert it into a quadratic matrix, that is:

[0120]

[0121] Among them, c 2,k-1 is the curvature of the moving target to be measured when the longitudinal distance is 0 at the previous moment, c 1,k-1 is the heading angle of the moving target to be measured when the vertical distance is 0 at the previous moment, c 0,k-1 is the position of the moving target to be measured when the vertical distance is 0 at the previous moment.

[0122] Then, based on the quadratic matrix of the trajectory at the previous moment, the transpose of the translation matrix, the transpose of the rotation matrix, and the product of the translation matrix and the rotation matrix, the quadratic matrix of the trajectory at the current moment is determined.

[0123] Among them, the quadratic matrix obtained at the current moment is:

[0124]

[0125] Finally, based on the quadratic matrix of the trajectory at the current moment, the trajectory equation of the moving target to be measured at the current moment is determined. By integrating the above quadratic matrix at the current moment, we can get:

[0126]

[0127] According to the above formula, the trajectory coefficient c at the current moment k is obtained 0,k =P 33 、c 1,k =2P 23 、c 2,k =P 22 .

[0128] Specifically, c 0,k =P 33 =c 2,k-1 x0 2 sinθ+c 2,k-1 y0 2 (cosθ) 2 +c 1,k-1 x0 sinθ-c 1,k-1 y0 cosθ+c 0,k-1 +y0 sinθ+x0 cosθ;

[0129] c 1,k =2P 23 =2(c 2,k-1 x0 sinθcosθ-c 2,k-1 y0(cosθ) 2 -0.5sinθ+0.5c 1,k-1 cosθ);

[0130] c 2,k =P 22 =c 2,k-1 (cosθ) 2 ;

[0131] By adopting the trajectory prediction method provided by the present invention, only 108 multiplications and 72 additions are required to obtain the coefficients of the trajectory equation.

[0132] As mentioned earlier, using a conventional fitting algorithm requires 21×N multiplications and (12×N)-6 additions. This means that when the number of trajectory points is greater than 5, the trajectory prediction method provided by the present invention can reduce the amount of computation. However, when performing trajectory prediction, a large number of trajectory points are required to accurately predict the trajectory.

[0133] The previously described solution primarily targets relatively stable operating conditions. However, if the target makes a rapid turn, the trajectory coefficients obtained at the current moment may contain errors. Therefore, the resulting trajectory equations must be evaluated.

[0134] In some embodiments, after step S120, a step of determining the trajectory equation at the current moment is further included. Specifically, the steps include:

[0135] Step S130: Determine the error value of the trajectory equation at the current moment through the trajectory equation at the current moment and the movement data of the trajectory point at the current moment.

[0136] The error value of the trajectory equation at the current moment can be determined by comparing the trajectory equation at the current moment with the movement data of the trajectory point at the current moment. For example, step S130 may include:

[0137] Step S1301: Input the ordinate of the trajectory point at the current moment into the trajectory equation at the current moment to obtain the predicted abscissa of the trajectory point at the current moment.

[0138] Step S1302: Determine the error value of the trajectory equation at the current moment based on the difference between the horizontal coordinate of the trajectory point at the current moment and the predicted horizontal coordinate of the trajectory point at the current moment.

[0139] The calculation formula of the error value is:

[0140] ε=(c2y0 2 +c1y0+c0-x0) 2 ;

[0141] x0 and y0 are the horizontal coordinate and vertical coordinate of the trajectory point at the current moment, respectively. c0, c1, and c2 are the trajectory coefficients of the trajectory equation obtained by adopting the trajectory prediction method provided by the present invention.

[0142] Step S140: When the error value is greater than the preset error, all trajectory points in the trajectory set are fitted to update the trajectory equation at the current moment.

[0143] The preset error can be set according to the actual application scenario and is not limited here.

[0144] In this implementation, by adding a check on the accuracy of the trajectory equation, the impact of rapid turns on the trajectory prediction can be avoided. Once the error in the trajectory equation at the current moment exceeds a preset error, a fit is performed based on all trajectory points in the trajectory set, re-updating the trajectory equation at the current moment to ensure accurate trajectory prediction.

[0145] The trajectory prediction method provided by the present invention first obtains the driving data of the mobile target to be measured from the previous moment to the current moment, as well as the trajectory equation of the mobile target to be measured at the previous moment. Then, based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, the trajectory equation of the mobile target to be measured at the current moment is determined, so as to predict the trajectory of the mobile target to be measured based on the trajectory equation at the current moment. There is no need to add a trajectory point at the current moment and then use the trajectory point at the current moment and the trajectory points at multiple previous moments to perform a fitting operation to obtain the trajectory equation at the current moment. Among them, since the trajectory equation at the previous moment is obtained based on data at historical moments and reflects the trajectory of the mobile target to be measured at the previous moment, after obtaining the driving data at the current moment, it is only necessary to use the driving data from the previous moment to the current moment to adjust the trajectory equation at the previous moment without re-fitting, thereby reducing the amount of calculation and saving computing time.

[0146] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0147] Based on the trajectory prediction method provided in the above embodiment, the present invention also provides a specific implementation of a trajectory prediction device applied to the trajectory prediction method. Please refer to the following embodiment.

[0148] like Figure 2 As shown, a trajectory prediction device 200 is provided, comprising:

[0149] The data acquisition module 210 is used to obtain the travel data of the moving target to be measured from the previous moment to the current moment, and the trajectory equation of the moving target to be measured at the previous moment; wherein the previous moment and the current moment are two consecutive moments, and the travel data includes the translation distance and the heading angle;

[0150] The trajectory determination module 220 is used to determine the trajectory equation of the moving target to be measured at the current moment based on the driving data from the previous moment to the current moment and the trajectory equation at the previous moment, so as to predict the trajectory of the moving target to be measured according to the trajectory equation at the current moment.

[0151] In one possible implementation, the trajectory determination module 220 is configured to perform matrix conversion on the translation distance of the moving target to be measured from the previous moment to the current moment to obtain a translation matrix of the moving target to be measured from the previous moment to the current moment;

[0152] Performing matrix conversion on the heading angle of the moving target to be measured from the previous moment to the current moment to obtain the rotation matrix of the moving target to be measured from the previous moment to the current moment;

[0153] Based on the translation matrix and rotation matrix from the previous moment to the current moment, the trajectory equation of the previous moment is rotated and translated to determine the trajectory equation of the moving target to be measured at the current moment.

[0154] In one possible implementation, the trajectory determination module 220 is configured to convert the trajectory equation at the previous moment into a quadratic matrix of the trajectory at the previous moment;

[0155] Determine the quadratic matrix of the trajectory at the current moment based on the quadratic matrix of the trajectory at the previous moment, the transpose of the translation matrix, the transpose of the rotation matrix, and the product of the translation matrix and the rotation matrix;

[0156] Based on the quadratic matrix of the trajectory at the current moment, the trajectory equation of the moving target to be measured at the current moment is determined.

[0157] In one possible implementation, the translation matrix M is:

[0158]

[0159] The rotation matrix R is:

[0160]

[0161] The trajectory equation at the previous moment is:

[0162] x=c 2,k-1 y 2 +c 1,k-1 y+c 0,k-1 ;

[0163] The quadratic matrix of the trajectory at the previous moment is:

[0164]

[0165] The quadratic matrix of the trajectory at the current moment is:

[0166]

[0167] Among them, x0 is the horizontal coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, y0 is the vertical coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, θ is the heading angle of the moving target to be measured from the previous moment to the current moment, c 2,k-1 is the curvature of the moving target to be measured when the longitudinal distance is 0 at the previous moment, c 1,k-1 is the heading angle of the moving target to be measured when the vertical distance is 0 at the previous moment, c 0,k-1 is the position of the moving target to be measured when the vertical distance is 0 at the previous moment, x is the horizontal coordinate of the trajectory equation, and y is the vertical coordinate of the trajectory equation.

[0168] In a possible implementation, the data acquisition module 210 is configured to store the acquired movement data of the trajectory point at the previous moment in a trajectory set; wherein the movement data includes at least the horizontal coordinate and the vertical coordinate of the trajectory point;

[0169] When the number of trajectory points in the trajectory set is less than a first preset threshold, the trajectory equation is not calculated;

[0170] When the number of trajectory points in the trajectory set is equal to a first preset threshold, fitting all trajectory points in the trajectory set to determine the trajectory equation at the previous moment;

[0171] When the number of trajectory points in the trajectory set is greater than a first preset threshold, the trajectory equation of the previous moment is determined based on the trajectory equation of the previous moment and the driving data from the previous moment to the previous moment, where the previous moment is the next adjacent moment of the previous moment.

[0172] In a possible implementation, the data acquisition module 210 is configured to save the movement data of the trajectory point at the current moment in a trajectory set; wherein the movement data includes at least the horizontal coordinate and the vertical coordinate of the trajectory point;

[0173] A trajectory determination module 220 is configured to determine an error value of the trajectory equation at the current moment based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment;

[0174] When the error value is greater than the preset error, all trajectory points in the trajectory set are fitted and the trajectory equation at the current moment is updated.

[0175] In one possible implementation, the trajectory determination module 220 is configured to input the ordinate of the trajectory point at the current moment into the trajectory equation at the current moment to obtain the predicted abscissa of the trajectory point at the current moment;

[0176] An error value of the trajectory equation at the current moment is determined based on a difference between the abscissa of the trajectory point at the current moment and the predicted abscissa of the trajectory point at the current moment.

[0177] In a possible implementation, the data acquisition module 210 is configured to delete the trajectory point farthest from the current moment when the number of trajectory points in the trajectory set is greater than a second preset threshold.

[0178] Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, the electronic device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the above-mentioned trajectory prediction method embodiments are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of the modules in the above-mentioned device embodiments are realized, for example, Figure 2 The functions of the modules 210 to 220 are shown.

[0179] Exemplarily, the computer program 32 may be divided into one or more modules, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules may be a series of computer program instruction segments that can implement specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the electronic device 3. For example, the computer program 32 may be divided into Figure 2 Modules 210 to 220 are shown.

[0180] The electronic device 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of electronic device 3 and does not constitute a limitation of electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0181] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0182] The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Furthermore, the memory 31 may include both an internal storage unit of the electronic device 3 and an external storage device. The memory 31 is used to store the computer program and other programs and data required by the electronic device. The memory 31 may also be used to temporarily store data that has been output or is about to be output.

[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0184] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0185] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0186] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0188] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0189] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned trajectory prediction method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0190] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A trajectory prediction method, characterized in that: include: Acquire travel data of the moving target to be measured from a previous moment to a current moment, and a trajectory equation of the moving target to be measured at the previous moment; wherein the previous moment and the current moment are two consecutive moments, and the travel data includes a translation distance and a heading angle; Performing matrix conversion on the translation distance of the moving target to be measured from the previous moment to the current moment to obtain the translation matrix of the moving target to be measured from the previous moment to the current moment; Performing matrix conversion on the heading angle of the moving target to be measured from the previous moment to the current moment to obtain a rotation matrix of the moving target to be measured from the previous moment to the current moment; Converting the trajectory equation of the previous moment into a quadratic matrix of the trajectory of the previous moment; Determine the quadratic matrix of the trajectory at the current moment based on the quadratic matrix of the trajectory at the previous moment, the transpose of the translation matrix, the transpose of the rotation matrix, and the product of the translation matrix and the rotation matrix; Based on the quadratic matrix of the trajectory at the current moment, the trajectory equation of the mobile target to be measured at the current moment is determined, so as to predict the trajectory of the mobile target to be measured according to the trajectory equation at the current moment.

2. The trajectory prediction method according to claim 1, wherein: The translation matrix M is: The rotation matrix R is: The trajectory equation at the previous moment is: x=c 2,k-1 y 2 +c 1,k-1 y+c 0,k-1 ; The quadratic matrix of the trajectory at the previous moment is: The quadratic matrix of the trajectory at the current moment is: Wherein, x0 is the horizontal coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, y0 is the vertical coordinate of the translation distance of the moving target to be measured from the previous moment to the current moment, θ is the heading angle of the moving target to be measured from the previous moment to the current moment, c 2,k-1 is the curvature of the moving target to be measured when the vertical distance is 0 at the previous moment, c 1,k-1 is the heading angle of the moving target to be measured when the vertical distance is 0 at the previous moment, c 0,k-1 is the position of the moving target to be measured when the vertical distance is 0 at the previous moment, x is the horizontal coordinate of the trajectory equation, and y is the vertical coordinate of the trajectory equation.

3. The trajectory prediction method according to claim 1, wherein: The method for determining the trajectory equation of the moving target to be measured at the previous moment is: Saving the acquired movement data of the trajectory point at the previous moment in a trajectory set; wherein the movement data at least includes the horizontal coordinate and the vertical coordinate of the trajectory point; When the number of trajectory points in the trajectory set is less than a first preset threshold, the trajectory equation is not calculated; When the number of trajectory points in the trajectory set is equal to a first preset threshold, fitting all trajectory points in the trajectory set to determine the trajectory equation at the previous moment; When the number of trajectory points in the trajectory set is greater than a first preset threshold, the trajectory equation of the previous moment is determined based on the trajectory equation of the previous moment and the driving data from the previous moment to the previous moment; wherein the previous moment is the next adjacent moment of the previous moment.

4. The trajectory prediction method according to claim 1, wherein: After obtaining the travel data of the moving target to be measured from the previous moment to the current moment, the method further includes: Saving the movement data of the trajectory point at the current moment in a trajectory set; wherein the movement data at least includes the horizontal coordinate and the vertical coordinate of the trajectory point; The trajectory prediction method further includes: Determining an error value of the trajectory equation at the current moment based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment; When the error value is greater than a preset error, all trajectory points in the trajectory set are fitted to update the trajectory equation at the current moment.

5. The trajectory prediction method according to claim 4, wherein: The determining, based on the trajectory equation at the current moment and the movement data of the trajectory point at the current moment, an error value of the trajectory equation at the current moment includes: Inputting the ordinate of the trajectory point at the current moment into the trajectory equation at the current moment to obtain the predicted abscissa of the trajectory point at the current moment; An error value of the trajectory equation at the current moment is determined based on a difference between the horizontal coordinate of the trajectory point at the current moment and the predicted horizontal coordinate of the trajectory point at the current moment.

6. The trajectory prediction method according to claim 4, wherein: After the movement data of the trajectory point at the current moment is saved in the trajectory set, the method further includes: When the number of track points in the track set is greater than a second preset threshold, the track point farthest from the current moment is deleted.

7. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Vehicle trajectory prediction method and device, equipment and storage medium

    CN113672845A

  • Obstacle trajectory prediction method and apparatus, electronic device, and storage medium

    WO2023001168A1