Same driving track identification method, device and equipment and readable storage medium
By mapping driving trajectories to encoded sequences and detecting similarity based on edit distance matrices, the problem of low efficiency in identifying vehicles traveling on the same route in existing technologies is solved, achieving efficient and accurate identification of identical driving trajectories.
Patent Information
- Application Number
- CN202511371848.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2025-12-19
AI Technical Summary
In existing technologies, methods for identifying vehicles traveling the same route are inefficient, inaccurate, and have poor system performance, failing to meet the needs of large-scale data analysis and real-time processing.
The driving trajectory is mapped to an encoded sequence, and then split into sub-encoded sequences based on the turnaround point encoding. The similarity of the sub-encoded sequences is detected by editing the distance matrix, and the same driving trajectory is extracted.
It achieves automated, efficient, and accurate identification of identical driving trajectories, freeing up human resources and meeting the needs of large-scale data analysis and real-time processing.
Smart Images

Figure CN121167342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a method, apparatus, device, and computer-readable storage medium for identifying vehicle trajectories. Background Technology
[0002] Comparing vehicle performance data, such as fuel consumption, along the same driving routes is a key method for optimizing driving behavior, improving fleet efficiency, and reducing operating costs. A prerequisite for achieving this goal is the ability to quickly and accurately identify identical driving routes from massive amounts of vehicle trajectory data.
[0003] Currently, the common practice in the industry is to use the trajectory visualization function of a vehicle-to-everything (V2X) platform. This method typically requires manual operation by analysts: first, the driving trajectories of one or more vehicles are loaded and displayed on a map; then, by continuously zooming in and out of the map, the trajectories are visually observed and compared to determine whether different vehicles have passed through the same geographical area or road. After confirming route similarities, the similarities are manually marked on the map or approximate "same road segments" are extracted based on the time information of the trajectory points; finally, vehicle data within that time period is extracted for comparative analysis.
[0004] However, this traditional approach, relying on human visual judgment and manual operation, has significant limitations: First, it is extremely inefficient; manually comparing and extracting data from hundreds or thousands of vehicle trajectories requires substantial time and manpower. Second, it suffers from poor accuracy and consistency; due to its reliance on subjective human judgment, different analysts may extract different "identical road segments," leading to a lack of objectivity and repeatability in the analysis results. Furthermore, it performs poorly when processing long routes; rendering and loading detailed trajectory maps over long periods puts significant pressure on the system, resulting in a poor user experience and inconvenient operation.
[0005] Therefore, there is an urgent need in the field for a method that can automatically, efficiently and accurately extract the same route from vehicle trajectory data in order to overcome the aforementioned shortcomings of the prior art. Summary of the Invention
[0006] To address the aforementioned technical problems, this application provides a method, apparatus, device, and computer-readable storage medium for identifying the same driving trajectory.
[0007] In a first aspect, embodiments of this application provide a method for identifying identical driving trajectories, the method comprising: Map at least one driving trajectory to an encoded sequence; The encoded sequence is divided into several sub-encoded sequences based on the turnaround point encoding; For any two sub-coded sequences, detect whether the two sub-coded sequences are similar; If they are similar, the same driving trajectory is extracted based on the distance matrix of the two sub-encoded sequences, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
[0008] In conjunction with the first aspect, in one implementation, detecting whether two sub-coded sequences are similar includes: Determine the edit distance between the two sub-coded sequences and the maximum number of codes in the two sub-coded sequences; The similarity is calculated as the ratio of the edit distance between two sub-coded sequences to the maximum number of codes. If the similarity is less than the first preset value, then the two sub-encoded sequences are determined to be similar.
[0009] In conjunction with the first aspect, in one implementation, determining the edit distance between the two sub-coded sequences includes: Construct the distance matrix between the two sub-encoded sequences; Fill the elements in the first row and the first column of the distance matrix; Following the column-first, row-second order, fill the remaining elements according to the preset fill rules, which include: If the i-th code in one sub-coded sequence is the same as the j-th code in another sub-coded sequence, S i,j =S i-1,j-1 If the i-th code in one sub-coded sequence is different from the j-th code in another sub-coded sequence, then S i,j =min(S) i-1,j-1 +1, S i-1,j +1, S i,j-1 +1); i takes values from 2 to p, and j takes values from 2 to q; After all elements in the distance matrix are filled, S p,q This represents the edit distance between the two sub-encoded sequences.
[0010] In conjunction with the first aspect, in one implementation, the extraction of the same driving trajectory based on the distance matrix of the two sub-encoded sequences includes: If the minimum values in adjacent x columns are the same and the number of values is the same, then determine the position of the minimum value in the first and xth columns of x, where x is greater than the second preset value; Based on the aforementioned positions, the first and second coded segments are extracted from the two sub-coded sequences, respectively. The first sub-trajectory corresponding to the first coded segment and the second sub-trajectory corresponding to the second coded segment are considered to be the same travel trajectory.
[0011] In conjunction with the first aspect, in one implementation, after extracting the same driving trajectory based on the distance matrix of the two sub-encoded sequences, the method further includes: Obtain the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory; Data analysis was performed based on the first and second driving conditions.
[0012] In conjunction with the first aspect, in one implementation, obtaining the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory includes: Determine the first start and end sequence number of the first sub-driving trajectory in its corresponding encoding sequence, determine the first driving time period information corresponding to the first start and end sequence number, and obtain the first driving condition corresponding to the first driving time period information. Determine the second start and end sequence number of the second sub-driving trajectory in its corresponding encoding sequence, determine the second driving time period information corresponding to the second start and end sequence number, and obtain the second driving condition corresponding to the second driving time period information.
[0013] In conjunction with the first aspect, in one implementation, the step of splitting the encoded sequence into several sub-encoded sequences based on turnaround point encoding includes: Identify the turnaround point code from the encoded sequence, wherein if the nth code in the encoded sequence is the same as the (n+2)th code, then the (n+2)th code is the turnaround point code; The encoded sequence is divided into several sub-encoded sequences using each turnaround point as a splitting point.
[0014] Secondly, embodiments of this application provide a device for recognizing identical driving trajectories, the device comprising: The mapping module is used to map at least one driving trajectory into an encoded sequence; A splitting module is used to split the encoded sequence into several sub-encoded sequences based on the turnaround point encoding; The detection module is used to detect whether any two sub-coded sequences are similar. The extraction module is used to extract identical driving trajectories based on the distance matrix between two sub-encoded sequences if they are similar, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
[0015] Thirdly, embodiments of this application provide a device for recognizing identical driving trajectories. The device includes a processor, a memory, and an identical driving trajectory recognition program stored in the memory and executable by the processor. When the identical driving trajectory recognition program is executed by the processor, it implements the steps of the identical driving trajectory recognition method as described in the first aspect.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program for identifying identical driving trajectories, wherein when the program for identifying identical driving trajectories is executed by a processor, it implements the steps of the method for identifying identical driving trajectories as described in the first aspect.
[0017] The beneficial effects of the technical solutions provided in this application include: In this embodiment, at least one driving trajectory is mapped to an encoded sequence; the encoded sequence is split into several sub-encoded sequences based on turnaround point encoding; for any two sub-encoded sequences, it is detected whether the two sub-encoded sequences are similar; if they are similar, the same driving trajectory is extracted based on the distance matrix of the two sub-encoded sequences, wherein the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is defined as the distance between the first m codes in one sub-encoded sequence and the first n codes in another sub-encoded sequence, where m ranges from 1 to p, n ranges from 1 to q, p is the number of codes in the first encoding sequence, and q is the number of codes in the other encoding sequence. Through the embodiments of this application, driving trajectories are converted into encoded sequences, and based on these sequences, computer technology is used to find identical driving trajectories, completely replacing traditional manual operations, greatly reducing manpower, and meeting the needs of large-scale data analysis and real-time processing. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating an embodiment of the same vehicle trajectory recognition method in this application; Figure 2 This is a schematic diagram of the distance matrix in one embodiment of this application; Figure 3 This is a schematic diagram of the functional modules of an embodiment of the same vehicle trajectory recognition device in this application; Figure 4 This is a schematic diagram of the hardware structure of the same vehicle trajectory recognition device involved in the embodiments of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0021] In one aspect, embodiments of this application provide a method for identifying identical driving trajectories.
[0022] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the same vehicle trajectory recognition method used in this application. Figure 1 As shown, the methods for identifying the same driving trajectory include: Step S10: Map at least one driving trajectory into an encoded sequence; In this embodiment, based on map coding technology, the map area is divided into multiple grids, and each grid is assigned a unique code. The grids based on the vehicle trajectory path are used to map the vehicle trajectory into a coding sequence. For example, the grids based on the vehicle trajectory path A are mapped to the coding sequence A=[d08, d07, d06, d05, d04, d03, d04, d05, d06, d07, d08]; the grids based on the vehicle trajectory path B are mapped to the coding sequence B=[d01, d02, d03, d04, d05, d06, d07, d06, d05, d04, d05, d06, d07, e07].
[0023] Step S20: Based on the turnaround point encoding, the encoded sequence is split into several sub-encoded sequences; In this embodiment, the turnaround point code can be determined by analyzing the directional changes in the vehicle trajectory. For example, if the directional change in the vehicle trajectory exceeds a preset amount at grid x, then the code corresponding to grid x is used as the turnaround point code. Thus, the code sequence is split into several sub-code sequences using the turnaround point code as the splitting point.
[0024] Further, in one embodiment, step S20 includes: Identify turnaround point codes from the encoding sequence, wherein if the nth code and the (n+2)th code in the encoding sequence are the same, then the (n+2)th code is the turnaround point code; using each turnaround point code as a splitting point, the encoding sequence is split into several sub-encoding sequences.
[0025] In this embodiment, for example, in encoded sequence A, if the 5th and 7th codes are the same, then the 7th code is used as the turnaround point code, i.e., the turnaround point code includes d04. Therefore, encoded sequence A is split into sub-encoded sequences A1=[d08, d07, d06, d05, d04, d03] and A2=[d04, d05, d06, d07, d08]. Similarly, for encoded sequence B, if the turnaround point codes include d06 and d05, then encoded sequence B is split into sub-encoded sequences B1=[d01, d02, d03, d04, d05, d06, d07], B2=[d06, d05, d04], and B3=[d05, d06, d07, e07].
[0026] Step S30: For any two sub-coding sequences, detect whether the two sub-coding sequences are similar; In this embodiment, the sub-encoded sequence is a string. By calculating the similarity between strings, the similarity between any two sub-encoded sequences can be determined, thereby determining whether the two sub-encoded sequences are similar.
[0027] Furthermore, in one embodiment, detecting whether two sub-coded sequences are similar includes: Determine the edit distance and the maximum number of codes in the two sub-coded sequences; use the ratio of the edit distance to the maximum number of codes in the two sub-coded sequences as the similarity; if the similarity is less than a first preset value, then the two sub-coded sequences are determined to be similar.
[0028] In this embodiment, taking sub-coding sequences B1 and A2 as examples, transforming B1 into A2 or vice versa requires at least 4 operations. Therefore, the edit distance between sub-coding sequences B1 and A2 is 4. Sub-coding sequence B1 contains 7 codes, and sub-coding sequence A2 contains 5 codes. Thus, the maximum number of codes in the two sub-coding sequences is 7, meaning the similarity between the two sub-coding sequences is 4 / 7. This pattern can be repeated to obtain the similarity between any two sub-coding sequences.
[0029] The similarity is then compared with a first preset value. If the similarity is less than the first preset value, the two sub-encoding sequences are determined to be similar. The first preset value is set based on actual needs.
[0030] Furthermore, in one embodiment, determining the edit distance between two sub-coded sequences includes: Construct a distance matrix between the two sub-encoding sequences; fill the elements in the first row and the first column of the distance matrix; fill the remaining elements according to a preset filling rule, following the column-first, row-second order. The preset filling rule includes: if the i-th code in one sub-encoding sequence is the same as the j-th code in the other sub-encoding sequence, S... i,j =S i-1,j-1 If the i-th code in one sub-coded sequence is different from the j-th code in another sub-coded sequence, then S i,j =min(S) i-1,j-1 +1, S i-1,j +1, S i,j-1 +1); i takes values from 2 to p, and j takes values from 2 to q; after all elements in the distance matrix are filled, S p,q This represents the edit distance between the two sub-encoded sequences.
[0031] In this embodiment, refer to Figure 2 , Figure 2 This is a schematic diagram of the distance matrix in one embodiment of this application. First, the values of each element in the first row and the first column are determined. Then, each element in the first column is filled from top to bottom according to a preset filling rule, and then each element in the second column is filled from top to bottom according to the preset filling rule, until all elements in the distance matrix are filled. The element in the lower right corner of the distance matrix is used as the edit distance between the two sub-encoding sequences.
[0032] In this embodiment, conventional methods for calculating edit distance can lead to high computational complexity and low efficiency if the two sub-coded sequences contain too many codes. This embodiment, however, determines each element in the distance matrix according to a preset padding rule, ultimately obtaining the edit distance between the two sub-coded sequences. This reduces the computational load and lowers the requirements for hardware computing power.
[0033] Step S40: If similar, extract the same driving trajectory based on the distance matrix of the two sub-encoded sequences, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
[0034] Further, in one embodiment, step S40 includes: If the minimum values in adjacent x columns are the same and the number of values is the same, then determine the position of the minimum value in the first and xth columns of x, where x is greater than the second preset value; Based on the aforementioned positions, the first and second coded segments are extracted from the two sub-coded sequences, respectively. The first sub-trajectory corresponding to the first coded segment and the second sub-trajectory corresponding to the second coded segment are considered to be the same travel trajectory.
[0035] In this embodiment, for ease of explanation, ... Figure 2 Take the distance matrix shown as an example. Figure 2 As shown, rows 1 to 10 correspond to the codes of sub-code sequence 1, and columns 1 to 11 correspond to the codes of sub-code sequence 2. The minimum value in the first column of this distance matrix is 1, and the number of minimum values is 1; the minimum value in the second column is 2, and the number of minimum values is 2; the minimum value in the third column is 3, and the number of minimum values is 3. And so on, the minimum value and the number of minimum values in each column of the distance matrix can be determined.
[0036] Reference Figure 2 As can be seen, the minimum value in columns 4 through 10 is 3, and there is only one minimum value in each column. Assuming the second preset value is set to 5, the positions of the minimum value 3 in columns 4 and 10 are determined and denoted as the starting position and ending position, respectively. The starting position is C... ab The first row and fourth column, with the endpoint at position C. cd The value is in the seventh row and tenth column, i.e., a=1, b=4, c=7, d=10.
[0037] Extract the a-th to c-th codes from sub-coded sequence 1 to obtain the first coded segment; extract the b-th to d-th codes from sub-coded sequence 2 to obtain the second coded segment. Thus, the first sub-trajectory corresponding to the first coded segment and the second sub-trajectory corresponding to the second coded segment are considered the same travel trajectory.
[0038] Through the embodiments of this application, the driving trajectory is converted into an encoded sequence, and the same driving trajectory is found based on the encoded sequence using computer technology. This completely replaces the traditional manual operation, greatly liberates manpower, and meets the needs of large-scale data analysis and real-time processing.
[0039] Furthermore, in one embodiment, after step S40, the method further includes: Step S50: Obtain the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory; Step S60: Perform data analysis based on the first driving condition and the second driving condition.
[0040] In this embodiment, the first / second driving conditions include driver operation behavior, fuel consumption, etc., so as to analyze the impact of driver operation behavior on fuel consumption.
[0041] Further, in one embodiment, step S50 includes: Determine the first start and end sequence number of the first sub-driving trajectory in its corresponding encoding sequence, determine the first driving time period information corresponding to the first start and end sequence number, and obtain the first driving condition corresponding to the first driving time period information. Determine the second start and end sequence number of the second sub-driving trajectory in its corresponding encoding sequence, determine the second driving time period information corresponding to the second start and end sequence number, and obtain the second driving condition corresponding to the second driving time period information.
[0042] In this embodiment, it is assumed that the first sub-driving trajectory corresponds to the first encoded segment. Assume the first coded segment has an index of 1 to 7 in its sub-coded sequence s. In the coding sequence S to which the sub-coding sequence s belongs, there are y codes before the first code of the sub-coding sequence s. The first start and end sequence numbers of the first sub-driving trajectory corresponding to the first coding segment in the coding sequence S are (1+y) to (7+y). Based on the driving trajectory corresponding to the coding sequence S, the first driving time period information corresponding to the vehicle driving in the segment from the grid corresponding to the sequence number (1+y) to the grid corresponding to the sequence number (7+y) is determined, and then the first driving condition corresponding to the first driving time period information is obtained.
[0043] Based on the same operation, the second driving condition corresponding to the second driving time period information is obtained, which will not be described in detail here.
[0044] Secondly, embodiments of this application also provide a vehicle trajectory recognition device.
[0045] In one embodiment, reference is made to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of the same vehicle trajectory recognition device as described in this application. Figure 3 As shown, the same driving trajectory recognition device includes: Mapping module 10 is used to map at least one driving trajectory into an encoded sequence; The splitting module 20 is used to split the encoded sequence into several sub-encoded sequences based on the turnaround point encoding; Detection module 30 is used to detect whether two sub-coding sequences are similar for any two sub-coding sequences; Extraction module 40 is used to extract the same driving trajectory based on the distance matrix of the two sub-encoded sequences if they are similar, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
[0046] Furthermore, in one embodiment, the detection module 30 is specifically used for: Determine the edit distance between the two sub-coded sequences and the maximum number of codes in the two sub-coded sequences; The similarity is calculated as the ratio of the edit distance between two sub-coded sequences to the maximum number of codes. If the similarity is less than the first preset value, then the two sub-encoded sequences are determined to be similar.
[0047] Furthermore, in one embodiment, the detection module 30 is specifically used for: Construct the distance matrix between the two sub-encoded sequences; Fill the elements in the first row and the first column of the distance matrix; Following the column-first, row-second order, fill the remaining elements according to the preset fill rules, which include: If the i-th code in one sub-coded sequence is the same as the j-th code in another sub-coded sequence, S i,j =S i-1,j-1 If the i-th code in one sub-coded sequence is different from the j-th code in another sub-coded sequence, then S i,j =min(S) i-1,j-1 +1, S i-1,j +1, S i,j-1 +1); i takes values from 2 to p, and j takes values from 2 to q; After all elements in the distance matrix are filled, S p,q This represents the edit distance between the two sub-encoded sequences.
[0048] Furthermore, in one embodiment, the extraction module 40 is specifically used for: If the minimum values in adjacent x columns are the same and the number of values is the same, then determine the position of the minimum value in the first and xth columns of x, where x is greater than the second preset value; Based on the aforementioned positions, the first and second coded segments are extracted from the two sub-coded sequences, respectively. The first sub-trajectory corresponding to the first coded segment and the second sub-trajectory corresponding to the second coded segment are considered to be the same travel trajectory.
[0049] Furthermore, in one embodiment, the same driving trajectory recognition device further includes an analysis module, used for: Obtain the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory; Data analysis was performed based on the first and second driving conditions.
[0050] Furthermore, in one embodiment, the analysis module is specifically used for: Determine the first start and end sequence number of the first sub-driving trajectory in its corresponding encoding sequence, determine the first driving time period information corresponding to the first start and end sequence number, and obtain the first driving condition corresponding to the first driving time period information. Determine the second start and end sequence number of the second sub-driving trajectory in its corresponding encoding sequence, determine the second driving time period information corresponding to the second start and end sequence number, and obtain the second driving condition corresponding to the second driving time period information.
[0051] Furthermore, in one embodiment, the splitting module 20 is specifically used for: Identify the turnaround point code from the encoded sequence, wherein if the nth code in the encoded sequence is the same as the (n+2)th code, then the (n+2)th code is the turnaround point code; The encoded sequence is divided into several sub-encoded sequences using each turnaround point as a splitting point.
[0052] The functions of each module in the above-mentioned identical driving trajectory recognition device correspond to the steps in the above-mentioned identical driving trajectory recognition method embodiment, and their functions and implementation processes will not be described in detail here.
[0053] Thirdly, embodiments of this application provide a vehicle trajectory recognition device, which can be a personal computer (PC), laptop computer, server, or other device with data processing capabilities.
[0054] Reference Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of the same driving trajectory recognition device involved in the embodiments of this application. In the embodiments of this application, the same driving trajectory recognition device may include a processor, a memory, a communication interface, and a communication bus.
[0055] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0056] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting components within the same vehicle trajectory recognition device, as well as interfaces used for interconnecting the same vehicle trajectory recognition device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0057] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0058] The processor can be a general-purpose processor, which can call the same driving trajectory recognition program stored in the memory and execute the same driving trajectory recognition method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the same driving trajectory recognition program is called can refer to the various embodiments of the same driving trajectory recognition method in this application, and will not be repeated here.
[0059] Those skilled in the art will understand that Figure 4 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0060] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0061] The computer-readable storage medium of this application stores a program for recognizing identical driving trajectories, wherein when the program for recognizing identical driving trajectories is executed by a processor, it implements the steps of the method for recognizing identical driving trajectories as described above.
[0062] The method implemented when the same driving trajectory recognition program is executed can be referred to in various embodiments of the same driving trajectory recognition method in this application, and will not be repeated here.
[0063] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0064] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0065] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0066] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0067] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they 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 this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0069] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for identifying identical vehicle trajectories, characterized in that, The method for identifying identical driving trajectories includes: Map at least one driving trajectory to an encoded sequence; The encoded sequence is divided into several sub-encoded sequences based on the turnaround point encoding; For any two sub-coded sequences, detect whether the two sub-coded sequences are similar; If they are similar, the same driving trajectory is extracted based on the distance matrix of the two sub-encoded sequences, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
2. The method for identifying identical vehicle trajectories as described in claim 1, characterized in that, The detection of whether two sub-coded sequences are similar includes: Determine the edit distance between the two sub-coded sequences and the maximum number of codes in the two sub-coded sequences; The similarity is calculated as the ratio of the edit distance between two sub-coded sequences to the maximum number of codes. If the similarity is less than the first preset value, then the two sub-encoded sequences are determined to be similar.
3. The method for identifying identical driving trajectories as described in claim 2, characterized in that, Determining the edit distance between the two sub-coded sequences includes: Construct the distance matrix between the two sub-encoded sequences; Fill the elements in the first row and the first column of the distance matrix; Following the column-first, row-second order, fill the remaining elements according to the preset fill rules, which include: If the i-th code in one sub-coded sequence is the same as the j-th code in another sub-coded sequence, S i,j =S i-1,j-1 If the i-th code in one sub-coded sequence is different from the j-th code in another sub-coded sequence, then S i,j =min(S) i-1,j-1 +1, S i-1,j +1, S i,j-1 +1); i takes values from 2 to p, and j takes values from 2 to q; After all elements in the distance matrix are filled, S p,q This represents the edit distance between the two sub-encoded sequences.
4. The method for identifying identical vehicle trajectories as described in claim 1, characterized in that, The extraction of identical driving trajectories based on the distance matrix of two sub-encoded sequences includes: If the minimum values in adjacent x columns are the same and the number of values is the same, then determine the position of the minimum value in the first and xth columns of x, where x is greater than the second preset value; Based on the aforementioned positions, the first and second coded segments are extracted from the two sub-coded sequences, respectively. The first sub-trajectory corresponding to the first coded segment and the second sub-trajectory corresponding to the second coded segment are considered to be the same travel trajectory.
5. The method for identifying identical vehicle trajectories as described in claim 4, characterized in that, After extracting the same driving trajectory based on the distance matrix of the two sub-encoded sequences, the method further includes: Obtain the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory; Data analysis was performed based on the first and second driving conditions.
6. The method for identifying identical driving trajectories as described in claim 5, characterized in that, The step of obtaining the first driving condition corresponding to the first sub-driving trajectory and the second driving condition corresponding to the second sub-driving trajectory includes: Determine the first start and end sequence number of the first sub-driving trajectory in its corresponding encoding sequence, determine the first driving time period information corresponding to the first start and end sequence number, and obtain the first driving condition corresponding to the first driving time period information. Determine the second start and end sequence number of the second sub-driving trajectory in its corresponding encoding sequence, determine the second driving time period information corresponding to the second start and end sequence number, and obtain the second driving condition corresponding to the second driving time period information.
7. The method for identifying identical vehicle trajectories as described in claim 1, characterized in that, The step of splitting the encoded sequence into several sub-encoded sequences based on turnaround point encoding includes: Identify the turnaround point code from the encoded sequence, wherein if the nth code in the encoded sequence is the same as the (n+2)th code, then the (n+2)th code is the turnaround point code; The encoded sequence is divided into several sub-encoded sequences using each turnaround point as a splitting point.
8. A vehicle trajectory recognition device, characterized in that, The same driving trajectory recognition device includes: The mapping module is used to map at least one driving trajectory into an encoded sequence; A splitting module is used to split the encoded sequence into several sub-encoded sequences based on the turnaround point encoding; The detection module is used to detect whether any two sub-coded sequences are similar. The extraction module is used to extract identical driving trajectories based on the distance matrix between two sub-encoded sequences if they are similar, where the element S in the m-th row and n-th column of the distance matrix is... m,n The edit distance is the first m codes in one sub-encoding sequence and the first n codes in another sub-encoding sequence, where m ranges from 1 to p and n ranges from 1 to q, p is the number of codes in the first encoding sequence and q is the number of codes in the other encoding sequence.
9. A vehicle trajectory recognition device, characterized in that, The same driving trajectory recognition device includes a processor, a memory, and an same driving trajectory recognition program stored in the memory and executable by the processor, wherein when the same driving trajectory recognition program is executed by the processor, it implements the steps of the same driving trajectory recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for identifying identical driving trajectories, wherein when the program for identifying identical driving trajectories is executed by a processor, it implements the steps of the method for identifying identical driving trajectories as described in any one of claims 1 to 7.