A method for accompanying vehicle identification based on semantic trajectory

Through the combination of multi-feature matching and BiLSTM model, the problem of missing trajectory points in vehicle identification is solved, the accuracy of trajectory similarity is improved, and the analysis and identification of vehicle behavior patterns is realized, and applied to traffic safety and logistics planning is implemented.

CN115359437BActive Publication Date: 2025-08-12CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211004516.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-08-12
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

The prior art has problems such as missing track point feature data and missing track point in the vehicle identification, resulting in inaccurate calculation of trajectory similarity.

Method used

By obtaining the traffic trajectory data set and trajectory semantic vocabulary, a multi-feature matching data completion method and BiLSTM model are used, combining inflection point feature optimization and multi-feature attention mechanism, trajectory data completion and trajectory point compensation are performed, semantic trajectory vectors are generated, and the similarity between vehicles is calculated to identify the accompanying vehicle.

Benefits of technology

It improves the accuracy of trajectory similarity, can effectively explore the real driving trajectory and behavioral patterns of vehicles, and is applied to traffic safety, logistics planning, trajectory clustering and driving route prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115359437B_ABST
    Figure CN115359437B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for identifying accompanying vehicles based on semantic trajectories, which belongs to the field of intelligent transportation application technology. The method comprises the following steps: processing a traffic trajectory dataset to obtain a vehicle time-series trajectory sequence; using the MFDC algorithm to complete the trajectory data to obtain a vehicle compensation trajectory sequence; performing feature matching between a trajectory semantic vocabulary and the vehicle compensation trajectory sequence to obtain a semantic trajectory compensation sequence; calculating the inflection point angle of context trajectory points of the vehicle compensation trajectory sequence to optimize the semantic trajectory compensation sequence; vectorizing the optimized semantic trajectory compensation sequence using AT2VEC to generate a semantic trajectory vector; using the TP-BILSTM algorithm to perform trajectory point compensation on the semantic trajectory vector, and utilizing a multi-feature attention mechanism to extract semantic trajectory vectors with feature influence; calculating the similarity between the semantic trajectory vectors of different vehicles, and identifying accompanying vehicles of the same category based on one-hot encoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent transportation applications, relates to vehicle trajectory data processing, and particularly to a method for identifying accompanying vehicles based on semantic trajectories. Background Art

[0002] In recent years, the rapid growth of vehicle usage has posed significant challenges to my country's transportation network and the need to create energy-efficient, green, and environmentally friendly transport systems. Furthermore, with the advancement of global positioning technology, sensor networks, and smart mobile devices, massive amounts of redundant trajectory data are stored within these devices. This unused data often holds hidden value. Therefore, fully utilizing traffic trajectory data to extract valuable information for government commercial development, public transportation management, and other areas has become a key concern.

[0003] At the same time, companion vehicle mining plays a crucial role in achieving intelligent transportation. Through various methods and techniques, deep mining of traffic data enables prediction and analysis of a range of scenarios, including future road conditions. This contributes to research on human behavior, transportation logistics, animal behavior, and marketing. With the advent of the big data era, discovering hidden knowledge and "interesting" trajectory patterns from this massive volume of spatiotemporal trajectory data is crucial. For example, identifying trucks with identical trajectory patterns can aid logistics planning, while discovering common sections of commuters' routes can aid public transportation planning. Mining companion patterns is an effective method for analyzing spatiotemporal trajectory patterns, specifically discovering groups of moving objects that move together for a period exceeding a set threshold. Spatiotemporal trajectory companion patterns are a crucial component of spatiotemporal data trajectory patterns and have a wide range of applications, including discovering groups of moving objects with identical or similar motion patterns.

[0004] In recent years, many scholars have conducted extensive research on accompanying vehicle mining models. First, many scholars have proposed different accompanying patterns, using different clustering methods to implement accompanying vehicle mining based on the spatiotemporal constraints of mobile objects. Second, scholars use trajectory space distance functions to measure the similarity between different trajectories and classify accompanying vehicle groups based on trajectory similarity. Examples include trajectory point similarity measurement methods for global matching and trajectory point similarity measurement methods for local matching. Third, scholars have begun studying the processing of streaming traffic data and how to integrate semantic information into spatiotemporal features and use trajectory similarity to measure the similarity between trajectories to mine accompanying vehicles. By adding semantics to trajectory points and vectorizing trajectory similarity across multiple features, accompanying vehicle mining is achieved. Fourth, algorithms for mining frequent accompanying patterns in multiple data streams are used. Companion vehicle mining is achieved by constructing a tree index structure on the trajectory data stream to mine frequent element sets.

