CN112766339A - Trajectory recognition model training method and trajectory recognition method - Google Patents
Trajectory recognition model training method and trajectory recognition method Download PDFInfo
- Publication number
- CN112766339A CN112766339A CN202110029664.0A CN202110029664A CN112766339A CN 112766339 A CN112766339 A CN 112766339A CN 202110029664 A CN202110029664 A CN 202110029664A CN 112766339 A CN112766339 A CN 112766339A
- Authority
- CN
- China
- Prior art keywords
- track
- neural network
- trajectory
- vector
- recurrent neural
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 84
- 238000012549 training Methods 0.000 title claims abstract description 38
- 239000013598 vector Substances 0.000 claims abstract description 76
- 238000013528 artificial neural network Methods 0.000 claims abstract description 61
- 230000000306 recurrent effect Effects 0.000 claims abstract description 35
- 238000004364 calculation method Methods 0.000 claims abstract description 7
- 238000011156 evaluation Methods 0.000 claims abstract description 7
- 230000015654 memory Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 11
- 230000007246 mechanism Effects 0.000 description 8
- 238000013135 deep learning Methods 0.000 description 6
- 230000004913 activation Effects 0.000 description 5
- 230000001537 neural effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 210000004027 cell Anatomy 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 241000288105 Grus Species 0.000 description 1
- 238000007476 Maximum Likelihood Methods 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 241000724291 Tobacco streak virus Species 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Databases & Information Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Remote Sensing (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a trajectory recognition model training method and a trajectory recognition method. The model training method comprises the following steps: s1, encoding target track data into track semantic vectors in a mode of constructing corpus pairs based on the one-hot coded vectors; s2, constructing a recurrent neural network for evaluating the track semantic vector and a classifier for classifying the evaluation result; and S3, training the recurrent neural network and the classifier by using the marked track data. In the track identification method, a new track semantic vector calculation method is adopted, and track segments with indefinite length can be projected into a vector space with definite length. By adopting the model training method, the network can learn the track characteristics of different categories, and the track categories are identified by the recurrent neural network.
Description
Technical Field
The invention relates to the field of computers, in particular to processing and recognition of motion trajectory data.
Background
A trajectory is a series of data that records and describes the path of motion of an object. The trajectory recognition problem is a recognition problem that analyzes and presumes information such as the identity, category, intention, and the like of a target based on a captured motion trajectory of the target. The existing track recognition algorithm comprises a track recognition method based on clustering, a track recognition method based on sequence modeling and a track recognition method based on deep learning.
The track identification method based on clustering mainly comprises the methods of DTW (Dynamic Time Warping), EDR (Edit Distance on Real sequence) and the like, and the method mainly has the main idea that the similarity degree between different tracks is calculated by designing a calculation function for measuring the similarity of track data, and the similar tracks are clustered to achieve the track division effect, so that different types of tracks are identified.
The track recognition method based on sequence modeling mainly comprises methods such as an HMM (Hidden Markov Model), a CRF (Conditional Random Field) and the like, and the method mainly comprises the steps of modeling track data by using mathematical models such as a Random process and the like, adding classification information of a track to be recognized into a Model as modeling parameters, performing Model parameter tracks by using the existing track data marked with identity information, estimating parameters of the HMM and the C RF Model by using a maximum likelihood estimation method, and obtaining track identity information by using the parameter information.
The track recognition method based on deep learning is an end-to-end track recognition method, and comprises TULER (track-User Link on Embedding recovery Neural Networks), TULVAE (track-User Link on Auto Encoding variation) and the like, wherein input data of the method is original track data, and output is a recognition result of track identity. The track recognition method based on deep learning generally models tracks based on a recurrent neural network, wherein the recurrent neural network is a recurrent neural network which recurs in the evolution direction of a sequence and all nodes (recurrent units) are connected in a chain manner, and the method is characterized in that the network has memorability and network parameters are shared, so the method is widely applied to the processing of sequence data. The track identification method based on deep learning utilizes a large number of marked track data sets to carry out parameter estimation (namely network training) of a network model, and can directly carry out track identification by utilizing the trained network model.
Due to the particularity of the track data, namely the track data is indefinite in length and contains time and space information, and the distribution of track points on the space has obvious randomness, the characteristics enable the existing track identification method to have defects on track identification tasks, and the method is specifically embodied as follows:
the track identification method based on clustering faces the following problems: in an original space, the track data has the characteristics of large inter-class distance and difficult estimation of inter-class distance, so that the recognition accuracy of the track recognition task based on the clustering track recognition method is low, and the robustness of the algorithm is not high. Clustering-based trajectory recognition methods typically work well on one type of data, and recognition accuracy on other trajectory data can fluctuate widely.
The method based on sequence modeling has the problems that the modeling difficulty is high, due to the fact that the real track data features are many, the factors which can be considered by a sequence model are few, great challenges are brought to the sequence modeling, different sequence models need to be established according to specific application scenes and rules, and the generalization capability of the models is poor.
The method based on the deep neural network has the problems that the neural network has memory disappearance when the track length is too long, namely the neural network forgets information of an earlier track segment, and the track recognition method based on the deep neural network does not consider that the influences of different track points in the track on track recognition results are different, so that the track recognition method based on the deep learning has poor performance under certain data sets.
Disclosure of Invention
The invention aims to provide a trajectory model training method based on an attention mechanism and a corresponding trajectory identification method aiming at the problems.
Before describing the technical scheme of the invention, firstly, the definition of the track is given: a trajectory is a sequence of geographic points that record the movement of a human or other object, such as an animal, hurricane, and vehicle. The general trajectory has three key elements: target information, temporal information, and spatial information, in the form of: t { < u, T {1,p1>,<u,t2,p2>,…<u,tn,pn> -, where u is the record target identification, t is the time stamp of the record, and p is the location information of the record. In some cases, such as radar systems, the identity of the target is unknown, which is referred to as an anonymous trajectory. In a real world dataset, the location may be coordinates of latitude and longitude, or may be a point of interest, such as a park, a restaurant, etc. A track composed of points of interest is also referred to as a check-in based track. In the present invention, a check-in based trajectory dataset is used as a basic input.
In one aspect, the present invention provides a trajectory recognition model training method, including:
s1, encoding target track data into information encoding in a vector form by constructing a corpus pair based on a single hot encoding vector;
s2, constructing a recurrent neural network for encoding and converting the information into track semantic vectors and a classifier for classifying tracks based on the track semantic vectors;
and S3, training the recurrent neural network and the classifier by using the marked track data.
In a preferred implementation, the step S1 includes:
s1.1, carrying out vector-form one-hot coding on each track point in target track data;
s1.2, extracting adjacent track information of each track point and forming a corpus pair by the track point information;
s1.3, constructing a learning network for track point information coding, taking the corpus pair as the input of the learning network, and taking the output layer parameters of the learning network as the information coding of the corresponding track point.
In another preferred implementation, the method further comprises temporally slicing the target trajectory data.
In another preferred implementation, the step S2 includes: and classifying the corresponding track based on the evaluation result of the track semantic vector by utilizing the multilayer perceptron.
In another preferred implementation, the step S2 includes:
s2.1, calculating a track semantic vector based on a recurrent neural network;
s2.2, establishing a trajectory semantic vector reevaluation model based on attention;
and S2.3, recalculating the track semantic vector by using the track semantic vector obtained in the step S2.1 and the track semantic vector reevaluation model constructed in the step S2.3.
In another preferred implementation manner, in the track semantic vector calculation process of step S2.1, the method further includes: and randomly erasing a plurality of neural network units in the recurrent neural network according to a certain proportion.
In another preferred implementation, the recurrent neural network unit is a long-short term memory network, a gated neural unit, or a bidirectional long-short term memory network.
In another aspect, the present invention provides a method for performing trajectory recognition using a model trained by the method, including: and substituting the track data to be recognized as target track data into the trained recurrent neural network and the corresponding classifier for recognition.
In another aspect, the invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described above.
In another aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program capable of running on the processor, wherein the processor implements the method described above when executing the program.
Technical effects
The trajectory recognition model training method and the corresponding trajectory recognition method adopt a new trajectory semantic vector calculation mode, and can project trajectory sections with indefinite lengths into a vector space with definite lengths, so that the original trajectory data with poor recognition effect through a recurrent neural network can be converted into trajectory data which can be effectively recognized through the recurrent neural network.
The track recognition model can learn track characteristics of different categories through training, and track categories are recognized through a recurrent neural network.
According to the method, an attention mechanism is introduced, the weights of different track points can be learned in a self-adaptive manner, the influence of important points is highlighted, the influence of non-important points is weakened, and the precision of track identification is remarkably improved due to the consideration of the weight influence of different track points.
Drawings
The invention is illustrated and described only by way of example and not by way of limitation in the scope of the accompanying drawings, in which:
fig. 1 is a flowchart of an estimation and identification method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a neural network structure used in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions, design methods, and advantages of the present invention more apparent, the present invention will be further described in detail by specific embodiments with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The principles and embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Since the training method of the model and the recognition method of the trajectory are only different from the input data for the recurrent neural network, they are described together here.
As shown in fig. 1, the method for model training and trajectory recognition based on the attention-cycle neural network of embodiment 1 includes the following steps:
step 1: spatiotemporal trajectory data is obtained from a database.
And reading the track data from the database and temporarily storing the track data into a memory or a file.
Step 2: and (4) preprocessing data.
And carrying out preprocessing work such as denoising and duplicate removal on the original track data.
And step 3: and (6) slicing the data.
And performing re-slicing processing on the track data. The track data is collected, wherein the track is generally recorded by day, which may cause the situation that the irrelevant track position points are divided into a complete track. To solve this problem, in the present embodiment, the original trajectory is subdivided into subsequences at time intervals (e.g., 4 hours, 6 hours, 8 hours), each of which contains trajectory data within one sub-period.
And 4, step 4: and encoding track point information.
Deep neural networks have difficulty processing trajectories in terms of latitude and longitude. Therefore, in the present invention, each track location point is represented by a fixed-dimension vector v, and this location point is called a check-in location point. The sign-in position points learn context semantic information in an embedding mode, and vector representation of the position points is obtained. The advantage of converting location points into embedded vectors is that location points with similar semantics in geographic space are mapped into similar vectors in vector space, so in the process, the semantic information of the real world is expressed in the track point vector.
In this embodiment, the vector representation of the location point is calculated as follows:
4.1. and carrying out unique hot coding on the track points. Assume that the set of trace points included in all traces is (p)1,p2,…,pn) Then, each trace point is separately encoded with a 1 xn-dimensional vector, and the trace point with index i is encoded with a unique code of [0,0, … 1, … 0, 0%]Where "1" is at the ith position and the remainder are 0, the symbol l (p) is usedi) Represents piThe one-hot encoding of (1).
4.2. And extracting context information of the track points and establishing a corpus pair. For each track point, selecting the original pointThe front k points and the back k points adjacent to the track point in the track form a corpus pairWherein p isiIs the selected central track point of the central track,is the set of adjacent trace points.
4.3. And (5) constructing a learning network and learning the information codes of the track points. In one implementation, a neural network having a structure as shown in fig. 2 is used as a learning network for track point information encoding, and the network comprises a three-layer network structure: an input layer, a projection layer and an output layer, wherein the input layer comprises p in the corpus pair, the projection layer adds the vectors of the input layer and performs linear transformation once, namely multiplying the vectors by a parameter W and adding an offset b, and the output layer is p in the target corpus pairi. The input and output of the learning network both use the one-hot coding of the trace points. Utilizing the steps
4.2, training the neural network by the linguistic data pairs constructed in the step 2, wherein each linguistic data pair is used as a group of training data, and the training enables the neural network to converge.
4.4 after the training of the learning network is finished, inputting target track data, extracting parameters of an output layer of the learning network to be used as information codes of track points, and using v (p)i) And (4) showing.
And 5: and calculating a track semantic vector based on the recurrent neural network.
After the position points are mapped into vectors, the problem of track with indefinite length needs to be solved. In this embodiment, a cyclic neural network (RNN) based model is used to encode the whole trace into a Vector, which is called a Track Semantic Vector (TSV). RNNs are a class of artificial neural networks, the connections between nodes forming a directed graph along a time series. It allows the model to show temporal dynamic behavior. Unlike feed-forward neural networks, RNNs can process input sequences with their internal states (memory). Three RNN variants can be used including: long and Short Time Memory (LSTM), a Gating Recursion Unit (GRU) and a Bidirectional Recursion Neural Network (BRNN) are used for calculating the track vector.
In this embodiment, LSTM is used for track semantic vector evaluation. A general LSTM unit consists of an input gate, an output gate, and a forgetting gate. The LSTM cell memorizes values at arbitrary time intervals, and the three gates regulate the flow of information into and out of the cell. The LSTM is designed to address the problem of explosion and vanishing gradients that may be encountered in conventional RNN training. For each sub-track T ═ l obtained after slicing1,l2,…,lkLet ht-1Representing the last state, h representing the current state, htRepresenting candidate states and encoding v (p) the information of the trace points obtained in step 4i) Substitution, and then recursive evolution using the following recursion formula:
ft=σg(Wfv(pt)+Ufht-1+bf)
it=σg(Wiv(pt)+Uiht-1+bi)
ot=σg(Wov(pt)+Uoht-1+bo)
ct=ft°ct-1+it°σc(Wcv(pt)+Ucht-1+bc)
ht=ot°σh(ct)
during the training process, the initial value is c00 and h00, operator ° denotes a Hadamard product (elementary product). In addition, in the above formula, subscript t indexes time step; v (p)t) Is the input vector of the LSTM unit; f. oftIs the activation vector of the forgetting gate; i.e. itIs the activation vector that updates the gate; otIs the activation vector of the output gate; h istIs a hidden state vector, also called the output vector of the LSTM unit; c. CtIs the state vector of the LSTM unit; w, U and b are weight matrix and deviation vector parameters that need to be learned during trainingLearning; sigmagIs a sigmoid function; sigmacIs a hyperbolic tangent function; sigmahIs a hyperbolic tangent function. In this way, the RNN output after each recursive iteration is obtained. The average of each output is then used to evaluate the trajectory semantic vector, as shown below.
In this embodiment, the track semantic vector output formula is as follows:
step 6: and calculating the attention score.
In step 5 above, how to encode the track into a vector and further obtain a track semantic vector is described in detail, so as to associate the track with the identification information.
In the prior art, for the recurrent neural network, a softmax function is generally used for classification, wherein a loss function L can be calculated as an equation.
L=cross_entropy(user,softmax(TSV))
However, there are two problems in directly judging the track category using the track semantic vector as feature information: (1) when the trajectory is too long, the original trajectory will contain noise points, but the noise points are weighted the same as the normal points. (2) The RNN unit used in step 5 may gradually forget the early track point information, resulting in incomplete capture of the whole track information.
In view of the above two problems, the present invention introduces an attention mechanism module. Note that the power mechanism does not discard all hidden states computed in the source RNN, but rather provides a way to allow decoders to peek at them (treating them as dynamic memory of source information). By doing so, the attention mechanism improves translation of long sentences. Currently, attention mechanisms have become de facto standard and have been successfully applied to many other tasks, including image subtitle generation, speech recognition, and text summarization.
The inventors of the present application have found that the above two problems can be solved by introducing an attention mechanism module to evaluate the trajectory semantic vector.
In the embodiment, an attention-based trajectory semantic vector reevaluation model is established. For example, the inventors assign a weight to the output at each point in time. Let atRepresenting the weight of each time point, representing the different importance of each point, the calculation steps are as follows:
1. calculating an attention score for each time point, usingIt is shown that,is calculated as follows:
wherein h ist TIs h calculated in step 5tThe transpose of (a) is performed,h is all the time points calculated in step 5tIs measured.
2. Normalizing the attention score of each time point to obtain a normalized attention score which is the weight a of each time pointtNormalization is performed using the following formula
And 7: recalculating trajectory vectors
Using the output value h calculated in step 5 at each time pointtAnd the weight a of the output value at each time point calculated in step 6tRecalculating track semantic vector, new TSV for track semantic vectorattentionExpressed, it can be calculated with the following equation:
and 8: and classifying the track vectors by utilizing a multilayer perceptron.
Multi-layer perceptrons (MLPs) are a class of feedforward Artificial Neural Networks (ANNs). The MLP consists of three layers of nodes: an input layer, a hidden layer, and an output layer. Each node, except the input nodes, is a neuron that uses a nonlinear activation function. MLPs are trained using a supervised learning technique called back propagation. Its multi-layered and non-linear activation distinguishes MLP from linear perceptrons. It is able to distinguish between data that are not linearly separable. For the trajectory semantic vector TSV, MLP (TSV) is used to represent the output of MLP as a perceptual result, as follows:
MLP(TSV)=tanh(W·TSV+b)
track identification is a multi-classification problem in nature, so the inventor classifies MLPs (TSVs) by using a softmax function, and the softmax function can acquire the element with the largest value in a vector and acquire the number corresponding to the largest value as the number corresponding to the track identification type.
And step 9: and acquiring track identification information.
In this example, an open python library Gensim (https:// radimreurek. com/genesis /) was used as a training database to encode information for check-in track points according to the above-described procedure. There are three important parameters in the embedding training, let vectore denote the dimension of the position embedding vector, windows denote the length of the context, and learning denotes the number of iterations of signing into the position embedding model. The vectoresize and windows values depend on the size of the trajectory training corpus, and when vectoresize is 250, the model performs best. When raising the value of learning, a more stable value vectore can be obtained. The inventors found that if the learning is greater than 100, vectoresize will converge. In addition, the inventor selects a skip-gram as a training algorithm to train the attention circulation neural network.
The inventors used cross-entropy loss as the loss function of the present invention and Adam as the optimization method because it was able to adaptively calculate the learning rate for each parameter.
Preferably, to reduce overfitting in the recurrent neural network, the inventors used a regularization technique dropout (erasure) in step 5, which works by: in the training process of a neural network, firstly, randomly selecting some units in a neural layer and temporarily hiding the units, then, carrying out the training and optimizing process of the neural network, and randomly hiding other neural elements in the next training process until the training is finished, wherein in the process, the proportion of the number of the randomly hidden neural elements to the number of the neural elements in the whole neural network is called as a dropout rate. Dropout is a very efficient method to achieve model averaging of the neural network by preventing complex co-adaptation on the training data. The inventors set the droporate to 0.5. Let hidsensize denote the number of hidden layers in the recurrent neural network and attentionsize denote the size of the trajectory semantic vector. The inventors employed a grid search strategy to select the optimal parameters of hidrenzee and attentionsize. The inventors set the initial learning rate to 0.00095 and gradually decreased it to 0.0001. The inventor conducts a large number of tests and finds that the network can achieve convergence after 30 times of iterative training.
Example 2
In another implementation, a similar approach as in embodiment 1 is used, except that the GRU is used for trajectory semantic vector evaluation in step 5.
Gating a recursive unit (GRU) is a gating mechanism in a recurrent neural network. The GRU is like a Long Short Term Memory (LSTM) with a forgetting gate, but has fewer parameters than LSTM because it has no output gates. GRUs exhibit better performance on some smaller data sets.
Similar to LSTM, the track semantic vector for a sub-track T is computed by averaging the hidden outputs of each time node GRU, as follows.
zt=σg(Wzv(pt)+Uzht-1+bz)
rt=σg(Wrv(pt)+Urht-1+br)
ht=(1-zt)°ht-1+zt°σh(Whv(pt)+Uh(rt°ht-1)+bh)
Wherein, v (p)t) Is an input vector, htIs the output vector, ztIs to update the gate vector, W, U and b are the parameters that need to be learned. In the evaluation of the track semantic vector, for t equal to 0, the output vector is ht=0。σgIs a sigmoid function. SigmahIs hyperbolic tangent.
Example 3
In another implementation, a similar approach to embodiment 1 is used, except that in step 5 a Bidirectional Recurrent Neural Network (BRNN) is used for trajectory semantic vector evaluation.
A bi-directional recurrent neural network is a neural network structure that connects two hidden layers of opposite directions to the same output. With this form of generative deep learning, the output layer can obtain information from both past (backward) and future (forward) states. Bidirectional recurrent neural networks were introduced to increase the amount of input information available to the network. Standard Recurrent Neural Networks (RNNs) also have limitations because information cannot be obtained from the current state for future inputs. In contrast, a bidirectional recurrent neural network does not require its input data to be fixed. In addition, their future input information may be obtained from the current state. Bidirectional recurrent neural networks are particularly useful when an input context is required. For example, in handwriting recognition, performance can be enhanced by knowing the letters before and after the current letter.
To verify the effect of the present invention, the inventor used a pedestrian trajectory data set (download address: http:// snap
http:// snap. stanford. edu/data/loc-bright kit. html) and the measurement mode adopts accuracy, recall rate and F1 index. The accuracy calculation mode is as follows:
the recall ratio is calculated as follows:
the F1 index is calculated as follows:
comparing the method of the present invention with the existing methods of LCSS (Long-Common-sequence), LDA (late Dirichlet allocation), SVM (support vector maps), TULER (project-User Link on Embedded Current Networks), TULVAE (project-User Link on Auto Encoding variant), etc., the comparison result is as follows:
as can be seen from the table, the track recognition model trained by the method and the corresponding recognition method can obviously improve the accuracy of track recognition.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (10)
1. A trajectory recognition model training method, characterized in that the method comprises:
s1, encoding target track data into vector-form information encoding by constructing a corpus based on a single hot encoding vector;
s2, constructing a recurrent neural network for coding and converting the information into track semantic vectors and a classifier for classifying tracks based on the track semantic vectors;
and S3, training the recurrent neural network and the classifier by using the marked track data.
2. The trajectory recognition model training method according to claim 1, wherein the step S1 includes:
s1.1, carrying out vector-form one-hot coding on each track point in target track data;
s1.2, extracting adjacent track information of each track point and forming a corpus pair by the track point information;
s1.3, constructing a learning network for track point information coding, taking the corpus pair as the input of the learning network, and taking the output layer parameters of the learning network as the information coding of the corresponding track point.
3. The trajectory recognition model training method of claim 1, further comprising time slicing the target trajectory data.
4. The method for training the trajectory recognition model based on the attention circulation neural network as claimed in claim 1, wherein the step S2 comprises: and classifying the corresponding track based on the evaluation result of the track semantic vector by utilizing the multilayer perceptron.
5. The trajectory recognition model training method according to claim 1, wherein the step S2 includes:
s2.1, calculating a track semantic vector based on a recurrent neural network;
s2.2, establishing a trajectory semantic vector reevaluation model based on attention;
and S2.3, recalculating the track semantic vector by using the track semantic vector obtained in the step S2.1 and the track semantic vector reevaluation model constructed in the step S2.2.
6. The method for training the trajectory recognition model based on the attention circulation neural network as claimed in claim 5, wherein in the trajectory semantic vector calculation process of step S2.1, the method further comprises: and randomly erasing a plurality of neural network units in the recurrent neural network according to a certain proportion.
7. The trajectory recognition model training method according to claim 1, wherein the recurrent neural network is a recurrent neural network, or a bidirectional recurrent neural network.
8. A trajectory recognition method, comprising: inputting the trajectory data to be recognized as target trajectory data into a model obtained by the method according to any one of claims 1 to 7 for recognition.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, on which memory a computer program is stored which is executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110029664.0A CN112766339A (en) | 2021-01-11 | 2021-01-11 | Trajectory recognition model training method and trajectory recognition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110029664.0A CN112766339A (en) | 2021-01-11 | 2021-01-11 | Trajectory recognition model training method and trajectory recognition method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112766339A true CN112766339A (en) | 2021-05-07 |
Family
ID=75701262
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110029664.0A Pending CN112766339A (en) | 2021-01-11 | 2021-01-11 | Trajectory recognition model training method and trajectory recognition method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112766339A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990154A (en) * | 2021-05-11 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Data processing method, computer equipment and readable storage medium |
CN113240212A (en) * | 2021-07-09 | 2021-08-10 | 中航信移动科技有限公司 | Data processing method, electronic device and medium for generating flight trajectory |
CN117523382A (en) * | 2023-07-19 | 2024-02-06 | 石河子大学 | Abnormal track detection method based on improved GRU neural network |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180203852A1 (en) * | 2017-01-18 | 2018-07-19 | Xerox Corporation | Natural language generation through character-based recurrent neural networks with finite-state prior knowledge |
CN108629978A (en) * | 2018-06-07 | 2018-10-09 | 重庆邮电大学 | A kind of traffic trajectory predictions method based on higher-dimension road network and Recognition with Recurrent Neural Network |
CN110928993A (en) * | 2019-11-26 | 2020-03-27 | 重庆邮电大学 | User position prediction method and system based on deep cycle neural network |
CN111400620A (en) * | 2020-03-27 | 2020-07-10 | 东北大学 | User trajectory position prediction method based on space-time embedded Self-orientation |
CN111488984A (en) * | 2020-04-03 | 2020-08-04 | 中国科学院计算技术研究所 | Method for training trajectory prediction model and trajectory prediction method |
-
2021
- 2021-01-11 CN CN202110029664.0A patent/CN112766339A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180203852A1 (en) * | 2017-01-18 | 2018-07-19 | Xerox Corporation | Natural language generation through character-based recurrent neural networks with finite-state prior knowledge |
CN108629978A (en) * | 2018-06-07 | 2018-10-09 | 重庆邮电大学 | A kind of traffic trajectory predictions method based on higher-dimension road network and Recognition with Recurrent Neural Network |
CN110928993A (en) * | 2019-11-26 | 2020-03-27 | 重庆邮电大学 | User position prediction method and system based on deep cycle neural network |
CN111400620A (en) * | 2020-03-27 | 2020-07-10 | 东北大学 | User trajectory position prediction method based on space-time embedded Self-orientation |
CN111488984A (en) * | 2020-04-03 | 2020-08-04 | 中国科学院计算技术研究所 | Method for training trajectory prediction model and trajectory prediction method |
Non-Patent Citations (3)
Title |
---|
TAO SUN 等: "Trajectory-User Link with Attention Recurrent Networks", 《2020 25TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR)》 * |
YONG YU 等: "TULSN: Siamese Network for Trajectory-user Linking", 《2020 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN)》 * |
胡铮等: "基于用户行为序列特征的位置预测模型", 《北京邮电大学学报》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990154A (en) * | 2021-05-11 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Data processing method, computer equipment and readable storage medium |
CN112990154B (en) * | 2021-05-11 | 2021-07-30 | 腾讯科技(深圳)有限公司 | Data processing method, computer equipment and readable storage medium |
CN113240212A (en) * | 2021-07-09 | 2021-08-10 | 中航信移动科技有限公司 | Data processing method, electronic device and medium for generating flight trajectory |
CN113240212B (en) * | 2021-07-09 | 2021-09-28 | 中航信移动科技有限公司 | Data processing method, electronic device and medium for generating flight trajectory |
CN117523382A (en) * | 2023-07-19 | 2024-02-06 | 石河子大学 | Abnormal track detection method based on improved GRU neural network |
CN117523382B (en) * | 2023-07-19 | 2024-06-04 | 石河子大学 | Abnormal track detection method based on improved GRU neural network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112084331B (en) | Text processing and model training method and device, computer equipment and storage medium | |
CN107506740B (en) | Human body behavior identification method based on three-dimensional convolutional neural network and transfer learning model | |
Sillito et al. | Semi-supervised learning for anomalous trajectory detection | |
Chakraborty et al. | A fully spiking hybrid neural network for energy-efficient object detection | |
Wang et al. | Research on Healthy Anomaly Detection Model Based on Deep Learning from Multiple Time‐Series Physiological Signals | |
CN112766339A (en) | Trajectory recognition model training method and trajectory recognition method | |
CN113570859B (en) | Traffic flow prediction method based on asynchronous space-time expansion graph convolution network | |
Karamouzas et al. | Crowd space: a predictive crowd analysis technique | |
CN111709754A (en) | User behavior feature extraction method, device, equipment and system | |
CN110659742A (en) | Method and device for acquiring sequence representation vector of user behavior sequence | |
CN110956309A (en) | Flow activity prediction method based on CRF and LSTM | |
Yeganejou et al. | Classification via deep fuzzy c-means clustering | |
Wang et al. | A novel multiface recognition method with short training time and lightweight based on ABASNet and H-softmax | |
Fan et al. | Entropy‐based variational Bayes learning framework for data clustering | |
CN111881299A (en) | Outlier event detection and identification method based on duplicate neural network | |
Kopčan et al. | Anomaly detection using autoencoders and deep convolution generative adversarial networks | |
CN117636477A (en) | Multi-target tracking matching method based on radial basis function fuzzy neural network | |
CN116208399A (en) | Network malicious behavior detection method and device based on metagraph | |
CN111709442A (en) | Multilayer dictionary learning method for image classification task | |
Zhang et al. | VESC: a new variational autoencoder based model for anomaly detection | |
CN116167353A (en) | Text semantic similarity measurement method based on twin long-term memory network | |
Rallis et al. | Bidirectional long short-term memory networks and sparse hierarchical modeling for scalable educational learning of dance choreographies | |
CN114116692A (en) | Missing POI track completion method based on mask and bidirectional model | |
Ramadhan et al. | Comparative analysis of various optimizers on residual network architecture for facial expression identification | |
Zhengfeng | Accurate recognition method of continuous sports action based on deep learning algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210507 |