Track generation method and device, electronic equipment, storage medium and program product

By obtaining and optimizing the driving trajectory of the target user, identifying and deleting useless trajectories, and generating trajectories that match the user's driving style, it solves the problem of untimely lane change and rigid planning in the autonomous driving solution, and achieves the accuracy and flexibility of the trajectory sex.

CN118936506APending Publication Date: 2024-11-12GUANGZHOU XIAOPENG CONNECTIVITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411126665.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing autonomous driving solutions lack prior information and beyond visual range perception, resulting in untimely lane change and unreasonable speed. The planning based on navigation information is too rigid and cannot match the user's driving habits.

Method used

By obtaining the driving trajectory of the target user, the accuracy is optimized, the useless trajectory is deleted, and the smoothing process is performed to generate a trajectory that matches the user's driving style.

Benefits of technology

The generated trajectory is highly accurate, matches the user's driving style, avoids the impact of useless trajectories on the trajectory, and improves the flexibility and applicability of autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118936506A_ABST
    Figure CN118936506A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of track generation, in particular to a track generation method and device, electronic equipment, a storage medium and a program product. Obtaining a to-be-processed track; the to-be-processed track is a target user driving track; performing precision optimization on the to-be-processed trajectory to generate an optimized trajectory; identifying the optimized tracks, and determining useless tracks in the optimized tracks; the useless track is used for representing a wrong driving track of the target user in the driving process; and deleting the useless trajectory, smoothing the remaining trajectory in the optimized trajectory, and generating a target trajectory matched with the target user. Therefore, the accuracy of the generated target track is ensured, and the influence of useless tracks on the target track is avoided. The method is generated based on the driving track of the target user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of trajectory generation, and in particular to a trajectory generation method, device, electronic device, storage medium and program product. Background Art

[0002] With the development of science and technology, autonomous driving technology is becoming more and more mature. At present, the industry's autonomous driving solutions are gradually shifting from relying on high-precision maps to relying on real-time perception. However, solutions based only on real-time perception lack prior information and beyond-visual-range perception, which can easily lead to problems such as untimely lane changes and unreasonable speeds.

[0003] In addition, the current autonomous driving planning modules in the industry mainly refer to navigation information for planning, but users' driving habits are different, and planning based only on navigation information will be too rigid.

[0004] Therefore, how to provide a planning trajectory that matches the user becomes an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present invention provides a trajectory generation method, device, electronic device, storage medium and program product to solve the problem of how to provide a planned trajectory that matches a user.

[0006] In a first aspect, the present invention provides a trajectory generation method, the method comprising:

[0007] Obtain the trajectory to be processed; the trajectory to be processed is the driving trajectory of the target user;

[0008] Optimize the accuracy of the trajectory to be processed and generate an optimized trajectory;

[0009] Identify the optimized trajectory and determine the useless trajectory in the optimized trajectory; the useless trajectory is used to characterize the wrong trajectory of the target user during driving;

[0010] Useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory that matches the target user.

[0011] The trajectory generation method provided in the embodiment of the present application obtains a trajectory to be processed; the trajectory to be processed is the driving trajectory of the target user; the accuracy of the trajectory to be processed is optimized to generate an optimized trajectory, thereby ensuring the accuracy of the generated optimized trajectory. The optimized trajectory is identified, and useless trajectories in the optimized trajectory are determined, thereby ensuring the accuracy of the useless trajectories in the determined optimized trajectory. The useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory that matches the target user, thereby ensuring the accuracy of the generated target trajectory and avoiding the influence of useless trajectories on the target trajectory. Since the above method generates a target trajectory based on the driving trajectory of the target user, the target trajectory matches the driving style of the target user.

[0012] In an optional implementation, performing precision optimization on the trajectory to be processed to generate an optimized trajectory includes:

[0013] The initial trajectory pose corresponding to each trajectory point in the trajectory to be processed is converted to the target coordinate system to generate a backup trajectory pose, and each backup trajectory pose is optimized to generate a backup trajectory;

[0014] Based on the alternative trajectories, an optimized trajectory is generated.

[0015] The trajectory generation method provided in the embodiment of the present application converts the initial trajectory posture corresponding to each trajectory point in the to-be-processed trajectory to the target coordinate system, generates a backup trajectory posture, and ensures the accuracy of the generated backup trajectory posture. Each backup trajectory posture is optimized to generate a backup trajectory, thereby ensuring that the generated backup trajectory has a high accuracy. Based on the backup trajectory, an optimized trajectory is generated, thereby ensuring that the generated optimized trajectory has a high accuracy.

[0016] In an optional implementation, optimizing the positions of the backup trajectories to generate the backup trajectories includes:

[0017] The global positioning constraint method is used to optimize the postures of each backup trajectory to generate the postures of each first trajectory;

[0018] Optimizing each first trajectory pose using an inter-frame positioning constraint method to generate each candidate trajectory pose;

[0019] Generate alternative trajectories based on the poses of each candidate trajectory.

[0020] The trajectory generation method provided in the embodiment of the present application optimizes each spare trajectory pose using a global positioning constraint method to generate each first trajectory pose, thereby ensuring the accuracy of the generated first trajectory pose. The inter-frame positioning constraint method is used to optimize each first trajectory pose to generate each candidate trajectory pose, thereby reducing the accumulation of local errors and ensuring the accuracy of each candidate trajectory pose. Based on each candidate trajectory pose, a spare trajectory is generated to ensure the accuracy of the generated spare trajectory.

[0021] In an optional implementation, generating an optimized trajectory based on the backup trajectory includes:

[0022] evaluating the backup trajectory to determine the current accuracy of the backup trajectory;

[0023] If the current accuracy corresponding to the backup trajectory is greater than or equal to the preset accuracy threshold, the backup trajectory is determined as the optimized trajectory;

[0024] If the current accuracy corresponding to the backup trajectory is less than the preset accuracy threshold, the backup trajectory posture is optimized again.

[0025] The trajectory generation method provided in the embodiment of the present application evaluates the spare trajectory, determines the current accuracy of the spare trajectory, and ensures the accuracy of the current accuracy of the determined spare trajectory. If the current accuracy corresponding to the spare trajectory is greater than or equal to the preset accuracy threshold, the spare trajectory is determined as the optimized trajectory, thereby ensuring that the generated optimized trajectory has a high accuracy. If the current accuracy corresponding to the spare trajectory is less than the preset accuracy threshold, the spare trajectory posture is optimized again, thereby ensuring that the generated optimized trajectory has a high accuracy. This avoids the situation where the generated optimized trajectory has a low accuracy, resulting in a large difference in driving style corresponding to the target user.

[0026] In an optional implementation, evaluating the backup trajectory to determine the current accuracy of the backup trajectory includes:

[0027] For the candidate trajectory poses in the backup trajectory, determine the target candidate trajectory pose from the candidate trajectory poses according to the arrangement order of the candidate trajectory poses, and determine the target initial trajectory pose corresponding to the target candidate trajectory pose from the trajectory to be processed;