[0005] However, existing technologies face the problems of missing trajectory feature data and missing trajectory points. To address this issue, almost all researchers have removed this noisy data during the data preprocessing phase. However, noisy data remains an important component for maintaining the integrity of vehicle trajectory sequences. To address this issue, many researchers have proposed various neural network models to compensate for missing trajectory points. For example, a GRU neural network model is used to model contextual trajectory points in vehicle trajectory sequences, and an attention mechanism is embedded within the model to increase the contribution of different features, thereby compensating for missing trajectory points. An LSTM model is used to model temporal trajectory sequences, learning the correlations between contextual trajectory points. A multi-feature attention mechanism is embedded within the LSTM model to compensate for missing trajectory points in the input trajectory based on the learned model. Similarly, some researchers have used a CNN neural network model for modeling and learning, and introduced an attention mechanism to compensate for missing trajectory points. While these researchers have achieved promising results in the task of classifying vehicles in the same lane, these neural network models can only model forward trajectory sequences. When there are multiple candidate compensation points, selecting a single point for compensation becomes uncertain. Summary of the Invention

[0006] Based on the problems existing in the prior art, the present invention focuses on the heterogeneity and incompleteness of traffic trajectory data, and proposes a method for accompanying vehicle identification based on semantic trajectories, aiming to improve the accuracy of trajectory similarity. First, in order to solve the problem of missing feature data of trajectory points, data completion is achieved by dynamically capturing trajectory sequences with different features. Then, semantic features are introduced into the model, and the potential correlation of trajectory semantic features is captured through the forward and reverse neural networks of the BiLSTM model, thereby compensating for missing trajectory points. This can not only effectively mine the real driving trajectory of the vehicle, but also analyze the behavior pattern of the vehicle. The method comprises the following steps:

[0007] Obtain traffic trajectory dataset and trajectory semantic vocabulary;

[0008] The traffic trajectory dataset includes at least latitude features, longitude features, time features, license plate features, vehicle body color features, vehicle brand features, and vehicle category features; the trajectory semantic vocabulary includes the longitude information, latitude information, and corresponding semantic information of the trajectory access points;

[0009] Processing the traffic trajectory dataset to obtain a vehicle time series trajectory sequence based on different vehicle characteristics;

[0010] A multi-feature matching data completion method is used to complete the trajectory data of the vehicle time series trajectory sequence to obtain a vehicle compensation trajectory sequence;

[0011] Performing feature matching on the trajectory semantic vocabulary and the vehicle compensation trajectory sequence, using the values in the trajectory semantic vocabulary as semantic labels of vehicle trajectory points, and obtaining a semantic trajectory compensation sequence;

[0012] Calculating the inflection point angle of the context trajectory point of the vehicle compensation trajectory sequence, and optimizing the semantic trajectory compensation sequence using the inflection point feature;

[0013] The optimized semantic trajectory compensation sequence is vectorized using a multi-feature vectorization model. The spatial feature vector, temporal feature vector, inflection point feature vector, and semantic feature vector of the semantic trajectory compensation sequence are extracted. Each feature vector is fused to generate a semantic trajectory vector.

[0014] Input the semantic trajectory vector into a bidirectional BILSTM model based on a multi-feature attention mechanism according to the trajectory pair, use the attention mechanism to learn the context trajectory points, and compensate the trajectory points to output the compensated semantic trajectory vector;

[0015] The similarity between the semantic trajectory vectors of different vehicles is calculated, one-hot encoding is performed according to the similarity, and accompanying vehicles of the same category are identified according to the one-hot encoding state.

[0016] Beneficial effects of the present invention:

[0017] This invention addresses trajectory data heterogeneity through two compensation methods: trajectory data completion and trajectory point compensation. This approach improves the performance of accompanying vehicle identification. By identifying accompanying vehicle behavior patterns, it can reflect social development patterns and people's lifestyles. Therefore, this invention can be applied to traffic safety, logistics planning, trajectory clustering, and trajectory route prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a method for identifying accompanying vehicles based on semantic trajectories in an embodiment of the present invention;

[0019] Figure 2 This is a diagram of a dynamic capture mechanism based on trajectory sequences with different trajectory features according to an embodiment of the present invention;

[0020] Figure 3 This is a diagram of the compensation trajectory vectorization mechanism according to an embodiment of the present invention;

[0021] Figure 4 This is a diagram of the semantic compensation trajectory and its trajectory semantic modeling process according to an embodiment of the present invention;

