Driving trajectory processing method and apparatus, vehicle and storage medium
By grouping and merging the driving trajectory, the problem of excessive computing resource consumption caused by the complexity of the driving trajectory is solved, and efficient driving trajectory recognition is achieved.
Patent Information
- Application Number
- PCT/CN2024/107305
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-23
- Filing Date
- 2024-07-24
- Publication Date
- 2025-02-27
AI Technical Summary
The prior art has too much computing resources when processing driving trajectory due to trajectory complexity, and lacks an effective solution.
By obtaining the starting point and end point of the target driving trajectory, grouping them, performing similarity calculations and merging processing to reduce the consumption of computing resources.
It effectively reduces the consumption of computing resources during driving trajectory recognition and improves processing efficiency.
Smart Images

Figure CN2024107305_27022025_PF_FP_ABST
Abstract
Description
Driving trajectory processing method, device, vehicle and storage medium Technical Field
[0001] The present disclosure relates to the field of intelligent driving technology, and in particular to a method, device, vehicle, and storage medium for processing a driving trajectory. Background Art
[0002] As smart connected cars become more and more common, vehicles can continuously send their location data and status data to the cloud while driving. The cloud's computing resources can be used to analyze the driving data to obtain travel patterns and common routes. Then, based on the car users' travel patterns, routes can be planned for car users, destinations can be predicted, and personalized services can be pushed.
[0003] The core concept of existing common route recognition methods is to compare trajectory similarities, including dynamic time warping (DTW). However, due to the complex spatial variations of driving trajectories, including the potential for overlapping and intersecting trajectories, DTW cannot be directly applied. In addition, similarity coefficient methods are also used, but the computational resources required by these methods increase rapidly as historical data increases.
[0004] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0005] Summary of the Invention
[0006] The embodiments of the present disclosure provide a method, device, vehicle, and storage medium for processing a driving trajectory to at least address the technical problem in related technologies of excessive consumption of computing resources during driving trajectory recognition due to complex spatial variations in driving trajectories.
[0007] According to one embodiment of the present disclosure, a method for processing a driving trajectory is provided, comprising: obtaining a start point and an end point of a target driving trajectory; grouping the target driving trajectory according to the start point and the end point to obtain a plurality of driving trajectory groups; calculating similarity between the plurality of driving trajectories in each driving trajectory group to obtain a plurality of similarity values; and merging the plurality of driving trajectories in each driving trajectory group according to the plurality of similarity values.
[0008] Optionally, the driving trajectory processing method further includes: determining a target driving trajectory graph for each driving trajectory in each driving trajectory group; and performing similarity calculation based on the target driving trajectory graph to obtain multiple similarity values.
[0009] Optionally, the driving trajectory processing method further includes: obtaining the maximum longitude and latitude value and the minimum longitude and latitude value of each driving trajectory in each driving trajectory group; determining an initial driving trajectory map of each driving trajectory according to the maximum longitude and latitude value and the minimum longitude and latitude value; and gridding the initial driving trajectory map to obtain a target driving trajectory map.
[0010] Optionally, the driving trajectory processing method further includes: for any driving trajectory group, determining a first driving trajectory and a second driving trajectory from the driving trajectory group; determining a first target driving trajectory map corresponding to the first driving trajectory and a second target driving trajectory map corresponding to the second driving trajectory; and calculating the similarity between the first target driving trajectory map and the second target driving trajectory map to obtain a first similarity value.
[0011] Optionally, the driving trajectory processing method further includes: in response to the first similarity value being less than a first preset value, merging the first driving trajectory and the second driving trajectory to obtain a first merged trajectory; determining a third driving trajectory from the driving trajectory group, and repeatedly performing the steps of determining a third target driving trajectory map corresponding to the third driving trajectory and a fourth target driving trajectory map corresponding to the first merged trajectory until no driving trajectory for which similarity has not been calculated exists in the driving trajectory group.
[0012] Optionally, the driving trajectory processing method further includes: in response to the first similarity value being greater than or equal to a first preset value, determining a fourth driving trajectory from the driving trajectory group; and repeatedly performing the steps of determining a fourth target driving trajectory map corresponding to the fourth driving trajectory and a first target driving trajectory map corresponding to the first driving trajectory until there are no driving trajectories in the driving trajectory group for which similarity calculation has not been performed.
[0013] Optionally, the driving trajectory processing method also includes: determining the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map; merging the first driving trajectory and the second driving trajectory according to the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map.
[0014] According to one embodiment of the present disclosure, a driving trajectory processing device is further provided, comprising: an acquisition module configured to acquire a start point and an end point of a target driving trajectory; a grouping module configured to group the target driving trajectory according to the start point and the end point to obtain a plurality of driving trajectory groups; a calculation module configured to perform similarity calculation on the plurality of driving trajectories in each driving trajectory group to obtain a plurality of similarity values; and a processing module configured to merge the plurality of driving trajectories in each driving trajectory group according to the plurality of similarity values.
[0015] According to one embodiment of the present disclosure, a vehicle is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned methods for processing a driving trajectory.
[0016] According to one embodiment of the present disclosure, a non-volatile storage medium is further provided, in which a computer program is stored. The computer program is configured to execute any of the above-mentioned driving trajectory processing methods when running.
[0017] In the disclosed embodiment, the start and end points of a target driving trajectory are obtained, the target driving trajectories are grouped according to the start and end points to obtain multiple driving trajectory groups, and similarity calculations are performed on the multiple driving trajectories in each driving trajectory group to obtain multiple similarity values. This achieves the purpose of merging the multiple driving trajectories in each driving trajectory group according to the multiple similarity values, thereby achieving the technical effect of further comparing the similarities of the multiple driving trajectories after grayscale processing of the multiple driving trajectory images. This can further solve the technical problem in the related art of excessive consumption of computing resources during the driving trajectory recognition process due to the complex spatial variations of the driving trajectories. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of this application. The illustrative embodiments of the present disclosure and their descriptions are provided to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0019] FIG1 is a flow chart of a method for processing a driving trajectory according to one embodiment of the present disclosure;
[0020] FIG2 is a schematic diagram of a driving trajectory according to one embodiment of the present disclosure;
[0021] FIG3 is a structural block diagram of a device for processing a driving trajectory according to one embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are set to distinguish similar objects, and are not necessarily set to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes 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.
[0024] According to an embodiment of the present disclosure, an embodiment of a method for processing a driving trajectory is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system containing at least one 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.
[0025] The method embodiment can also be executed in an electronic device including a memory and a processor, a similar control device, or an in-vehicle terminal. Taking an in-vehicle terminal as an example, the in-vehicle terminal may include one or more processors and a memory configured to store data. Optionally, the in-vehicle terminal may also include a communication device configured to have a communication function and a display device. It will be understood by those skilled in the art that the above structural description is only illustrative and does not limit the structure of the in-vehicle terminal. For example, the in-vehicle terminal may also include more or fewer components than those described in the above structural description, or have a configuration different from that described in the above structural description.
[0026] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field-programmable gate array (FPGA), a neural-network processing unit (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and the like. Among them, different processing units may be independent components or integrated into one or more processors. In some instances, the electronic device may also include one or more processors.
[0027] The memory can be configured to store computer programs, such as a computer program corresponding to the method for processing the driving trajectory in the embodiments of the present disclosure. The processor implements the aforementioned method for processing the driving trajectory by running the computer program stored in the memory. The memory can include high-speed random access memory (RAM) and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory can further include memory remotely located relative to the processor, and these remote memories can be connected to the electronic device via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0028] The communication device is configured to receive or send data via a grid. Specific examples of the aforementioned grid may include a wireless grid provided by a communication provider of the mobile terminal. In one embodiment, the communication device includes a grid adapter (network interface controller, NIC), which can be connected to other grid devices via a base station to communicate with the Internet. In one embodiment, the communication device can be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly. In some embodiments of the present solution, the communication device is configured to connect to a mobile device such as a mobile phone or tablet, and can send instructions to the vehicle-mounted terminal via the mobile device.
[0029] The display device may be a touch-screen liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display"). The LCD may enable a user to interact with the user interface of the vehicle-mounted terminal. In some embodiments, the vehicle-mounted terminal may include a graphical user interface (GUI), and the user may interact with the GUI through finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction function may include a vehicle gear shifting function, and executable instructions configured to execute the human-computer interaction function may be configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0030] FIG1 is a flow chart of a method for processing a driving trajectory according to one embodiment of the present disclosure. As shown in FIG1 , the method includes the following steps:
[0031] Step S102: Obtain the starting point and end point of the target driving trajectory.
[0032] Optionally, the execution subject of this embodiment is a driving trajectory processing system. It should be noted that other electronic devices and processors can also serve as execution subjects, and no further restrictions are made here.
[0033] In the technical solution provided in the above step S102 of the present disclosure, the driving trajectory processing system can determine the target driving trajectory from multiple initial driving trajectories, and further obtain the start point and end point sets of the multiple target driving trajectories.
[0034] Specifically, the driving trajectory processing system can periodically obtain the driving trajectory of the vehicle within this cycle. The cycle can be set manually, and the empirical value usually sets the cycle to one month, that is, the driving trajectory processing system can collect the driving trajectory of the vehicle every other month.
[0035] Specifically, after obtaining the initial driving trajectory, the driving trajectory system should also filter the initial driving trajectory to obtain the target driving trajectory. For example, the length of the initial driving trajectory can be determined. When the length of the driving trajectory is greater than a preset value, common routes can be identified. Otherwise, it indicates that the driving trajectory is a short trip with high randomness. Therefore, initial driving trajectories with a length less than the preset value will not be identified.
[0036] Optionally, the driving trajectory system will also cut the initial driving estimates obtained if their length is greater than a preset value. That is, the trajectory data within a radius of 500m between the starting point and the end point of the driving trajectory is removed, and the driving trajectory before reaching the destination is removed. This avoids trajectory duplication and deviation caused by complex road conditions at the starting point and end point, such as in scenarios such as finding a parking space or exiting an underground parking lot.
[0037] Step S104 : grouping the target driving trajectories according to the starting point and the end point to obtain a plurality of driving trajectory groups.
[0038] In the technical solution provided in the above step S104 of the present disclosure, the driving trajectory system can group the multiple target driving trajectories according to the starting points and end points in the multiple target driving trajectories through a clustering method to obtain multiple driving trajectory groups.
[0039] Specifically, the driving trajectory system can cluster the starting points and end points of multiple target driving trajectories, with the cluster center as the initial starting point or initial end point position. For example, the clustering method can be DB-SCAN (Density-Based Spatial Clustering of Applications with Noise). It is worth noting that any method involved in this application can be used as long as it can perform clustering, and no specific limitation is made here.
[0040] Alternatively, DB-SCAN is a density-based clustering algorithm designed to discover data points with similar characteristics in space. Compared to traditional clustering algorithms (such as K-means), DB-SCAN does not require a predefined number of clusters and can discover clusters of any shape. The core idea of DB-SCAN is to determine whether a data point belongs to a cluster based on the density around it. It does this by defining a core object with a radius and a minimum number of neighbors. Then, starting from the core object, it gradually expands the clusters by finding other objects with density reachable to it.
[0041] Optionally, the driving trajectory processing system will periodically update the initial starting point or initial end point position, and the frequency of the period is the same as the periodic frequency of the driving trajectory processing system periodically acquiring the initial driving trajectory.
[0042] For example, when the driving trajectory processing system periodically obtains the driving trajectory of the vehicle in the second month, it is necessary to re-cluster the starting point and end point of the vehicle's driving trajectory in the first month and the second month to obtain a new cluster center as the initial starting point position or the initial end point position.
[0043] Optionally, the driving trajectory processing system can clear the currently stored historical vehicle driving trajectories on a one-year basis. That is, in the first month of the second year, the driving trajectory system only clusters the vehicle driving trajectories of that month to avoid the technical problem of excessive system computing power due to excessive storage resources.
[0044] Step S106 , performing similarity calculation on the multiple driving trajectories in each driving trajectory group to obtain multiple similarity values.
[0045] In the technical solution provided in the above step S106 of the present disclosure, after the starting points and end points of multiple target driving trajectories are clustered, similarity comparison calculation is performed on the driving trajectories whose starting points and end points are the same cluster center to obtain multiple similarity values.
[0046] Specifically, as shown in FIG2 , the driving trajectory processing system can convert the two driving trajectories to be compared into grayscale images, that is, a grid division method can be used within the driving trajectory range to determine whether the trajectory data passes through each grid, that is, whether there is a driving trajectory within the grid. If there is a driving trajectory, the grid color is black (0), otherwise it is white (255).
[0047] Furthermore, the ratio of the distance between the two driving trajectory images to the average number of black grids in the two images is calculated as the trajectory similarity F. When F is less than a preset threshold, the two driving trajectories are considered to be the same.
[0048] Optionally, the above-mentioned preset threshold is an empirical value. Generally speaking, in actual application, the above-mentioned preset threshold can be set to 0.05, that is, when F<0.05, the two driving trajectories are considered to be the same trajectory.
[0049] Step S108 : merging the multiple driving trajectories in each driving trajectory group according to the multiple similarity values.
[0050] In the technical solution provided in the above step S108 of the present disclosure, in the above step, when it is determined that the trajectory similarity value is less than the preset threshold, it is determined that the above two driving trajectories are the same trajectory, and therefore the above two driving trajectories can be merged to obtain a merged target merged trajectory.
[0051] Specifically, when it is determined that two driving trajectories are the same, the grayscale matrices of the two trajectories can be summed. That is, for a grid, if the grayscale value of at least one trajectory is 0, the grid is black (0), otherwise it is white (255). The grayscale value of each grid is reread to generate the final merged trajectory grid, that is, the target merged trajectory grayscale image.
[0052] From the above steps S102 to S108, it can be seen that in the present disclosure, the starting point and end point of the target driving trajectory are obtained, the target driving trajectories are grouped according to the starting point and the end point to obtain multiple driving trajectory groups, and similarity calculations are performed on the multiple driving trajectories in each driving trajectory group to obtain multiple similarity values. This achieves the purpose of merging the multiple driving trajectories in each driving trajectory group according to the multiple similarity values, thereby achieving the technical effect of further comparing the similarities of the multiple driving trajectories after grayscale processing of the multiple driving trajectory images, thereby solving the technical problem in the related art of excessive consumption of computing resources during the driving trajectory recognition process due to the complex spatial variations of the driving trajectory.
[0053] The above method of this embodiment is further described in detail below.
[0054] As an optional implementation, performing similarity calculation on multiple driving trajectories in each driving trajectory group to obtain multiple similarity values includes: determining a target driving trajectory map for each driving trajectory in each driving trajectory group, performing similarity calculation based on the target driving trajectory map, and obtaining multiple similarity values.
[0055] In this embodiment, performing similarity calculation on multiple driving trajectories in each driving trajectory group to obtain multiple similarity values includes the following steps: the driving trajectory processing system can determine a target driving trajectory map for each driving trajectory, wherein the target driving trajectory map is a grayscale grid image of the driving trajectory; and then performing similarity calculation based on the target driving trajectory maps of the multiple driving trajectories to compare and obtain multiple similarity values.
[0056] As an optional implementation, determining the target driving trajectory map of each driving trajectory in each driving trajectory group includes: obtaining the maximum longitude and latitude values and the minimum longitude and latitude values of each driving trajectory in each driving trajectory group, determining an initial driving trajectory map of each driving trajectory based on the maximum longitude and latitude values and the minimum longitude and latitude values, and gridding the initial driving trajectory map to obtain the target driving trajectory map.
[0057] In this embodiment, as shown in FIG2 , determining a target driving trajectory map for each driving trajectory in each driving trajectory group includes the following steps: the driving trajectory processing system may obtain the maximum longitude and latitude value (i.e., max_long, max_lat) and the minimum longitude and latitude value (i.e., min_long, min_lat) of each driving trajectory, and then determine the maximum range of the driving trajectory based on the coordinates of the maximum longitude and latitude value and the minimum longitude and latitude value, and generate an initial driving trajectory map, and grid-divide the initial driving trajectory map to obtain a grid-divided map of the driving trajectory, i.e., the target driving trajectory map.
[0058] Specifically, the minimum distance used by the driving trajectory processing system for grid division is calculated using the following formula: dist = dt * V, where dt is the sampling interval and V is the maximum speed that the vehicle can reach. For example, dt can be an empirical value, generally in the range of 5s-10s. In actual working conditions, the maximum speed that a vehicle can reach is generally 150km / h, that is, V = 150km / h.
[0059] As an optional implementation, performing similarity calculation based on the target driving trajectory graph to obtain multiple similarity values includes: for any driving trajectory group, determining a first driving trajectory and a second driving trajectory from the driving trajectory group, determining a first target driving trajectory graph corresponding to the first driving trajectory and a second target driving trajectory graph corresponding to the second driving trajectory, and performing similarity calculation on the first target driving trajectory graph and the second target driving trajectory graph to obtain a first similarity value.
[0060] In this embodiment, performing similarity calculation based on the target driving trajectory map to obtain multiple similarity values includes the following steps: for any driving trajectory group, the driving trajectory processing system can determine a first driving trajectory and a second driving trajectory from the driving estimation group, and further determine a first target driving trajectory map corresponding to the first driving trajectory and a second target driving trajectory map corresponding to the second driving trajectory by performing grayscale processing on the grid image of the driving trajectory, and then perform similarity calculation on the first target driving trajectory map and the second target driving trajectory map based on the grid grayscale in the driving trajectory map to obtain a first similarity value.
[0061] Specifically, the driving trajectory processing system can convert the first trajectory data into a grayscale image, and then determine whether the driving trajectory passes through each grid according to the grid division diagram of the first driving trajectory obtained in the above step, that is, whether there is a driving trajectory in the grid. If there is a driving trajectory in the grid, the grid color is black (0), otherwise it is white (255). Repeat the above method to determine the first target driving trajectory map and the second target driving trajectory map.
[0062] Specifically, the method by which the driving trajectory processing system can perform similarity calculation is not specifically limited herein. In this application, hash verification is taken as an example, that is, the driving trajectory processing system can perform similarity calculation on the first target driving trajectory map and the second target driving trajectory map using the following formula:
[0063] Wherein, ABS(P1(i,j)-P2(i,j)) is the absolute value of the grayscale difference between the first driving trajectory and the second driving trajectory within the same coordinate. As an optional embodiment, merging the multiple driving trajectories in each driving trajectory group according to multiple similarity values includes: in response to the first similarity value being less than a first preset value, merging the first driving trajectory and the second driving trajectory to obtain a first merged trajectory, determining a third driving trajectory from the driving trajectory group, and repeatedly performing the steps of determining a third target driving trajectory map corresponding to the third driving trajectory and a fourth target driving trajectory map corresponding to the first merged trajectory until no driving trajectories for which similarity calculation has not been performed exist in the driving trajectory group.
[0064] In this embodiment, merging multiple driving trajectories in each driving trajectory group according to multiple similarity values includes the following steps: comparing the first similarity value obtained in the above step with a first preset value; when the first similarity value is less than the first preset value, it is considered that the first driving trajectory and the second driving trajectory are the same trajectory, so the driving trajectory processing system needs to merge the first driving trajectory and the second driving trajectory to obtain a merged first merged trajectory; further, obtaining a fourth target driving trajectory map corresponding to the first merged trajectory and a third target driving trajectory map corresponding to a third driving trajectory in the driving trajectory group other than the first driving trajectory and the second driving trajectory, again performing a similarity calculation on the first merged trajectory and the third driving trajectory, and repeating the above steps until all driving trajectories in the driving trajectory group have undergone similarity calculation.
[0065] For example, a driving trajectory group includes four driving trajectories A, B, C, and D. The driving trajectory processing system first selects two driving trajectories A and B for similarity calculation. When the similarity value between A and B is less than a first preset value, it is determined that A and B are the same trajectory, and the two driving trajectories A and B are merged to obtain a merged driving trajectory AB. Furthermore, the driving trajectory AB is compared with the driving trajectory C for similarity. If the similarity value between AB and C is also less than the first preset value, it is determined that AB and C are the same trajectory. The driving trajectory processing system then merges the two driving trajectories AB and C to obtain a merged driving trajectory ABC. Next, the above steps are repeated again to calculate the similarity between the merged trajectory ABC and the driving trajectory D. If the similarity value between ABC and D is also less than the first preset value, the two driving trajectories ABC and D are merged to obtain a merged driving trajectory ABCD, which is the final merged trajectory obtained for the driving trajectory group.
[0066] Optionally, the first preset value is an empirical value. In actual working conditions, the first preset value is generally set to 0.05, that is, when the similarity value between two driving trajectories is less than 0.05, they are the same trajectories.
[0067] As an optional embodiment, the above method also includes: in response to the first similarity value being greater than or equal to the first preset value, determining a fourth driving trajectory from the driving trajectory group, and repeatedly performing the steps of determining a fourth target driving trajectory map corresponding to the fourth driving trajectory and a first target driving trajectory map corresponding to the first driving trajectory until there are no driving trajectories in the driving trajectory group for which similarity has not been calculated.
[0068] In this embodiment, the above-mentioned merging of multiple driving trajectories in each driving trajectory group according to multiple similarity values further includes the following steps: in the above-mentioned steps, if the first similarity value between the first driving trajectory and the second driving trajectory is greater than or equal to the first preset value, it indicates that the similarity between the first driving trajectory and the second driving trajectory is not high, and therefore cannot be merged as the same trajectory. Further, the driving trajectory processing system will again select a fourth target driving trajectory map corresponding to a fourth driving trajectory other than the first driving trajectory and the second driving trajectory from the driving trajectory group, and then perform similarity calculation on the fourth target driving trajectory map corresponding to the fourth driving trajectory and the first target driving trajectory map corresponding to the first driving trajectory, and repeat the above-mentioned steps until all driving trajectories in the driving trajectory group have undergone similarity calculation.
[0069] For example, a driving trajectory group includes four driving trajectories A, B, C, and D. The driving trajectory processing system first selects driving trajectories A and B for similarity calculation. When the similarity value between A and B is greater than or equal to a first preset value, it is determined that A and B are not the same trajectory, and therefore the two driving trajectories A and B cannot be merged. Furthermore, the driving trajectory A is compared with the driving trajectory C for similarity. If the similarity value between A and C is less than the first preset value, A and C are determined to be the same trajectory. The driving trajectory processing system can merge the two driving trajectories A and C to obtain a merged driving trajectory AC. Next, the above steps are repeated to calculate the similarity between the merged trajectory AC and the driving trajectory D. If the similarity value between AC and D is greater than or equal to the first preset value, the two driving trajectories AC and D are not merged.
[0070] Furthermore, the driving trajectory processing system selects driving trajectories B and D in addition to A and C for similarity calculation. If the similarity value between B and D is less than a first preset value, the two driving trajectories B and D can be merged to obtain a merged trajectory BD. In this case, the driving trajectory group has two identical trajectories, namely AC and BD. If the similarity value between B and D is greater than or equal to the first preset value, the two driving trajectories B and D cannot be merged. In this case, the driving trajectory group has only one identical trajectory, namely AC.
[0071] As an optional implementation, in response to the first similarity value being less than a first preset value, the first driving trajectory and the second driving trajectory are merged to obtain the first merged trajectory, including: determining the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map, and merging the first driving trajectory and the second driving trajectory according to the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map.
[0072] In this embodiment, in response to the first similarity value being less than the first preset value, the first driving trajectory and the second driving trajectory are merged to obtain the first merged trajectory, which includes the following steps: the driving trajectory processing system can determine the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map one by one (the grayscale value is represented by black (0), otherwise it is white (255)), and then determine the grayscale value of the two driving trajectories in each grid one by one. If there is a driving trajectory with a grayscale value of 0 in the grid, the grayscale value of the grid is determined to be 0. Conversely, if the grayscale values of the two driving trajectories in the grid are both 255, the grayscale value of the grid is 255. Finally, the driving trajectory processing system can obtain a grayscale value image, and then generate a corresponding merged trajectory image based on the above grayscale value image. Through the description of the above embodiment, 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. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, disk, or CD), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or grid device, etc.) to execute the methods of the various embodiments of the present disclosure.
[0073] This embodiment also provides a driving trajectory processing device, which is configured to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0074] FIG3 is a structural block diagram of a driving trajectory processing device 300 according to one embodiment of the present disclosure. As shown in FIG3 , the device includes: an acquisition module 301 , a grouping module 302 , a calculation module 303 and a processing module 304 .
[0075] An acquisition module 301 is configured to acquire the start point and end point of a target driving trajectory;
[0076] A grouping module 302 is configured to group the target driving trajectories according to the starting point and the end point to obtain a plurality of driving trajectory groups;
[0077] A calculation module 303 is configured to perform similarity calculation on multiple driving trajectories in each driving trajectory group to obtain multiple similarity values;
[0078] The processing module 304 is configured to merge the multiple driving trajectories in each driving trajectory group according to the multiple similarity values.
[0079] Optionally, the calculation module 303 includes: a first determination unit, configured to determine a target driving trajectory graph of each driving trajectory in each driving trajectory group; and a calculation unit, configured to perform similarity calculation based on the target driving trajectory graph to obtain multiple similarity values.
[0080] Optionally, the first determination unit includes: an acquisition subunit, configured to obtain the maximum longitude and latitude values and the minimum longitude and latitude values of each driving trajectory in each driving trajectory group; a first determination subunit, configured to determine an initial driving trajectory map of each driving trajectory based on the maximum longitude and latitude values and the minimum longitude and latitude values; a division subunit, configured to grid-divide the initial driving trajectory map to obtain a target driving trajectory map.
[0081] Optionally, the calculation unit includes: a second determination subunit, configured to determine, for any driving trajectory group, a first driving trajectory and a second driving trajectory from the driving trajectory group; a third determination subunit, configured to determine a first target driving trajectory map corresponding to the first driving trajectory and a second target driving trajectory map corresponding to the second driving trajectory; and a calculation subunit, configured to perform similarity calculation on the first target driving trajectory map and the second target driving trajectory map to obtain a first similarity value.
[0082] Optionally, the processing module 304 includes: a first processing unit, configured to merge the first driving trajectory and the second driving trajectory to obtain a first merged trajectory in response to the first similarity value being less than a first preset value; a first execution unit, configured to determine a third driving trajectory from the driving trajectory group, and repeatedly determine a third target driving trajectory map corresponding to the third driving trajectory and a fourth target driving trajectory map corresponding to the first merged trajectory until there are no driving trajectories in the driving trajectory group for which similarity calculation has not been performed.
[0083] Optionally, the processing module 304 further includes: a second determination unit, configured to determine a fourth driving trajectory from the driving trajectory group in response to the first similarity value being greater than or equal to a first preset value; and a second execution unit, configured to repeatedly execute the steps of determining a fourth target driving trajectory map corresponding to the fourth driving trajectory and a first target driving trajectory map corresponding to the first driving trajectory until there are no driving trajectories in the driving trajectory group for which similarity calculation has not been performed.
[0084] Optionally, the processing unit includes: a fourth determination subunit, configured to determine the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map; a second processing unit, configured to merge the first driving trajectory and the second driving trajectory according to the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map.
[0085] An embodiment of the present disclosure further provides a vehicle, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned driving trajectory processing method.
[0086] Optionally, in this embodiment, the vehicle may be configured to store a computer program configured to perform the following steps:
[0087] Step S102, obtaining the starting point and end point of the target driving trajectory;
[0088] Step S104, grouping the target driving trajectories according to the starting point and the end point to obtain multiple driving trajectory groups;
[0089] Step S106, performing similarity calculation on the multiple driving trajectories in each driving trajectory group to obtain multiple similarity values;
[0090] Step S108 : merging the multiple driving trajectories in each driving trajectory group according to the multiple similarity values.
[0091] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0092] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0093] In some embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0094] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0095] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0096] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a grid device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0097] The above is only a preferred embodiment of the present disclosure. 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 disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.
Claims
1. A method for processing a driving trajectory, comprising: Get the starting point and end point of the target driving trajectory; Grouping the target driving trajectories according to the starting point and the end point to obtain a plurality of driving trajectory groups; Calculating similarity of multiple driving trajectories in each driving trajectory group to obtain multiple similarity values; The multiple driving trajectories in each driving trajectory group are merged according to the multiple similarity values.
2. The method for processing the driving trajectory according to claim 1, wherein: The similarity calculation is performed on multiple driving trajectories in each driving trajectory group, and multiple similarity values are obtained, including: Determine a target driving trajectory map for each driving trajectory in each driving trajectory group; A similarity calculation is performed according to the target driving trajectory diagram to obtain multiple similarity values.
3. The method for processing the driving trajectory according to claim 2, wherein: Determining a target driving trajectory map for each driving trajectory in each driving trajectory group includes: Obtaining the maximum longitude and latitude value and the minimum longitude and latitude value of each driving track in each driving track group; Determine an initial driving trajectory map of each driving trajectory according to the maximum longitude and latitude value and the minimum longitude and latitude value; The initial driving trajectory map is grid-divided to obtain a target driving trajectory map.
4. The method for processing the driving trajectory according to claim 2, wherein: The similarity calculation is performed according to the target driving trajectory diagram to obtain multiple similarity values including: For any driving trajectory group, determining a first driving trajectory and a second driving trajectory from the driving trajectory group; Determine a first target driving trajectory map corresponding to the first driving trajectory and a second target driving trajectory map corresponding to the second driving trajectory; The first target driving trajectory map and the second target driving trajectory map are subjected to similarity calculation to obtain a first similarity value.
5. The method for processing the driving trajectory according to claim 4, wherein: The merging process of the multiple driving trajectories in each driving trajectory group according to the multiple similarity values includes: In response to the first similarity value being less than a first preset value, merging the first driving trajectory and the second driving trajectory to obtain a first merged trajectory; A third driving trajectory is determined from the driving trajectory group, and the steps of determining a third target driving trajectory map corresponding to the third driving trajectory and a fourth target driving trajectory map corresponding to the first merged trajectory are repeatedly performed until there is no driving trajectory in the driving trajectory group for which similarity calculation has not been performed.
6. The method for processing the driving trajectory according to claim 4, wherein: The method further comprises: In response to the first similarity value being greater than or equal to a first preset value, determining a fourth driving trajectory from the driving trajectory group; The steps of determining a fourth target driving trajectory map corresponding to the fourth driving trajectory and a first target driving trajectory map corresponding to the first driving trajectory are repeatedly performed until no driving trajectory for which similarity calculation has not been performed exists in the driving trajectory group.
7. The method for processing the driving trajectory according to claim 5, wherein: In response to the first similarity value being less than a first preset value, merging the first driving trajectory and the second driving trajectory to obtain a first merged trajectory includes: Determine the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map; The first driving trajectory and the second driving trajectory are merged according to the grayscale value of each grid in the first target driving trajectory map and the grayscale value of each grid in the second target driving trajectory map.
8. A driving trajectory processing device, comprising: An acquisition module, configured to acquire a starting point and an end point of a target driving trajectory; A grouping module, configured to group the target driving trajectory according to the starting point and the end point to obtain a plurality of driving trajectory groups; A calculation module, configured to perform similarity calculation on multiple driving trajectories in each driving trajectory group to obtain multiple similarity values; The processing module is configured to merge the multiple driving trajectories in each driving trajectory group according to the multiple similarity values.
9. A vehicle comprising a memory and a processor, wherein: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for processing the driving trajectory described in any one of claims 1 to 7.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method for processing the driving trajectory described in any one of claims 1 to 7 when running on a computer or a processor.
Citation Information
Patent Citations
Travel trajectory clustering method, apparatus and device
CN107122461A
Sea target position prediction method integrating route extraction and trend judgment
CN113312438A
Track processing method and device and computer equipment
CN114155391A
Underground vehicle path planning method, device and equipment
CN115451989A
Driving track processing method and device, vehicle and storage medium
CN117113099A