[0028] Calculate the target rigid body transformation corresponding to the target initial trajectory pose conversion to the target candidate trajectory pose;

[0029] Determines the current accuracy of the alternate trajectory based on the target rigid body transformation.

[0030] The trajectory generation method provided in the embodiment of the present application determines the target candidate trajectory posture from the candidate trajectory postures according to the arrangement order of the candidate trajectory postures in the spare trajectory, and determines the target initial trajectory posture corresponding to the target candidate trajectory posture from the trajectory to be processed; calculates the target rigid body transformation corresponding to the target initial trajectory posture to the target candidate trajectory posture, and ensures the accuracy of the calculated target rigid body transformation. Based on the target rigid body transformation, the current accuracy of the spare trajectory is determined, and the accuracy of the current accuracy of the determined spare trajectory is ensured.

[0031] In an optional implementation, determining the current accuracy of the backup trajectory based on the target rigid body transformation includes:

[0032] Determine each first initial trajectory position within a preset range of the target initial trajectory position;

[0033] Performing coordinate system transformation on each first initial trajectory pose based on the target rigid body transformation to generate a first transformed trajectory pose corresponding to each first initial trajectory pose;

[0034] Determining first candidate trajectory poses corresponding to each first converted trajectory pose in the backup trajectory;

[0035] Calculating the error between each first candidate trajectory pose and the corresponding first converted trajectory pose;

[0036] Determine the maximum value from the errors as the local error corresponding to the target candidate trajectory pose;

[0037] Based on each local error, the current accuracy of the backup trajectory is determined.

[0038] The trajectory generation method provided in the embodiment of the present application determines each first initial trajectory posture within a preset range of the target initial trajectory posture; performs a coordinate system transformation on each first initial trajectory posture based on the target rigid body transformation, generates a first conversion trajectory posture corresponding to each first initial trajectory posture, and ensures the accuracy of the first conversion trajectory posture corresponding to each generated first initial trajectory posture. Determine the first candidate trajectory posture corresponding to each first conversion trajectory posture in the spare trajectory; calculate the error between each first candidate trajectory posture and the corresponding first conversion trajectory posture, and ensure the accuracy of the error calculated between each first candidate trajectory posture and the corresponding first conversion trajectory posture. Determine the maximum value from the error as the local error corresponding to the target candidate trajectory posture, and ensure the accuracy of the determined local error, so that the determined local error can best characterize the error between the first candidate trajectory posture and the corresponding first conversion trajectory posture. According to each local error, determine the current accuracy of the spare trajectory, and ensure the accuracy of the current accuracy of the determined spare trajectory.

[0039] In an optional implementation, identifying the optimized trajectory and determining the useless trajectory in the optimized trajectory includes:

[0040] Identify the optimized trajectory and detect whether there is a reversing trajectory in the optimized trajectory;

[0041] If there is a reversing trajectory in the optimized trajectory, it is determined that there is a useless trajectory in the optimized trajectory, and a target starting point and a target end point of the useless trajectory are determined from the optimized trajectory.

[0042] The trajectory generation method provided in the embodiment of the present application identifies the optimized trajectory and detects whether there is a reversing trajectory in the optimized trajectory; if there is a reversing trajectory in the optimized trajectory, it is determined that there is a useless trajectory in the optimized trajectory, thereby ensuring the accuracy of the determined useless trajectory. The target starting point and target end point of the useless trajectory are determined from the optimized trajectory, and then the useless trajectory can be determined based on the target starting point and target end point, thereby ensuring the accuracy of the determined useless trajectory.

[0043] In an optional implementation, if there is a reversing trajectory in the optimized trajectory, determining that there is a useless trajectory in the optimized trajectory, and determining a target starting point and a target end point of the useless trajectory from the optimized trajectory include:

[0044] If there is a reverse trajectory in the optimized trajectory, determining a first forward trajectory, a reverse trajectory, and a second forward trajectory in the optimized trajectory based on the driving sequence;

[0045] Determine a reversing starting point and a first circle center from the reversing trajectory, wherein the first circle center and the reversing starting point are at a preset distance;

[0046] Determine a first circle with the first circle center as the center and the preset distance as the radius;

[0047] Detecting whether there is a first intersection point between the first circle and the second forward trajectory;

[0048] According to the detection results, the target starting point and the target end point corresponding to the useless trajectory are determined.

[0049] The trajectory generation method provided in the embodiment of the present application, if there is a reversing trajectory in the optimized trajectory, then the first forward trajectory, the reversing trajectory and the second forward trajectory in the optimized trajectory are determined based on the driving order, so as to facilitate the determination of the target starting point and the target end point according to the first forward trajectory, the reversing trajectory and the second forward trajectory. The reversing starting point and the first center of the circle are determined from the reversing trajectory, and the first center of the circle is at a preset distance from the reversing starting point; a first circle with the first center of the circle as the center and the preset distance as the radius is determined; whether there is a first intersection between the first circle and the second forward trajectory; based on the detection result, the target starting point and the target end point corresponding to the useless trajectory are determined, thereby ensuring the accuracy of the determined target starting point and the target end point.

[0050] In an optional implementation, determining the target starting point and the target end point corresponding to the useless track according to the detection result includes:

[0051] If there is a first intersection point between the first circle and the second forward trajectory, the first intersection point is determined as the target end point;

[0052] A second intersection point between the first forward trajectory and the second forward trajectory is determined as the target starting point.

[0053] In the trajectory generation method provided in the embodiment of the present application, if there is a first intersection point between the first circle and the second forward trajectory, the first intersection point is determined as the target end point, thereby ensuring the accuracy of the determined target end point. The second intersection point between the first forward trajectory and the second forward trajectory is determined as the target starting point, thereby ensuring the accuracy of the determined target starting point.

[0054] In an optional implementation, determining the target starting point and the target end point corresponding to the useless track according to the detection result includes:

[0055] If there is no first intersection point between the first circle and the second forward trajectory, determining a third intersection point where the first circle intersects the reverse trajectory;

[0056] Determine a second circle center in the reversing trajectory, where the second circle center is at a preset distance from the third intersection point;

[0057] Determine a second circle with the second circle center as the center and the preset distance as the radius;

[0058] Determine the fourth intersection point of the second circle and the first forward trajectory as the target starting point;

[0059] The fifth intersection point of the second circle and the second forward trajectory is determined as the target end point.

[0060] The trajectory generation method provided by the embodiment of the present application determines a third intersection point where the first circle intersects the reversing trajectory if there is no first intersection point between the first circle and the second forward trajectory; determines a second center point in the reversing trajectory, with a preset distance between the second center point and the third intersection point; determines a second circle with the second center point as the center and the preset distance as the radius; determines a fourth intersection point between the second circle and the first forward trajectory as the target starting point; determines a fifth intersection point between the second circle and the second forward trajectory as the target end point, thereby ensuring the accuracy of the determined target end point and target starting point.

[0061] In an optional implementation, useless trajectories are deleted, and remaining trajectories are smoothed to generate a target trajectory that matches the driving style of the target user, including:

[0062] Delete useless tracks and connect the remaining tracks to generate connected tracks;