[0022] Figure 5 It is a diagram of the vehicle classification mechanism according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to better illustrate the technical solution of the present invention and make its advantages more concise and clear, the problem to be solved by the present invention will be specifically explained below, and then the specific implementation methods of the present invention will be further described in detail with reference to the accompanying drawings.

[0024] To address the heterogeneity and incompleteness of traffic trajectory data involved in accompanying vehicle identification, the present invention implements accompanying vehicle identification and classification through three steps: semantic trajectory representation, semantic trajectory feature extraction, and semantic trajectory modeling. The following describes the identification method of the present invention with reference to specific embodiments.

[0025] Figure 1 FIG is a flow chart of a method for identifying accompanying vehicles based on semantic trajectories according to an embodiment of the present invention; Figure 1 As shown, the method includes:

[0026] S1, obtain traffic trajectory dataset and trajectory semantic vocabulary;

[0027] S2. Processing the traffic trajectory dataset to obtain a vehicle time series trajectory sequence based on different vehicle characteristics;

[0028] S3, using a multi-feature matching data completion method (Multi Feature Data Completion, MFDC) to complete the trajectory data of the vehicle time series trajectory sequence to obtain a vehicle compensation trajectory sequence;

[0029] S4, performing feature matching on the trajectory semantic vocabulary and the vehicle compensation trajectory sequence, using the values in the trajectory semantic vocabulary as semantic labels of vehicle trajectory points, and obtaining a semantic trajectory compensation sequence;

[0030] S5, calculating the inflection point angle of the context trajectory point of the vehicle compensation trajectory sequence, and optimizing the semantic trajectory compensation sequence using the inflection point feature;

[0031] S6. Use a multi-feature vectorization model to vectorize the optimized semantic trajectory compensation sequence, extract the spatial feature vector, temporal feature vector, inflection point feature vector, and semantic feature vector of the semantic trajectory compensation sequence, and fuse each feature vector to generate a semantic trajectory vector.

[0032] S7. Input the semantic trajectory vector into a bidirectional BILSTM model based on a multi-feature attention mechanism according to the trajectory pair, use the attention mechanism to learn the context trajectory points, and compensate the trajectory points, thereby outputting the compensated semantic trajectory vector;

[0033] S8. Calculate the similarity between the semantic trajectory vectors of different vehicles, perform one-hot encoding based on the similarity, and identify accompanying vehicles of the same category based on the one-hot encoding state.

[0034] In this embodiment of the present invention, in step S1, the trajectory semantic vocabulary is a derived record table of the traffic trajectory dataset, and both constitute the input of the entire model. In this embodiment of the present invention, the traffic trajectory dataset includes at least latitude features, longitude features, time features, license plate features, vehicle body color features, vehicle brand features, and vehicle type features; the trajectory semantic vocabulary includes the longitude and latitude information of the trajectory access points, as well as the corresponding semantic information.

[0035] The traffic trajectory dataset can record information such as the vehicle license plate, the vehicle's latitude and longitude positioning, the vehicle's body color, and the vehicle's brand. The record details of each vehicle can be expressed as formula (1), and the entire traffic trajectory dataset is shown by formula (2).

[0036] C V (i)={V id (i),V lat (i),V lng (i),V t (i),V c (i),V ca (i)} (1)

[0037] C V ={C V (1),C V (2),…,C V (n)} (2)

[0038] Among them C V (i), i∈(1, 2, ..., n) represents the vehicle trajectory point data recorded in the i-th row of the traffic trajectory dataset; n represents the length of the traffic trajectory dataset; V id (i), V lat (i), V lng (i), V t (i), V c (i), V ca (i) represents the license plate feature, latitude feature, longitude feature, time feature, vehicle body color and vehicle category feature of the vehicle trajectory point data recorded in the i-th row.

[0039] The trajectory semantic vocabulary is constructed by reading the coordinate information of the trajectory access points through the POI (Point of Information) operation. The trajectory semantic vocabulary records the semantic information of the longitude and latitude of all trajectory access points. The trajectory semantic vocabulary can be expressed as follows:

[0040] C s (i)={V lat (i),V lng (i),V se (i)} (3)

[0041] C s ={C s (1),C s (2),…,C s (n)} (4)

[0042] Among them C s (i), i∈(1, 2, ..., n) represents the semantic information of the i-th row of the trajectory semantic vocabulary; n represents the length of the trajectory semantic vocabulary; V lat (i), V lng (i), V se (i) represents the longitude, latitude and semantic label features in the semantic information of the i-th row respectively.

