Method, device and equipment for recognizing inter-track relationship
By calculating the ratio of the area to the perimeter of the closed region between trajectories and the time difference, the accompanying relationship between trajectories can be accurately identified, solving the problems of low efficiency and insufficient accuracy in existing technologies, and making it suitable for trajectory data analysis of transportation vehicles.
Patent Information
- Application Number
- CN202210476467.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-04-29
AI Technical Summary
Existing technologies for identifying the accompaniment relationship between trajectories are inefficient and inaccurate, especially when dealing with large datasets, making real-time discovery and accurate identification difficult.
By acquiring the trajectory point sequences of two target trajectories, connecting the start and end points of the trajectories to form a closed trajectory line, calculating the ratio of the total area and total perimeter of the closed region to determine the similarity distance, and combining the timestamps of the trajectory points to calculate the average time difference, the accompaniment relationship is judged by comprehensively considering spatial and temporal similarity.
It achieves accurate identification of the companion relationship between trajectories with low computational complexity, improves identification efficiency, and is applicable to trajectory data analysis of vehicles, ships and other transportation tools, supporting application scenarios such as fleet relationship discovery, monitoring and control of specific group activities.
Smart Images

Figure CN114707616B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer technical field, and particularly relates to a method and device for identifying a following relationship between trajectories and equipment. BACKGROUND
[0002] Trajectory following patterns are ubiquitous in daily life, such as car following, people traveling in the same vehicle, group travel, etc. By analyzing the following relationship of trajectories, similar freight vehicles, ships or crowds in time and space can be found from massive trajectory data. Quickly and effectively identifying the following relationship of group movement trajectories under the big data scale has great value for car fleet relationship discovery, specific group activity trajectory monitoring and control, vehicle and cargo matching, suspected illegal vehicle analysis of the same type, logistics scheduling optimization, urban traffic planning, etc.
[0003] Currently, there are mainly the following methods for analyzing the similarity between trajectories: 1. Location-based Social Network (LBSN) user trajectory similarity recommendation, which is based on location check-in and only analyzes the similarity of user trajectories through check-in locations, which is too one-sided and has low accuracy in analyzing the following relationship between trajectories; 2. User trajectory similarity recommendation based on the longest common subsequence, which has high computational complexity and low efficiency; 3. CMC (Coherent Moving Cluster) spatiotemporal trajectory following model mining algorithm, which has low execution efficiency of traditional clustering and intersection operations in the algorithm and consumes a large amount of computing and storage resources, making it difficult to be used in online analysis and real-time discovery of group movement trajectory following patterns in massive data, and failing to identify the following relationship between some trajectories that are quite different in space or time, thus having the problem of inaccurate following relationship identification. SUMMARY
[0004] The present application provides a method and device for identifying the following relationship between trajectories to solve the problems of low efficiency and inaccurate identification of the following relationship between trajectories in the prior art.
[0005] In one aspect, the present application provides a method for identifying the following relationship between trajectories, comprising:
[0006] For any two target trajectories whose following relationship is to be determined, the trajectory point sequences of the two target trajectories are obtained;
[0007] determine an average time difference of the two target trajectories according to time stamps of the trajectory points in the trajectory point sequences of the two target trajectories, connect a trajectory start point of the two target trajectories, connect a trajectory end point of the two target trajectories, form a closed trajectory line containing the two target trajectories, determine a total area and a total perimeter of a closed area surrounded by the closed trajectory line, and determine a similarity distance of the two target trajectories according to a ratio of the total area to the total perimeter;
[0008] determine whether the two target trajectories have a companion relationship according to the similarity distance and the average time difference of the two target trajectories, and obtain a companion relationship determination result.
[0009] In another aspect, the present application provides a device for identifying a companion relationship between trajectories, comprising:
[0010] a trajectory data processing module configured to, for any two target trajectories for which a companion relationship is to be determined, acquire trajectory point sequences of the two target trajectories;
[0011] a spatial similarity determination module configured to connect a trajectory start point of the two target trajectories, connect a trajectory end point of the two target trajectories, form a closed trajectory line containing the two target trajectories, determine a total area and a total perimeter of a closed area surrounded by the closed trajectory line, and determine a similarity distance of the two target trajectories according to a ratio of the total area to the total perimeter;
[0012] a time similarity determination module configured to determine an average time difference of the two target trajectories according to time stamps of the trajectory points in the trajectory point sequences of the two target trajectories;
[0013] a companion relationship determination module configured to determine whether the two target trajectories have a companion relationship according to the similarity distance and the average time difference of the two target trajectories, and obtain a companion relationship determination result.
[0014] In another aspect, the present application provides an electronic device comprising a processor and a memory communicatively connected to the processor;
[0015] the memory stores computer execution instructions;
[0016] the processor executes the computer execution instructions stored in the memory to implement the above-mentioned method for identifying a companion relationship between trajectories.
[0017] In another aspect, the present application provides a computer readable storage medium having computer execution instructions stored therein, the computer execution instructions being executed by a processor to implement the above-mentioned method for identifying a companion relationship between trajectories.
[0018] The trajectory inter-relationship recognition method, device and equipment provided by the application can connect the trajectory starting points of two target trajectories and connect the trajectory ending points of the two target trajectories to form a closed trajectory line containing the two target trajectories according to the trajectory point sequences of the two target trajectories, determine the total area and total perimeter of the closed area surrounded by the closed trajectory line, determine the similarity distance of the two target trajectories according to the ratio of the total area to the total perimeter, and can well measure the similarity of the two target trajectories in space, determine the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequences of the two target trajectories, and can well measure the size of the deviation of the two target trajectories in time, determine whether the two target trajectories have a companion relationship according to the similarity distance and the average time difference of the two target trajectories, combine the spatial similarity and the time similarity, obtain a companion relationship determination result, can accurately identify whether the two trajectories have a companion relationship, has low calculation complexity, and improves the efficiency of companion analysis. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application together with the specification.
[0020] Figure 1 A trajectory inter-relationship recognition method flowchart is provided for an exemplary embodiment of the application.
[0021] Figure 2 An example diagram of two trajectories is provided for an exemplary embodiment of the application.
[0022] Figure 3 An example diagram of a closed trajectory line of two trajectories is provided for an exemplary embodiment of the application.
[0023] Figure 4 A trajectory inter-relationship recognition method flowchart is provided for another exemplary embodiment of the application.
[0024] Figure 5 An example diagram of a continuously drifting trajectory point is provided for an exemplary embodiment of the application.
[0025] Figure 6 A trajectory compression method flowchart is provided for an exemplary embodiment of the application.
[0026] Figure 7 A flowchart for generating a closed trajectory line of two target trajectories is provided for an exemplary embodiment of the application.
[0027] Figure 8 A structure diagram of a trajectory inter-relationship recognition device is provided for an exemplary embodiment of the application.
[0028] Figure 9 The structural schematic diagram of an electronic device provided for an example embodiment of the present application is shown.
[0029] The specific embodiments of the present application have been shown and described in the above-described drawings and text, and will be described in more detail hereinafter. These drawings and text are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0030] The example embodiments will be described in detail herein with reference to the accompanying drawings. The same numbers in different drawings represent the same or similar elements. The embodiments described in the following example embodiments are not representative of all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0031] First, the terms involved in the present application are explained:
[0032] Accompanying mode: Intuitively, the accompanying mode of a spatiotemporal trajectory refers to a group of moving objects moving together in a defined range for at least a specified length of time. Such a mode of movement is called an accompanying mode. The movement mode of multiple objects is an accompanying mode, i.e., the movement trajectories of multiple objects have an accompanying relationship. For example, students returning to the same neighborhood after school from the same school, colleagues going to and from work together, etc. These are some examples of accompanying modes in reality.
[0033] Global Navigation Satellite System (GNSS) is a space-based radio navigation positioning system that can provide users with all-weather 3D coordinates and speed and time information at any location on the earth's surface or near-earth space.
[0034] Douglas-Peucker algorithm: also known as the Ramer-Douglas-Peucker algorithm, iterative snap algorithm, split and merge algorithm, is an algorithm that approximates a curve as a series of points and reduces the number of points. Its advantage is that it has translational and rotational invariance. Given a curve and a threshold, the sampling result is certain.
[0035] Longest Common Sub-Sequence (LCSS): The longest common sub-sequence of two sequences X and Y, which is different from common string, and the common sub-sequence can be discontinuous, but the position before and after is unchanged.
[0036] Locality In-between Polylines (LIP): The area of the closed region (such as polygon) obtained by intersecting two trajectories is taken as the weight, and the total area is calculated as the similarity distance of the two trajectories to measure the similarity of the two trajectories in space.
[0037] Euclidean Distance of two trajectories: The average of the spatial distance of the trajectory points corresponding to the two trajectories, but it cannot measure the similarity of trajectories of different lengths, and it is sensitive to noise points.
[0038] Dynamic Time Warping (DTW): A dynamic programming algorithm for calculating the similarity of two time series, especially sequences of different lengths. It is mainly applied to time series data, such as isolated word speech recognition, gesture recognition, data mining, and information retrieval.
[0039] Similarity distance: is determined based on the spatial distance between the trajectory points of different trajectories, and is used to measure the similarity of the same trajectory in space. The similarity between different trajectories usually contains two aspects of space and time, and the similarity distance of the trajectory reflects the similarity of the trajectory in space. Commonly used similarity distances between trajectories include multi-line position distance, Euclidean distance of trajectory, etc.
[0040] In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. In the description of the following embodiments, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0041] In view of the problems of low efficiency and inaccurate identification when the existing trajectory similarity analysis scheme is applied to the identification of the accompanying relationship between trajectories, the application provides a method for identifying the accompanying relationship between trajectories. For any two target trajectories whose accompanying relationship needs to be determined, the trajectory start points of the two target trajectories are connected, and the trajectory end points of the two target trajectories are connected to form a closed trajectory line containing the two target trajectories. The total area and total perimeter of the closed area enclosed by the closed trajectory line are determined, and the similarity distance of the two target trajectories is determined according to the ratio of the total area to the total perimeter. Considering that the lengths of different trajectories are not the same, the area size cannot directly reflect the similarity of the trajectories, and the ratio of the total area to the total perimeter can better measure the similarity of the two target trajectories in space. The average time difference of the two target trajectories is determined according to the time stamps of the trajectory points in the trajectory point sequences of the two target trajectories, which is used to measure the characteristics of the accompanying mode of the two target trajectories in time. Whether the two target trajectories have an accompanying relationship is determined according to the similarity distance and the average time difference of the two target trajectories, and an accompanying relationship determination result is obtained. The accompanying relationship between the two trajectories can be accurately identified, and the calculation complexity is low and the efficiency is high.
[0042] The method for identifying the accompanying relationship between trajectories provided by the application can be applied to trajectory accompanying analysis of trajectory data of vehicles, ships and other transportation tools, and can mine trajectories with an accompanying relationship, thereby determining transportation tools moving in an accompanying mode and objects riding the transportation tools, and can be applied to at least the following application scenarios: vehicle fleet relationship discovery, specific group activity trajectory monitoring and control, vehicle and cargo matching, suspected illegal vehicle analysis of the same type, logistics scheduling optimization, urban traffic planning, etc.
[0043] For example, for a specific journey trajectory of a user-specified vehicle in a specified time period, the method of the application identifies whether each journey trajectory in a large amount of trajectory data and the specific journey trajectory have an accompanying relationship by taking each journey trajectory in the large amount of trajectory data and the specific journey trajectory as two target trajectories, respectively. Other journey trajectories having an accompanying relationship with the specific journey trajectory can be identified, and journey trajectories in an accompanying mode with the specified vehicle in the specified time period can be found, which can be used in suspected illegal vehicle analysis of the same type, specific group activity trajectory monitoring and control, etc.
[0044] For example, for a large amount of existing journey trajectory data, the method of the application identifies whether any two journey trajectories have an accompanying relationship by taking any two journey trajectories as two target trajectories, which can mine journey trajectories having an accompanying relationship from a large amount of trajectory data, and can be used in vehicle fleet relationship discovery, vehicle and cargo matching, urban traffic planning, etc.
[0045] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the drawings.
[0046] Figure 1 The flow chart of the trajectory relationship identification method provided by an exemplary embodiment of the present application is provided. The trajectory relationship identification method provided by the embodiment can be applied to an electronic device, which can be a cloud server, and can also be a terminal device such as a smart phone, a tablet computer, a desktop computer, and an Internet of Things device.
[0047] As shown in Figure 1 , the specific steps of the method are as follows:
[0048] Step S101, for any two target trajectories whose accompanying relationship is to be determined, the trajectory point sequences of the two target trajectories are obtained.
[0049] In the embodiment, whether any two target trajectories have an accompanying relationship can be identified, which can be applied to many different application scenarios.
[0050] Exemplarily, for a specific travel trajectory of a user-specified vehicle in a specified time period, by the method of the present application, each travel trajectory in a large amount of trajectory data is taken as a target trajectory together with the specific travel trajectory, and whether the two target trajectories have an accompanying relationship is identified, so that other travel trajectories having an accompanying relationship with the specific travel trajectory can be identified, and thus travel trajectories having an accompanying mode with the specified vehicle in the specified time period can be found, which can be used in scenarios such as suspected illegal vehicle analysis of the same type, monitoring and control of specific group activities, etc.
[0051] Optionally, this step can be implemented in the following way:
[0052] In response to an accompanying trajectory mining request, the trajectory data of a specified trajectory and the trajectory data to be mined are obtained;
[0053] According to the positions of the trajectory start point and the trajectory end point in the trajectory data of the specified trajectory, a first candidate trajectory having the same departure information and the same arrival information as the specified trajectory is filtered out from the trajectory data to be mined; each first candidate trajectory is taken as a target trajectory together with the specified trajectory to determine an accompanying relationship, and the trajectory point sequences of the two target trajectories are obtained. Further, whether the two target trajectories have an accompanying relationship can be identified based on the trajectory point sequences of the two target trajectories.
[0054] Exemplarily, for a large amount of existing travel trajectory data, by the method of the present application, any two travel trajectories are taken as two target trajectories, and whether the two target trajectories have a companion relationship is identified, so that travel trajectories with a companion relationship can be mined from a large amount of trajectory data, which can be used in scenarios such as vehicle fleet relationship discovery, vehicle-load matching, and urban traffic planning.
[0055] Optionally, this step can be implemented in the following way:
[0056] In response to a companion trajectory mining request, all trajectory data to be mined is obtained; second candidate trajectories with the same departure location information and the same arrival location information are screened out according to the positions of the trajectory start points and the positions of the trajectory end points in the trajectory data; any two second candidate trajectories in the second candidate trajectories are respectively grouped into two target trajectories to be determined for a companion relationship, and the trajectory point sequences of the two target trajectories are obtained. Further, whether the two target trajectories have a companion relationship can be identified based on the trajectory point sequences of the two target trajectories.
[0057] In step S102, the trajectory start points of the two target trajectories are connected, and the trajectory end points of the two target trajectories are connected to form a closed trajectory line containing the two target trajectories.
[0058] After obtaining the trajectory point sequences of the two target trajectories to be determined for a companion relationship, the trajectory start points of the two target trajectories are connected, and the trajectory end points of the two target trajectories are connected to form a closed trajectory line containing the two target trajectories, the connection line of the trajectory start points of the two target trajectories, and the connection line of the trajectory end points of the two target trajectories.
[0059] Exemplarily, taking the two trajectories shown in Figure 2 as an example, the trajectory start points of the two trajectories are connected, and the trajectory end points of the two trajectories are connected to form a complete closed curve, called a closed trajectory line, as shown in Figure 3 As shown in Figure 3 , the intersection points of the two trajectories divide the closed area enclosed by the closed trajectory line into a plurality of polygonal sub-areas, each of which is also closed.
[0060] In step S103, the total area and the total perimeter of the closed area enclosed by the closed trajectory line are determined, and the similarity distance of the two target trajectories is determined according to the ratio of the total area to the total perimeter.
[0061] In actual applications, if two trajectories completely coincide, the closed area enclosed by the closed trajectory line formed by the two trajectories is a trajectory line, and the area is 0, at this time, the two trajectories are completely consistent, and the similarity is the highest. If the area of the closed area enclosed by the closed trajectory line formed by the two trajectories is large, it indicates that the deviation of the two trajectories in space is large, and the similarity is low.
[0062] Since the lengths of the two trajectories are different, the area of the closed region surrounded by the closed trajectory line formed by the two trajectories cannot directly reflect the similarity of the trajectories in space, and the length of the trajectories also needs to be combined.
[0063] In this embodiment, after the closed trajectory line containing the two target trajectories is determined, the total area and the total perimeter of the closed region surrounded by the closed trajectory line are determined, and the ratio of the total area to the total perimeter is calculated, and the ratio of the total area to the total perimeter is taken as the similarity distance of the two target trajectories, to measure the similarity of the two target trajectories in space.
[0064] Exemplarily, the optimized multi-line position distance (LIP) algorithm can be used to calculate the area and perimeter of each polygon sub-region in the closed region surrounded by the closed trajectory line, calculate the sum of the areas of all polygon sub-regions to obtain the total area of the closed region, calculate the sum of the perimeters of all polygon sub-regions to obtain the total perimeter of the closed region, and calculate the ratio of the total area to the total perimeter, and take the ratio of the total area to the total perimeter as the similarity distance of the two target trajectories.
[0065] By calculating the ratio of the total area to the total perimeter of the closed region surrounded by the closed trajectory line formed by the two target trajectories through steps S102-S103, whether the two target trajectories are similar (or consistent) in space can be well measured.
[0066] In step S104, the average time difference between the two target trajectories is determined according to the time stamps of the trajectory points in the trajectory point sequences of the two target trajectories.
[0067] In actual applications, if the trajectories of two vehicles are similar (or consistent) in space, but the time difference of the two trajectories is large (such as one day apart), then there is no accompanying behavior between the two vehicles, and the two trajectories do not have an accompanying relationship.
[0068] In this embodiment, the average time difference between the two target trajectories is determined according to the time stamps of the trajectory points in the trajectory point sequences of the two target trajectories, to measure whether the two target trajectories have the characteristics of the accompanying mode in time.
[0069] Optionally, in this step, the absolute value of the difference between the time stamps of the starting points of the two target trajectories can be calculated as a first difference value, the absolute value of the difference between the time stamps of the ending points can be calculated as a second difference value, and the average of the first difference value and the second difference value is taken as the average time difference between the two target trajectories.
[0070] Optionally, in this step, the absolute value of the difference between the timestamps of the start points of the two target trajectories can be calculated as a first difference value; the absolute value of the difference between the timestamps of the end points of the two target trajectories can be calculated as a second difference value; and the absolute value of the difference between the timestamps of the at least one intermediate trajectory point and the two target trajectories can be calculated as a third difference value; and the average of the first difference value, the second difference value and the third difference value can be calculated as the average time difference between the two target trajectories.
[0071] Optionally, in view of the fact that the number of trajectory points contained in the two target trajectories can be different, this step can be implemented in the following manner:
[0072] The average of the timestamps of the trajectory points in the trajectory point sequence of each target trajectory can be determined as the average timestamp of each target trajectory; and the absolute value of the difference between the average timestamps of the two target trajectories can be determined as the average time difference between the two target trajectories.
[0073] For example, the average of the timestamps of all the trajectory points in the trajectory point sequence of one target trajectory can be calculated as a first average timestamp; the average of the timestamps of all the trajectory points in the trajectory point sequence of the other target trajectory can be calculated as a second average timestamp; and the absolute value of the difference between the first average timestamp and the second average timestamp can be calculated as the average time difference between the two target trajectories, which can well measure the time deviation between the two target trajectories.
[0074] In step S105, whether the two target trajectories have the accompanying relationship is determined according to the similarity distance and the average time difference between the two target trajectories, to obtain an accompanying relationship determination result.
[0075] After the similarity distance and the average time difference between the two target trajectories are determined, whether the two target trajectories have the accompanying relationship is determined according to the similarity distance and the average time difference between the two target trajectories, and a set similarity distance threshold value and an average time difference threshold value.
[0076] For example, according to the similarity distance and the average time difference between the two target trajectories, if the similarity distance is less than or equal to the similarity distance threshold value, and the average time difference is less than or equal to the time difference threshold value, it indicates that the two target trajectories have high similarity in space and small deviation in time, and thus it is determined that the two target trajectories have the accompanying relationship.
[0077] If the similarity distance between the two target trajectories is greater than the similarity distance threshold value, it indicates that the two target trajectories have low similarity in space, and thus it is determined that the two target trajectories do not have the accompanying relationship.
[0078] If the average time difference between the two target trajectories is greater than the time difference threshold value, it indicates that the two target trajectories have large deviation in time, and thus it is determined that the two target trajectories do not have the accompanying relationship.
[0079] It should be noted that the processes of determining the similarity distance of the two target trajectories in steps S102-S103 and the process of determining the average time difference of the two target trajectories in step S104 can be executed in parallel or in sequence.
[0080] For example, after the similarity distance of the two target trajectories is determined in step S103, the similarity distance threshold can be set. If the similarity distance of the two target trajectories is greater than the similarity distance threshold, it indicates that the similarity of the two target trajectories in space is low, and it is impossible to have a companion relationship, so it is determined that the two target trajectories do not have a companion relationship, and step S104 does not need to be executed. If the similarity distance of the two target trajectories is less than or equal to the similarity distance threshold, it indicates that the similarity of the two target trajectories in space is high, and it is possible to have a companion relationship, so step S104 is continued to determine the average time difference of the two target trajectories, and if the average time difference of the two target trajectories is less than the time difference threshold, it indicates that the deviation of the two target trajectories in time is also small, and it is determined that the two target trajectories have a companion relationship.
[0081] For example, step S104 can be executed first to determine the average time difference of the two target trajectories. If the average time difference of the two target trajectories is greater than the time difference threshold, it indicates that the deviation of the two target trajectories in time is large, and it is impossible to have a companion relationship, so it is determined that the two target trajectories do not have a companion relationship, and steps S102-S103 do not need to be executed. If the average time difference of the two target trajectories is less than or equal to the time difference threshold, it indicates that the deviation of the two target trajectories in time is small, and it is possible to have a companion relationship, so steps S102-S103 are continued to determine the similarity distance of the two target trajectories, and if the similarity distance of the two target trajectories is less than or equal to the similarity distance threshold, it indicates that the similarity of the two target trajectories in space is high, and it is determined that the two target trajectories have a companion relationship.
[0082] In this embodiment, the similarity distance threshold can be set according to the actual application scenario, and the similarity distance threshold set for the identification of the companion relationship of trajectories in different scenarios can be different, which is not limited here. For example, for the identification of the companion relationship of vehicle trajectories, the similarity distance threshold can be set to 6.
[0083] In addition, considering that the driving speeds of different types of vehicles / ships are different, the time difference threshold can be set according to the actual application scenario, and the time difference threshold set for the identification of the companion relationship of trajectories in different scenarios can be different, which is not limited here. For example, for the identification of the companion relationship of vehicle trajectories, the time difference threshold can be set to 1 hour, 1.5 hours, etc.
[0084] The embodiment can measure the similarity of the two target trajectories in space by determining the similar distance of the two target trajectories according to the ratio of the total area to the total perimeter of the closed region surrounded by the closed trajectory line, and can measure the size of the deviation of the two target trajectories in time by determining the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequence of the two target trajectories. The embodiment can accurately identify whether the two trajectories have a companion relationship by determining whether the two target trajectories have a companion relationship according to the similar distance and the average time difference of the two target trajectories, combining the spatial similarity and the time similarity, and has low computational complexity, thereby improving the efficiency of companion analysis.
[0085] In actual applications, the obtained original trajectory data of the transportation tool is all trajectory data of the transportation tool in a relatively long period of time (such as one day, one week, one month, or even several months). The trajectory data of one transportation tool includes trajectories of multiple different trips of the transportation tool in the period of time. The different transportation tools may have a companion behavior only in one trip of performing a certain task. In order to effectively identify the companion relationship, in the embodiment, the original trajectory data of the transportation tool obtained can be processed by trajectory segmentation to obtain effective trip trajectory data, and the trip trajectory with the companion relationship can be mined based on the effective trip trajectory data.
[0086] Further, in order to calculate the similarity of the trip trajectory of the vehicle, the ship, and the like, and improve the calculation efficiency, the trip trajectory with the same origin and destination information can be screened as the target trajectory for mining the companion relationship, so that the data processing of the trajectory obviously without the companion relationship can be reduced, thereby the calculation amount can be reduced and the efficiency of companion relationship identification can be improved.
[0087] In addition, in actual applications, one complete trip of the vehicle may pass through several thousand kilometers, the positioning data of the vehicle is about 1-15 seconds, and the trip trajectory points of the vehicle are up to tens of thousands. The satellite positioning data of the ship is relatively low in frequency, but the trip of the ship is usually far, and the trajectory points of one trip are also up to tens of thousands. If the original trajectory point sequence of the trip of the vehicle / ship is used to identify the companion relationship, the calculation amount is large. In order to reduce the calculation amount of the companion relationship identification processing and improve the calculation efficiency, the trip trajectory data can be compressed to reduce the number of trajectory points of the trip, and the compressed trajectory point sequence of the trip trajectory is generated.
[0088] Reference is made to Figure 4 , Figure 4The flowchart of the method for identifying inter-track accompanying relationship provided for another exemplary embodiment of the present application is shown in FIG. 8, and the specific steps of the method are as follows: Figure 4
[0089] In step S400, original trajectory data of the vehicle is acquired.
[0090] The original trajectory data can be data in a relatively long time period, which can be acquired according to the needs of actual application scenarios.
[0091] In actual applications, positioning data usually has noise, and the original trajectory data contains noise data, which can affect the accuracy of the similar distance of the trajectory. In this embodiment, before the original trajectory data of the vehicle is processed by trajectory segmentation, the original trajectory data can be processed by denoising.
[0092] Exemplarily, the denoising processing of the original trajectory data can be performed in a pre-defined rule manner, and a basic data range rule can be set, including a first threshold value of the difference between the positioning time and the current time, the latitude and longitude range, etc.
[0093] For the trajectory points in the original trajectory data, the difference between the positioning time and the current time is greater than or equal to the first threshold value, all of the trajectory points can be removed, and the noise data of the time that is too long or the time error can be removed.
[0094] For the trajectory points in the original trajectory data, the latitude and longitude values are not within the corresponding latitude and longitude range, all of the trajectory points can be removed, and the noise data of the position information error or some isolated trajectory points can be removed.
[0095] Optionally, the line speed of the vehicle between the time-adjacent trajectory points in the original trajectory data can also be calculated to perform denoising, and the line speed of the vehicle between the time-adjacent trajectory points is used to identify and remove the trajectory points that drift in the original trajectory data.
[0096] The line speed of the vehicle between the time-adjacent trajectory points can be calculated according to the distance and the time stamp difference between the time-adjacent trajectory points.
[0097] The trajectory points that drift are as follows: if the line speed between two continuous (time-adjacent) trajectory points is greater than or equal to a set line speed threshold value, it is a drift, and the two trajectory points are the trajectory points that drift, and the distance between the two trajectory points is the drift distance. The line speed threshold value can be set and adjusted according to the speed limit information of the road / route in the actual application scenario, such as 60 km / h, 120 km / h, 160 km / h, etc., which is not limited here.
[0098] Optionally, if consecutive drifts occur between the plurality of trajectory points: drifts occur between any two time-adjacent trajectory points in the plurality of trajectory points (i.e., the linear speed is greater than or equal to the linear speed threshold), and the drift distance of each drift in the plurality of consecutive drifts is greater than or equal to the drift distance threshold, then the trajectory points that have consecutive drifts can be removed.
[0099] For example, with reference to the linear speed threshold of 160 km / h, the drift distance threshold can be set to 10 km, as shown in Figure 5 As shown, the trajectory points A-L are a plurality of trajectory points sorted by time, and drifts occur between any adjacent two trajectory points. The drift distance between the trajectory points is shown in Figure 5 As shown, the drift distance between any adjacent two trajectory points in A-H is greater than or equal to 10 km, so A-H are trajectory points that have consecutive drifts. The drift distance between any adjacent two trajectory points in J-L is greater than or equal to 10 km, so J-L are also trajectory points that have consecutive drifts.
[0100] If the denoising processing is performed on the original trajectory data, the original trajectory data mentioned in the subsequent steps refers to the trajectory data obtained after the denoising processing is performed on the original trajectory data.
[0101] In step S401, the original trajectory data of the vehicle is subjected to trajectory segmentation processing, each trajectory segment is taken as a trip trajectory, and a sequence of trajectory points of the trip trajectory is obtained.
[0102] In this step, the effective trip trajectory data can be obtained by performing trajectory segmentation processing on the original trajectory data of the vehicle, and the trip trajectories with the accompanying relationship can be mined based on the effective trip trajectory data.
[0103] For example, the dwell points in the original trajectory data can be detected, the trajectory data is segmented with the dwell points as the segmentation points, a plurality of trajectory segments are obtained, each trajectory segment is taken as a trip trajectory, and a sequence of trajectory points of each trip trajectory is generated.
[0104] Optionally, a dwell duration threshold can be set, and the dwell points in the original trajectory data are identified based on the dwell duration threshold. If the vehicle stays at a trajectory point and the stay time is greater than or equal to the dwell duration threshold, it is determined that the trajectory point is a dwell point. The dwell point is taken as the end point of the trajectory of the previous trip trajectory (if any) and the start point of the trajectory of the next trip trajectory (if any).
[0105] Optionally, in combination with road network data, it can be determined through vehicle-road matching whether the vehicle is driving on the road / route, and in combination with the set residence duration threshold, the trajectory end point (the point of driving off the road / leaving the berth) and the trajectory start point (the point of driving into the road / berthing) of the trip are identified, so as to split the original trajectory data into multiple trajectory segments.
[0106] The residence duration threshold can be set according to the actual application scenario and the safety driving specification, for example, the relevant specification requires that in order to prevent fatigue driving, the longest driving time is 4 hours during the day or 2 hours at night, and at least 15 minutes of rest is required, and the residence duration threshold can be set to 18 minutes, 20 minutes, half an hour, etc., which is not limited here.
[0107] Exemplarily, a complete trip trajectory of a vehicle or a ship and the like will pass through multiple positioning points, mainly including time and space positioning data. The trip trajectory can include trajectory point sequence, trajectory start point, trajectory end point, trajectory length, trajectory point number and the like. The trip trajectory can be described in the manner shown in Table 1 as follows:
[0108] Table 1
[0109] Field name Type Description trajectoryPointList List <trajectorypoint> < / trajectorypoint> TrajectoryPoint sequence startPoint TrajectoryPoint Trajectory start point endPoint TrajectoryPoint Trajectory end point distance Double Trajectory length cnt Bigint Number of trajectory points
[0110] The trajectory point sequence is an ordered sequence formed by sorting all trajectory points of the complete trip trajectory according to the time stamp of the trajectory point. The trajectory start point and the trajectory end point are the trajectory points at which the trip trajectory starts and ends. The trajectory length is the total driving distance of the trip trajectory. The trajectory point number is the number of trajectory points in the trajectory point sequence.
[0111] The trajectory point includes trajectory time, longitude, latitude, altitude and the like, and is the positioning information of the vehicle, ship and the like during driving. The trajectory point can be described in the manner shown in Table 2 as follows:
[0112] Table 2
[0113] Field name Type Description gmtCreate String Trajectory time Lng double Longitude Lat double Latitude altitude double Altitude
[0114] In step S402, the trajectory point sequence of the trip trajectory is compressed, and part of the trajectory points in the trajectory point sequence except the trajectory start point and the trajectory end point are removed, to obtain the compressed trajectory point sequence of the trip trajectory.
[0115] In practical applications, a vehicle's complete journey can cover thousands of kilometers, with vehicle positioning data occurring approximately every 1-15 seconds, resulting in tens of thousands of trajectory points. While ship satellite positioning data has a lower frequency, ships typically travel longer distances, also generating tens of thousands of trajectory points per journey. Performing commensurate relationship identification processing on the raw trajectory point sequences of vehicles / ships would be computationally intensive. To reduce the computational burden and improve efficiency, the journey trajectory data can be compressed, decreasing the number of trajectory points and generating a compressed trajectory point sequence.
[0116] In this embodiment, before identifying the accompaniment relationship between travel trajectories, the trajectory point sequence of the travel trajectory is compressed to remove some trajectory points other than the trajectory start point and trajectory end point, so as to reduce the number of trajectory points of the travel and improve the efficiency of identifying the accompaniment relationship between travel trajectories.
[0117] For example, in the above Figure 1 In the illustrated embodiment, before connecting the start points of the two target trajectories and connecting the end points of the trajectory data in step S102 to form a closed trajectory line containing the two target trajectories, the trajectory data of the target trajectories can be compressed to remove some trajectory points other than the start and end points of the trajectory data, resulting in a compressed trajectory point sequence of the target trajectories. Subsequently, the similarity distance and average time difference between the target trajectories are calculated based on the compressed trajectory point sequence of the target trajectories to improve the efficiency of identifying the accompaniment relationship between the target trajectories.
[0118] In addition, this step can be implemented using any existing trajectory compression method, and no specific limitation is made here.
[0119] Step S403: Filter travel trajectories with the same departure point information and the same destination point information.
[0120] In this embodiment, in order to calculate the similarity of the travel trajectories of vehicles, ships and other means of transportation, and at the same time improve the calculation efficiency, travel trajectories with the same departure and arrival information can be selected as target trajectories for mining accompanying relationships. This can reduce the data processing of trajectories that obviously do not have accompanying relationships, thereby reducing the amount of calculation and improving the efficiency of accompanying relationship identification.
[0121] In actual applications, considering that the trajectory start points of the trajectory points of the trajectories do not necessarily coincide, and the trajectory end points of the trajectory points of the trajectories do not necessarily coincide, there is usually a certain position deviation. The map grids (grid regions in the grid map) in which the trajectory start points and the trajectory end points of the trajectories are located can be determined based on the grid map. If the trajectory start points of two trajectories are in the same map grid, it can be determined that the two trajectories have the same starting point. If the trajectory end points of two trajectories are in the same map grid, it can be determined that the two trajectories have the same destination.
[0122] In this step, according to the map grid in which the trajectory start point of the trajectory point sequence of the trajectory is located and the map grid in which the trajectory end point of the trajectory point sequence of the trajectory is located, two trajectories whose trajectory start points are in the same map grid and whose trajectory end points are in the same map grid are screened out as two target trajectories to be determined for the accompanying relationship.
[0123] Exemplarily, in order to better store the trajectory data and facilitate the identification of the accompanying relationship between the trajectories, the trajectory data can also be stored in the manner shown in Table 3 in this embodiment:
[0124] Table 3
[0125] Field name Type Description Vhc_id String Vehicle identification O_area_code String Departure map grid code D_area_code String Arrival map grid code trajectoryPointList List <trajectorypoint> < / trajectorypoint> Compressed trajectory point sequence
[0126] Based on the trajectory data stored in the manner shown in Table 3, by comparing whether the starting map grid codes of two trajectories are consistent, it can be determined whether the trajectory start points of the two trajectories are in the same map grid, thereby determining whether the starting points of the two trajectories are the same. By comparing whether the arrival map grid codes of two trajectories are consistent, it can be determined whether the trajectory end points of the two trajectories are in the same map grid, thereby determining whether the arrival points of the two trajectories are the same, thereby the trajectories with the same starting point information and the same arrival point information can be screened out.
[0127] In addition, in actual applications, a journey has a starting point and a destination, and a normal journey should include multiple trajectory points. If the trajectory point of a trajectory has only one point, it does not participate in the calculation of the accompanying relationship identification. Therefore, the trajectory screened out in this step cannot contain only one trajectory point, that is, the number of trajectory points of the trajectory screened out is greater than 1.
[0128] Step S404, identifying the accompanying relationship based on the screened trajectories.
[0129] In a possible application scenario, in response to a companion trajectory mining request, first candidate trajectories having the same departure location information and the same arrival location information are filtered out from the trip trajectory data of a specified trip and the trip trajectory data to be mined; each of the first candidate trajectories and the specified trajectory are used to form two target trajectories for which a companion relationship is to be determined, compressed trajectory point sequences of the two target trajectories are obtained, and whether the two target trajectories have a companion relationship is identified based on the compressed trajectory point sequences of the two target trajectories, see steps S102-S105, which are not described herein again.
[0130] In another possible application scenario, in response to a companion trajectory mining request, trip trajectory data of all trip trajectories to be mined is obtained, and second candidate trajectories having the same departure location information and the same arrival location information are filtered out; any two of the second candidate trajectories are used to form two target trajectories for which a companion relationship is to be determined, compressed trajectory point sequences of the two target trajectories are obtained, and whether the two target trajectories have a companion relationship is identified based on the compressed trajectory point sequences of the two target trajectories, see steps S102-S105, which are not described herein again.
[0131] In an optional embodiment, in step S402, the Douglas-Peucker algorithm can be used to compress the trajectory data of the target trajectory. The basic idea of the Douglas-Peucker algorithm is as follows: a straight line is virtually connected between the first point and the last point of a curve formed by a plurality of point sequences, distances of all points on the curve to the straight line are calculated, and a maximum distance value dmax is found. The maximum distance value dmax is compared with a limit difference D. If dmax < D, all intermediate points on the curve are discarded. If dmax ≥ D, the coordinate point corresponding to dmax is retained, and the curve is divided into two parts with the point as a boundary. The method is repeatedly used on the two parts, until each point to be discarded on the curve, and a compressed point sequence is obtained.
[0132] Referring to Figure 6 , Figure 6 A flowchart of a trajectory compression method provided by an exemplary embodiment of the present application is shown in FIG. 6. Specific steps of compressing the trajectory data of the target trajectory using the Douglas-Peucker algorithm are as follows: Figure 6
[0133] Step S601: Obtain a trajectory point sequence of a trip trajectory.
[0134] The trajectory point sequence of the trip trajectory can be a compressed trajectory point sequence. The trajectory compression retains the trajectory start point and the trajectory end point of the trip, and thus does not change the trip and does not affect the route rendering of the trip trajectory.
[0135] Step S602: Generate a trip trajectory based on the trajectory point sequence.
[0136] In this step, according to the sequence of trajectory points, a trajectory line corresponding to the trip is generated, that is, a trip trajectory.
[0137] In step S603, the trajectory start point and the trajectory end point are obtained, and a trajectory point deviation threshold dMax is obtained.
[0138] In this embodiment, dMax is used to represent the trajectory point deviation threshold, which can be set according to the width of the road / route and other information in the actual application scenario, which is not limited here.
[0139] For example, for the processing scene of vehicle trajectory, since the actual road width can usually reach 30 meters, in the scene of calculating the trajectory line, the vehicle on the road can be accepted, and the specific lane of the vehicle is not concerned, so dMax=30 can be set.
[0140] In step S604, the current start position start=0 and the end position end=CNT-1 are initialized.
[0141] In this embodiment, start is used to represent the start position point sequence number of the current trajectory line, and end is used to represent the end position point sequence number of the current trajectory line. CNT represents the number of trajectory points in the sequence of trajectory points of the trip trajectory.
[0142] Initially, the current trajectory line is a trajectory line containing all trajectory points in the sequence of trajectory points of the trip trajectory, start is the position sequence number of the trajectory start point of the trip trajectory, and end is the position sequence number of the trajectory end point of the trip trajectory, that is, end is the number of trajectory points in the sequence of trajectory points of the trip trajectory minus 1.
[0143] The Douglas-Pok algorithm is used to find the maximum distance point maxPt and the corresponding maximum distance maxDist from the line connecting the start point and the end point on the current trajectory line in a recursive manner. The trajectory points on the current trajectory line with a distance from the line connecting the start point and the end point less than the trajectory point deviation threshold dMax can be discarded to achieve the purpose of trajectory compression.
[0144] In step S605, it is determined whether start<end is satisfied.
[0145] In this embodiment, the condition for recursion termination is that the start position sequence number of the current trajectory line is less than the end position sequence number, that is, start<end.
[0146] If start<end, step S606 is executed to perform compression processing of the current trajectory line.
[0147] If start≥end, the current trajectory line does not need compression processing, and does not need to be recursively processed again.
[0148] Step S606, calculate the distance between each trajectory point between start and end and the straight line where the current start point and end point are located, and store as an array curDist[].
[0149] In this step, for the current trajectory line, connect the start point and end point with a straight line, and calculate the distance between each trajectory point between start and end and the straight line, to obtain an array curDist[]. Each element in the array is the distance between a trajectory point and the straight line, and the subscript of the element corresponds to the position serial number of the trajectory point.
[0150] Step S607, calculate the maximum distance maxDist in the array curDist[] and the position serial number maxPt of the trajectory point corresponding to the maximum distance.
[0151] By comparing the size of the distance stored in the array curDist[], the maximum distance maxDist in the array can be determined, and according to the subscript of the maximum distance maxDist in the array, the position serial number maxPt of the trajectory point corresponding to the maximum distance can be determined.
[0152] Step S608, whether maxDist≥dMax is satisfied.
[0153] If maxDist≥dMax is satisfied
[0154] Step S609, if maxDist≥dMax, keep the trajectory point maxPt corresponding to the maximum distance.
[0155] Step S610, if maxDist is less than dMax, discard the trajectory point maxPt corresponding to the maximum distance.
[0156] Step S611, according to maxPt, divide the current trajectory line into two trajectory lines: the first trajectory line: start=start, end=maxPt; and the second trajectory line: start=maxPt, end=end.
[0157] Step S612, perform compression processing on the first trajectory line.
[0158] Step S613, perform compression processing on the second trajectory line.
[0159] The process of performing compression processing on the first trajectory line and the process of performing compression processing on the second trajectory line are consistent with the flow of steps S605-S611, and will not be described here.
[0160] Optionally, in step S608, if maxDist < dMax, it means that the distance between each trajectory point on the current trajectory line and the straight line passing through the current start point and end point is less than dMax, and all the trajectory points between start and end on the current trajectory line are discarded, and the recursive branch ends.
[0161] Until all recursions end, the compressed trajectory point sequence is obtained. The number of trajectory points in the compressed trajectory point sequence is greatly reduced.
[0162] The embodiment compresses the trajectory point sequence of the target trajectory by using the Douglas-Peucker algorithm, removes part of the trajectory points in the trajectory point sequence except the start point and the end point of the trajectory, reduces the number of trajectory points of the trip, and improves the efficiency of identifying the accompanying relationship between the trajectories of the trip.
[0163] In an optional embodiment, referring to Figure 7 The start point of the two target trajectories is connected, and the end point of the two target trajectories is connected to form a closed trajectory line containing the two target trajectories. Specifically, the following steps can be used:
[0164] In step S701, the two target trajectories include a first target trajectory tr1 and a second target trajectory tr2.
[0165] In the embodiment, tr1 and tr2 represent the two target trajectories. The two target trajectories have the same origin and destination, and the same line direction.
[0166] In step S702, the end points of the first target trajectory tr1 and the second target trajectory tr2 are obtained, and a first connecting line tr1End from the end point of the first target trajectory to the end point of the second target trajectory is generated.
[0167] In step S703, the first connecting line tr1End is used as an extension line segment of the first target trajectory tr1, and a first trajectory line tr1New from the start point of the first target trajectory to the end point of the second target trajectory is generated.
[0168] In step S704, the start points of the first target trajectory tr1 and the second target trajectory tr2 are obtained, and a second connecting line tr2Start from the start point of the first target trajectory to the start point of the second target trajectory is generated.
[0169] In step S705, the second connecting line tr2Start is appended to the starting position of the second target trajectory tr2, and a second trajectory line tr2New from the start point of the first target trajectory to the end point of the second target trajectory is obtained.
[0170] Step S706, reverse the direction of the second trajectory line tr2New to obtain a third trajectory line tr3New; the first trajectory line tr1New and the third trajectory line tr3New form a closed trajectory line containing two target trajectories.
[0171] Since the starting point and the destination of tr1 and tr2 are the same, the directions are also consistent, so the directions of tr1New and tr2New are also consistent. The direction of tr3New obtained by reversing the direction of tr2New is opposite to that of tr1New, and tr3New and tr1New merge to generate a closed connection ring, and a closed trajectory line is obtained.
[0172] Step S707, the closed trajectory line of the two target trajectories encloses a closed area.
[0173] The closed trajectory line of the two target trajectories encloses a closed area usually contains one or more polygonal regions. After determining the closed trajectory line of the two target trajectories, the data of the closed area enclosed by the closed trajectory line can be determined by spatial data calculation.
[0174] Exemplarily, a tool kit realizing the function of spatial data calculation can be used to perform spatial data calculation on the closed trajectory line of the two target trajectories to determine the closed area data. Further, based on the closed area data, the LIP algorithm is used to calculate the area and perimeter of each polygonal sub-region in the closed area enclosed by the closed trajectory line. Further, the sum of the areas of all polygonal sub-regions can be calculated to obtain the total area of the closed area, the sum of the perimeters of all polygonal sub-regions can be calculated to obtain the total perimeter of the closed area, the ratio of the total area to the total perimeter can be calculated, and the ratio of the total area to the total perimeter is taken as the similarity distance of the two target trajectories.
[0175] In this embodiment, for two target trajectories: a first target trajectory and a second target trajectory, a first connecting line from the end point of the first target trajectory to the end point of the second target trajectory is generated, the first connecting line is taken as an extension line segment of the first target trajectory, and a first trajectory line from the start point of the first target trajectory to the end point of the second target trajectory is obtained; a second connecting line from the start point of the first target trajectory to the start point of the second target trajectory is generated, the second connecting line is added to the starting position of the second target trajectory point, and a second trajectory line from the start point of the first target trajectory to the end point of the second target trajectory is obtained; the direction of the second trajectory line is reversed to obtain a third trajectory line; the first trajectory line and the third trajectory line form a closed trajectory line containing the two target trajectories, the closed trajectory line of the two target trajectories can be determined, the similarity distance of the two target trajectories can be accurately determined based on the closed trajectory line, and the similarity of the two target trajectories in space can be well measured.
[0176] Figure 8A structure diagram of a trajectory inter-relationship identification device is provided for an exemplary embodiment of the present application. The trajectory inter-relationship identification device provided by the embodiment of the present application can execute the processing flow provided by the trajectory inter-relationship identification method embodiment. As shown in Figure 8 the trajectory inter-relationship identification device 80 includes a trajectory data processing module 81, a spatial similarity determination module 82, a time similarity determination module 83, and a relationship determination module 84.
[0177] Specifically, the trajectory data processing module 81 is configured to, for any two target trajectories for which a relationship is to be determined, obtain trajectory point sequences of the two target trajectories.
[0178] The spatial similarity determination module 82 is configured to connect trajectory start points of the two target trajectories and connect trajectory end points of the two target trajectories to form a closed trajectory line containing the two target trajectories, determine a total area and a total perimeter of a closed area enclosed by the closed trajectory line, and determine a similarity distance of the two target trajectories according to a ratio of the total area to the total perimeter.
[0179] The time similarity determination module 83 is configured to determine an average time difference of the two target trajectories according to time stamps of trajectory points in the trajectory point sequences of the two target trajectories.
[0180] The relationship determination module 84 is configured to determine whether the two target trajectories have a relationship according to the similarity distance and the average time difference of the two target trajectories, and obtain a relationship determination result.
[0181] The device provided by the embodiment of the present application can be specifically used to execute the scheme provided by the corresponding method embodiment, and specific functions and technical effects that can be achieved will not be described here. Figure 1
[0182] In an alternative embodiment, before obtaining trajectory point sequences of any two target trajectories for which a relationship is to be determined, the trajectory data processing module is further configured to:
[0183] perform trajectory segmentation processing on original trajectory data of a vehicle, take each trajectory segment as a trip trajectory, and obtain a trajectory point sequence of the trip trajectory; and according to a map grid in which a trajectory start point of the trip trajectory is located and a map grid in which a trajectory end point of the trip trajectory is located, filter out trip trajectories in which the trajectory start point is located in the same map grid and the trajectory end point is located in the same map grid, and obtain the target trajectories for which a relationship is to be determined.
[0184] In an alternative embodiment, the trajectory data processing module is further configured to: before connecting the trajectory start points of the two target trajectories and connecting the trajectory end points of the two target trajectories to form a closed trajectory line containing the two target trajectories, compress the trajectory data of the target trajectories, remove part of the trajectory points in the trajectory data except the trajectory start points and the trajectory end points, and obtain a compressed trajectory point sequence of the target trajectories.
[0185] In an alternative embodiment, the trajectory data processing module is further configured to: before performing trajectory segmentation processing on the original trajectory data of the vehicle, taking each trajectory segment as a trip trajectory, and obtaining a trajectory point sequence of the trip trajectory, perform denoising processing on the original trajectory data.
[0186] In an alternative embodiment, when connecting the trajectory start points of the two target trajectories and connecting the trajectory end points of the two target trajectories to form a closed trajectory line containing the two target trajectories, the spatial similarity determination module is further configured to:
[0187] The two target trajectories include a first target trajectory and a second target trajectory, a first connecting line from the trajectory end point of the first target trajectory to the trajectory end point of the second target trajectory is generated, the first connecting line is taken as an extended line segment of the first target trajectory, and a first trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory is obtained; a second connecting line from the trajectory start point of the first target trajectory to the trajectory start point of the second target trajectory is generated, the second connecting line is added to the starting position of the second target point, and a second trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory is obtained; the direction of the second trajectory line is reversed to obtain a third trajectory line; the first trajectory line and the third trajectory line form a closed trajectory line containing the two target trajectories.
[0188] In an alternative embodiment, when determining the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequences of the two target trajectories, the time similarity determination module is further configured to:
[0189] The average value of the time stamps of the trajectory points in the trajectory point sequence of each target trajectory is determined as the average time stamp of each target trajectory; the absolute value of the difference between the average time stamps of the two target trajectories is determined to obtain the average time difference of the two target trajectories.
[0190] In an alternative embodiment, when determining whether the two target trajectories have a companion relationship according to the similar distance and the average time difference of the two target trajectories, and obtaining a companion relationship determination result, the companion relationship determination module is further configured to:
[0191] According to the similar distance and the average time difference of the two target trajectories, if the similar distance is less than or equal to a similar distance threshold, and the average time difference is less than or equal to a time difference threshold, it is determined that the two target trajectories have a companion relationship.
[0192] The device provided by the embodiments of the present application can be specifically used for executing the scheme provided by any of the above method embodiments, and the specific functions and the technical effects that can be achieved will not be repeated here.
[0193] Figure 9 A structural schematic diagram of an electronic device is provided for an example embodiment of the present application. As shown in the figure, the electronic device 90 includes a processor 901 and a memory 902 connected with the processor 901 in communication, and the memory 902 stores computer execution instructions. Figure 9
[0194] The processor executes the computer execution instructions stored in the memory to implement the scheme provided by any of the above method embodiments, and the specific functions and the technical effects that can be achieved will not be repeated here.
[0195] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When the computer execution instructions are executed by a processor, the computer execution instructions are used to implement the scheme provided by any of the above method embodiments, and the specific functions and the technical effects that can be achieved will not be repeated here.
[0196] The embodiments of the present application also provide a computer program product, and the program product includes a computer program. The computer program is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium. The at least one processor executes the computer program to make the electronic device execute the scheme provided by any of the above method embodiments, and the specific functions and the technical effects that can be achieved will not be repeated here.
[0197] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the application are indicated by the following claims.
[0198] It should be understood that the present application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the present application. The scope of the present application is limited only by the appended claims.
Claims
1. A method of identifying inter-track relationships, characterized by, The method comprises the following steps: For any two target trajectories to be determined for a companion relationship, obtain the trajectory point sequence of the two target trajectories, the two target trajectories comprising a first target trajectory and a second target trajectory; Determine the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequence of the two target trajectories; Generate a first connecting line from the trajectory end point of the first target trajectory to the trajectory end point of the second target trajectory, take the first connecting line as an extended line segment of the first target trajectory, and obtain a first trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory; Generate a second connecting line from the trajectory start point of the first target trajectory to the trajectory start point of the second target trajectory, and add the second connecting line to the starting position of the second target trajectory point to obtain a second trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory; Reverse the direction of the second trajectory line to obtain a third trajectory line; The first trajectory line and the third trajectory line form a closed trajectory line containing the two target trajectories; Determine the total area and the total perimeter of the closed area enclosed by the closed trajectory line, and determine the similarity distance of the two target trajectories according to the ratio of the total area to the total perimeter; Determine whether the two target trajectories have a companion relationship according to the similarity distance and the average time difference of the two target trajectories, and obtain a companion relationship determination result.
2. The method of claim 1, wherein, Before the step of obtaining the trajectory point sequence of the two target trajectories to be determined for a companion relationship, the method further comprises the following steps: Perform trajectory segmentation processing on the original trajectory data of the vehicle, take each trajectory segment as a trip trajectory, and obtain the trajectory point sequence of the trip trajectory; According to the map grid where the trajectory start point is located and the map grid where the trajectory end point is located in the trajectory point sequence of the trip trajectory, filter out the trip trajectory whose trajectory start point is located in the same map grid and whose trajectory end point is located in the same map grid, and obtain the target trajectory to be determined for a companion relationship.
3. The method of claim 2, wherein, Before the step of connecting the trajectory start points of the two target trajectories and connecting the trajectory end points of the trajectory data to form a closed trajectory line containing the two target trajectories, the method further comprises the following steps: Compress the trajectory data of the target trajectory, remove part of the trajectory points in the trajectory data except the trajectory start point and the trajectory end point, and obtain the compressed trajectory point sequence of the target trajectory.
4. The method of claim 2, wherein, Before the step of performing trajectory segmentation processing on the original trajectory data of the vehicle, taking each trajectory segment as a trip trajectory, and obtaining the trajectory point sequence of the trip trajectory, the method further comprises the following steps: Perform denoising processing on the original trajectory data.
5. The method of claim 1, wherein, The step of determining the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequence of the two target trajectories comprises the following steps: Determine the average value of the time stamps of the trajectory points in the trajectory point sequence of each target trajectory as the average time stamp of each target trajectory; Determine the absolute value of the difference between the average time stamps of the two target trajectories to obtain the average time difference of the two target trajectories.
6. The method of claim 1, wherein, The determining whether the two target trajectories have a companion relationship according to the similar distance and the average time difference of the two target trajectories obtains a companion relationship determination result, and includes: According to the similar distance and the average time difference of the two target trajectories, if the similar distance is less than or equal to a similar distance threshold, and the average time difference is less than or equal to a time difference threshold, it is determined that the two target trajectories have a companion relationship.
7. An apparatus for recognizing inter-track paracouplings, characterized in that Including: The trajectory data processing module is used for obtaining the trajectory point sequence of two target trajectories including a first target trajectory and a second target trajectory for any two target trajectories to be determined as having a companion relationship. The spatial similarity determination module is used for generating a first connecting line from the trajectory end point of the first target trajectory to the trajectory end point of the second target trajectory, taking the first connecting line as an extension line segment of the first target trajectory to obtain a first trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory. A second connecting line from the trajectory start point of the first target trajectory to the trajectory start point of the second target trajectory is generated, and the second connecting line is added to the starting position of the second target trajectory point to obtain a second trajectory line from the trajectory start point of the first target trajectory to the trajectory end point of the second target trajectory. The direction of the second trajectory line is reversed to obtain a third trajectory line. The first trajectory line and the third trajectory line form a closed trajectory line containing the two target trajectories. The total area and the total perimeter of the closed area surrounded by the closed trajectory line are determined, and the similar distance of the two target trajectories is determined according to the ratio of the total area to the total perimeter. The time similarity determination module is used for determining the average time difference of the two target trajectories according to the time stamps of the trajectory points in the trajectory point sequence of the two target trajectories. The companion relationship determination module is used for determining whether the two target trajectories have a companion relationship according to the similar distance and the average time difference of the two target trajectories, and obtaining a companion relationship determination result.
8. An electronic device, comprising: Including: A processor and a memory connected in communication with the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Systems and methods for object tracking
CN111954886A