[0063] The connection trajectory is smoothed to generate the target trajectory.

[0064] The trajectory generation method provided in the embodiment of the present application deletes useless trajectories, connects the remaining trajectories to generate a connected trajectory; and smoothes the connected trajectories to generate a target trajectory, thereby ensuring that the generated target trajectory is smooth and can be used as a driving trajectory.

[0065] In an optional implementation, after generating the target trajectory matching the driving style of the target user, the method further includes:

[0066] Obtain map information and navigation information corresponding to the trajectory to be processed;

[0067] According to the correspondence between the map information and navigation information and the target trajectory, semantic information and voice prompt information are added to the target trajectory.

[0068] The trajectory generation method provided in the embodiment of the present application obtains the map information and navigation information corresponding to the trajectory to be processed; according to the correspondence between the map information and navigation information and the target trajectory, semantic information and voice prompt information are added to the target trajectory, so that target navigation information can be generated according to the target trajectory after adding the semantic information and voice prompt information, and the generated target navigation information is ensured to be more compatible with the driving style of the target user. The above method makes the generated target navigation information more flexible, so the above trajectory generation method has strong applicability.

[0069] In a second aspect, the present invention provides a trajectory generation device, the device comprising:

[0070] An acquisition module is used to acquire a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user;

[0071] The first generation module is used to optimize the accuracy of the trajectory to be processed and generate an optimized trajectory;

[0072] A determination module is used to identify the optimized trajectory and determine the useless trajectory in the optimized trajectory; the useless trajectory is used to characterize the wrong trajectory of the target user during driving;

[0073] The second generation module is used to delete useless trajectories, smooth the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

[0074] The trajectory generation device provided in the embodiment of the present application obtains a trajectory to be processed; the trajectory to be processed is the driving trajectory of the target user; the accuracy of the trajectory to be processed is optimized to generate an optimized trajectory, thereby ensuring the accuracy of the generated optimized trajectory. The optimized trajectory is identified, and useless trajectories in the optimized trajectory are determined, thereby ensuring the accuracy of the useless trajectories in the determined optimized trajectory. The useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory that matches the target user, thereby ensuring the accuracy of the generated target trajectory. Since the above-mentioned device generates a target trajectory based on the driving trajectory of the target user, the target trajectory matches the driving style of the target user.

[0075] In a third aspect, the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the trajectory generation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0076] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the trajectory generation method of the first aspect or any corresponding embodiment thereof.

[0077] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the trajectory generation method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0079] Figure 1 is a schematic flow chart of a trajectory generation method according to an embodiment of the present invention;

[0080] Figure 2 is a flow chart of another trajectory generation method according to an embodiment of the present invention;

[0081] Figure 3 is a flow chart of another trajectory generation method according to an embodiment of the present invention;

[0082] Figure 4 is a first schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0083] Figure 5 is a second schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0084] Figure 6 is a third schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0085] Figure 7 is a fourth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0086] Figure 8 is a fifth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0087] Fig. 9 is a sixth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0088] Fig.10 is a seventh schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0089] Fig.11 is an eighth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0090] Fig.12 is a flow chart of yet another trajectory generating method according to an embodiment of the present invention;

[0091] Fig.13 is a ninth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0092] Fig.14 is a tenth schematic diagram of determining useless trajectories according to an embodiment of the present invention;

[0093] Fig.15 is a structural block diagram of a trajectory generating device according to an embodiment of the present invention;

[0094] Fig.16 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0095] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0096] With the development of science and technology, autonomous driving technology is becoming more and more mature. At present, the industry's autonomous driving solutions are gradually shifting from relying on high-precision maps to relying on real-time perception. However, solutions based only on real-time perception lack prior information and beyond-visual-range perception, which can easily lead to problems such as untimely lane changes and unreasonable speeds.

[0097] In addition, the current autonomous driving planning modules in the industry mainly refer to navigation information for planning, but users' driving habits are different, and planning based only on navigation information will be too rigid.

[0098] Therefore, how to provide a planning trajectory that matches the user becomes an urgent problem to be solved.

[0099] Based on the above problems, an embodiment of the present application provides a trajectory generation method, which obtains a trajectory to be processed; the trajectory to be processed is the driving trajectory of the target user; the accuracy of the trajectory to be processed is optimized to generate an optimized trajectory, thereby ensuring the accuracy of the generated optimized trajectory. The optimized trajectory is identified, and useless trajectories in the optimized trajectory are determined, thereby ensuring the accuracy of the useless trajectories in the determined optimized trajectory. The useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory that matches the target user, thereby ensuring the accuracy of the generated target trajectory. Since the above method generates a target trajectory based on the driving trajectory of the target user, the target trajectory matches the driving style of the target user.

[0100] It should be noted that the execution subject of the trajectory generation method provided in the embodiment of the present application can be a device for trajectory generation, and the trajectory generation device can be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware, wherein the electronic device can be a server or a terminal, or a control device in an intelligent vehicle, wherein the server in the embodiment of the present application can be a single server, or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, a wearable device, an intelligent robot, and other intelligent hardware devices. In the following method embodiments, the execution subject is an electronic device as an example for explanation.

[0101] According to an embodiment of the present invention, an embodiment of a trajectory generation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0102] In this embodiment, a trajectory generation method is provided, which can be used in the above-mentioned electronic device. Figure 1 is a flow chart of a trajectory generation method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0103] Step S101, obtaining the trajectory to be processed.

[0104] Among them, the trajectory to be processed is the driving trajectory of the target user.

[0105] Specifically, the electronic device may receive the trajectory to be processed input by the user, or may receive the trajectory to be processed sent by other devices, wherein the other devices may be devices such as smart vehicles. When the electronic device is a control device in a smart vehicle, the electronic device may also search for the trajectory to be processed from a storage space.

[0106] This application does not specifically limit the manner in which the electronic device obtains the trajectory to be processed.

[0107] Step S102, optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory.

[0108] Specifically, the electronic device can use a preset optimization algorithm to optimize the accuracy of the trajectory to be processed and generate an optimized trajectory.

[0109] Among them, the preset optimization algorithm can be a particle swarm optimization algorithm, a genetic optimization algorithm, a gradient descent optimization algorithm, a global positioning constraint method, an inter-frame positioning constraint method, etc. The embodiment of the present application does not specifically limit the preset optimization algorithm.

[0110] This step will be described in detail below.

[0111] Step S103: identifying the optimized trajectory and determining useless trajectories in the optimized trajectory.

[0112] Among them, useless trajectories are used to characterize the wrong trajectories of the target user during driving.

[0113] Specifically, the electronic device may identify the optimized trajectory and determine whether there is a useless trajectory in the optimized trajectory. If there is a useless trajectory in the optimized trajectory, the optimized trajectory is identified again to determine the useless trajectory in the optimized trajectory.

[0114] This step will be described in detail below.

[0115] Step S104, deleting useless trajectories, smoothing the remaining trajectories in the optimized trajectory, and generating a target trajectory that matches the target user.