[0043] In the embodiment of the present invention, in step S2, the traffic trajectory dataset has multiple different features, so a vehicle time series trajectory sequence can be generated according to different vehicles; specifically:

[0044] Use the time feature as the index and the license plate feature as the query condition to obtain the license plate trajectory sequence:

[0045]

[0046] Among them, i represents the vehicle with the i-th license plate in the data set; represents the trajectory sequence of the license plate of the i-th vehicle; P j represents the jth trajectory access point of the trajectory sequence for the license plate, where j∈(1,2,…,n).

[0047] Using time features as indexes, and body color features and brand features as query conditions to obtain the trajectory sequence of vehicle attributes;

[0048]

[0049] in, represents the trajectory sequence of the i-th vehicle's attached attributes, P j represents the jth trajectory access point of the trajectory sequence for the license plate, where j∈(1,2,...,m).

[0050] In an embodiment of the present invention, Figure 2 This is a diagram of a dynamic capture mechanism based on a trajectory sequence with different trajectory features according to an embodiment of the present invention, such as Figure 2As shown, in step S3, the vehicle time sequence trajectory sequence generated in step S2 and Perform global matching of trajectory points and use the dynamic matching algorithm between trajectories to complete the trajectory data in a dynamic capture manner to obtain the vehicle compensation trajectory sequence T com .

[0051] T com ={T1,T2,…,T N} (7)

[0052] T i ={V id (i),V lat (i),V lng (i),V t (i)} (8)

[0053] Where T i represents the i trajectory points of the vehicle compensation trajectory sequence; N represents the length of the vehicle compensation trajectory sequence; V id (i), V lat (i), V lng (i), V t (i) represents the license plate, latitude, longitude and time features of the i-th trajectory point.

[0054] The MFDC algorithm primarily addresses missing data for vehicle trajectory points. Missing trajectory point data can lead to mismatches between vehicle sequences and actual trajectory data, affecting trajectory similarity calculations. The basic principle of the MFDC algorithm is to obtain trajectory sequences based on different vehicle features. By dynamically matching the trajectory points of different trajectory sequences, the algorithm can complete trajectory point data for features such as the vehicle license plate, effectively addressing the problem of data heterogeneity between trajectories.

[0055] In an embodiment of the present invention, in step S4, feature matching is performed based on the already constructed trajectory semantic vocabulary and the longitude and latitude in the trajectory compensation sequence, that is, feature matching is performed between the longitude and latitude information in the trajectory semantic vocabulary and the latitude and longitude features in the vehicle compensation trajectory sequence. Here, the longitude and latitude information in the trajectory semantic vocabulary and the longitude and latitude information in the vehicle compensation trajectory sequence can be matched one by one. When the longitude and latitude information are successfully matched, it indicates that the trajectory points of the two are the same trajectory points. The semantic information value of the trajectory semantic vocabulary can be assigned to the semantic label of each vehicle trajectory point in the vehicle compensation trajectory sequence to generate a semantic trajectory compensation sequence for the vehicle compensation trajectory sequence. Therefore, the semantic trajectory compensation sequence is represented as T s :

[0056] T s ={T1,T2,…,T N} (9)

[0057] T k ={V id (k),V lat (k),V lng (k),V t (k),V s (k),V T (k)} (10)

[0058] Where T k represents the k trajectory points of the semantic trajectory sequence; N represents the length of the semantic trajectory sequence; V s (k) represents vehicle V id (k) Semantic label features of trajectory sequence. V T (k) represents vehicle V id (k) Trajectory inflection point characteristics of trajectory sequence.

[0059] In the embodiment of the present invention, in step S5, according to the vehicle compensation trajectory sequence T obtained in the previous step, com , by calculating T com The inflection point angle Θ(i) of the context trajectory point in the network can be used to construct the road network inflection point record table C T ,This road network turning point record table can be used to optimize the ,semantic trajectory compensation sequence.

[0060]

[0061]

[0062]

[0063]

[0064] C T (j) = {V lat (j),V lng (j),V T (j)} (15)

[0065] C T ={C T (1),C T (2),…,C T (N)} (16)

[0066] Where i∈(1,2,…,T), T represents the number of trajectory points in the vehicle compensation trajectory sequence; |N i-1 N i | represents the distance between trajectory point i-1 and trajectory point i, |N i+1 N i|The distance between trajectory point i+1 and trajectory point i, |N i-1 N i+1 |The distance between trajectory point i-1 and trajectory point i+1; N i-1 (x i-1 ,y i-1 ), N i (x i ,y i ), N i+1 (x i+1 ,y i+1 ) represents the context trajectory point and its longitude and latitude; j∈(1,2,…,N), N represents the length of the compensation trajectory sequence; V lat (j), V lng (j), V T (j) represents the latitude, longitude and inflection point characteristics of the trajectory point;

