A spatiotemporal trajectory data characterizing representation and feature extraction method
By characterizing and extracting features from spatiotemporal trajectory data, the problems of low efficiency and lack of versatility in existing technologies are solved, and compact data representation and efficient feature extraction are achieved, which is suitable for real-time analysis and secure processing in various scenarios.
Patent Information
- Application Number
- CN202411838468.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing spatiotemporal trajectory data processing methods have problems such as low efficiency, waste of storage space, high computational complexity, lack of versatility and data security. In addition, traditional representation methods cannot effectively express the dynamic characteristics and complex structure of data, and are difficult to meet the needs of large-scale data processing and real-time analysis.
By characterizing the offset of a trajectory point relative to the previous trajectory point, including preprocessing, standard vectorization and unit circle characterization, the data storage volume is reduced and deep features are extracted. A modular design is used to simplify the data representation and processing process.
It achieves compact data representation and efficient feature extraction, improves data quality and integrity, enhances analysis accuracy and interpretability, is applicable to trajectory data from different sources and formats, meets the needs of large-scale and real-time analysis, and ensures data security.
Smart Images

Figure CN119669727B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of trajectory data processing, and relates to a character representation and feature extraction method for spatiotemporal trajectory data. Background Art
[0002] With the widespread adoption of the Internet of Things (IoT), smartphones, and in-car navigation systems, spatiotemporal trajectory data, a type of data that records the paths of objects, has become a valuable resource in fields such as geographic information systems, intelligent transportation, urban planning, and environmental monitoring. In-depth analysis of this data can reveal valuable information such as travel patterns, causes of traffic congestion, and population mobility patterns.
[0003] Spatiotemporal trajectory data collection is often affected by various factors, such as signal interference and equipment failure, resulting in noise and missing values. Traditional data preprocessing techniques, such as simple elimination and mean padding, cannot effectively maintain the integrity and authenticity of the data, affecting the accuracy of subsequent analysis results.
[0004] Traditional methods for representing spatiotemporal trajectory data, such as coordinate-based point sequence representation, cannot fully express the dynamic characteristics and complex structure of the data. In addition, these methods have limitations in data compression and feature extraction, which is not conducive to large-scale data processing and in-depth analysis.
[0005] Feature extraction is a key step in analyzing spatiotemporal trajectory data, but existing feature extraction techniques often suffer from high computational complexity, making them difficult to efficiently process on large datasets. Furthermore, extracting discriminative and robust features to support high-precision pattern recognition and predictive analysis remains an unresolved challenge.
[0006] Existing methods for processing spatiotemporal trajectory data are often designed for specific types of data or application scenarios and lack versatility. In practical applications, spatiotemporal trajectory data from different sources and formats requires different processing methods, which limits the scope of application of existing technologies.
[0007] As data volumes continue to grow, higher requirements are placed on the processing speed and real-time performance of spatiotemporal trajectory data. Traditional data processing methods are computationally inefficient and cannot meet the needs of real-time analysis and online decision support.
[0008] Spatiotemporal trajectory data often involves personal privacy. How to conduct effective data analysis while ensuring data security is another challenge facing current technology. Summary of the Invention
[0009] In light of this, the present invention aims to provide a method for characterizing and extracting features from spatiotemporal trajectory data. This method aims to address the low efficiency, wasted storage space, and high computational complexity of existing trajectory data storage and processing technologies. By using character representation to represent the offset of a trajectory point relative to the previous one, the present invention significantly reduces data storage while preserving the integrity and analytical capabilities of the trajectory.
[0010] In order to achieve the above object, the present invention provides the following technical solutions:
[0011] A method for characterizing and extracting features from spatiotemporal trajectory data includes the following steps:
[0012] S1: Obtain the spatiotemporal trajectory dataset to be processed;
[0013] S2: Preprocessing the spatiotemporal trajectory dataset, including:
[0014] S21: Sampling the spatiotemporal trajectory dataset according to a preset time interval;
[0015] S22: interpolating the sampled spatiotemporal trajectory data to fill in missing data;
[0016] S3: Perform standard vectorization processing on the preprocessed spatiotemporal trajectory data, including:
[0017] S31: normalizing the latitude and longitude information in the spatiotemporal trajectory data so that it falls within a preset range;
[0018] S32: Calculate the vectors between adjacent trajectory points and express the vectors in a two-dimensional coordinate form;
[0019] S33: Calculate the normalized radian between the vector and the reference axis;
[0020] S4: performing unit circle characterization on the normalized radians, including:
[0021] S41: Divide the unit circle into a preset number of layers, and divide each layer into a preset number of equal parts;
[0022] S42: determining a position of the vector on a unit circle according to the normalized radian, and representing the position using a character code;
[0023] S5: combining the character code with the length information of the vector to obtain a character representation of the vector;
[0024] S6: Extracting features from the character representation, including:
[0025] S61: Segment the character representation into sequences of preset length and step size;
[0026] S62: Using the sequence as feature information of the spatiotemporal trajectory data.
[0027] Furthermore, the preset time interval is T seconds.
[0028] Furthermore, the interpolation process adopts linear interpolation, Lagrange interpolation or spline interpolation.
[0029] Furthermore, the preset interval is (-1, 1).
[0030] Furthermore, the reference axis is any one of the x-axis, the y-axis and the z-axis.
[0031] Furthermore, the character code starts with the lowercase letter 'a' of the ASCII code.
[0032] Furthermore, in the feature extraction, the preset length is L and the preset step size is S.
[0033] A spatiotemporal trajectory data characterization and feature extraction system, comprising:
[0034] A data acquisition module is used to obtain the spatiotemporal trajectory dataset to be processed;
[0035] A preprocessing module is used to preprocess the spatiotemporal trajectory dataset, including:
[0036] A sampling module, configured to sample the spatiotemporal trajectory dataset at preset time intervals;
[0037] An interpolation module, configured to perform interpolation processing on the sampled spatiotemporal trajectory data to fill in missing data;
[0038] A vectorization module is used to perform standard vectorization processing on the preprocessed spatiotemporal trajectory data, including:
[0039] A standardization module, configured to standardize the latitude and longitude information in the spatiotemporal trajectory data;
[0040] A vector calculation module, used to calculate the vectors between adjacent trajectory points and express the vectors in a two-dimensional coordinate form;
[0041] A radian calculation module, configured to calculate a normalized radian between the vector and a reference axis;
[0042] A characterization module, configured to perform unit circle characterization on the normalized radian, comprising:
[0043] A unit circle division module, used to divide the unit circle into a preset number of layers, and divide each layer into a preset number of equal parts;
[0044] a position determination module, configured to determine the position of the vector on the unit circle according to the normalized radian;
[0045] an encoding module, configured to represent the position using a character encoding;
[0046] a combining module, configured to combine the character code with the length information of the vector to obtain a character representation of the vector;
[0047] A feature extraction module, configured to extract features from the character representation, comprising:
[0048] a segmentation module, configured to segment the character representation into sequences of a preset length and step size;
[0049] A sequence generation module is used to use the sequence as feature information of the spatiotemporal trajectory data.
[0050] Furthermore, the data acquisition module is connected to an external data source and is used to receive a spatiotemporal trajectory dataset provided by the external data source.
[0051] Furthermore, the feature extraction module is connected to the subsequent analysis and processing module to transmit the feature information to the subsequent analysis and processing module.
[0052] The beneficial effects of the present invention are:
[0053] (1) Through sampling and interpolation processing at preset time intervals, the present invention can effectively fill in the missing values in the spatiotemporal trajectory data, improve the quality and integrity of the data, and thus improve the efficiency of subsequent processing.
[0054] (2) By standardizing the longitude and latitude information and characterizing the angle between the vector and the reference axis using unit circle, the present invention achieves a compact and intuitive representation of the spatiotemporal trajectory data, thereby enhancing the interpretability and representation capabilities of the data.
[0055] (3) The present invention effectively extracts the deep features of spatiotemporal trajectory data by dividing the character representation into sequences and using them as feature information, providing a rich feature basis for subsequent data analysis and application.
[0056] (4) Compared with the traditional spatiotemporal trajectory data processing method, the characterization method of the present invention simplifies the data representation, reduces the computational complexity, and improves the computational efficiency.
[0057] (5) Through the method of the present invention, the feature extraction of spatiotemporal trajectory data is more accurate, which helps to improve the accuracy and reliability of subsequent data analysis, such as applications in trajectory clustering, pattern recognition, etc.
[0058] (6) The method of the present invention is applicable to spatiotemporal trajectory data from different sources and formats, has wide applicability and flexibility, and can meet the data processing requirements in different scenarios.
[0059] (7) The system structure of the present invention is clear, and the modular design makes the implementation process simple and convenient for deployment and maintenance in practical applications.
[0060] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:
[0062] Figure 1 A schematic diagram of the standard vectorization between two points of the spatiotemporal trajectory data provided by the present invention;
[0063] Figure 2 A schematic diagram of the unit circle characterization provided by the present invention;
[0064] Figure 3 A schematic diagram of vector characterization provided by the present invention;
[0065] Figure 4 This is a schematic diagram of feature extraction provided by the present invention. DETAILED DESCRIPTION
[0066] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0067] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.
[0068] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0069] The technical solution adopted by the present invention is to perform character expression dimensionality reduction processing and feature extraction on the spatiotemporal trajectory data.
[0070] Assume that a characterized spatiotemporal trajectory dataset Tras = (Tra1, Tra2, ..., Tra n ,), where Tra i is a space-time trajectory segment of a voyage, Tra i ={p1,p2,p3,...,p m}, p i =(lon i ,lat i ,v i ,h i ,ins i ,t i ) indicates that at t i The current location information, including longitude information lon i , latitude information lat, speed information v i , ship heading information h i , other location information ins i The steps for characterization processing and feature extraction of spatiotemporal trajectory data are as follows:
[0071] S1: Get the characterized spatiotemporal trajectory dataset Tras to be processed;
[0072] S2: Preprocessing of spatiotemporal trajectory data. The obtained spatiotemporal trajectory data is filled with T-second intervals as basic time points using linear interpolation or other equivalent interpolation methods, including but not limited to linear interpolation, Lagrange interpolation, and spline interpolation.
[0073] S3: Standard vectorization of spatiotemporal trajectory data. For each spatiotemporal trajectory data, the portion between two adjacent trajectory points is first standardized and then vectorized. This step includes calculating the Euclidean distance between adjacent trajectory points and the normalized arc between their constituent vectors and the reference axis (usually the x-axis). Figure 1shown.
[0074] S31: Read all spatiotemporal trajectory data, perform minimum-maximum normalization, and scale the longitude and latitude data to a specific range, for example, to (-1, 1), or other applicable ranges;
[0075] S32: Vectorization of the spatiotemporal trajectory data of two adjacent points, assuming that the two adjacent points A = (lon a ,lat a ) and B=(lon b ,lat b ), whose expression is:
[0076]
[0077] Where, It is the vector of two adjacent points in the empty trajectory, the first component lon b -lon a Indicates the change in longitude from point A to point B. The second component lat b -lat a Indicates the change in latitude from point A to point B.
[0078] S34: Calculate the normalized radian θ between the two point vectors and the positive direction of the x-axis. The expression is:
[0079]
[0080] In the formula, θ represents the vector The normalized angle formed along the positive direction of the x-axis, whose value range is [-1, 1], or other applicable normalized intervals.
[0081] S4: Unit circle characterization
[0082] like Figure 2 As shown in Figure 1, unit circle characterization is a character encoding method that maps the normalized arc angle of a vector to the unit circle. By dividing the unit circle into multiple concentric layers and evenly dividing each layer into equal-angle regions, ASCII-based numbering is used to uniquely identify and accurately locate each point on the unit circle.
[0083] S41: Divide the unit circle into layers and equal parts
[0084] Determine the total number of layers (N):
[0085] According to application requirements, the total number of layers N into which the unit circle is divided is set. The more layers N, the higher the encoding accuracy.
[0086] Divide each layer into equal parts (M n ):
[0087] For the nth layer, calculate the number of equal parts M n , the formula is as follows:
[0088] M n =2 n+1
[0089] Where n is the current layer number, 1≤n≤N. For example:
[0090] Layer 1 (n=1): M1=2^(1+1)=4 equiangular regions
[0091] Layer 2 (n=2): M2=2^(2+1)=8 equiangular regions
[0092] Layer 3 (n=3): M3=2^(3+1)=16 equiangular regions
[0093] Similarly, as the number of layers increases, the number of equal portions doubles.
[0094] S42: Generate character encoding
[0095] Each layer corresponds to a base character, starting with the ASCII lowercase letter 'a'. As the number of layers increases, the ASCII code of the base character increases. For example:
[0096] Layer 1: 'a'
[0097] Layer 2: 'b'
[0098] Layer 3: 'c'
[0099] And so on.
[0100] The equal-angle areas in each layer are numbered in a counterclockwise direction starting from the positive direction of the positive x-axis, ranging from 0 to
[0101] M n -1. For example:
[0102] The four areas on the first layer are numbered a0, a1, a2, and a3
[0103] The 8 regions in the second layer are numbered b0, b1, ..., b7
[0104] The 16 regions in the third layer are numbered c0, c1, ..., c15
[0105] Coding example:
[0106] Layer 1, Area 0: a0
[0107] Layer 2, Area 7: b7
[0108] Layer 3, Area 15: c15
[0109] Decoding example:
[0110] Given an encoded string "c15".
[0111] Layer calculation:
[0112] n=ASCII(′c′)-ASCII(′a′)+1=3
[0113] The number of equal parts of the third layer M3=16.
[0114] The recovery area is the 3rd layer, the 15th isotropic area.
[0115] The rules for layering and area division of the unit circle:
[0116] Layer Number:
[0117] According to the normalized radius r of the offset point, determine the circle layer number where it is located. For example:
[0118] If r is within the range of the first layer, the number is a.
[0119] If r is within the range of the second layer, the number is b.
[0120] The radius range of the circle layer is determined by the division rules and can be set according to the accuracy requirements.
[0121] n = 1 (first layer): The unit circle is divided into four equal-angle regions, numbered a0, a1, a2, and a3 in clockwise direction starting from the positive x-axis.
[0122] n=2 (second layer): the circle is expanded to the second layer and divided into 8 equal-angle regions, numbered b0, b1, ..., b7.
[0123] n=3 (third layer): further expanded to the third layer, divided into 16 equiangular regions, numbered c0, c1, ..., c15.
[0124] Extension to the nth layer: Layers and regional divisions can be expanded infinitely according to actual needs, and the regional numbering rules remain consistent.
[0125] 5: Vector character representation
[0126] Vector characterization is a method for converting two-dimensional vector information into character codes. By combining unit circle characterization techniques, the length and direction of a vector are encoded separately, enabling concise representation and efficient retrieval of vector data.
[0127] S51: Vector length normalization and layer number determination:
[0128] Normalize the length L of the vector to the unit interval [0,1]. The normalization formula is as follows:
[0129]
[0130] Among them, L_max is the maximum length of the vector, which is determined according to the data set.
[0131] The unit interval [0,1] is evenly divided according to the total number of layers N to obtain an array of segmentation points.
[0132] The insertion position n of the normalized length L_normalized is determined by binary search as the number of layers corresponding to the vector length.
[0133] For example, if N=3 and the split points are {0, 1 / 3, 2 / 3, 1}, then:
[0134] 0≤L_normalized<1 / 3, n=1
[0135] 1 / 3≤L_normalized<2 / 3, n=2
[0136] 2 / 3≤L_normalized≤1, n=3
[0137] S52: Vector direction encoding:
[0138] Calculate the angle θ between the vector and the positive direction of the x-axis, in the range [0°, 360°), counterclockwise.
[0139] Divide the angle interval and determine the direction area number (μ)
[0140] According to the number of equal parts M of the nth layer n , divide 360 degrees into M n An equiangular area.
[0141] Use the binary search method to determine the angle region number μ where θ is located. The calculation formula is as follows:
[0142]
[0143] S53: Generate vector character encoding
[0144] The layer number character C corresponding to the length layer n Combined with the direction area number μ, it forms the character code C of the vector n μ. For example:
[0145] Layer 2, Area 1: b1
[0146] Layer 3, Area 3: c3
[0147] This process effectively combines vector information with the character encoding of the unit circle, converting vector data into a concise character encoding form. This conversion not only facilitates the subsequent application of the data, but also greatly improves the efficiency of rapid retrieval. Figure 3 shown.
[0148] The position of the offset point in the unit circle is determined by calculating the normalized radius r and the angle θ.
[0149] The arrows in the figure indicate that the offset of P1 falls into a certain layer and area, such as c3.
[0150] Area Code:
[0151] According to the angle θ of the offset point, determine the angle zone number where it is located. For example:
[0152] If θ is within an angular range in the first quadrant, the number is 0.
[0153] By analogy, the area number where θ is located is added to the layer number to form a complete character code.
[0154] Trajectory sequence generation:
[0155] The initial point P0 stores its complete latitude and longitude coordinates, and subsequent track points are stored according to the character encoding of their offsets. For example:
[0156] Assuming that the character codes corresponding to the trajectory offsets are a0, b1, c2..., the generated trajectory sequence is:
[0157] P0: (121.5, 30.3), trajectory encoding: {a0, b1, c2, ...}
[0158] S6: Feature Extraction
[0159] Through the above process, it is assumed that the spatiotemporal trajectory data of a voyage is converted into a character sequence F. Next, the N-gram method is applied to segment these character sequences, and a specific window length W and step size S are selected to cut each character sequence, thereby generating a series of minimum fine-grained trajectory feature information tokens. This process will generate a new character sequence Y, Y = (y1, y2, ..., y l ). Where N = (lW) / S, N is an integer, l is the length y of sequence F i =(f i ,f i+1 ,...,f i+W ), f is the i-th element of the character sequence F. This process effectively completes the feature extraction of trajectory data and retains the upper and lower continuous trajectory information, providing a basis for subsequent analysis and processing. For the feature extraction process, we can Figure 4Repeat the above steps to complete the extraction of spatiotemporal data features for all voyages.
[0160] From a data perspective, representation needs to extract valid information from the data and reflect its true distribution. From an algorithmic perspective, representation needs to conform to the algorithm's application format, facilitate algorithm learning, and improve prediction accuracy. Trajectory representation aims to represent different trajectories as vectors in the same dimensional space, facilitating downstream application.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for characterization and feature extraction of spatiotemporal trajectory data, characterized by: Including the following step: S1: Obtain the spatiotemporal trajectory dataset to be processed; S2: Preprocessing the spatiotemporal trajectory dataset, including: S21: Sampling the spatiotemporal trajectory dataset according to a preset time interval; S22: interpolating the sampled spatiotemporal trajectory data to fill in missing data; S3: Perform standard vectorization processing on the preprocessed spatiotemporal trajectory data, including: S31: normalizing the latitude and longitude information in the spatiotemporal trajectory data so that it falls within a preset range; S32: Calculate the vectors between adjacent trajectory points and express the vectors in a two-dimensional coordinate form; S33: Calculate the normalized radian between the vector and the reference axis; S4: performing unit circle characterization on the normalized radians, including: S41: Divide the unit circle into a preset number of layers, and divide each layer into a preset number of equal parts; S42: determining a position of the vector on a unit circle according to the normalized radian, and representing the position using a character code; S5: combining the character code with the length information of the vector to obtain a character representation of the vector; S6: Extracting features from the character representation, including: S61: Segment the character representation into sequences of preset length and step size; S62: Using the sequence as feature information of the spatiotemporal trajectory data.
2. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: The preset time interval is T seconds.
3. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: The interpolation process adopts linear interpolation method, Lagrange interpolation method or spline interpolation method.
4. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: The preset interval is (-1, 1).
5. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: The reference axis is any one of the x-axis, the y-axis and the z-axis.
6. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: The character code starts with the lowercase letter 'a' in ASCII code.
7. The method for characterizing and extracting features from spatiotemporal trajectory data according to claim 1, wherein: In the feature extraction, the preset length is L and the preset step size is S.
8. A system for characterizing and extracting spatiotemporal trajectory data, characterized by: include: A data acquisition module is used to obtain the spatiotemporal trajectory dataset to be processed; A preprocessing module is used to preprocess the spatiotemporal trajectory dataset, including: A sampling module, configured to sample the spatiotemporal trajectory dataset at preset time intervals; An interpolation module, configured to perform interpolation processing on the sampled spatiotemporal trajectory data to fill in missing data; A vectorization module is used to perform standard vectorization processing on the preprocessed spatiotemporal trajectory data, including: A standardization module, configured to standardize the latitude and longitude information in the spatiotemporal trajectory data; A vector calculation module, used to calculate the vectors between adjacent trajectory points and express the vectors in a two-dimensional coordinate form; A radian calculation module, configured to calculate a normalized radian between the vector and a reference axis; A characterization module, configured to perform unit circle characterization on the normalized radian, comprising: A unit circle division module, used to divide the unit circle into a preset number of layers, and divide each layer into a preset number of equal parts; a position determination module, configured to determine the position of the vector on the unit circle according to the normalized radian; an encoding module, configured to represent the position using a character encoding; a combining module, configured to combine the character code with the length information of the vector to obtain a character representation of the vector; A feature extraction module, configured to extract features from the character representation, comprising: a segmentation module, configured to segment the character representation into sequences of a preset length and step size; A sequence generation module is used to use the sequence as feature information of the spatiotemporal trajectory data.
9. The spatiotemporal trajectory data characterization and feature extraction system according to claim 8, characterized in that: The data acquisition module is connected to an external data source and is used to receive a spatiotemporal trajectory dataset provided by the external data source.
10. The spatiotemporal trajectory data characterization and feature extraction system according to claim 8, characterized in that: The feature extraction module is connected to the subsequent analysis and processing module and is used to transmit the feature information to the subsequent analysis and processing module.
Citation Information
Patent Citations
Road network-based spatio-temporal trajectory clustering method
CN106383868A
Moving target track position prediction method
CN112434228A