[0116] Specifically, after determining the useless tracks in the optimized track, the electronic device may delete the useless tracks, perform smoothing processing on the remaining tracks in the optimized track, and generate a target track that matches the target user.

[0117] The trajectory generation method provided in the embodiment of the present application obtains a trajectory to be processed; the trajectory to be processed is the driving trajectory of the target user; the accuracy of the trajectory to be processed is optimized to generate an optimized trajectory, thereby ensuring the accuracy of the generated optimized trajectory. The optimized trajectory is identified, and useless trajectories in the optimized trajectory are determined, thereby ensuring the accuracy of the useless trajectories in the determined optimized trajectory. The useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory that matches the target user, thereby ensuring the accuracy of the generated target trajectory and avoiding the influence of useless trajectories on the target trajectory. Since the above method generates a target trajectory based on the driving trajectory of the target user, the target trajectory matches the driving style of the target user.

[0118] In this embodiment, a trajectory generation method is provided, which can be used in the above-mentioned electronic device. Figure 2 is a flow chart of a trajectory generation method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0119] Step S201, obtaining a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user.

[0120] For more information about this step, see Figure 1 The introduction of step S101 is not repeated here.

[0121] Step S202, optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory.

[0122] Specifically, the above step S202 may include the following steps:

[0123] Step S2021, converting the initial trajectory pose corresponding to each trajectory point in the trajectory to be processed into the target coordinate system to generate a spare trajectory pose, and optimizing each spare trajectory pose to generate a spare trajectory.

[0124] The target coordinate system may be a geodetic coordinate system or a target coordinate system established with a specific location as the coordinate origin.

[0125] Specifically, the electronic device can determine the initial trajectory pose corresponding to each trajectory point in the trajectory to be processed in the vehicle coordinate system. Then, according to the relationship between the vehicle coordinate system and the target coordinate system, the initial trajectory pose corresponding to each trajectory point in the trajectory to be processed is converted to the target coordinate system to generate a backup trajectory pose.

[0126] Specifically, the “optimizing the posture of each backup trajectory to generate a backup trajectory” in the above step S2021 includes:

[0127] Step a1, optimizing each spare trajectory posture using a global positioning constraint method to generate each first trajectory posture.

[0128] Specifically, the electronic device may obtain global positioning constraint information, wherein the global positioning constraint information may include map information, landmark positions, GPS data, etc. Then, an objective function is established, wherein the objective function is used to measure the degree of conformity of the backup trajectory posture with the global positioning constraint. The objective function may consider a variety of factors, such as the degree of matching of the trajectory posture with the map, the proximity to the landmark position, the consistency with the GPS data, etc.

[0129] The electronic device can then determine the constraints. These constraints can include continuity, smoothness, physical limitations, etc. of the trajectory.

[0130] After establishing the objective function and determining the constraints, the electronic device can select a suitable optimization algorithm according to the characteristics and scale of the problem. The backup trajectory pose is input into the optimization algorithm as the initial value. The optimization algorithm iteratively adjusts the backup trajectory pose according to the objective function and the constraints to find the optimal trajectory pose. In each iteration, the value of the objective function is calculated, and the trajectory pose is updated according to the rules of the optimization algorithm to generate each first trajectory pose.

[0131] Among them, common optimization algorithms include gradient descent method, Newton method, particle swarm optimization algorithm, genetic algorithm, etc.

[0132] Step a2: Optimize each first trajectory pose using an inter-frame positioning constraint method to generate each candidate trajectory pose.

[0133] Specifically, the electronic device can determine the time interval and frame rate between adjacent frames of each first trajectory posture, and other related parameters, then define the constraints of inter-frame posture change, and establish an inter-frame positioning constraint model according to the constraints of inter-frame posture change.

[0134] Among them, the constraints of the inter-frame pose change can be based on the kinematic model or other relevant physical laws. For example, for the trajectory of a vehicle, the pose change between adjacent frames should conform to the vehicle's motion characteristics, such as speed limit, acceleration limit, etc. The constraints can represent the pose change between adjacent frames through the relationship of the pose transformation matrix.

[0135] Then, an optimization objective function is constructed to measure the degree of conformity of the candidate trajectory pose with the inter-frame positioning constraints. The objective function can consider multiple factors, such as the smoothness of pose changes and consistency with constraints.

[0136] Finally, the electronic device can select a suitable optimization algorithm according to the characteristics and scale of the problem. The first trajectory pose is used as the initial value and substituted into the optimization algorithm. The optimization algorithm updates the candidate trajectory pose through iterative calculation according to the objective function and the inter-frame positioning constraints. In each iteration, the value of the objective function is calculated, and the pose parameters are adjusted according to the rules of the optimization algorithm so that the objective function value is gradually reduced to achieve the purpose of optimization.

[0137] Among them, a common method is to minimize the error of pose change while satisfying the inter-frame positioning constraints. The error can be measured using a norm (such as the Euclidean norm). Common optimization algorithms include gradient descent, conjugate gradient method, Newton method, etc. These algorithms can update the candidate trajectory pose according to the derivative or gradient information of the objective function to gradually optimize the objective function.

[0138] Step a3: Generate a backup trajectory based on the poses of each candidate trajectory.

[0139] Specifically, the electronic device generates a backup trajectory according to each candidate trajectory posture.

[0140] Step S2022: Generate an optimized trajectory based on the backup trajectory.

[0141] Specifically, the above step S2022 may include the following steps:

[0142] Step b1, evaluating the backup trajectory to determine the current accuracy of the backup trajectory.

[0143] Specifically, the above step b1 may include the following steps:

[0144] Step b11, for the candidate trajectory poses in the backup trajectory, determine the target candidate trajectory pose from the candidate trajectory poses according to the arrangement order of the candidate trajectory poses, and determine the target initial trajectory pose corresponding to the target candidate trajectory pose from the trajectory to be processed.

[0145] Specifically, for the candidate trajectory postures in the backup trajectory, according to the arrangement order of the candidate trajectory postures, the electronic device can determine the target candidate trajectory posture from the candidate trajectory postures in sequence, and determine the target initial trajectory posture corresponding to the target candidate trajectory posture from the trajectory to be processed.

[0146] Exemplarily, assuming that the backup trajectory includes 1-10 candidate trajectory poses, the first candidate trajectory pose is used as the target candidate trajectory pose, then the second candidate trajectory pose is used as the target candidate trajectory pose, ..., and finally the tenth candidate trajectory pose is used as the target candidate trajectory pose.

[0147] Step b12, calculating the target rigid body transformation corresponding to the target initial trajectory posture conversion to the target candidate trajectory posture.

[0148] Specifically, the electronic device may calculate the target rigid body transformation corresponding to the target candidate trajectory posture conversion from the target initial trajectory posture to the target candidate trajectory posture according to the relationship between the target initial trajectory posture and the target candidate trajectory posture.

[0149] Step b13, determining the current accuracy of the backup trajectory based on the target rigid body transformation.

[0150] Specifically, the above step b13 may include the following steps:

[0151] Step b131, determining each first initial trajectory posture within a preset range of the target initial trajectory posture.

[0152] Specifically, the electronic device may determine each first initial trajectory posture within a preset range of the target initial trajectory posture.

[0153] The preset range may be a range of preset numbers forward and backward with the target initial trajectory posture as the center, or a range of preset numbers forward with the target initial trajectory posture as the center, or a range of preset numbers backward with the target initial trajectory posture as the center.

[0154] Among them, the preset number can be 3, 4, or 5. The embodiment of the present application does not make any specific limitation on the preset number, nor does it make any specific limitation on the preset range.

[0155] Step b132, performing coordinate system transformation on each first initial trajectory posture based on the target rigid body transformation, and generating a first transformed trajectory posture corresponding to each first initial trajectory posture.

[0156] Specifically, after determining each first initial trajectory posture, the electronic device may calculate a first converted trajectory posture corresponding to each first initial trajectory posture obtained after each first initial trajectory posture is converted based on the target rigid body transformation.

[0157] Step b133, determining the first candidate trajectory poses corresponding to each first conversion trajectory pose in the spare trajectories.

[0158] Step b134, calculating the error between each first candidate trajectory pose and the corresponding first conversion trajectory pose.

[0159] Specifically, the electronic device may calculate the Euclidean distance between each first candidate trajectory posture and the corresponding first conversion trajectory posture to obtain the error between each first candidate trajectory posture and the corresponding first conversion trajectory posture.

[0160] Step b135, determining the maximum value from the errors as the local error corresponding to the target candidate trajectory pose.

[0161] Specifically, the electronic device may compare the errors between each first candidate trajectory posture and the corresponding first conversion trajectory posture, and determine the maximum value from the errors as the local error corresponding to the target candidate trajectory posture.

[0162] Step b136, determining the current accuracy of the backup trajectory based on each local error.

[0163] Optionally, the electronic device may determine the maximum local error from the local errors as the current accuracy of the backup trajectory.

[0164] Optionally, the electronic device may also calculate an average value of each local error, and determine the calculated average value as the current accuracy of the backup trajectory.

[0165] Optionally, the electronic device may also calculate the median of each local error, and determine the calculated median as the current accuracy of the backup trajectory.

[0166] Step b2: if the current accuracy corresponding to the backup trajectory is greater than or equal to a preset accuracy threshold, the backup trajectory is determined as the optimized trajectory.

[0167] Specifically, the electronic device may receive a preset accuracy threshold input by a user, may receive a preset accuracy threshold sent by other devices, and may also set a preset accuracy threshold according to the length of the trajectory to be processed.

[0168] The embodiment of the present application does not specifically limit the manner in which the electronic device obtains the preset accuracy threshold.

[0169] After obtaining the preset accuracy threshold, the electronic device may compare the current accuracy corresponding to the backup trajectory with the preset accuracy threshold, and determine the backup trajectory as the optimized trajectory if the current accuracy corresponding to the backup trajectory is greater than or equal to the preset accuracy threshold.

[0170] Step b3: If the current accuracy corresponding to the backup trajectory is less than the preset accuracy threshold, the posture of the backup trajectory is optimized again.

[0171] Specifically, if the current accuracy corresponding to the backup trajectory is less than a preset accuracy threshold, the electronic device optimizes the posture of the backup trajectory again.

[0172] Among them, the way in which the electronic device optimizes the backup trajectory posture again can be referred to the above implementation method, which will not be repeated here.

[0173] Step S203, identifying the optimized trajectory and determining useless trajectories in the optimized trajectory; the useless trajectory is used to characterize the wrong trajectory of the target user during driving.

[0174] For more information about this step, see Figure 1 The introduction of step S103 is not repeated here.

[0175] Step S204: delete useless trajectories, perform smoothing on the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

[0176] For more information about this step, see Figure 1 The introduction of step S104 is not repeated here.

[0177] The trajectory generation method provided in the embodiment of the present application converts the initial trajectory pose corresponding to each trajectory point in the trajectory to be processed to the target coordinate system, generates a spare trajectory pose, and ensures the accuracy of the generated spare trajectory pose. The global positioning constraint method is used to optimize each spare trajectory pose, and each first trajectory pose is generated, thereby ensuring the accuracy of the generated first trajectory pose. The inter-frame positioning constraint method is used to optimize each first trajectory pose, and each candidate trajectory pose is generated, thereby reducing the accumulation of local errors and ensuring the accuracy of each candidate trajectory pose. Based on each candidate trajectory pose, a spare trajectory is generated, thereby ensuring the accuracy of the generated spare trajectory.

[0178] For the candidate trajectory poses in the backup trajectory, determine the target candidate trajectory pose from the candidate trajectory poses according to the arrangement order of the candidate trajectory poses, and determine the target initial trajectory pose corresponding to the target candidate trajectory pose from the trajectory to be processed; calculate the target rigid body transformation corresponding to the target candidate trajectory pose from the target initial trajectory pose, and ensure the accuracy of the calculated target rigid body transformation. Determine each first initial trajectory pose within the preset range of the target initial trajectory pose; perform coordinate system transformation on each first initial trajectory pose based on the target rigid body transformation, generate the first conversion trajectory pose corresponding to each first initial trajectory pose, and ensure the accuracy of the generated first conversion trajectory pose corresponding to each first initial trajectory pose. Determine the first candidate trajectory pose corresponding to each first conversion trajectory pose in the backup trajectory; calculate the error between each first candidate trajectory pose and the corresponding first conversion trajectory pose, and ensure the accuracy of the error between each first candidate trajectory pose and the corresponding first conversion trajectory pose. The maximum value is determined from the errors as the local error corresponding to the target candidate trajectory pose, which ensures the accuracy of the determined local error, so that the determined local error can best characterize the error between the first candidate trajectory pose and the corresponding first conversion trajectory pose. According to each local error, the current accuracy of the backup trajectory is determined, which ensures the accuracy of the current accuracy of the determined backup trajectory.

[0179] If the current accuracy of the spare trajectory is greater than or equal to the preset accuracy threshold, the spare trajectory is determined as the optimized trajectory, thereby ensuring that the generated optimized trajectory has a high accuracy. If the current accuracy of the spare trajectory is less than the preset accuracy threshold, the spare trajectory posture is optimized again, thereby ensuring that the generated optimized trajectory has a high accuracy. This avoids the situation where the generated optimized trajectory has a low accuracy, resulting in a large difference in driving style with the target user.

[0180] In this embodiment, a trajectory generation method is provided, which can be used in the above-mentioned electronic device. Figure 3 is a flow chart of a trajectory generation method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0181] Step S301, obtaining a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user.

[0182] For more information about this step, see Figure 2 The introduction of step S201 is not repeated here.

[0183] Step S302, optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory.

[0184] For more information about this step, see Figure 2 The introduction of step S202 is not repeated here.

[0185] Step S303: Identify the optimized trajectory and determine the useless trajectory in the optimized trajectory.

[0186] Among them, useless trajectories are used to characterize the wrong trajectories of the target user during driving.