[0067] It can be understood that in the embodiment of the present invention, by introducing inflection point features into the spatial features of the semantic trajectory points, the trajectory points simultaneously have spatial features, temporal features, inflection point features and semantic features. Therefore, the semantic trajectory compensation sequence at this time can be used as an optimized semantic trajectory compensation sequence with inflection point features.

[0068] In the embodiment of the present invention, in step S6, the present invention constructs an AT2Vec model to extract semantic trajectory features. The model is mainly divided into four modules, namely semantic feature extraction, spatial feature extraction, inflection point feature extraction, and time feature extraction. Considering the multiplicity of features of semantic trajectories and the diversity of data types, the vectorization of semantic trajectories is achieved by constructing word embedding vectors with different features, such as Figure 3 As shown, the details are as follows:

[0069] Spatial feature extraction. lat and longitude V lng The spatial features composed of the grid method are discretized to obtain the position code V of the semantic compensation trajectory points on the spatial grid. sp Among them, the grid tolerance value d lat , d lng It is determined by the maximum spatial span in the dataset and the length of the trajectory sequence, as shown in Equation (16).

[0070]

[0071] Where Δd lat , Δd lng Respectively represents the latitude tolerance value and longitude tolerance value of the grid. max , lng maxIndicates the maximum and minimum longitude values of all track access points. lat max ,lat min Represents the maximum and minimum latitude grids among all trajectory access points, and the grid value corresponding to the inflection point is used as the position code V sp Then all semantic trajectory sequences T s The spatial position encoding features are input into the skipGram spatial feature embedding model, and each grid cell is vectorized by maximizing formula (18).

[0072]

[0073] Where N is the length of the trajectory; w is the size of the sliding window; c t+j Represents cell c of the current sliding window j t The adjacent cells of , and the probability of the adjacent cells can be calculated by the softmax function, expressed as:

[0074]

[0075] Where c j Indicates the current cell c i The trajectory context cell; v represents the vector of the cell; thus realizing the spatial feature embedding f of the trajectory sp .

[0076]

[0077] Where, It represents the feature vector representation after the skipGram algorithm embeds the spatial features of the semantic trajectory sequence into words, where Represents any trajectory T s The spatial feature vector of the k-th trajectory visit point in .

[0078] For the time feature, time slicing is used to map the timestamp of the semantic trajectory point to the time unit for discretization, and the position code V of the semantic trajectory point on the time unit is obtained. t .

[0079]

[0080] Where δ t Represents the time span of all trajectory sequences; m represents the maximum number of trajectory access points in all compensation trajectory sequences. Then all semantic trajectory sequences T s The timestamp position encoding feature is input into the skipGram temporal feature embedding model. Therefore, we get T s The time feature vector f t .

[0081]

[0082] In the formula The temporal feature vector representing the kth trajectory access point in the semantic trajectory sequence.

[0083] People's daily activities can be divided into nine different attributes: transportation hubs, commercial places, administrative districts, small consumer places, sports venues, schools, offices, check-in places, and rest areas. The Glove model learns the vector expression of semantic labels and learns the optimal vector expression by minimizing the loss function of the Glove model. It is expressed as:

[0084]

[0085] Where w i ,w k Represents the word vector of keyword i, j; b i ,b k represents the bias term; f is the weight function; for the semantic feature V s As the input of the model, the word embedding is performed through the Glove model to obtain the vector V of the semantic feature s . Thus we get T s The semantic feature vector f s .

[0086]

[0087] In the formula Represents the semantic feature vector of the kth trajectory access point in the semantic trajectory sequence.

[0088] According to the trajectory inflection point feature, the semantic trajectory sequence T s The trajectory inflection point features are input into the skipGram inflection point feature embedding model to obtain T s The inflection point eigenvector f T .

[0089]

[0090] In the formula Represents the inflection point feature vector of the kth trajectory access point in the semantic trajectory sequence.

[0091] After the above features are vectorized, semantic feature fusion is achieved through semantic feature vector concatenation. Therefore, the semantic trajectory T s Any trajectory point T in k After word embedding, the semantic trajectory vector T s T in k Vector representation:

[0092] T k =contact(f t (k),f s (k),f sp (k),f T (k)) (26)

[0093] T s ={T1,T2,…,T N} (27)

