Track intention classification method and device, electronic equipment and storage medium
By acquiring and clustering trajectory information and automatically classifying trajectory intentions, the problem of relying on artificial rules and modal number selection in the existing technology is solved, and the trajectory prediction performance and real-time performance of the autonomous driving system are improved.
Patent Information
- Application Number
- CN202310250708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2024-09-20
AI Technical Summary
Existing trajectory intention prediction methods rely on artificially defined rules and modal number selection, which leads to the introduction of limitations of human experience and domain knowledge, and high computational complexity, making it difficult to meet the real-time requirements of autonomous driving technology.
By obtaining operating environment data, extracting trajectory information, determining target trajectory samples, and generating trajectory intention classification results through clustering methods, human intervention is avoided and the trajectory prediction performance of the autonomous driving system is improved.
It realizes automatic classification and prediction of trajectory intentions in the autonomous driving system, improves the performance and real-time performance of the trajectory prediction model, and reduces the impact of human factors.
Smart Images

Figure CN118675138A
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a trajectory intention classification method and device, electronic device and storage medium. Background Art
[0002] Trajectory intention prediction is the intermediate link of the autonomous driving function module "environmental perception-trajectory prediction-decision planning", which plays a connecting role. In the actual road environment, the movement intention of obstacles around the vehicle is uncertain, resulting in insufficient trajectory prediction performance of the traditional rule-based trajectory prediction method. At the same time, with the development of deep learning technology, learning-based trajectory prediction methods have been widely used. Learning-based trajectory prediction methods belong to supervised learning methods. In the model training stage, training samples need to be prepared in advance.
[0003] Currently, the publicly available trajectory prediction databases, such as Waymo, Argoverse, Lyft, Apolloscape and other autonomous driving related databases, only provide the true value information of the position of obstacle targets, but not the true value information of the intention, and cannot be directly used for the training of the intention multimodal trajectory prediction model. For these databases, it is necessary to manually define the intention rules of different modes in advance, generate samples of different intention classifications such as left turn, right turn, and straight, and then use them for the training of the intention multimodal trajectory prediction model.
[0004] In the related art, there are currently two types of solutions for trajectory intention prediction of trajectory samples (i.e., automatic generation of trajectory intention labels):
[0005] (1) It is necessary to manually define rules for different behavioral intention modes in advance, such as lane keeping, left lane change, right lane change, and turning. These rules are often formulated based on the lateral and longitudinal offsets and speed change rates of obstacle targets; that is, human factors are introduced and are limited by human experience and domain knowledge.
[0006] (2) Dynamic clustering methods require artificially given modal numbers, such as the K value in the K-means clustering method widely used in unsupervised learning algorithms. The selection of the optimal modal number K value is an inherent defect of the K-means algorithm. The larger the K value, the denser the sample points in each class will be, but the greater the computational complexity, which is not conducive to autonomous driving technology with high real-time requirements.
[0007] Therefore, the trajectory intention prediction in the related art has the above-mentioned technical problems. Summary of the invention
[0008] The present application provides a trajectory intention classification method and device, an electronic device and a storage medium to at least solve at least one technical problem existing in the related art.
[0009] According to one aspect of an embodiment of the present application, a trajectory intention classification method is provided, comprising:
[0010] Acquire operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device;
[0011] Extracting trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle;
[0012] Determine a plurality of target trajectory samples according to the trajectory information, wherein each of the target trajectory samples is used to indicate a trajectory of a corresponding target dynamic obstacle;
[0013] By clustering the target trajectory samples, trajectory intention classification results of the target trajectory samples are obtained.
[0014] Optionally, as in the aforementioned method, extracting the trajectory information from the operating environment data includes:
[0015] Determining at least one preset field;
[0016] According to the preset fields, a field value corresponding to each preset field is extracted from the operating environment data to obtain the trajectory information.
[0017] Optionally, as in the aforementioned method, determining a plurality of target trajectory samples according to the trajectory information includes:
[0018] Classifying the plurality of track information according to the target field to obtain a track information set corresponding to each target field type, wherein each track information includes at least the target field, and the target field includes a plurality of the target field types;
[0019] Collect each track information according to a preset image frame collection strategy to obtain a track sample corresponding to each track information, wherein the preset image frame collection strategy includes: historical duration and future duration;
[0020] Convert each trajectory sample into a converted trajectory sample in a preset coordinate system, wherein the preset coordinate system is a coordinate system with the target mobile device as the origin, and the target mobile device is a mobile device where a collection device that collects operating environment data is located or a dynamic obstacle corresponding to the trajectory indicated by the trajectory sample;
[0021] The plurality of target trajectory samples are determined from all the converted trajectory samples.
[0022] Optionally, as in the aforementioned method, determining the plurality of target trajectory samples from all the converted trajectory samples comprises:
[0023] All the converted trajectory samples are filtered to determine the multiple target trajectory samples that meet the preset screening strategy, wherein the preset screening strategy includes: the instantaneous speed is greater than or equal to the preset instantaneous speed, the average speed is greater than or equal to the preset average speed, the obstacle category of the dynamic obstacle is a preset type, and the dynamic state satisfies the preset state.
[0024] Optionally, as in the aforementioned method, filtering all the converted trajectory samples to determine the plurality of target trajectory samples satisfying a preset screening strategy includes:
[0025] Filtering all the converted trajectory samples to determine the designated trajectory samples that meet the preset screening strategy;
[0026] The designated trajectory sample is compressed to obtain the target trajectory sample retaining the key trajectory point in the designated trajectory sample, wherein the designated trajectory sample includes a plurality of candidate trajectory points, and the key trajectory point is the candidate trajectory point corresponding to key motion information.
[0027] Optionally, as in the aforementioned method, clustering the target trajectory samples to obtain the trajectory intention classification result of the target trajectory samples includes:
[0028] Generate a cost matrix between every two target trajectory samples, wherein each cost element in the cost matrix includes: an average curvature cost, a head and tail slope cost, and a Ferechet clustering cost, wherein the average curvature cost is used to measure the absolute value of the difference between the average values of the curvatures of all trajectory points of trajectory sample i and trajectory sample j, the head and tail slope cost is used to measure the absolute value of the difference between the head and tail slopes of trajectory sample i and trajectory sample j, and the Ferechet clustering cost is used to measure the shortest dog leash length of trajectory sample i and trajectory sample j to calculate the maximum difference between the two sequences, wherein trajectory sample i and trajectory sample j are two different target trajectory samples among all the target trajectory samples;
[0029] Based on the cost matrix and the minimum number of trajectory samples, all the target trajectory samples are clustered to obtain trajectory intention classification results of the target trajectory samples, wherein the minimum number of trajectory samples is the minimum number of trajectory samples included in an intention classification result.
[0030] Optionally, as in the aforementioned method, after obtaining the trajectory intention classification result of the target trajectory samples by clustering the target trajectory samples, the method further includes:
[0031] According to the trajectory intention classification result of the target trajectory sample, determining the classification number of different trajectory intention classification results;
[0032] According to the trajectory intention classification result, all the target trajectory samples are classified to obtain classification sample sets corresponding to the trajectory intention classification results one by one, wherein all the target trajectory samples corresponding to each trajectory intention classification result are in the same classification sample set;
[0033] The target trajectory corresponding to each of the target trajectory samples is displayed according to the trajectory intention classification result.
[0034] According to another aspect of an embodiment of the present application, a trajectory intention classification device is also provided, including:
[0035] An acquisition unit, used to acquire operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device;
[0036] An extraction unit, configured to extract trajectory information from the operating environment data, wherein the trajectory information is used to indicate an instantaneous state of a dynamic obstacle;
[0037] a determination unit, configured to determine a plurality of target trajectory samples according to the trajectory information, wherein each of the target trajectory samples is used to indicate a trajectory of a corresponding target dynamic obstacle;
[0038] The classification unit is used to obtain a trajectory intention classification result of the target trajectory sample by clustering the target trajectory sample.
[0039] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.
[0040] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.
[0041] According to another aspect of the embodiments of the present application, the embodiments of the present application provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes a method as described in any of the preceding items.
[0042] According to another aspect of an embodiment of the present application, an embodiment of the present application provides a mobile device, including the electronic device as described above.
[0043] In an embodiment of the present application, a trajectory intention classification method and device, an electronic device and a storage medium are provided. The method includes: obtaining operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device; extracting trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle; determining multiple target trajectory samples according to the trajectory information, wherein each target trajectory sample is used to indicate the trajectory of the corresponding target dynamic obstacle; and obtaining the trajectory intention classification result of the target trajectory sample by clustering the target trajectory samples. By adopting the operating environment data collected by the target operating equipment, the target trajectory samples of each target dynamic obstacle are obtained, and the trajectory intention classification results of the target trajectory samples can be obtained by clustering the target trajectory samples. Then, each target trajectory sample that determines the corresponding trajectory intention classification result can be directly used as a training sample to train the trajectory prediction model, so that the trajectory prediction model can be iteratively trained in a closed-loop manner to ensure the performance of the trajectory prediction model. The trajectory prediction model provides the intention category of the output trajectory while outputting the trajectory waypoints, so as to better provide the downstream decision-making planning module with complete and accurate future trajectory information of surrounding obstacles; and it can effectively overcome the technical problems existing in related technologies that the rules of different behavioral intention modes are manually defined in advance, which leads to the introduction of human factors and is limited by human experience and domain knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 is a flowchart of an optional trajectory intention classification method according to an embodiment of the present application;
[0047] Figure 2 is a flowchart of another optional trajectory intention classification method according to an embodiment of the present application;
[0048] Figure 3is a flowchart of another optional trajectory intention classification method according to an embodiment of the present application;
[0049] Figure 4 is a flowchart of another optional trajectory intention classification method according to an embodiment of the present application;
[0050] Figure 5 is a flowchart of another optional trajectory intention classification method according to an embodiment of the present application;
[0051] Figure 6 is a flowchart of another optional trajectory intention classification method according to an embodiment of the present application;
[0052] Figure 7 is a schematic structural diagram of an optional trajectory intention classification system according to an embodiment of the present application;
[0053] Figure 8 is a schematic structural diagram of another optional trajectory intention classification system according to an embodiment of the present application;
[0054] Fig. 9 is a schematic diagram of an optional multi-stage filtering process according to an embodiment of the present application;
[0055] Fig.10 is an optional target trajectory display diagram according to an embodiment of the present application;
[0056] Fig.11 is a structural block diagram of an optional trajectory intention classification device according to an embodiment of the present application;
[0057] Fig.12 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0060] According to one aspect of an embodiment of the present application, a trajectory intention classification method is provided. Optionally, in this embodiment, the above-mentioned trajectory intention classification method can be applied to a hardware environment consisting of a terminal and a server. The server is connected to the terminal via a network, and can be used to provide services (such as data processing services, application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server.
[0061] The above network may include but is not limited to at least one of the following: wired network, wireless network. The above wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, etc.
[0062] The trajectory intention classification method of the embodiment of the present application can be executed by a server, or by a terminal, or by both a server and a terminal. The terminal can also execute the trajectory intention classification method of the embodiment of the present application by a client installed thereon.
[0063] Taking the trajectory intention classification method in this embodiment executed by the server as an example, Figure 1 A trajectory intention classification method provided in an embodiment of the present application includes the following steps:
[0064] Step S101, acquiring operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device;
[0065] The trajectory intention classification method in this embodiment can be applied to scenarios where the trajectory intention of dynamic obstacles needs to be identified, such as: scenarios for identifying vehicle trajectory intentions, scenarios for identifying pedestrian trajectory intentions, etc., and can also be scenarios for identifying the trajectory intentions of other obstacles. In the embodiment of this application, the above-mentioned trajectory intention classification method is illustrated by taking the identification of vehicle trajectory intentions as an example. For other types of dynamic obstacles, the above-mentioned trajectory intention classification method is also applicable if there is no contradiction.
[0066] Optionally, the operating environment data may be a data packet indicating the operating environment obtained by collecting the operating environment of the target operating device based on multi-source heterogeneous sensors on the vehicle, such as camera sensors, LiDAR sensors, and millimeter-wave radar sensors. The operating environment data may include the location, category, and tracking ID (different tracking IDs of different dynamic obstacles are different) of dynamic obstacles around the vehicle (i.e., the target operating device is a vehicle) in the operating environment, information related to static obstacles, and related information such as road sign indicators.
[0067] The operating environment data may include one or more operating environment data, and different operating environment data among the multiple operating environment data may be collected from different operating environments of the same target operating device, or may be collected from different operating environments of different target operating devices.
[0068] Furthermore, the number of dynamic obstacles in the operating environment data depends on the driving environment of the vehicle (i.e., the vehicle on which the data acquisition device is installed). That is, the operating environment data may include data indicating the trajectories of multiple dynamic obstacles (for example, when the vehicle is driving during rush hour), or there may be no data indicating the trajectory of any dynamic obstacle (for example, when the vehicle is driving late at night).
[0069] Step S102: extracting trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle.
[0070] After the operating environment data is obtained, the operating environment data may include data other than data related to dynamic obstacles. Therefore, in order to facilitate the classification of the trajectory intention of the dynamic obstacle, information can be extracted from the operating environment data to obtain trajectory information indicating the instantaneous state of the dynamic obstacle.
[0071] Furthermore, when the operating environment data includes relevant data of a plurality of dynamic obstacles, the trajectory information may include sub-information of a plurality of instantaneous states corresponding to each of the plurality of dynamic obstacles.
[0072] Step S103: determining a plurality of target trajectory samples according to the trajectory information, wherein each target trajectory sample is used to indicate the trajectory of the corresponding target dynamic obstacle.
[0073] After the trajectory information is obtained, a target trajectory sample corresponding to each target dynamic obstacle may be determined in the trajectory information according to different target dynamic obstacles.
[0074] In this embodiment, the target trajectory samples correspond one-to-one to the target dynamic obstacles.
[0075] Step S104, clustering the target trajectory samples to obtain trajectory intention classification results of the target trajectory samples.
[0076] After obtaining the target trajectory samples, all the target trajectory samples can be clustered to determine the category to which each target trajectory sample belongs, and then obtain the trajectory intention classification result of the target trajectory sample. The trajectory intention classification result can be a result used to indicate the trajectory type of the target trajectory sample, such as: lane change, overtaking, U-turn, etc.
[0077] After obtaining the trajectory intention classification result of the target trajectory sample, the trajectory intention classification result can be used as the label of the corresponding target trajectory sample, and the target trajectory sample for which the trajectory intention classification result is determined can be used as training data to train the trajectory prediction model.
[0078] Through the method in this embodiment, the operating environment data collected by the target operating device is used to obtain the target trajectory samples of each target dynamic obstacle, and the target trajectory samples can be clustered to obtain the trajectory intention classification results of the target trajectory samples, and then each target trajectory sample that determines the corresponding trajectory intention classification result can be directly used as a training sample to train the trajectory prediction model, so that the trajectory prediction model can be iteratively trained in a closed-loop manner to ensure the performance of the trajectory prediction model. The trajectory prediction model provides the intention category of the output trajectory while outputting the trajectory waypoints, so as to better provide the downstream decision-making planning module with complete and accurate future trajectory information of surrounding obstacles; and it can effectively overcome the technical problems existing in the related technology that the rules of different behavioral intention modes are manually defined in advance, resulting in the introduction of human factors and being limited by human experience and domain knowledge.
[0079] like Figure 2 As shown, as an optional embodiment, as in the above method, the step S102 extracts the trajectory information from the operating environment data, including the following steps:
[0080] Step S201, determining at least one preset field.
[0081] The preset fields may be predetermined fields related to the trajectory of the dynamic obstacle. For example, the relevant fields are the timestamp obj_timestamp (unit: ns), frame number frame_id (natural number), tracking number obj_id (natural number, -1 for the vehicle), category obj_type (natural number), confidence obj_conf (number between [0,1]), horizontal and vertical three-dimensional coordinates [obj_utmx, obj_utmy, obj_utmz] (horizontal and vertical three-dimensional coordinates in the UTM coordinate system, unit: meter), length, width and height [obj_l, obj_w, obj_h] (unit: meter) and heading angle obj_yaw (unit: radian), etc. of each dynamic obstacle around the vehicle.
[0082] Step S202: According to the preset fields, a field value corresponding to each preset field is extracted from the operating environment data to obtain trajectory information.
[0083] After the preset fields are determined, the preset fields can be extracted in the operating environment data according to the preset fields to obtain a vector representing the instantaneous state of a dynamic obstacle or the vehicle in a frame (for example, a video frame). Then, trajectory information can be obtained based on all vectors.
[0084] Based on the example given in step S201, each vector may be a 12-dimensional vector as shown below:
[0085] [obj_timestamp,frame_id,obj_id,obj_type,obj_conf,obj_utmx,obj_utmy,obj_utmz,obj_
[0086] l,obj_w,obj_h,obj_yaw]
[0087] The general format of trajectory information can be TXT text format (JSON format can also be used). The content of each line in TXT represents the instantaneous state of a certain obstacle or vehicle in a certain frame. Each field is separated by a space. Each line of text contains the above 12 fields, and each line is separated by a line feed character.
[0088] like Figure 3 As shown, as an optional embodiment, as in the above method, the step S103 determines a plurality of target trajectory samples according to the trajectory information, including the following steps:
[0089] Step S301 , classifying multiple track information according to target fields to obtain a track information set corresponding to each target field type, wherein each track information includes at least a target field, and the target field includes multiple target field types.
[0090] Since different account categories have different motion characteristics, the target field for classification can be determined from all fields included in the trajectory information.
[0091] For example: according to the mobile obstacle category field (i.e., one of the target fields), it is divided into motor vehicles (small cars, large cars, motorcycles, trailers, others) and non-motor vehicles (pedestrians, electric bike riders, tricycle riders, others), and all trajectory information is divided.
[0092] Step S302 , collecting each piece of trajectory information according to a preset image frame collection strategy to obtain a trajectory sample corresponding to each piece of trajectory information, wherein the preset image frame collection strategy includes: historical duration and future duration.
[0093] The historical duration may be the duration corresponding to a known trajectory in a trajectory sample, and the future duration may be the duration corresponding to a trajectory to be predicted in the trajectory sample.
[0094] That is, if the trajectory prediction model is trained through the trajectory sample in the later stage, the known trajectory corresponding to the historical duration can be used as the input object in the training data of the trajectory prediction model, and the trajectory to be predicted corresponding to the future duration can be used as the expected output in the training data of the trajectory prediction model.
[0095] For example: according to the tracking sequence number, dynamic obstacles are screened out from all frames, and according to the requirements of the historical duration MT (unit: seconds) and the future duration NT (unit: seconds), the acquisition frame rate of the original data is FT and the sampling interval is step (unit: frame), and a trajectory sample of a fixed length L_sample is generated. The value of L_sample is as follows:
[0096] L_sample=MT*FT / step+1+NT*FT / step=(MT+NT)*(FT / step)+1;
[0097] Among them, MT+NT represents the trajectory duration (seconds), that is, the historical duration + the future duration, FT / step represents the number of frames per second after sampling, and 1 is the current frame.
[0098] In this embodiment, the frame sampling interval step is taken as 2 frames, and the acquisition frame rate of the operating environment data is assumed to be FT=10 (unit: fps, 10 frames are collected per second), so the interval of 2 frames corresponds to an inter-frame duration of 0.2s. The historical duration MT=1s (corresponding to the frame length MT*FT / step)=1*10 / 2=5 frames), and the future duration NT=3s, then the fixed length of each trajectory sample is:
[0099] L_sample=MT*FT / step+1+NT*FT / step=5+1+15=21 frames.
[0100] Step S303, converting each trajectory sample into a converted trajectory sample in a preset coordinate system, wherein the preset coordinate system is a coordinate system with the target mobile device as the origin, and the target mobile device is a mobile device where a collection device that collects operating environment data is located or a dynamic obstacle corresponding to the trajectory indicated by the trajectory sample.
[0101] After all trajectory samples are obtained, each trajectory sample can be converted to a coordinate system to obtain a converted trajectory sample in a preset coordinate system. In addition, the preset coordinate system can be a coordinate system with the target mobile device being the mobile device where the collection device that collects the operating environment data is located as the origin, or a coordinate system with the dynamic obstacle corresponding to the trajectory indicated by the trajectory sample as the origin.
[0102] For example, the coordinate system may be transformed as follows: all trajectory samples are traversed, and the fixed-length trajectory samples of each obstacle target individual are transformed one by one into a local coordinate system with the coordinates of the first trajectory point of the obstacle target as the origin and the heading angle as the main direction.
[0103] The coordinate points of each fixed-length trajectory sample of the obstacle target are recorded as [utmx_i, utmy_i] (from the utm right-handed coordinate system), and the heading angle is yaw_i, where the value of the integer i ranges from 0 to L_sample-1.
[0104] The position coordinates of the first trajectory point are [utmx_0,utmy_0], and the heading angle is yaw_0. The coordinate conversion steps are as follows:
[0105] (1) According to yaw_0 and the left-hand rule (the image is in the left-hand coordinate system), generate the rotation matrix:
[0106]
[0107] (1) Perform coordinate transformation on other trajectory points [utmx_i,utmy_i], i≠0 in each fixed-length trajectory sample of the obstacle target:
[0108]
[0109] Among them Used to convert coordinate points from a right-handed coordinate system to a left-handed coordinate system.
[0110] Step S304 , determining a plurality of target trajectory samples from all converted trajectory samples.
[0111] As an optional embodiment, as in the above method, the step S304 of determining a plurality of target trajectory samples from all converted trajectory samples includes the following steps:
[0112] Step S401, filtering all converted trajectory samples to determine multiple target trajectory samples that meet a preset screening strategy, wherein the preset screening strategy includes: the instantaneous speed is greater than or equal to a preset instantaneous speed, the average speed is greater than or equal to a preset average speed, the obstacle category of the dynamic obstacle is a preset type, and the dynamic state meets a preset state.
[0113] After all converted trajectory samples are obtained, since there may be useless trajectory samples among all converted trajectory samples (for example, the speed of the dynamic obstacle is too slow, the dynamic obstacle is not a specified obstacle type, etc.), all converted trajectory samples need to be filtered to obtain the required target trajectory samples.
[0114] For example, you can filter as follows:
[0115] (1) Instantaneous speed and average speed filtering. The speed of the trajectory point in the current frame (the displacement change rate between two adjacent frames) is not less than the threshold threshold_current (i.e., the preset instantaneous speed) and the average speed of a single converted trajectory sample is not less than the threshold threshold_mean (i.e., the preset average speed). The converted trajectory samples that do not meet the above two conditions at the same time are judged as static samples and discarded without entering subsequent operations. In this embodiment, the values of the two thresholds threshold_current and threshold_mean are related to the category of dynamic obstacles. The motor vehicle category can be set to 1m / s and 2m / s, respectively, while the non-motor vehicle category can be set to 0.25m / s and 0.5m / s, respectively. This filtering method is also convenient for deleting trajectory points (noise points) that should be static.
[0116] (2) Dynamic constraint (i.e., whether the dynamic state meets the preset state) filtering. Based on the acceleration change rate threshold threshold_da and the heading angle change rate threshold threshold_dyaw, the trajectory samples that meet the dynamic constraints are screened, and the trajectories that do not conform to the real physical meaning are filtered out to ensure the quality of trajectory data generation. The acceleration change rate is the third-order inverse of the trajectory point position (the second-order derivative of the velocity, the first-order derivative of the acceleration); the heading angle change rate is the heading angle change rate of two adjacent frames. Because non-motor vehicles are non-rigid body movements (such as pedestrians whose postures can change at will), the speed change rate threshold and the heading angle change rate threshold are only for motor vehicle categories. In the embodiment, the speed change rate threshold and the heading angle change rate threshold for the major category of motor vehicles can be set to 5m / s respectively. 2 and 0.3×πrad.
[0117] like Figure 4 As shown, as an optional embodiment, as in the above method, the step S401 filters all converted trajectory samples to determine a plurality of target trajectory samples that meet the preset screening strategy, including the following steps:
[0118] Step S501 : Filter all converted trajectory samples to determine designated trajectory samples that meet a preset screening strategy.
[0119] That is to say, after filtering in step S401 of the aforementioned embodiment, the specified trajectory samples satisfying the preset screening strategy are directly obtained.
[0120] Step S502 : compressing the designated trajectory sample to obtain a target trajectory sample retaining key trajectory points in the designated trajectory sample, wherein the designated trajectory sample includes a plurality of candidate trajectory points, and the key trajectory points are candidate trajectory points corresponding to key motion information.
[0121] After obtaining the specified trajectory sample, in order to reduce the size of the specified trajectory sample, the specified trajectory sample can be compressed. According to the key motion information corresponding to each key trajectory point, the key trajectory points are screened out in the specified trajectory sample, and then the target trajectory sample that retains the key trajectory points in the specified trajectory sample is obtained. The key motion information may include but is not limited to: whether it is the starting position, whether a turn is made, whether acceleration / deceleration occurs, etc.
[0122] In this embodiment, the specified trajectory sample can be compressed based on the vector data compression algorithm, the key trajectory points corresponding to the key motion information are retained, the trajectory point data in the specified trajectory sample is reduced, and the trajectory sample curve (L_sample) is approximately represented as a series of points (L_sample_zip), so as to improve the efficiency of subsequent data processing. This operation is equivalent to data filtering and can be abbreviated as In an embodiment, the vector data compression algorithm may adopt the Douglas-Peucker algorithm, which has translation and rotation invariance.
[0123] like Figure 5 As shown, as an optional embodiment, as in the above method, the step S104 obtains the trajectory intention classification result of the target trajectory samples by clustering the target trajectory samples, including the following steps:
[0124] Step S601, generating a cost matrix between every two target trajectory samples, wherein each cost element in the cost matrix includes: an average curvature cost, a head and tail slope cost, and a Ferechet clustering cost, wherein the average curvature cost is used to measure the absolute value of the difference between the average values of the curvatures of all trajectory points of trajectory sample i and trajectory sample j, the head and tail slope cost is used to measure the absolute value of the difference between the head and tail slopes of trajectory sample i and trajectory sample j, and the Ferechet clustering cost is used to measure the shortest leash length of trajectory sample i and trajectory sample j to calculate the maximum difference between the two sequences, and trajectory sample i and trajectory sample j are two different target trajectory samples among all target trajectory samples.
[0125] In order to determine whether two target trajectory samples belong to the same clustering result, a cost matrix can be generated for each two target trajectory samples. Here, the cost matrix is a tool to describe the loss size (possibility size or probability size) of two target trajectory samples belonging to the same clustering result in a specific scenario. Therefore, the larger the cost of the cost matrix, the smaller the probability that the two target trajectory samples corresponding to the cost matrix belong to the same clustering result.
[0126] Specifically, each cost element cost(i,j) in the cost matrix COST (square matrix, the size is the number of all target trajectory samples) involves three parts:
[0127] 1. Average curvature cost cost1(i,j): used to measure the absolute value of the difference between the average curvature values of all trajectory points of trajectory sample i and trajectory sample j.
[0128]
[0129] 2. The cost of the first and last point slopes cost2(i,j): It is used to measure the absolute value of the difference between the first and last point slopes of trajectory sample i and trajectory sample j.
[0130]
[0131] The calculation formula of the slope of the first and last points (denoted as p, q) is:
[0132]
[0133] Because when p(x)-q(x) tends to 0, slide tends to ∞, and the corresponding scenario is the vehicle turning around. Therefore, it can be improved to use the cost cost2_new(i,j) of the angle between the two vectors (i.e., the cosine similarity metric (p*q) / (|q|*|p|), with a value range of [-1,1]) as a substitute for the first and last point slope cost cost2(i,j). In the embodiment, these two different cost function schemes can be calculated in parallel throughout the entire process, and the intention clustering effects of the two cost functions are compared ({cost1(i,j), cost2(i,j), cost3(i,j)} vs. {cost1(i,j), cost2_new(i,j), cost3(i,j)}), and the best cost function is selected.
[0134] 3. Fereche clustering cost cost3(i,j): used to measure the shortest leash length of trajectory sample i and trajectory sample j, and to calculate the maximum difference between the two sequences.
[0135]
[0136] In order to improve the computational efficiency of the cost matrix, the above cost1(i,j), cost2(i,j), and cost3(i,j) can be designed as multi-threaded parallel operations. Since cost1(i,j), cost2(i,j), and cost3(i,j) may have different data dimensions, in order to integrate these three types of costs, the maximum and minimum normalization method Nor(*) is used to normalize the above three cost values to between 0 and 1. Zero mean normalization cannot be used here because negative values may be output after normalization.
[0137] Then add the normalized cost1(i,j), cost2(i,j), and cost3(i,j) as the value of each cost element cost(i,j) in the cost matrix, that is,
[0138] cost(i,j)=∑(Nor(cost1(i,j))+Nor(cost2(i,j))+Nor(cost3(i,j)))
[0139] Step S602, clustering all target trajectory samples based on the cost matrix and the minimum number of trajectory samples to obtain trajectory intent classification results of the target trajectory samples, wherein the minimum number of trajectory samples is the minimum number of trajectory samples included in an intent classification result.
[0140] Based on the above example, after the cost matrix is obtained, all target trajectory samples can be clustered based on the cost matrix and the preset minimum number of trajectory samples to obtain the trajectory intention classification results of the target trajectory samples.
[0141] Optionally, the representative density-based clustering algorithm OPTICS (an improved DBSCAN algorithm with reduced sensitivity of input parameters eps and min_samples) can be used to cluster all target trajectory samples and generate trajectory intent classification results. The OPTICS function interface here has two input parameters: the cost matrix COST and the minimum number of trajectory samples minTrajs (equivalent to min_samples in the OPTICS algorithm of the sklearn library).
[0142] In this embodiment, COST comes from the output of cost(i, j). Optionally, minTrajs=10 can be adjusted according to the minimum number of trajectory samples in an intent category.
[0143] like Figure 6 As shown, as an optional embodiment, as in the aforementioned method, after obtaining the trajectory intention classification result of the target trajectory samples by clustering the target trajectory samples in step S104, the method further includes the following steps:
[0144] Step S701, according to the trajectory intention classification result of the target trajectory sample, determine the classification number of different trajectory intention classification results.
[0145] After determining the trajectory intention classification result of each target trajectory sample, the number of classifications can be obtained according to the number of all different trajectory intention classification results.
[0146] Step S702, classify all target trajectory samples according to the trajectory intention classification result to obtain a classification sample set corresponding to the trajectory intention classification result one by one, wherein all target trajectory samples corresponding to each trajectory intention classification result are in the same classification sample set.
[0147] That is to say, according to the trajectory intention classification results, the target trajectory samples with the same trajectory intention classification result value are regarded as one category, as one in the same classification sample set, that is, as an intention modality, which can be used to train the trajectory prediction model of the corresponding intention modality.
[0148] Step S703 , displaying the target trajectory corresponding to each target trajectory sample according to the trajectory intention classification result.
[0149] Optionally, you can use the matplotlib.pyplot library in Python to plot all target trajectory samples in a 2D Cartesian coordinate system. Specifically, the target trajectory plotted in a 2D Cartesian coordinate system is a curve, and each point is the horizontal and vertical coordinates of each sample point in the trajectory sample. Note: The fixed length of each trajectory sample is the number of sample points, and the color of each trajectory corresponds to the intent category (for example Fig.10 As shown, there are 4 types of trajectory intention classification results), thereby achieving the purpose of displaying the target trajectory corresponding to each target trajectory sample according to the trajectory intention classification results.
[0150] As described below, an application example of applying any of the above embodiments is provided:
[0151] The block diagram of a trajectory intention classification system provided by this paper is as follows Figure 7 As shown, it includes three modules: trajectory data input module, trajectory multimodal automatic clustering modeling module, and trajectory automatic clustering result output module.
[0152] 1. Trajectory data input module. The trajectory data input module provides input information for the entire trajectory intention multimodal automatic clustering system, including 1.1 preliminary extraction submodule of trajectory information and 1.2 division and conversion submodule of trajectory samples, as follows:
[0153] 1.1 Preliminary extraction of trajectory information The submodule is used to extract relevant fields of trajectory samples from the data packets recorded by the real vehicle (i.e., operating environment data) and generate files in a common format.
[0154] Specifically, the data packet may be a data packet recorded by the ego vehicle ros bag, and the relevant fields are the timestamp obj_timestamp (unit: ns) of each dynamic obstacle around the ego vehicle, the frame number frame_id (natural number), the tracking number obj_id (natural number, -1 for the ego vehicle), the category obj_type (natural number), the confidence obj_conf (a number between [0,1]), the horizontal and vertical three-dimensional coordinates [obj_utmx, obj_utmy, obj_utmz] (the horizontal and vertical three-dimensional coordinates in the UTM coordinate system, unit: meter), the length, width and height [obj_l, obj_w, obj_h] (unit: meter) and the heading angle obj_yaw (unit: radian), etc. The above 12 fields are summarized as a 12-dimensional vector as shown below:
[0155] [obj_timestamp,frame_id,obj_id,obj_type,obj_conf,obj_utmx,obj_utmy,obj_utmz
[0156] ,obj_l,obj_w,obj_h,obj_yaw]
[0157] The general format of trajectory information can be TXT text format (JSON format can also be used). The content of each line in TXT represents the instantaneous state of a certain obstacle or vehicle in a certain frame. Each field is separated by a space. Each line of text contains the above 12 fields, and each line is separated by a line feed character.
[0158] 1.2 The trajectory sample division and conversion submodule is used to divide the trajectory information initially extracted in 1.1 into trajectory samples according to obstacle category, obstacle sequence number, historical duration and predicted duration, and generate trajectory samples of fixed length; then the trajectory samples are converted to a local coordinate system with the first trajectory point of the obstacle target as the origin.
[0159] Specifically:
[0160] 1.2.1 Classification of trajectory samples. Since different obstacle categories have different motion characteristics, this application example is divided according to the mobile obstacle category field (i.e., one of the target fields), here it is classified into motor vehicles (small cars, large cars, motorcycles, trailers, others) and non-motor vehicles (pedestrians, electric bike riders, tricycle riders, others), and all trajectory information is divided.
[0161] According to the tracking sequence number, dynamic obstacles are selected from all frames, and according to the requirements of the historical duration MT (unit: seconds) and the future duration NT (unit: seconds), the acquisition frame rate of the original data is FT and the sampling interval is step (unit: frame), and a trajectory sample of a fixed length L_sample is generated. The value of L_sample is as follows:
[0162] L_sample=MT*FT / step+1+NT*FT / step=(MT+NT)*(FT / step)+1;
[0163] Among them, MT+NT represents the trajectory duration (seconds), that is, the historical duration + the future duration, FT / step represents the number of frames per second after sampling, and 1 is the current frame.
[0164] In the embodiment, the frame sampling interval step is taken as 2 frames, and it is assumed that the acquisition frame rate of the original data (i.e., the operating environment data) is FT=10 (unit: fps, 10 frames are collected per second), so the interval of 2 frames corresponds to the inter-frame duration of 0.2s. The historical duration MT=1s (corresponding to the frame length of MT*FT / step)=1*10 / 2=5 frames), and the future duration NT=3s, then the fixed length of each trajectory sample is:
[0165] L_sample=MT*FT / step+1+NT*FT / step=5+1+15=21 frames.
[0166] 1.2.2 Conversion of trajectory samples. Traverse all trajectory samples and convert the fixed-length trajectory samples of each obstacle target individual one by one into a local coordinate system with the coordinates of the first trajectory point of the obstacle target as the origin and the heading angle as the main direction.
[0167] The coordinate points of each fixed-length trajectory sample of the obstacle target are recorded as [utmx_i, utmy_i] (from the utm right-handed coordinate system), and the heading angle is yaw_i, where the value of the integer i ranges from 0 to L_sample-1.
[0168] The position coordinates of the first trajectory point are [utmx_0,utmy_0], and the heading angle is yaw_0. The coordinate conversion steps are as follows:
[0169] (1) According to yaw_0 and the left-hand rule (the image is in the left-hand coordinate system), generate the rotation matrix:
[0170]
[0171] (2) The coordinates of other trajectory points [utmx_i,utmy_i], i≠0 in each fixed-length trajectory sample of the obstacle target are transformed as follows:
[0172]
[0173] Among them It is used to transform the coordinate points from the right-hand coordinate system to the left-hand coordinate system, and then obtain the transformed trajectory samples.
[0174] 2. Trajectory multimodal automatic clustering modeling module. The trajectory multimodal automatic clustering modeling module loads the trajectory samples divided by the trajectory data input module 1 (i.e., the trajectory data input module), and after a series of automated operations, generates the clustering number of the intent mode (i.e., trajectory intent classification result) and the target trajectory samples under each intent mode required by the next module 3 trajectory automatic clustering result output layer. Figure 8 As shown, the modeling layer of the dotted box includes four submodules: 2.1 multi-level filtering submodule of trajectory samples, 2.2 vector compression submodule of trajectory curves, 2.3 generation submodule of trajectory cost matrix and 2.4 density-based trajectory clustering submodule, and the four submodules are in a sequential progressive relationship.
[0175] The specific implementation methods of the above sub-modules are as follows:
[0176] 2.1 Multi-level filtering submodule of trajectory samples. Fig. 9As shown in the multi-stage filtering process, based on the cascaded multi-stage filtering rules, the trajectory samples output by module 1 are filtered to screen out trajectory samples with a certain speed and meeting the dynamic constraints.
[0177] (1) Instantaneous speed and average speed filtering. The speed of the trajectory point in the current frame (the displacement change rate between two adjacent frames) is not less than the threshold threshold_current (i.e., the preset instantaneous speed) and the average speed of a single converted trajectory sample is not less than the threshold threshold_mean (i.e., the preset average speed). The converted trajectory samples that do not meet the above two conditions at the same time are judged as static samples and discarded without entering subsequent operations. In this embodiment, the values of the two thresholds threshold_current and threshold_mean are related to the category of dynamic obstacles. The motor vehicle category can be set to 1m / s and 2m / s, respectively, while the non-motor vehicle category can be set to 0.25m / s and 0.5m / s, respectively. This filtering method is also convenient for deleting trajectory points (noise points) that should be static.
[0178] (2) Dynamic constraint (i.e., whether the dynamic state meets the preset state) filtering. Based on the acceleration change rate threshold threshold_da and the heading angle change rate threshold threshold_dyaw, the trajectory samples that meet the dynamic constraints are screened, and the trajectories that do not conform to the real physical meaning are filtered out to ensure the quality of trajectory data generation. The acceleration change rate is the third-order inverse of the trajectory point position (the second-order derivative of the velocity, the first-order derivative of the acceleration); the heading angle change rate is the heading angle change rate of two adjacent frames. Because non-motor vehicles are non-rigid body movements (such as pedestrians whose postures can change at will), the speed change rate threshold and the heading angle change rate threshold are only for motor vehicle categories. In the embodiment, the speed change rate threshold and the heading angle change rate threshold for the major category of motor vehicles can be set to 5m / s respectively. 2 and 0.3×πrad.
[0179] After the above filtering, the specified trajectory sample is obtained.
[0180] 2.2 Vector compression submodule of trajectory curve. Based on the vector data compression algorithm, the specified trajectory sample is compressed to obtain the target trajectory sample, the key trajectory points corresponding to the key motion information are retained, the trajectory point data in the specified trajectory sample is reduced, and the trajectory sample curve (L_sample) is approximately represented as a series of points (L_sample_zip), which is convenient for improving the efficiency of subsequent data processing. This operation is equivalent to data filtering and can be abbreviated as In an embodiment, the vector data compression algorithm may adopt the Douglas-Peucker algorithm, which has translation and rotation invariance.
[0181] 2.3 Trajectory cost matrix generation submodule. The function of this submodule is to generate a cost matrix between target trajectory samples for density clustering of all target trajectory samples, as the input of 2.4. Specifically, each cost element cost(i,j) in the cost matrix COST (square matrix, the size is the number of all target trajectory samples) involves three parts:
[0182] 1. Average curvature cost cost1(i,j): It is used to measure the absolute value of the difference between the average curvature values of all trajectory points of trajectory sample i and trajectory sample j (trajectory sample i and trajectory sample j are two different target trajectory samples among all target trajectory samples).
[0183]
[0184] 2. The cost of the first and last point slopes cost2(i,j): It is used to measure the absolute value of the difference between the first and last point slopes of trajectory sample i and trajectory sample j.
[0185]
[0186] The calculation formula of the slope of the first and last points (denoted as p, q) is:
[0187]
[0188] Because when p(x)-q(x) tends to 0, slide tends to ∞, and the corresponding scenario is the vehicle turning around. Therefore, it can be improved to use the cost cost2_new(i,j) of the angle between the two vectors (i.e., the cosine similarity metric (p*q) / (|q|*|p|), with a value range of [-1,1]) as a substitute for the first and last point slope cost cost2(i,j). In the embodiment, these two different cost function schemes can be calculated in parallel throughout the entire process, and the intention clustering effects of the two cost functions are compared ({cost1(i,j), cost2(i,j), cost3(i,j)} vs. {cost1(i,j), cost2_new(i,j), cost3(i,j)}), and the best cost function is selected.
[0189] 3. Fereche clustering cost cost3(i,j): used to measure the shortest leash length of trajectory sample i and trajectory sample j, and to calculate the maximum difference between the two sequences.
[0190]
[0191] In order to improve the computational efficiency of the cost matrix, the above cost1(i,j), cost2(i,j), and cost3(i,j) can be designed as multi-threaded parallel operations. Since cost1(i,j), cost2(i,j), and cost3(i,j) may have different data dimensions, in order to integrate these three types of costs, the maximum and minimum normalization method Nor(*) is used to normalize the above three cost values to between 0 and 1. Zero mean normalization cannot be used here because negative values may be output after normalization.
[0192] Then add the normalized cost1(i,j), cost2(i,j), and cost3(i,j) as the value of each cost element cost(i,j) in the cost matrix, that is,
[0193] cost(i,j)=∑(Nor(cost1(i,j))+Nor(cost2(i,j))+Nor(cost3(i,j)))
[0194] 2.4 Density-based trajectory clustering submodule. This submodule processes the cost matrix generated by submodule 2.3 based on the density-based trajectory clustering method to generate the intent category label of each target trajectory sample (i.e., trajectory intent classification result).
[0195] Optionally, the representative density-based clustering algorithm OPTICS (an improved DBSCAN algorithm that reduces the sensitivity of the input parameters eps and min_samples) can be used to cluster all target trajectory samples and generate intent category labels. The OPTICS function interface here has two input parameters: the cost matrix COST and the minimum number of trajectory samples minTrajs (equivalent to min_samples in the OPTICS algorithm of the sklearn library).
[0196] In this embodiment, COST comes from the output of cost(i, j). Optionally, minTrajs=10 can be adjusted according to the minimum number of trajectory samples in an intent category.
[0197] 3. Trajectory automatic clustering result output module. As the output layer of the entire system, based on the target trajectory samples with intent category labels output by module 2 (i.e., trajectory multimodal automatic clustering modeling module), (1) the number of intent multimodal clusters is automatically generated, (2) multimodal trajectory samples are automatically classified, and (3) the trajectory multimodal clustering results are visualized. The specific description is as follows:
[0198]
[0199] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0200] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0201] According to another aspect of an embodiment of the present application, a trajectory intention classification device for implementing the above-mentioned trajectory intention classification method is also provided. Fig.11 is a structural block diagram of an optional trajectory intention classification device according to an embodiment of the present application, such as Fig.11 As shown, the device may include:
[0202] An acquisition unit 1 is used to acquire operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device;
[0203] An extraction unit 2, used to extract trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle;
[0204] A determination unit 3, configured to determine a plurality of target trajectory samples according to the trajectory information, wherein each target trajectory sample is used to indicate a trajectory of a corresponding target dynamic obstacle;
[0205] The classification unit 4 is used to obtain the trajectory intention classification result of the target trajectory samples by clustering the target trajectory samples.
[0206] It should be noted that the acquisition unit 1 in this embodiment can be used to execute the above step S101, the extraction unit 2 in this embodiment can be used to execute the above step S102, the determination unit 3 in this embodiment can be used to execute the above step S103, and the classification unit 4 in this embodiment can be used to execute the above step S104.
[0207] The device in this embodiment, in addition to the above modules, may also include a module for executing any method in any of the embodiments of the aforementioned trajectory intention classification method.
[0208] It should be noted that the above modules and corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can be run in the implementation of Figure 1 The hardware environment of the method shown may be implemented by software or hardware, wherein the hardware environment includes a network environment.
[0209] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned trajectory intention classification method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0210] According to another embodiment of the present application, there is also provided an electronic device, including: Fig.12 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0211] Memory 1503, used for storing computer programs;
[0212] The processor 1501 is used to implement the following steps when executing the program stored in the memory 1503:
[0213] Step S101, acquiring operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device;
[0214] Step S102: extracting trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle.
[0215] Step S103: determining a plurality of target trajectory samples according to the trajectory information, wherein each target trajectory sample is used to indicate the trajectory of the corresponding target dynamic obstacle.
[0216] Step S104, clustering the target trajectory samples to obtain trajectory intention classification results of the target trajectory samples.
[0217] Optionally, in this embodiment, the above-mentioned communication bus can be a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0218] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0219] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0220] An embodiment of the present application further provides a computer-readable storage medium, the storage medium including a stored program, wherein the method steps of the above method embodiment are executed when the program is run.
[0221] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0222] According to another aspect of the embodiments of the present application, the embodiments of the present application provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes a method as described in any of the preceding items.
[0223] An embodiment of the present invention further provides a mobile device, which includes the above-mentioned electronic device.
[0224] The mobile device in the embodiment of the present invention can be any device that can be driven automatically or unmanned or assisted, such as mobile devices (such as floor scrubbers, vacuum cleaners, sweepers, logistics vehicles, passenger cars, buses, coaches, vans, trucks, trucks, trailers, trailers, cranes, excavators, bulldozers, road trains, sweepers, sprinkler trucks, garbage trucks, engineering vehicles, rescue vehicles, logistics carts, AGVs (Automated Guided Vehicles), etc.), motorcycles, bicycles, tricycles, carts, robots, sweepers, balance vehicles, etc. The present application does not strictly limit the types of mobile tools, and they are not listed here in detail.
[0225] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0226] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0227] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0228] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0230] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0231] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A trajectory intention classification method, characterized in that: include: Acquire operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device; Extracting trajectory information from the operating environment data, wherein the trajectory information is used to indicate the instantaneous state of the dynamic obstacle; Determine a plurality of target trajectory samples according to the trajectory information, wherein each of the target trajectory samples is used to indicate a trajectory of a corresponding target dynamic obstacle; By clustering the target trajectory samples, trajectory intention classification results of the target trajectory samples are obtained.
2. The method according to claim 1, characterized in that The extracting trajectory information from the operating environment data includes: Determining at least one preset field; According to the preset fields, a field value corresponding to each preset field is extracted from the operating environment data to obtain the trajectory information.
3. The method according to claim 1, characterized in that The step of determining a plurality of target trajectory samples according to the trajectory information includes: Classifying the plurality of track information according to the target field to obtain a track information set corresponding to each target field type, wherein each track information includes at least the target field, and the target field includes a plurality of the target field types; Collect each track information according to a preset image frame collection strategy to obtain a track sample corresponding to each track information, wherein the preset image frame collection strategy includes: historical duration and future duration; Convert each trajectory sample into a converted trajectory sample in a preset coordinate system, wherein the preset coordinate system is a coordinate system with the target mobile device as the origin, and the target mobile device is a mobile device where a collection device that collects operating environment data is located or a dynamic obstacle corresponding to the trajectory indicated by the trajectory sample; The plurality of target trajectory samples are determined from all the converted trajectory samples.
4. The method according to claim 3, characterized in that The step of determining the plurality of target trajectory samples from all the converted trajectory samples comprises: All the converted trajectory samples are filtered to determine the multiple target trajectory samples that meet the preset screening strategy, wherein the preset screening strategy includes: the instantaneous speed is greater than or equal to the preset instantaneous speed, the average speed is greater than or equal to the preset average speed, the obstacle category of the dynamic obstacle is a preset type, and the dynamic state satisfies the preset state.
5. The method according to claim 4, characterized in that The filtering of all the converted trajectory samples to determine the plurality of target trajectory samples satisfying a preset screening strategy includes: Filtering all the converted trajectory samples to determine the designated trajectory samples that meet the preset screening strategy; The designated trajectory sample is compressed to obtain the target trajectory sample retaining the key trajectory point in the designated trajectory sample, wherein the designated trajectory sample includes a plurality of candidate trajectory points, and the key trajectory point is the candidate trajectory point corresponding to key motion information.
6. The method according to claim 1, characterized in that The step of clustering the target trajectory samples to obtain trajectory intention classification results of the target trajectory samples includes: Generate a cost matrix between every two target trajectory samples, wherein each cost element in the cost matrix includes: an average curvature cost, a head and tail slope cost, and a Ferechet clustering cost, wherein the average curvature cost is used to measure the absolute value of the difference between the average values of the curvatures of all trajectory points of trajectory sample i and trajectory sample j, the head and tail slope cost is used to measure the absolute value of the difference between the head and tail slopes of trajectory sample i and trajectory sample j, and the Ferechet clustering cost is used to measure the shortest dog leash length of trajectory sample i and trajectory sample j to calculate the maximum difference between the two sequences, wherein trajectory sample i and trajectory sample j are two different target trajectory samples among all the target trajectory samples; Based on the cost matrix and the minimum number of trajectory samples, all the target trajectory samples are clustered to obtain trajectory intention classification results of the target trajectory samples, wherein the minimum number of trajectory samples is the minimum number of trajectory samples included in an intention classification result.
7. The method according to any one of claims 1 to 6, characterized in that After obtaining the trajectory intention classification result of the target trajectory samples by clustering the target trajectory samples, the method further includes: According to the trajectory intention classification result of the target trajectory sample, determining the classification number of different trajectory intention classification results; According to the trajectory intention classification result, all the target trajectory samples are classified to obtain classification sample sets corresponding to the trajectory intention classification results one by one, wherein all the target trajectory samples corresponding to each trajectory intention classification result are in the same classification sample set; The target trajectory corresponding to each of the target trajectory samples is displayed according to the trajectory intention classification result.
8. A trajectory intention classification device, characterized in that: include: An acquisition unit, used to acquire operating environment data, wherein the operating environment data is data used to characterize the operating environment of the target operating device; An extraction unit, configured to extract trajectory information from the operating environment data, wherein the trajectory information is used to indicate an instantaneous state of a dynamic obstacle; a determination unit, configured to determine a plurality of target trajectory samples according to the trajectory information, wherein each of the target trajectory samples is used to indicate a trajectory of a corresponding target dynamic obstacle; The classification unit is used to obtain a trajectory intention classification result of the target trajectory sample by clustering the target trajectory sample.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 7 by running the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 7 when run.
11. A mobile device, characterized in that: The mobile device comprises the electronic device according to claim 9.
Citation Information
Patent Citations
Meta-learning-based vehicle trajectory clustering method and system
CN111539454A
Vehicle control method and device, equipment and medium
CN112519765A
Track fusion method, device and equipment
CN114120396A
Target trajectory prediction method, system, device and medium
CN115221970A
Sample data generation method and trajectory prediction method and device using same
CN115635961A