[0187] Specifically, the above step S303 may include the following steps:

[0188] Step S3031, identifying the optimized trajectory and detecting whether there is a reversing trajectory in the optimized trajectory.

[0189] Specifically, the electronic device can identify each optimized trajectory point in the optimized trajectory to determine whether there are multiple consecutive optimized trajectory points whose corresponding speed and direction are negative. If there are multiple consecutive optimized trajectory points whose corresponding speed and direction are negative, it is determined that there is a reversing trajectory in the optimized trajectory.

[0190] It should be noted that positive numbers for speed and direction represent the direction of travel.

[0191] Step S3032: If there is a reversing trajectory in the optimized trajectory, it is determined that there is a useless trajectory in the optimized trajectory, and a target starting point and a target end point of the useless trajectory are determined from the optimized trajectory.

[0192] Specifically, the above step S3032 may include the following steps:

[0193] Step c1: if there is a reversing trajectory in the optimized trajectory, a first forward trajectory, a reversing trajectory and a second forward trajectory in the optimized trajectory are determined based on the driving order.

[0194] Specifically, if there is a reversing trajectory in the optimized trajectory, the electronic device can identify each optimized trajectory point in the optimized trajectory, determine the reversing optimized trajectory point whose speed and direction are negative, and then determine the first forward trajectory, the reversing trajectory and the second forward trajectory in the optimized trajectory based on the driving order and each reversing optimized trajectory point.

[0195] Step c3, determining the reversing starting point and the first center of the circle from the reversing trajectory.

[0196] There is a preset distance between the first circle center and the reversing starting point.

[0197] Specifically, the electronic device can determine the reversing starting point and the first center of the circle from the reversing trajectory.

[0198] Among them, the preset distance can be set by the user, and can also be set according to the turning radius of the target vehicle corresponding to the target user, wherein the turning radius is proportional to the preset distance. The embodiment of the present application does not specifically limit the preset distance.

[0199] Step c3, determining a first circle with the first circle center as the center and the preset distance as the radius.

[0200] Specifically, the electronic device determines a first circle with the first circle center as the center and the preset distance as the radius.

[0201] Step c4, detecting whether there is a first intersection point between the first circle and the second forward trajectory.

[0202] Specifically, the electronic device can detect whether there is a first intersection point between the first circle and the second forward trajectory.

[0203] Step c5, determining the target starting point and target end point corresponding to the useless track according to the detection result.

[0204] For example, Figure 4 Shown and Figure 5 As shown, the electronic device can Figure 4 The solid straight line in the figure is determined as the first forward trajectory, the dashed straight line is determined as the reverse trajectory, and the solid curve is determined as the second forward trajectory, where point A is the reverse starting point. The electronic device can Figure 5 The solid straight line in is determined as the first forward trajectory, the solid curve is determined as the reverse trajectory, and then the dotted straight line is determined as the second forward trajectory, wherein point A is the reverse starting point.

[0205] Then, the electronic equipment Figure 6 In the example, O1 is determined as the first center, and the first circle with O1 as the center and the preset distance as the radius is determined. Figure 7 Determine O1 as the first center, and determine a first circle with O1 as the center and the preset distance as the radius.

[0206] Then, the electronic device detects whether there is a first intersection point between the first circle and the second forward trajectory.

[0207] Specifically, the above step c5 may include the following steps:

[0208] Step c51: if there is a first intersection point between the first circle and the second forward trajectory, the first intersection point is determined as the target end point.

[0209] Specifically, if there is a first intersection point between the first circle and the second forward trajectory, the first intersection point is determined as the target end point.

[0210] For example, Figure 8 As shown, there is a first intersection point B between the first circle and the second forward trajectory, so the electronic device determines point B as the target end point.

[0211] Step c53: determine the second intersection point between the first forward trajectory and the second forward trajectory as the target starting point.

[0212] Specifically, the electronic device determines the second intersection point between the first forward trajectory and the second forward trajectory as the target starting point.

[0213] For example, Fig. 9 As shown, the electronic device determines the second intersection point D between the first forward trajectory and the second forward trajectory as the target starting point.

[0214] Step c53: if there is no first intersection point between the first circle and the second forward trajectory, determine a third intersection point where the first circle intersects the reverse trajectory.

[0215] Specifically, if there is no first intersection point between the first circle and the second forward trajectory, a third intersection point where the first circle intersects the reverse trajectory is determined.

[0216] Step c54, determining the second center of the circle in the reversing trajectory.

[0217] There is a preset distance between the second circle center and the third intersection point.

[0218] Specifically, the electronic device determines a point in the reversing trajectory that is a preset distance from the third intersection point as the second circle center.

[0219] Step c55, determining a second circle with the second circle center as the center and the preset distance as the radius.

[0220] Specifically, the electronic device determines a second circle with the second circle center as the center and the preset distance as the radius.

[0221] Step c56, determining the fourth intersection point of the second circle and the first forward trajectory as the target starting point.

[0222] Specifically, the electronic device determines the fourth intersection point of the second circle and the first forward trajectory as the target starting point.

[0223] Specifically, Fig.10 As shown, there is no first intersection point between the first circle and the second forward trajectory, and the electronic device determines the third intersection point E where the first circle intersects the reverse trajectory. The electronic device determines the point at a preset distance from point E in the reverse trajectory as the second circle center O2. Then, a second circle with O as the center and the preset distance as the radius is determined. The electronic device determines the fourth intersection point between the second circle and the first forward trajectory as point D, and then determines point D as the target starting point.

[0224] Step c57, determining the fifth intersection point of the second circle and the second forward trajectory as the target end point.

[0225] Specifically, the electronic device determines the fifth intersection point of the second circle and the second forward trajectory as the target end point.

[0226] Specifically, Fig.11 As shown, the electronic device determines the fifth intersection point B between the second circle and the second forward trajectory, and determines point B as the target end point.

[0227] Step S304: delete useless trajectories, perform smoothing on the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

[0228] For more information about this step, see Figure 2 The introduction of step S204 is not repeated here.

[0229] The trajectory generation method provided in the embodiment of the present application identifies the optimized trajectory and detects whether there is a reversing trajectory in the optimized trajectory; if there is a reversing trajectory in the optimized trajectory, the first forward trajectory, the reversing trajectory and the second forward trajectory in the optimized trajectory are determined based on the driving order, so as to facilitate the determination of the target starting point and the target end point according to the first forward trajectory, the reversing trajectory and the second forward trajectory. The reversing starting point and the first center of the circle are determined from the reversing trajectory, and the first center of the circle is a preset distance away from the reversing starting point; a first circle with the first center of the circle as the center and the preset distance as the radius is determined; it is detected whether there is a first intersection between the first circle and the second forward trajectory; if there is a first intersection between the first circle and the second forward trajectory, the first intersection is determined as the target end point, thereby ensuring the accuracy of the determined target end point. The second intersection between the first forward trajectory and the second forward trajectory is determined as the target starting point, thereby ensuring the accuracy of the determined target starting point.