[0094] Where, T s The representation vector representing the semantic trajectory sequence; T k Indicates T s The semantic feature vector of the kth trajectory access point in , where k∈(1, 2, ..., N); contact() represents an equidistant vector connector; f s (k), f t (k), f sp (k), f T (k) represents the semantic feature vector, time feature vector, spatial feature vector, and inflection point feature vector of the k-th trajectory access point respectively.

[0095] In an embodiment of the present invention, in step S7, a model needs to be constructed to extract semantic trajectory vectors that have been compensated for trajectory points and have feature influence. The model of the present invention is based on the seq2seq model and is composed of a bidirectional BILSTM in its encoder and decoder parts. The low-sampling semantic trajectory vector and the corresponding high-sampling semantic trajectory vector constitute a trajectory pair, the low-sampling semantic trajectory vector is used as the encoder input, and the high-sampling semantic trajectory vector is used as the decoder input. The goal is to learn the low-sampling semantic trajectory vector by minimizing the reconstruction error of the corresponding high-sampling semantic trajectory vector; by mining the correlation between the spatiotemporal, semantic, and inflection point features of the context trajectory points, an intermediate vector of the TP-BILSTM model is constructed. At the same time, an attention mechanism is introduced for the spatiotemporal, semantic, and inflection point features to focus on the influence of different features on the calculation of trajectory similarity, such as Figure 4 shown.

[0096] By s Perform trajectory vector point sampling to obtain low-sampling trajectory vector T sl , the semantic trajectory vector T s As the high-sampling trajectory vector T sh . sl As the input of the BiLSTM neural network model as the encoder, T sh The BiLSTM neural network model is used as the output of the decoder to train the TP-BiLSTM neural network model.s (k), f t (k), f sp (k), f T (k) Learn the dependencies between context trajectory points and obtain the intermediate vector T that maps the input low-sampled trajectory vector to the output true trajectory vector m . The intermediate vector T m It is formed by concatenating the hidden layer matrix α of the encoder BiLTSM model and the hidden layer matrix β of the decoder BiLTSM model.

[0097]

[0098] Considering T sl After the semantic trajectory vector is compressed to a fixed length, the semantic vector information is partially distorted and trajectory compensation is achieved. Therefore, the multi-feature attention mechanism MT-Attention is introduced in the encoder encoder stage. sl Encode to get Encoding vector, given The algorithm takes an input and maps its time, space, semantics and inflection points into three high-dimensional spaces Q, K, and R weight matrices. The dependencies between the time, space, semantics and inflection points of the trajectory points are mined through the three high-dimensional spaces.

[0099] The specific implementation method of the multi-feature attention mechanism uses the hidden state and memory unit state value of the previous layer of neural network to calculate the cell state at the current moment to calculate the feature weight matrix value ω ij , and then normalize the weight values through the softmax function:

[0100] ω tj =β1tanh(Ξ (1) [h t-1 ,q t-1 ]+Ξ (2) T(.,j)+α1) (29)

[0101]

[0102] Among them, T(.,j) represents the three-dimensional feature vector of the j-th trajectory access point extracted from the trajectory feature matrix in the trajectory multi-feature attention mechanism. Represents the parameter matrix learned by the model; d represents the dimension of the feature factor. Finally, according to the weight value ω ij and trajectory feature matrix T s Calculate the attention matrix E of the spatiotemporal, semantic and inflection point features of the semantic trajectory p .

[0103] T(i,.)={T(i,1)α t1 ,T(i,2)α t2 ,…,T(i,T)α tT} (31)

[0104] E p ={T(1,.),T(2,.),…,T(4d,.)} (32)

[0105] Where T(n,.) represents the nth row vector representation of the attention embedding matrix. T(i,j),j∈(1,2,…,T) represents the i-th row and j-th column element of the attention embedding matrix.

[0106] After building the MT-Attention mechanism, the target sampling trajectory T sl As the input of the encoder, the intermediate vector T m Convert it into the true trajectory vector T sh This solves the problem of inaccurate mining of accompanying vehicles based on trajectory similarity caused by missing trajectory points, and realizes trajectory compensation.

