The invention relates to a method for calculating a hash value of trajectory data, and belongs to the field of
Internet of Things. The method comprises the following steps: unifying the sampling rate and length of trajectory data, aligning the trajectory data in different directions to one direction, converting the trajectory data into a difference form, expressing a trajectory data sequence (dx (i), dy (i)) with the length of n as a complex sequence (dx (i) + j * dy (i)), calculating
Fourier transform of the sequence to obtain transform coefficients (u (i) + j * v (i)), i = 1, 2,..., n, and according to the length m of a required hash value, calculating the transform coefficients (u (i) + j * v (i), i = 1, 2,..., n) of the trajectory data sequence (dx (i), dy (i)) of the trajectory data sequence (dx (i), dy (i)) of the trajectory data sequence (dx (i), dy (i)). The method comprises the following steps of: intercepting m
Fourier transform low-frequency coefficients (u (i) + j * v (i)) (i = 1, 2,..., m), calculating amplitudes A (i) of the intercepted m low-frequency coefficients, calculating an average value A of the amplitudes A (i) of the m low-frequency coefficients, and calculating each bit b (i) of a hash value according to the size relation of A (i) relative to the average value A; according to the method, the trajectory data are converted into the hash values represented by the integers, so that the trajectory similar to the specified trajectory data can be retrieved from a
database with massive trajectories, and the further
processing range is narrowed.