[0230] If there is no first intersection point between the first circle and the second forward trajectory, determine the third intersection point where the first circle intersects the reversing trajectory; determine the second center of the circle in the reversing trajectory, with a preset distance between the second center of the circle and the third intersection point; determine a second circle with the second center of the circle as the center and the preset distance as the radius; determine the fourth intersection point of the second circle and the first forward trajectory as the target starting point; determine the fifth intersection point of the second circle and the second forward trajectory as the target end point, thereby ensuring the accuracy of the determined target end point and target starting point.

[0231] In this embodiment, a trajectory generation method is provided, which can be used in the above-mentioned electronic device. Fig.12 is a flow chart of a trajectory generation method according to an embodiment of the present invention. Fig.12 As shown, the process includes the following steps:

[0232] Step S401, obtaining a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user.

[0233] For more information about this step, see Figure 3 The introduction of step S301 is not repeated here.

[0234] Step S402, optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory.

[0235] For more information about this step, see Figure 3 The introduction of step S302 is not repeated here.

[0236] Step S403, identifying the optimized trajectory and determining useless trajectories in the optimized trajectory; the useless trajectory is used to characterize the wrong trajectory of the target user during driving.

[0237] For more information about this step, see Figure 3 The introduction of step S303 is not repeated here.

[0238] Step S404: delete useless trajectories, perform smoothing on the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

[0239] Specifically, the above step S404 may include the following steps:

[0240] Step S4041, delete useless tracks, connect the remaining tracks, and generate connected tracks.

[0241] Specifically, the electronic device deletes the useless tracks according to the target end point and the target start point corresponding to the useless tracks, and connects the remaining tracks to generate a connected track.

[0242] For example, Fig.13 As shown, the electronic device deletes the useless tracks between the target end point B and the target start point D, connects the remaining tracks, and generates a connected track.

[0243] For example, Fig.14 As shown, the electronic device deletes the useless tracks between the target end point B and the target start point D, connects the remaining tracks, and generates a connected track.

[0244] Step S4042, smoothing the connection trajectory to generate a target trajectory.

[0245] Specifically, the electronic device can comprehensively consider obstacle constraints and smoothness constraints, perform secondary programming optimization on the connection trajectory, and generate a target trajectory.

[0246] Specifically, the electronic device can clearly define the optimization goal, that is, to generate a target trajectory that not only meets the requirements of avoiding obstacles but also has smoothness. Then, the coordinates of a series of control points on the connected trajectory are determined as decision variables. Then, based on the position and shape of the obstacle, the constraint that the trajectory cannot enter the obstacle area is defined, and the smoothness constraint is achieved by restricting the curvature, acceleration, etc. of the trajectory. Then, the objective function is constructed, where the objective function includes two parts, one is the penalty term related to avoiding obstacles, and the other is the penalty term related to smoothness. For example, the distance between the trajectory and the obstacle can be made as large as possible, while the curvature change of the trajectory can be made as small as possible.

[0247] After constructing the objective function, the electronic device may select an optimization algorithm, which may be an interior point method, an effective set method, or the like.

[0248] Then, the electronic device substitutes the connection trajectory and constraints into the optimization algorithm. The optimization algorithm adjusts the decision variables according to the objective function and constraints to find the optimal trajectory solution. In each iteration, the optimization algorithm evaluates the degree to which the current connection trajectory satisfies the constraints and the value of the objective function, and improves it according to certain rules. The optimization algorithm stops iterating when certain termination conditions are met. The termination condition can be that the value of the objective function reaches a preset threshold, or the number of iterations reaches an upper limit, etc. After the optimization algorithm ends, the optimal solution obtained is the target trajectory that satisfies the obstacle constraints and smoothness constraints.

[0249] Step S405, obtaining map information and navigation information corresponding to the trajectory to be processed.

[0250] Specifically, the electronic device may receive map information and navigation information corresponding to the track to be processed input by the user, and may also receive map information and navigation information corresponding to the track to be processed sent by other devices, wherein the other devices may be devices such as smart vehicles. When the electronic device is a control device in a smart vehicle, the electronic device may also search for map information and navigation information corresponding to the track to be processed from a storage space.

[0251] The present application does not specifically limit the manner in which the electronic device obtains the map information and navigation information corresponding to the trajectory to be processed.

[0252] Step S406: adding semantic information and voice prompt information to the target trajectory according to the correspondence between the map information and navigation information and the target trajectory.

[0253] Specifically, the electronic device can associate map information, navigation information and target trajectory to ensure that they correspond spatially and logically. Then, the electronic device parses the map information to extract relevant information such as road names, landmarks, intersections, etc., and analyzes the navigation information to understand the driving direction, distance, estimated arrival time, etc.

[0254] Then, the electronic device follows the target trajectory and determines the specific location of each trajectory point on the map. The trajectory point is matched with nearby map elements such as roads, intersections, and landmarks. And according to the correspondence between the trajectory point and the map element, corresponding semantic information is added to each trajectory point. For example, if the trajectory point is located on a certain road, the name of the road is added to it; if the trajectory point is located at a certain intersection, relevant information of the intersection (such as the name of the crossroad, turn restrictions, etc.) is added to it. Among them, semantic information can be associated with the trajectory point in the form of labels, attributes or annotations.

[0255] After adding semantic information, the electronic device can design voice prompt content in combination with the navigation information and the added semantic information. The voice prompt content should be concise and clear, and be able to accurately convey driving information. For example, when approaching an intersection, the voice prompt can be "XX meters ahead is XX intersection, please follow the navigation instructions"; when driving along a certain road, the voice prompt can be "You are driving on XX road, XX meters ahead..."

[0256] In addition, the electronic device needs to determine when to play the voice prompt based on the target trajectory and navigation information. Usually, the voice prompt will be played when approaching important map elements (such as intersections, turns, destinations, etc.). The playback of the voice prompt can be triggered based on distance, time or other relevant factors.

[0257] Finally, the electronic device can integrate the designed voice prompt information with the target trajectory to ensure that the corresponding voice prompt is played at the correct location and time. Optionally, the electronic device can use the development tools or interfaces of relevant map and navigation software to achieve the integration of voice prompt information.

[0258] The trajectory generation method provided in the embodiment of the present application deletes useless trajectories, connects the remaining trajectories, and generates a connected trajectory; the connected trajectory is smoothed to generate a target trajectory, thereby ensuring that the generated target trajectory is smooth and can be used as a driving trajectory. The map information and navigation information corresponding to the trajectory to be processed are obtained; according to the correspondence between the map information and navigation information and the target trajectory, semantic information and voice prompt information are added to the target trajectory, so that target navigation information can be generated according to the target trajectory after adding the semantic information and voice prompt information, and it is ensured that the generated target navigation information is more matched with the driving style of the target user. The above method makes the generated target navigation information more flexible, so the above trajectory generation method has strong applicability.

[0259] In this embodiment, a trajectory generating device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0260] This embodiment provides a trajectory generation device, such as Fig.15 As shown, including:

[0261] An acquisition module is used to acquire a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user;

[0262] The first generation module is used to optimize the accuracy of the trajectory to be processed and generate an optimized trajectory;

