Multi-level dynamic adaptive trajectory optimization method and device, medium and program product
By using a multi-level dynamic adaptation trajectory optimization method, combined with multiple algorithms to optimize the turning angle of trajectory points, the problem of poor trajectory optimization effect in existing technologies is solved, and the smoothness and continuity of trajectory data are achieved, making it adaptable to complex scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-31
AI Technical Summary
The lack of coordination among various optimization algorithms in existing technologies leads to poor trajectory optimization results and makes it difficult to cope with complex scenarios such as noise points, outliers, and sudden changes in trajectory direction.
A multi-level dynamic adaptation trajectory optimization method is adopted, which combines median filtering, weighted averaging, curve fitting and exponential smoothing. Through hierarchical processing and dynamic adaptation, the turning angle of the trajectory points is optimized.
It achieves smooth, continuous, and accurate trajectory data, which can more realistically reflect the driving trajectory and status of the target vehicle and adapt to various scenarios with complex trajectory data.
Smart Images

Figure CN121765162A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a multi-level dynamic adaptation trajectory optimization method, device, medium, and program product. Background Technology
[0002] In the fields of digital twins and intelligent transportation, it is necessary to simulate complex traffic scenarios and vehicle movements. By optimizing trajectory data, it is possible to ensure smoother and more realistic vehicle movements in the simulated scenarios, thereby improving the accuracy and reliability of the simulation. Therefore, trajectory data optimization is a crucial step in building high-precision virtual models.
[0003] Existing technologies mainly employ moving average, weighted average, median filtering, exponential smoothing, and curve fitting methods to achieve trajectory smoothing and optimization. While these methods optimize trajectory data to some extent, they still present numerous challenges in complex and ever-changing real-world application scenarios. They struggle to simultaneously handle various complex situations, such as noise points, outliers, and abrupt changes in trajectory direction. Furthermore, the lack of coordinated trajectory optimization methods among different algorithms leads to unsatisfactory optimization results. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this application provides a multi-level dynamically adapted trajectory optimization method, device, medium, and program product, which at least solves the problem of poor trajectory optimization results caused by the lack of coordination among various optimization algorithms in existing technologies.
[0005] To achieve the above objectives and other advantages, this application adopts the following technical solution:
[0006] Firstly, this application provides a multi-level dynamic adaptation trajectory optimization method, including:
[0007] Obtain a set of trajectory points for the target vehicle, the set of trajectory points including multiple trajectory points and the first steering angle of the trajectory points;
[0008] The median filtering method is used to detect noise points in the trajectory points and perform noise reduction processing. The first turning angle of the noise points is adjusted to obtain the second turning angle of the trajectory points.
[0009] The trajectory points are smoothed in a local area using a weighted averaging method to obtain the third turning angle of the locally smoothed trajectory points.
[0010] The global trajectory trend of the trajectory points is fitted using curve fitting to obtain the fourth steering angle of the trajectory points after global optimization.
[0011] Based on the global trajectory trend fitting results and combined with previous trajectory points, the fourth turning angle of the trajectory points is dynamically updated using the exponential smoothing method to obtain the final turning angle of the trajectory points after real-time optimization.
[0012] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the steps of detecting noise points in the trajectory points using median filtering and performing noise reduction processing, and adjusting the first steering angle of the noise points to obtain the second steering angle of the trajectory points include:
[0013] Each of the aforementioned trajectory points is taken as the center trajectory point;
[0014] A set of steering angles is determined based on a set filter window size. The set of steering angles includes the first steering angle of the center trajectory point and the first steering angles of several adjacent trajectory points before and after the center trajectory point. The median value of the set of steering angles within the filter window is also determined.
[0015] Calculate the difference between the first turning angle of the center trajectory point and the median value, and determine whether the difference is greater than a preset threshold.
[0016] If yes, the center trajectory point is determined to be a noise point, and the median is used as the second turning angle to replace the first turning angle of the noise point; otherwise, the center trajectory point is determined to be a non-noise point.
[0017] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the step of smoothing the trajectory points in a local region using a weighted averaging method to obtain the third turning angle of the locally smoothed trajectory points includes:
[0018] Determine the local region surrounding each of the trajectory points;
[0019] Calculate the distance between adjacent trajectory points within the local area;
[0020] The weight of the second steering angle of each trajectory point is assigned based on the distance between the adjacent trajectory points;
[0021] The weighted average of the second turning angles of all trajectory points within the local region is calculated based on the assigned weights to obtain the third turning angle of each trajectory point after local smoothing.
[0022] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the step of fitting the global trajectory trend of the trajectory point using curve fitting to obtain the fourth turning angle of the globally optimized trajectory point includes:
[0023] Obtain the number of time steps for each of the trajectory points;
[0024] Based on the number of time steps, the third turning angle of each trajectory point is fitted using a set fitting equation, and a system of equations is constructed.
[0025] Solve the system of equations to obtain the fitting parameters of the fitted equation;
[0026] The time step and the fitting parameters are re-substituted into the fitting equation to calculate the fourth steering angle of the trajectory point after global optimization.
[0027] The calculated fourth steering angle of the trajectory point is compared with the initial value of the steering angle of the trajectory point. If the fitting error is within the preset range, the fitting equation is used for global optimization; otherwise, the form of the fitting equation is adjusted and the fitting process is re-executed.
[0028] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the step of dynamically updating the fourth turning angle of the trajectory point using exponential smoothing based on the global trajectory trend fitting result and combined with previous trajectory points to obtain the final turning angle of the trajectory point after real-time optimization includes:
[0029] Based on the fourth turning angle of the current trajectory point and the final turning angle of the previous trajectory point, the fourth turning angle of each trajectory point is iteratively updated using an exponential smoothing formula to obtain the final turning angle of the trajectory point after real-time optimization.
[0030] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the smoothing coefficient of the smoothing formula is calculated using the following formula:
[0031]
[0032] Where α is the smoothing coefficient. The fourth turning angle of the current trajectory point. The fourth turning angle of the previous trajectory point is given by , and variance() is the variance function.
[0033] According to the multi-level dynamic adaptation trajectory optimization method provided in this application, the step of obtaining the trajectory point set of the target vehicle includes:
[0034] Real-time acquisition of the target vehicle's driving trajectory data, which includes longitude, latitude, and timestamp;
[0035] Based on the longitude, latitude, and timestamp, the first turning angle of each trajectory point is calculated, thereby forming the trajectory point set.
[0036] Secondly, this application provides an electronic device, the electronic device comprising:
[0037] One or more processors; and a memory storing computer program instructions that, when executed, cause the processors to perform the multi-level dynamic adaptation trajectory optimization method as described above.
[0038] Thirdly, this application provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the multi-level dynamic adaptation trajectory optimization method as described above.
[0039] Fourthly, this application provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the multi-level dynamic adaptation trajectory optimization method as described above.
[0040] This application provides a multi-level dynamically adapted trajectory optimization method, device, medium, and program product. It acquires a set of trajectory points for a target vehicle, including multiple trajectory points and their first steering angles. Noise points are detected and denoised using median filtering, and the first steering angle of the noise points is adjusted to obtain the second steering angle. A weighted averaging method is used to smooth the trajectory points in a local area, resulting in a locally smoothed third steering angle. Curve fitting is used to fit the global trajectory trend of the trajectory points, yielding a globally optimized fourth steering angle. Based on the global trajectory trend fitting result and previous trajectory points, exponential smoothing is used to dynamically update the fourth steering angle, resulting in the final, real-time optimized steering angle. This application optimizes trajectory through a combination of layered processing (noise removal, local smoothing, global optimization, and real-time dynamic optimization) and dynamic adaptation. Layered processing considers both local and global trajectory characteristics, while the combination of dynamic adaptation methods flexibly adjusts the optimization strategy according to the real-time characteristics and requirements of trajectory data at different levels, adapting to complex trajectory data application scenarios. The optimized trajectory data is smoother, more continuous, and more accurate, and can more realistically reflect the driving trajectory and status of the target vehicle. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other implementation methods can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating the multi-level dynamic adaptation trajectory optimization method provided in the embodiments of this application;
[0043] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0044] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings.
[0045] It should be noted that those skilled in the art will understand, explicitly and implicitly, that the embodiments described in this application can be combined with other embodiments without conflict. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The terms "a," "an," "an," "the," and similar words used in this application do not indicate quantity limitation and can represent singular or plural. The terms "comprising," "including," "having," and any variations thereof used in this application are intended to cover non-exclusive inclusion; the terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of objects.
[0046] Moving Average: This method smooths data by calculating the average value of adjacent trajectory points and is often used for the initial processing of stationary trajectories.
[0047] Weighted average: This method assigns weights to trajectory points based on their importance (such as distance between points or time intervals) and is used for optimizing unevenly distributed data.
[0048] Median filtering: removes outliers from the trajectory and is suitable for data with a lot of noise.
[0049] Exponential smoothing: Optimizes real-time data with dynamic weights to improve trajectory continuity.
[0050] Curve fitting: Fits the overall trend of trajectory data and is suitable for global optimization.
[0051] These technologies lack adaptability to multiple scenarios. A single method often struggles to simultaneously address multiple issues such as noise points, outliers, and abrupt changes in trajectory direction. For example, the moving average method performs poorly on sharp turns or outliers and cannot eliminate abnormal turning angles. Real-time performance is insufficient. Curve fitting, in particular, requires global calculations and cannot adapt to real-time updated trajectory data, limiting its application in dynamic scenarios. Dynamic adjustment capabilities are lacking. The parameters of weighted averaging and exponential smoothing methods are usually fixed and difficult to dynamically adjust based on trajectory data characteristics, thus limiting further improvement in their optimization effects. There is a contradiction between local and global optimization. For example, the moving average method emphasizes local smoothing, while curve fitting emphasizes global trends. The lack of coordinated trajectory optimization methods among different algorithms leads to poor optimization results. Therefore, this application provides a multi-level dynamically adaptable trajectory optimization method, device, medium, and program product to at least solve the problem of poor trajectory optimization results caused by the lack of coordinated optimization methods among various optimization algorithms in the prior art.
[0052] Reference Figure 1 As shown, this application provides a multi-level dynamic adaptation trajectory optimization method, including:
[0053] Step S1: Obtain the set of trajectory points of the target vehicle. The set of trajectory points includes multiple trajectory points and the first steering angle of the trajectory points.
[0054] In this embodiment, step S1 specifically includes:
[0055] Step S101: Collect the driving trajectory data of the target vehicle in real time. The driving trajectory data includes longitude, latitude and timestamp.
[0056] Step S102: Based on longitude, latitude and timestamp, calculate the first turning angle of each trajectory point to form a set of trajectory points.
[0057] Specifically, high-precision positioning equipment such as GPS locators is used to collect the longitude, latitude, and timestamp of the target vehicle in real time. The data collection frequency can be set according to actual needs, such as 10 Hz or 5 Hz, to ensure the continuity and accuracy of the trajectory. Based on the timestamp sorting, for each trajectory point, the positions of its preceding and following trajectory points are determined. The azimuth angle between adjacent trajectory points is calculated using latitude and longitude data, that is, the angle between the line connecting the two points and due north. The difference between adjacent azimuth angles or the deviation relative to the initial azimuth angle is calculated as the first steering angle. The calculated first steering angle is combined with the corresponding trajectory point (including latitude, longitude, and timestamp) to form a trajectory point set. By collecting and calculating the steering angle of the trajectory points in real time, the driving status of the vehicle can be more accurately reflected, thereby improving the accuracy of trajectory optimization.
[0058] Step S2: Use median filtering to detect noise points in the trajectory points and perform noise reduction processing. Adjust the first turning angle of the noise points to obtain the second turning angle of the trajectory points.
[0059] In this embodiment, step S2 specifically includes:
[0060] Step S201: Designate each trajectory point as the center trajectory point;
[0061] Step S202: Determine a set of steering angles based on the set filter window size. The set of steering angles includes the first steering angle of the center trajectory point and the first steering angles of several adjacent trajectory points before and after the center trajectory point. Determine the median value of the set of steering angles within the filter window.
[0062] Step S203: Calculate the difference between the first turning angle of the center trajectory point and the median, and determine whether the difference is greater than a preset threshold;
[0063] If yes, proceed to step S204: determine the center trajectory point as a noise point, and replace the first steering angle of the noise point with the median as the second steering angle; if no, proceed to step S205: determine the center trajectory point as a non-noise point.
[0064] Specifically, the set of trajectory points is traversed, and each trajectory point is processed as the center trajectory point in turn. A filter window size is set, and N adjacent trajectory points before and after it are taken (including the center trajectory point itself, a total of 2n+1 points). For the current center trajectory point, its first turning angle and the first turning angles of several adjacent trajectory points before and after it are extracted to form a set of turning angles.
[0065] Sort the set of steering angles, where N can be 1, and calculate the value using the following formula:
[0066]
[0067] in, The median value. Centered on the trajectory point, , The median is the point adjacent to the center trajectory point. `median()` is the median calculation function.
[0068] Calculate the difference between the first steering angle and the median of the center trajectory point. Compare the difference with a preset threshold. If the difference is greater than the preset threshold, the center trajectory point is determined to be a noise point. The median is used as the second steering angle, replacing the first steering angle of the noise point. If the difference is not greater than the preset threshold, the center trajectory point is determined to be a non-noise point. Its first steering angle is retained as the second steering angle, without replacement.
[0069] The median filtering method effectively detects and removes noise points, and the median of the steering angle set is used to adjust the steering angle of the noise points, thereby reducing the interference of sudden steering angle changes.
[0070] Step S3: Use the weighted averaging method to smooth the trajectory points in the local area to obtain the third turning angle of the locally smoothed trajectory points.
[0071] Step S301: Determine the local region surrounding each trajectory point;
[0072] Step S302: Calculate the distance between adjacent trajectory points within the local area;
[0073] Step S303: Assign a weight to the second steering angle of each trajectory point based on the distance between adjacent trajectory points;
[0074] Step S304: Calculate the weighted average of the second turning angles of all trajectory points in the local area according to the assigned weights, so as to obtain the third turning angle of each trajectory point after local smoothing.
[0075] Specifically, to account for the relative positions (distances) between trajectory points, the turning angles of the trajectory points are locally smoothed to address the issue of uneven distances between them. A local region is defined for each trajectory point, and the trajectory points within this region are used to calculate the weighted average. The local region can be defined by choosing a fixed number of neighboring points (e.g., N points before and after) or based on distance (e.g., all points within a radius R).
[0076] To assign weights based on distance, it's necessary to first know the distance between each trajectory point and other trajectory points within its local region. The distance between trajectory points can be calculated using Euclidean distance, Manhattan distance, or other suitable distance metrics. Weights can be assigned using the reciprocal of the distance, a Gaussian function, or other decay functions. This embodiment uses the reciprocal of the distance to calculate the weights, as shown below:
[0077]
[0078] To dynamically calculate the weights based on the distance between the current trajectory point and the next trajectory point, Represents trajectory points and The distance between them.
[0079] For each trajectory point, calculate the weighted sum of the second steering angles of all trajectory points within its local region. Divide the weighted sum by the sum of the weights to obtain the weighted average. N can be 1. Calculate the weighted average of the second steering angles of the trajectory points using the following formula, which serves as the third steering angle for each trajectory point after local smoothing:
[0080]
[0081] in, The third turning angle of the trajectory point. , , This is the second turning angle for each trajectory point within the local area. , , The weights of the second turning angle for each trajectory point.
[0082] Using the weighted averaging method as a trajectory smoothing approach, when processing trajectory data, it can take into account the distance relationship between different trajectory points, thereby more reasonably allocating weights and achieving the effect of smoothing the trajectory.
[0083] Step S4: Use curve fitting to fit the global trajectory trend of the trajectory points to obtain the fourth turning angle of the globally optimized trajectory points.
[0084] In this embodiment, step 43 specifically includes:
[0085] Step S401: Obtain the number of time steps for each trajectory point;
[0086] Step S402: Based on the number of time steps, fit the third steering angle of each trajectory point using the set fitting equation, and construct a set of equations;
[0087] Step S403: Solve the system of equations to obtain the fitting parameters of the fitted equation;
[0088] Step S404: Substitute the number of time steps and the fitting parameters back into the fitting equation to calculate the fourth steering angle of the trajectory point after global optimization;
[0089] Step S405: Compare the calculated fourth steering angle of the trajectory point with the initial value of the steering angle of the trajectory point. If the fitting error is within the preset range, then use the fitting equation for global optimization; otherwise, adjust the form of the fitting equation and re-execute the fitting process.
[0090] Specifically, in trajectory data, each trajectory point is typically associated with a specific point in time. The time step can be the time interval between trajectory points or the cumulative time from the starting point to the current point. A suitable fitting equation is chosen, which uses the time step as the independent variable and the turning angle as the dependent variable. For all trajectory points, this equation is used to construct a system of equations, where each equation represents the fitting relationship for a trajectory point. The fitting equation can be a quadratic polynomial. The result after the local weighted smoothing process in step S3, i.e., the third turning angle of the trajectory point, is further fitted into a quadratic polynomial, as shown below:
[0091]
[0092] Where a, b, and c are the fitting parameters. This represents the time step number.
[0093] Mathematical methods (such as least squares, linear regression, and nonlinear optimization) are used to solve the system of equations to find the optimal parameters for the fitted equations. Once the fitted parameters are obtained, the specific form of the fitted equations can be determined. The time step number for each trajectory point is substituted into the fitted equation with the determined parameters to calculate the corresponding fourth steering angle.
[0094] Calculate the difference between the fourth steering angle and the initial steering angle, and determine whether this difference is within the preset error range. If it is within the preset error range, it indicates a good fit, and the current fitting equation is adopted; if the fit is poor, the form of the fitting equation needs to be adjusted (such as changing the order of the polynomial, trying different function types, etc.), and the fitting process is re-executed.
[0095] By capturing the overall trend of the trajectory through curve fitting, an optimal fitting curve can be found to approximate the vehicle's driving trajectory. This curve smoothly connects the various data points, thus significantly enhancing the continuity of the trajectory. This results in smoother and more continuous changes in steering angle, contributing to improved overall trajectory quality.
[0096] Meanwhile, curve fitting can also handle noise and outliers in the data. Since the original trajectory data may contain noise or outliers, the fitting process can reduce the impact of this noise on the overall trajectory trend. This embodiment uses the least squares method to solve for the fitting parameters, minimizing the influence of noise to enhance the effect of global smoothness.
[0097] Step S5: Based on the global trajectory trend fitting results and combined with the previous trajectory points, use the exponential smoothing method to dynamically update the fourth turning angle of the trajectory points, and obtain the final turning angle of the trajectory points after real-time optimization.
[0098] In this embodiment, based on the fourth turning angle of the current trajectory point and the final turning angle of the previous trajectory point, the fourth turning angle of each trajectory point is iteratively updated using an exponential smoothing formula to obtain the final turning angle of the trajectory point after real-time optimization.
[0099] Specifically, exponential smoothing is a commonly used time series forecasting and smoothing method. It smooths out fluctuations in historical data by weighting it and predicting future data points. The exponential smoothing formula is used to iteratively update the fourth turning angle of the current trajectory point. The exponential smoothing formula can be expressed as:
[0100]
[0101] Where α is the smoothing coefficient. The final turning angle of the trajectory point. The fourth turning angle of the current trajectory point. This is the final turning angle of the previous trajectory point in the historical data.
[0102] Starting from the initial trajectory point, the exponential smoothing formula is applied sequentially to iteratively update the steering angle of each trajectory point. During the iteration process, the final steering angle of each trajectory point is calculated based on its current steering angle and the smoothed steering angle of the previous trajectory points (i.e., the final optimized steering angle).
[0103] The formula for calculating the smoothing coefficient is:
[0104]
[0105] Where α is the smoothing coefficient. The fourth turning angle of the current trajectory point. The fourth turning angle of the previous trajectory point is given by , and variance() is the variance function.
[0106] In exponential smoothing algorithms, the smoothing coefficient α controls the relative weight of historical and newly generated data in the smoothing result, directly affecting the balance between smoothing effectiveness and response speed. The value of α is typically set between 0 and 1. Since noise levels may vary over time or spatially, a dynamic adjustment strategy for α can be considered. Specifically, for high-noise regions, the smoothing coefficient α can be decreased, while for low-noise regions, its value can be increased.
[0107] It's important to note that in high-noise regions, data points fluctuate significantly and contain considerable random errors. By decreasing the α value, the smoothing algorithm becomes more reliant on historical data and less sensitive to fluctuations in new data. This enhances the smoothing strength, effectively filters out noise, and yields more stable smoothing results. In low-noise regions, data points are relatively stable with gentler changes. By increasing the α value, the smoothing algorithm becomes more reliant on new data and responds more quickly to changes. This improves response speed, allowing the smoothing results to reflect actual data changes more rapidly. Therefore, exponential smoothing improves the real-time performance of trajectory optimization updates by dynamically adjusting and optimizing the smoothing coefficient.
[0108] Therefore, this application provides a multi-level dynamic adaptation trajectory optimization method that can adapt to complex trajectory data scenarios, including: low-quality data with a lot of noise, data with uneven distances and time intervals between trajectory points, sharp turns and sudden direction changes, and dynamic data requiring real-time updates. By combining multiple methods of hierarchical processing (noise cleaning, local smoothing, global optimization, and real-time dynamic optimization) and dynamic adaptation, trajectory optimization results in smoother turning angles and more continuous coordinate distribution between trajectory points. In complex road networks such as sharp turns, the trajectory path more closely resembles the actual vehicle driving path, eliminating abrupt changes caused by trajectory noise points.
[0109] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0110] Furthermore, some embodiments of this application also provide an electronic device. The electronic device can be various forms of digital computer, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, etc. The electronic device can also be various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices.
[0111] The electronic device includes: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the multi-level dynamic adaptation trajectory optimization method provided in any one or more of the above embodiments. Figure 2 An exemplary structural diagram of the electronic device is disclosed. For example... Figure 2As shown, the electronic device includes one or more processors 1101, a memory 1102, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0112] The electronic device may further include an input device 1103 and an output device 1104. The processor 1101, memory 1102, input device 1103, and output device 1104 may be connected via a bus or other means. Figure 2 Taking the example of a connection between China and Israel via a bus.
[0113] Input device 1103 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 1104 may include a display device, auxiliary lighting device (e.g., LED), and haptic feedback device (e.g., vibration motor). The display device may include, but is not limited to, a liquid crystal display (LCD), a light-emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0114] To provide interaction with the user, the electronic device can be a computer. This computer includes: a display device for showing information to the user (e.g., a cathode-ray tube (CRT) or an LCD monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0115] In this embodiment, a computer-readable medium stores a computer program / instruction, which, when executed by a processor, implements the multi-level dynamic adaptation trajectory optimization method provided in any one or more of the above embodiments. This computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into that device. The aforementioned computer-readable medium carries one or more computer-readable instructions.
[0116] The memory 1102 can serve as a non-transitory computer-readable storage medium, used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor 1101 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 1102, thereby implementing the program instructions / modules corresponding to the methods provided in any one or more of the embodiments described above in this application.
[0117] The memory 1102 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1102 may optionally include memory remotely located relative to the processor 1101, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0118] It should be noted that more specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0119] Computer-readable storage media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change random-access memory (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0120] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] In the above embodiments, all or part of the implementation can be achieved through software, hardware, firmware, or any combination thereof. For example, it can be implemented using an Application-Specific Integrated Circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the above steps or functions. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. In addition, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.
[0122] The computer program product provided in this application includes one or more computer programs / instructions. When executed by a processor, these computer programs / instructions generate, in whole or in part, the processes or functions described in this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive, SSD, etc.).
[0123] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0124] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.
Claims
1. A multi-layered dynamic adaptation trajectory optimization method, characterized in that, The method comprises the following steps: acquiring a trajectory point set of a target vehicle, the trajectory point set comprising a plurality of trajectory points and a first steering angle of the trajectory points; detecting noise points in the trajectory points and performing denoising processing using a median filtering method, and adjusting the first steering angle of the noise points to obtain a second steering angle of the trajectory points; smoothing the trajectory points in a local region using a weighted average method to obtain a third steering angle of the locally smoothed trajectory points; fitting a global trajectory trend of the trajectory points using a curve fitting method to obtain a fourth steering angle of the globally optimized trajectory points; dynamically updating the fourth steering angle of the trajectory points based on the global trajectory trend fitting result and in combination with previous trajectory points using an exponential smoothing method to obtain a final steering angle of the real-time optimized trajectory points.
2. The method of claim 1, wherein, The step of detecting noise points in the trajectory points and performing denoising processing using a median filtering method, and adjusting the first steering angle of the noise points to obtain a second steering angle of the trajectory points comprises: taking each of the trajectory points as a center trajectory point; determining a steering angle set based on a set filter window size, the steering angle set comprising the first steering angle of the center trajectory point and the first steering angles of a plurality of adjacent trajectory points before and after the center trajectory point, and determining a median value of the steering angle set in the filter window; calculating a difference value between the first steering angle of the center trajectory point and the median value, and determining whether the difference value is greater than a preset threshold value; if yes, determining that the center trajectory point is a noise point, and replacing the first steering angle of the noise point with the median value as a second steering angle, and if no, determining that the center trajectory point is a non-noise point.
3. The method of claim 1, wherein, The step of smoothing the trajectory points in a local region using a weighted average method to obtain a third steering angle of the locally smoothed trajectory points comprises: determining a local region around each of the trajectory points; calculating distances between adjacent trajectory points in the local region; assigning weights of the second steering angles of each of the trajectory points based on the distances between the adjacent trajectory points; calculating a weighted average value of the second steering angles of all the trajectory points in the local region according to the assigned weights to obtain a third steering angle of each of the locally smoothed trajectory points.
4. The method of claim 1, wherein, The step of fitting a global trajectory trend of the trajectory points using a curve fitting method to obtain a fourth steering angle of the globally optimized trajectory points comprises: acquiring a time step number of each of the trajectory points; fitting the third steering angle of each of the trajectory points using a set fitting equation based on the time step number, and constructing an equation set; solving the equation set to obtain a fitting parameter of the fitting equation; re-entering the time step number and the fitting parameter into the fitting equation to calculate to obtain a fourth steering angle of the globally optimized trajectory points; comparing the calculated fourth steering angle of the trajectory points with an initial value of the steering angle of the trajectory points, if a fitting error is within a preset range, using the fitting equation for global optimization, otherwise adjusting a form of the fitting equation and re-executing a fitting process.
5. The method of claim 1, wherein, The fourth steering angle of the trajectory point is dynamically updated using an exponential smoothing method based on the global trajectory trend fitting result and the previous trajectory point, to obtain the final steering angle of the trajectory point after real-time optimization, and the step comprises: The fourth steering angle of each trajectory point is iteratively updated using an exponential smoothing formula based on the fourth steering angle of the current trajectory point and the final steering angle of the previous trajectory point, to obtain the final steering angle of the trajectory point after real-time optimization.
6. The method of claim 5, wherein, The smoothing coefficient of the smoothing formula is calculated using the following formula: ; wherein a is a smoothing coefficient, is a fourth steering angle of a previous trajectory point, is a fourth steering angle of a previous trajectory point, variance() is a variance function.
7. The method of claim 1, wherein, The step of obtaining the trajectory point set of the target vehicle comprises: Real-time collection of driving trajectory data of the target vehicle, wherein the driving trajectory data comprises longitude, latitude and time stamp; Based on the longitude, latitude and time stamp, a first steering angle of each trajectory point is calculated to form the trajectory point set.
8. An electronic device, comprising: The electronic device comprises: One or more processors; and a memory storing computer program instructions which, when executed, cause the processor to perform the multi-level dynamic adaptation trajectory optimization method according to any one of claims 1-7.
9. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, The computer program / instructions, when executed by the processor, implement the multi-level dynamic adaptation trajectory optimization method according to any one of claims 1-7.
10. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions, when executed by the processor, implement the multi-level dynamic adaptation trajectory optimization method according to any one of claims 1-7.