[0107] The TP-BILSTM model is built on the seq2seq model. It encodes the input low-sampled semantic trajectory vector and embeds MT-Attention to enhance the semantic feature vector. The learned contextual intermediate vector is then used as the decoder input. The decoder then calculates the new semantic trajectory vector using the previous output value and the previous recursive state. It is worth noting that both the encoder and decoder utilize BILSTM neural network models during training. In the encoder, the BILSTM model, embedded with a multi-feature attention mechanism, uses forward and backward neural networks to focus on learning the forward semantic feature relationships and the contextual relationships of the backward semantic features of the low-sampled semantic trajectory vector. The extracted feature vector is then used as the encoder output. MT-Attention is embedded in the encoder output vector to enhance the influence of the semantic features on trajectory similarity. In the decoder, the high-sampled semantic trajectory vector is used as the BILSTM model input. The contextual relationships of the vector are learned through forward and backward neural networks, and the learned vector is used as the encoder's learning target to construct the contextual intermediate vector of the TP-BILSTM model. In the testing phase, the low-sampled semantic trajectory vector T sl As the input of the TP-BILSTM model, it first passes through the multi-feature attention matrix E p Strengthen the influence of feature factors, and then use the context intermediate matrix T with spatiotemporal and semantic relevance m Generate semantic trajectory vector Tsh , the generated T sh It is the semantic trajectory vector after the low-sampling trajectory is compensated by the trajectory points. In order to distinguish the representation of the semantic trajectory vectors of different vehicles, this paper uses T sh by Similarly, the remaining semantic trajectory vectors are also used as the position sampling trajectory input of the TP-LSTM model, and the input is mapped into the compensated semantic trajectory vector according to the above description.

[0108] In the embodiment of the present invention, in step S8, as Figure 5 As shown, it is necessary to obtain the semantic trajectory vectors of different vehicles First, the semantic trajectory vectors of each vehicle Normalize the data and use the Manhattan method or other similarity distance algorithms to calculate the similarity between the trajectory semantic vectors of different vehicles, and finally achieve the task of identifying and classifying accompanying vehicles.

[0109]

[0110] Where i represents the output node number of the softmax layer; N is the dimension of the input vector; TSM(i) represents the output value of the input vector after normalization. Therefore, the normalized trajectory vector can be expressed as follows:

[0111]

[0112] in Represents the trajectory vector with id as the license plate number The normalized vector represents the kth trajectory point of the vehicle whose id is the license plate number; Represents the normalized output value of the temporal, spatial, and semantic features of trajectory point k.

[0113] Therefore, the similarity distance between normalized trajectory vectors can be expressed by the following formula:

[0114]

[0115] Among them, T i , T j represents trajectory i and trajectory j; N represents T i , T j The longest trajectory points.

[0116] According to the similarity d(T i ,T j) draws a heat map. Using license plate numbers as the horizontal and vertical coordinates of the heat map, the similarity between vehicle trajectories is visualized. Accompanying vehicles can be identified by the degree of similarity reflected in a row or column of the heat map.

[0117] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying accompanying vehicles based on semantic trajectories, characterized in that: The method comprises: Acquire a traffic trajectory dataset and a trajectory semantic vocabulary; the traffic trajectory dataset includes at least latitude features, longitude features, time features, license plate features, vehicle body color features, vehicle brand features, and vehicle category features; the trajectory semantic vocabulary includes longitude information, latitude information, and corresponding semantic information of trajectory access points; Processing the traffic trajectory dataset to obtain a vehicle time series trajectory sequence based on different vehicle characteristics; A multi-feature matching data completion method is used to complete the trajectory data of the vehicle time series trajectory sequence to obtain a vehicle compensation trajectory sequence; Performing feature matching on the trajectory semantic vocabulary and the vehicle compensation trajectory sequence, using the values in the trajectory semantic vocabulary as semantic labels of vehicle trajectory points, and obtaining a semantic trajectory compensation sequence; Calculating the inflection point angle of the context trajectory point of the vehicle compensation trajectory sequence, and optimizing the semantic trajectory compensation sequence using the inflection point feature; The optimized semantic trajectory compensation sequence is vectorized using a multi-feature vectorization model. The spatial feature vector, temporal feature vector, inflection point feature vector, and semantic feature vector of the semantic trajectory compensation sequence are extracted. Each feature vector is fused to generate a semantic trajectory vector. Input the semantic trajectory vector into a bidirectional BILSTM model based on a multi-feature attention mechanism according to the trajectory pair, use the attention mechanism to learn the context trajectory points, and compensate the trajectory points to output the compensated semantic trajectory vector; The similarity between the semantic trajectory vectors of different vehicles is calculated, one-hot encoding is performed according to the similarity, and accompanying vehicles of the same category are identified according to the one-hot encoding state.

2. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: The vehicle time series trajectory sequence is completed with trajectory data using a multi-feature matching data completion method, including obtaining a license plate trajectory sequence using the time feature as an index and a license plate feature as a query condition, and obtaining a vehicle attribute trajectory sequence using the time feature as an index and body color features and vehicle brand features as query conditions; performing global matching on the license plate trajectory sequence and the vehicle attribute trajectory sequence, completing trajectory data through dynamic capture, and obtaining a vehicle compensation trajectory sequence.

3. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: Performing feature matching on the trajectory semantic vocabulary and the vehicle compensation trajectory sequence, using the values in the trajectory semantic vocabulary as semantic labels of vehicle trajectory points, and obtaining the semantic trajectory compensation sequence includes performing feature matching on the longitude and latitude information of the trajectory semantic vocabulary with the latitude features and longitude features of the vehicle compensation trajectory sequence, using the semantic information values in the trajectory semantic vocabulary as semantic labels of each vehicle trajectory point in the vehicle compensation trajectory sequence, and generating a semantic trajectory compensation sequence for the vehicle compensation trajectory sequence.

4. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: The inflection point angle of the context trajectory point of the vehicle compensation trajectory sequence is calculated, and the inflection point feature is used to optimize the semantic trajectory compensation sequence, including introducing the inflection point feature into the spatial feature of the semantic trajectory point to generate a semantic trajectory compensation sequence with the inflection point feature.

5. The accompanying vehicle identification method based on semantic trajectory according to claim 1 or 4, characterized in that: The calculation formula of the inflection point angle of the context trajectory point of the vehicle compensation trajectory sequence is expressed as: Where Θ(i) represents the inflection point angle of trajectory point i, i∈(1,2,…,T), T represents the number of trajectory points in the vehicle compensation trajectory sequence; |N i-1 N i | represents the distance between trajectory point i-1 and trajectory point i, |N i+1 N i |The distance between trajectory point i+1 and trajectory point i, |N i-1 N i+1 |The distance between trajectory point i-1 and trajectory point i+1.

6. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: The optimized semantic trajectory compensation sequence is vectorized using a multi-feature vectorization model. This involves discretizing spatial features using a grid method to obtain the position encoding of the semantic trajectory points on the spatial grid. The position encoding of the spatial grid in the semantic trajectory compensation sequence is input into the skipGram spatial feature embedding model, which vectorizes the grid cells and maps the contextual features of the semantic trajectory points to the spatial cells, thereby extracting the spatial feature vector of the semantic trajectory compensation sequence. Time slicing is used to map the timestamps of semantic trajectory points to time cells for discretization, obtaining the position encoding of the semantic trajectory points in the time cells. The position encoding features of the timestamps in the semantic trajectory compensation sequence are input into the skipGram temporal feature embedding model to obtain the temporal feature vector of the semantic trajectory compensation sequence. The user's daily life activities are divided into multiple attributes, and different attributes are used as corresponding semantic labels. Each semantic label is input into the Glove model to learn the vector expression of the semantic label, thereby obtaining the semantic feature vector of the semantic trajectory compensation sequence. The inflection point features of the semantic trajectory compensation sequence are input into the skipGram inflection point feature embedding model to obtain the inflection point feature vector.

7. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: The process of compensating trajectory points includes taking the semantic trajectory vector as a high-sampling trajectory vector, sampling the semantic trajectory vector to obtain a low-sampling trajectory vector; taking the trajectory pair of the low-sampling trajectory vector as the encoder input of the bidirectional BILSTM model, using the multi-feature attention mechanism to learn contextual trajectory points with feature influence, using the learned contextual trajectory points to compensate the trajectory points, and using the trajectory pair of the compensated low-sampling trajectory vector as the decoder output of the bidirectional BILSTM model; training a bidirectional BILSTM neural network model based on the multi-feature attention mechanism by optimizing the distance between the compensated low-sampling trajectory vector and the high-sampling trajectory vector; and using the trained bidirectional BILSTM neural network model based on the multi-feature attention mechanism to compensate all trajectory points of the semantic trajectory vector and update the semantic trajectory vector.

8. The accompanying vehicle identification method based on semantic trajectory according to claim 1, characterized in that: The calculation of the similarity between the semantic trajectory vectors of different vehicles includes normalizing the semantic trajectory vectors processed in the bidirectional BILSTM model based on the multi-feature attention mechanism, calculating the similarity between the semantic trajectory vectors of different vehicles using a similarity algorithm; performing one-hot encoding on the similarity between the current vehicle and the target vehicle, and identifying the target vehicle as the accompanying vehicle of the current vehicle when the similarity of a row or a column of the heat map exceeds a preset threshold.