[0263] A determination module is used to identify the optimized trajectory and determine the useless trajectory in the optimized trajectory; the useless trajectory is used to characterize the wrong trajectory of the target user during driving;

[0264] The second generation module is used to delete useless trajectories, smooth the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

[0265] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0266] The trajectory generating device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0267] The embodiment of the present invention also provides an electronic device having the above Fig.15 The trajectory generating device shown.

[0268] See also Fig.16 , Fig.16 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Fig.16 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.16 A processor 10 is taken as an example.

[0269] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0270] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0271] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0272] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0273] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.16 The example of connecting through bus is taken in the following.

[0274] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0275] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0276] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0277] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A trajectory generation method, It is characterized in that The method comprises: Obtaining a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user; Optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory; Identifying the optimized trajectory and determining useless trajectories in the optimized trajectory; the useless trajectories are used to characterize erroneous trajectories of the target user during driving; The useless trajectories are deleted, and the remaining trajectories in the optimized trajectory are smoothed to generate a target trajectory matching the target user.

2. The method according to claim 1, It is characterized in that The step of optimizing the accuracy of the trajectory to be processed to generate an optimized trajectory includes: Converting the initial trajectory pose corresponding to each trajectory point in the to-be-processed trajectory to the target coordinate system to generate a spare trajectory pose, and optimizing each of the spare trajectory poses to generate a spare trajectory; Based on the backup trajectory, the optimized trajectory is generated.

3. The method according to claim 2, It is characterized in that The step of optimizing the posture of each of the backup trajectories to generate a backup trajectory includes: Optimizing each of the backup trajectory poses using a global positioning constraint method to generate each first trajectory pose; Optimizing each of the first trajectory poses using an inter-frame positioning constraint method to generate each candidate trajectory pose; The backup trajectory is generated according to each of the candidate trajectory poses.

4. The method according to claim 3, It is characterized in that The step of generating the optimized trajectory based on the backup trajectory includes: evaluating the backup trajectory to determine a current accuracy of the backup trajectory; If the current accuracy corresponding to the backup trajectory is greater than or equal to a preset accuracy threshold, determining the backup trajectory as the optimized trajectory; If the current accuracy corresponding to the backup trajectory is less than the preset accuracy threshold, the backup trajectory posture is optimized again.

5. The method according to claim 4, It is characterized in that The step of evaluating the backup trajectory to determine the current accuracy of the backup trajectory includes: For the candidate trajectory poses in the backup trajectory, determine the target candidate trajectory pose from the candidate trajectory poses according to the arrangement order of the candidate trajectory poses, and determine the target initial trajectory pose corresponding to the target candidate trajectory pose from the trajectory to be processed; Calculating a target rigid body transformation corresponding to the target initial trajectory posture conversion to the target candidate trajectory posture; Based on the target rigid body transformation, a current accuracy of the backup trajectory is determined.

6. The method according to claim 5, It is characterized in that The determining the current accuracy of the backup trajectory based on the target rigid body transformation includes: Determine each first initial trajectory position and posture within a preset range of the target initial trajectory position and posture; Performing coordinate system transformation on each of the first initial trajectory postures based on the target rigid body transformation to generate a first transformed trajectory posture corresponding to each of the first initial trajectory postures; Determining, in the backup trajectories, first candidate trajectory poses corresponding to each of the first conversion trajectory poses; Calculating the error between each of the first candidate trajectory poses and the corresponding first converted trajectory pose; Determine a maximum value from the errors as a local error corresponding to the candidate trajectory pose of the target; According to each of the local errors, the current accuracy of the backup trajectory is determined.

7. The method according to claim 1, It is characterized in that The step of identifying the optimized trajectory and determining useless trajectories in the optimized trajectory includes: Identifying the optimized trajectory and detecting whether there is a reversing trajectory in the optimized trajectory; If the reversing trajectory exists in the optimized trajectory, it is determined that the useless trajectory exists in the optimized trajectory, and a target starting point and a target end point of the useless trajectory are determined from the optimized trajectory.

8. The method according to claim 7, It is characterized in that If the optimized trajectory contains a reversing trajectory, determining that the optimized trajectory contains a useless trajectory, and determining a target starting point and a target end point of the useless trajectory from the optimized trajectory include: If there is a reversing trajectory in the optimized trajectory, determining a first forward trajectory, a reversing trajectory, and a second forward trajectory in the optimized trajectory based on a driving order; Determine a reversing starting point and a first center of a circle from the reversing trajectory, wherein a preset distance exists between the first center of a circle and the reversing starting point; Determine a first circle with the first circle center as the center and the preset distance as the radius; Detecting whether there is a first intersection point between the first circle and the second forward trajectory; According to the detection result, the target starting point and the target end point corresponding to the useless track are determined.

9. The method according to claim 8, It is characterized in that The step of determining the target starting point and the target end point corresponding to the useless track according to the detection result includes: If there is a first intersection point between the first circle and the second forward trajectory, determining the first intersection point as the target end point; A second intersection point between the first forward trajectory and the second forward trajectory is determined as the target starting point.

10. The method according to claim 8, It is characterized in that The step of determining the target starting point and the target end point corresponding to the useless track according to the detection result includes: If the first circle and the second forward trajectory do not have the first intersection point, determining a third intersection point where the first circle and the reverse trajectory intersect; Determining a second center of a circle in the reversing trajectory, wherein the second center of a circle is spaced from the third intersection by the preset distance; Determine a second circle with the second circle center as the center and the preset distance as the radius; Determine a fourth intersection point between the second circle and the first forward trajectory as the target starting point; A fifth intersection point between the second circle and the second forward trajectory is determined as the target end point.

11. The method according to claim 1, It is characterized in that The deleting the useless tracks, smoothing the remaining tracks, and generating a target track matching the driving style of the target user includes: Deleting the useless tracks, connecting the remaining tracks to generate connected tracks; The connection trajectory is smoothed to generate the target trajectory.

12. The method according to claim 1, It is characterized in that After generating the target trajectory matching the driving style of the target user, the method further includes: Obtaining map information and navigation information corresponding to the trajectory to be processed; According to the correspondence between the map information and the navigation information and the target track, semantic information and voice prompt information are added to the target track.

13. A trajectory generating device, It is characterized in that The device comprises: An acquisition module, used to acquire a trajectory to be processed; the trajectory to be processed is a driving trajectory of a target user; A first generating module, used for optimizing the accuracy of the trajectory to be processed and generating an optimized trajectory; A determination module, used to identify the optimized trajectory and determine useless trajectories in the optimized trajectory; the useless trajectories are used to characterize the erroneous trajectories of the target user during driving; The second generating module is used to delete the useless trajectories, perform smoothing on the remaining trajectories in the optimized trajectory, and generate a target trajectory that matches the target user.

14. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the trajectory generation method according to any one of claims 1 to 12 by executing the computer instructions.

15. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the trajectory generation method according to any one of claims 1 to 12.

16. A computer program product, It is characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the trajectory generation method according to any one of claims 1 to 12.