Trajectory reconstruction methods, devices and related equipment
By using a deep fusion model of signaling sequences and road data, and leveraging a pre-trained encoder and a multi-head self-attention mechanism, the problem of decreased trajectory reconstruction accuracy caused by a single data source was solved, achieving high-precision trajectory reconstruction in complex urban environments.
Patent Information
- Application Number
- CN202511589714.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2045-11-03
AI Technical Summary
In existing technologies, trajectory reconstruction relies on a single data source, which leads to a significant decrease in reconstruction accuracy in complex urban road network environments. Furthermore, traditional methods have limited capabilities in handling noise and abnormal data, resulting in unreliable trajectory reconstruction results.
By acquiring signaling sequence data and road sampling point data, and using pre-trained signaling trajectory and road representation encoders for feature representation, a deep fusion model is constructed by combining multi-head self-attention mechanism and feature fusion to improve the accuracy and robustness of trajectory reconstruction.
It significantly improves the accuracy and robustness of trajectory positioning in complex urban environments, enabling more accurate reconstruction of users' movement trajectories, adapting to different urban environments, and enhancing the adaptability and generalization ability of trajectory reconstruction methods.
Smart Images

Figure CN121459583B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent transportation technology, and in particular to a trajectory reconstruction method, device and related equipment. Background Technology
[0002] Trajectory reconstruction refers to the process of reconstructing the movement trajectory of an object or user by analyzing collected location information. This technology typically utilizes historical data and algorithms to understand user behavior patterns and travel habits, and is widely used in fields such as traffic management, urban planning, and pedestrian flow analysis.
[0003] In related technologies, trajectory reconstruction typically relies on a single data source (such as Global Positioning System (GPS) data), which leads to a significant decrease in reconstruction accuracy in the complex road network environment of cities, resulting in relatively low accuracy of trajectory reconstruction. Summary of the Invention
[0004] This application provides a trajectory restoration method, apparatus, and related equipment, which can solve the technical problem in related technologies that trajectory restoration relies on a single data source, resulting in a significant decrease in reconstruction accuracy in complex urban road network environments, thus leading to relatively low accuracy in trajectory restoration.
[0005] In a first aspect, embodiments of this application provide a trajectory reconstruction method, the method comprising:
[0006] Obtain the first signaling sequence data of the first user;
[0007] Based on the first signaling sequence data, obtain the first sampling point sequence data of roads in the target area associated with the first signaling sequence data;
[0008] The first signaling sequence data is input into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation feature; and the first sampling point sequence data is input into a pre-trained road representation encoder for feature representation to obtain the first road representation feature of the target area.
[0009] The first trajectory representation feature and the first road representation feature are fused to obtain the second trajectory representation feature;
[0010] Based on the second trajectory representation features, feature decoding is performed to obtain the first activity trajectory of the first user.
[0011] Secondly, embodiments of this application provide a trajectory reconstruction device, the device comprising:
[0012] The first acquisition module is used to acquire the first signaling sequence data of the first user;
[0013] The second acquisition module is used to acquire, based on the first signaling sequence data, the first sampling point sequence data of the road in the target area associated with the first signaling sequence data;
[0014] The feature representation module is used to input the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain a first trajectory representation feature; and to input the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain a first road representation feature of the target area.
[0015] The feature fusion module is used to fuse the first trajectory representation feature and the first road representation feature to obtain the second trajectory representation feature.
[0016] The feature decoding module is used to perform feature decoding based on the second trajectory representation features to obtain the first activity trajectory of the first user.
[0017] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the trajectory restoration method as described in the first aspect.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the trajectory reconstruction method as described in the first aspect.
[0019] Fifthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the trajectory reconstruction method as described in the first aspect.
[0020] In this embodiment, the process involves: acquiring first signaling sequence data of a first user; acquiring first sampling point sequence data of roads in a target area associated with the first signaling sequence data; inputting the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain first trajectory representation features; inputting the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain first road representation features of the target area; fusing the first trajectory representation features and the first road representation features to obtain second trajectory representation features; and performing feature decoding based on the second trajectory representation features to obtain the first activity trajectory of the first user. This deep fusion of multimodal data, i.e., fusion of signaling data and road network data, makes trajectory reconstruction more accurate and robust, thereby significantly improving trajectory positioning accuracy in complex urban environments. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a trajectory reconstruction method provided in an embodiment of this application;
[0023] Figure 2 This is a schematic flowchart of a trajectory reconstruction method provided in a specific example of an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of the structure of a trajectory reconstruction device provided in an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] Among related technologies, a method for identifying user movement trajectories through base station handover signaling is proposed. This method analyzes the user's handover records between different base stations and combines Geographic Information System (GIS) technology to perform coarse-grained positioning of the user's movement path. The method mainly includes signaling data preprocessing, base station location mapping, and trajectory inference, and has a certain trajectory recognition capability within the mobile communication network coverage area.
[0028] In related technologies, an urban road network trajectory matching algorithm is proposed, which discloses a trajectory matching method based on a road network topology model. This technique improves the matching accuracy of trajectories in complex road network environments by establishing a detailed urban road network topology model and combining probabilistic matching and geometric constraint algorithms. The core of this method lies in constructing a road network graph model, defining connectivity and distance constraints between nodes, and using a heuristic search algorithm to optimize the road network mapping process of trajectories.
[0029] The related technologies have the following drawbacks:
[0030] 1) Reliance on a single data source (such as mobile signaling or GPS) leads to a significant decrease in reconstruction accuracy in complex urban road networks. For example, a user trajectory recognition method based on mobile communication networks, while identifying user trajectories through base station handover signaling, can only provide coarse-grained positioning and cannot address positioning errors and data incompleteness issues that may occur in complex road network environments. This makes trajectory reconstruction results relying solely on this method often unreliable.
[0031] 2) Traditional trajectory reconstruction techniques have limited capabilities in handling noise and outlier data, leading to insufficient reliability in practical applications. For example, while an urban road network trajectory matching algorithm improves trajectory matching accuracy to some extent through a road network topology model, it may still introduce significant errors due to its failure to effectively analyze the impact of signal interference or outlier data. Furthermore, algorithms based on probabilistic matching and geometric constraints, even if they can handle some outliers, have limited effectiveness in complex noisy environments, affecting the overall reconstruction quality.
[0032] Based on this, this application proposes a novel trajectory reconstruction method. In the field of mobile trajectory reconstruction, multi-source data fusion is considered an important research direction, aiming to improve the accuracy and robustness of trajectory reconstruction. Its main technologies include data preprocessing methods, feature fusion strategies, and trajectory reconstruction algorithms. Trajectory reconstruction refers to the process of reconstructing the movement trajectory of an object or user by analyzing collected location information. This technology typically utilizes historical data and algorithms to understand user behavior patterns and travel habits, and is widely used in traffic management, urban planning, and pedestrian flow analysis.
[0033] It should be noted that the trajectory restoration method in this application embodiment can be applied to trajectory restoration devices, specifically involving the fields of artificial intelligence, big data, and other technical fields.
[0034] See Figure 1 , Figure 1 This is a flowchart of a trajectory reconstruction method provided in an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0035] Step 101: Obtain the first signaling sequence data of the first user;
[0036] Step 102: Based on the first signaling sequence data, obtain the first sampling point sequence data of roads in the target area associated with the first signaling sequence data;
[0037] Step 103: Input the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation feature; and input the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain the first road representation feature of the target area.
[0038] Step 104: Perform feature fusion on the first trajectory representation feature and the first road representation feature to obtain the second trajectory representation feature;
[0039] Step 105: Based on the second trajectory representation features, perform feature decoding to obtain the first activity trajectory of the first user.
[0040] In step 101, the first signaling sequence data is mobile phone signaling data. This data is obtained by acquiring the mobile phone signaling of the first user within a preset time window, preprocessing it, and then obtaining the first signaling sequence data. The preset time window can be set according to actual conditions, such as a one-day window. Mobile phone signaling refers to the control information transmitted between a mobile phone and a base station in a mobile communication network. These signals contain important data such as the user's location information, status, and the initiation and termination of calls, and are typically used to track user activity and optimize network performance.
[0041] In some embodiments, mobile signaling data of the first user within the most recent day can be obtained and preprocessed. The preprocessing operation may include cleaning and filtering operations, such as filtering abnormal signaling such as long-distance and short-time handover. Then, the signaling trajectory is standardized to obtain the first signaling sequence data.
[0042] The first signaling sequence data may include at least one signaling trajectory sequence, which can be used... express, Latitude and longitude coordinates For timestamps (unit: minutes).
[0043] In step 102, road network spatial association can be performed based on the first signaling sequence data, and the target area associated with the first signaling sequence data can be obtained. Correspondingly, the first sampling point sequence data of the roads in the target area in the road network data can be obtained.
[0044] In some embodiments, a target area associated with the first signaling sequence data can be obtained through area detection, and correspondingly, the first sampling point sequence data of roads within that target area in the road network data can be obtained.
[0045] In some embodiments, step 102 specifically includes:
[0046] For each signaling trajectory in the first signaling sequence data, a buffer area within a preset range associated with each signaling point is determined, centered on each signaling point.
[0047] Extract the target area covered by the buffer area associated with each signaling point;
[0048] Extract the first sampling point sequence data of the roads in the target area, wherein the first sampling point sequence data includes the location of the road points and the cumulative distance of the road points in the road segment.
[0049] In this embodiment, for each signaling trajectory It can generate a buffer zone within a preset range, such as 500 meters, centered on each signaling point to associate with the road network. Then, the target area covered by each buffer zone can be extracted to obtain the road set. Every road It can be represented as an ordered sequence of sampling points, using It means that among them This indicates the cumulative distance of a road point within a road segment.
[0050] In related technologies, there are shortcomings in modeling the complexity of urban road networks, failing to fully explore the topological characteristics and spatial dependencies of urban road networks. For example, a multi-source sensor fusion method for reconstructing mobile trajectories, while attempting to improve the accuracy of trajectory reconstruction by integrating data from multiple sensors, still faces insufficient modeling of factors such as road connectivity, path selection, and constraints. This deficiency prevents further improvement in the adaptability and accuracy of the trajectory reconstruction algorithm.
[0051] This embodiment proposes a road network constraint trajectory matching technique based on sequence representation learning. By generating road network representations through sequence representation learning, spatial constraint matching can be designed, effectively solving the positioning error and path inconsistency problems in traditional trajectory reconstruction and improving the robustness of trajectory restoration. Furthermore, a trajectory restoration based on road network topology is constructed. By deeply modeling the complex structure and spatial dependencies of the urban road network, the adaptability and generalization ability of the trajectory restoration method in different urban environments are enhanced.
[0052] In step 103, both the signaling trajectory representation encoder and the road representation encoder need to be pre-trained before application so that they can perform accurate feature representation.
[0053] In some embodiments, prior to step 103, the method further includes:
[0054] The second signaling sequence data of the second user is obtained, which is obtained by masking and adding noise to the signaling sequence data of the second user;
[0055] The second signaling sequence data is input into the signaling trajectory representation encoder for feature representation to obtain the third trajectory representation feature;
[0056] Based on the third trajectory representation features, feature decoding is performed to obtain the second user's second activity trajectory and the confidence level of each trajectory point in the second activity trajectory;
[0057] Based on the second activity trajectory and the confidence level, a first target loss is constructed. The first target loss is obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level.
[0058] Based on the first target loss, the signaling trajectory representation encoder is pre-trained.
[0059] This involves acquiring mobile signaling data for a selected city for one day, preprocessing it (which may include filtering abnormal signaling such as long-distance and short-term handovers) to obtain clean preprocessed signaling data. In some embodiments, rule-based filtering of abnormal signaling such as long-distance and short-term fast handovers can be used, and the preprocessing operations may specifically include the following:
[0060] Data cleaning removes duplicate records and invalid base station identifiers (Identity Documents, IDs), retains valid signaling trajectories, and groups them by the second user ID and sorts them by timestamp.
[0061] Anomaly filtering is implemented, defining bidirectional handover distance > 3km and handover angle < 30° as abnormal signaling, and removing approximately 3%-5% of abnormal data.
[0062] Time normalization converts the timestamp into minutes from midnight of the current day.
[0063] The signaling trajectory representation encoder may include: a mask module, a noise module, an encoder, a decoder, and a loss function module.
[0064] The preprocessed signaling data, i.e., the signaling sequence data of the second user, can be masked and noise added to obtain the second signaling sequence data. Specifically, a masking module can be used to sample each trajectory sequence in the second user's signaling sequence data to obtain a noise level no greater than [value missing]. Masking of mask rate, and adding noise to the masked trajectory sequence using a noise module. The noise rate is determined by masking and adding noise to each trajectory sequence according to the mask rate and noise rate, resulting in the second signaling sequence data. This second signaling sequence data can then be reconstructed and its confidence output processed by an encoder and decoder. The output is compared with the signaling sequence data before masking and adding noise to calculate the accuracy and confidence loss, which is then used for pre-training of the trajectory reconstruction task, resulting in the signaling trajectory representation encoder.
[0065] The pre-training process of the signaling trajectory representation encoder specifically includes the following:
[0066] Step 1: Masking and noise processing.
[0067] Mask module operation: Based on uniformly distributed sampling mask rate From trajectory sequence (in, Latitude and longitude coordinates Randomly selected from timestamps Each trajectory point is marked with its latitude and longitude coordinates as a mask symbol. Generate mask trajectory sequence Unmasked trajectory points retain their original coordinates. .in, It can be set according to the actual situation, and can be adjusted according to different regions. The settings can be different. For example, the highest masking accuracy can be achieved when the trajectory sequence in the signaling data of region A is masked using a masking rate of no more than 0.2.
[0068] Noise module operation: The noise rate adds spatial noise to the unmasked trajectory points, and can be randomly selected. The trajectory points representing the proportion are replaced with their original coordinates ± Gaussian noise. (in, (The average coverage radius of the base station can be taken as 500m), generating a noisy trajectory sequence. This is the trajectory sequence in the second signaling sequence data. It can be set according to the actual situation, and can be adjusted according to different regions. The settings can be different. For example, when noise with a noise rate of 0.3 is added to the trajectory sequence in the signaling data of region A, the noise restoration accuracy is the highest.
[0069] Step 2: Spatiotemporal feature encoding (linear layer encoding).
[0070] Spatiotemporal feature coding includes spatial feature coding, temporal feature coding, and spatiotemporal fusion coding.
[0071] Spatial feature encoding: Latitude and longitude coordinates of trajectory sequences in the second signaling sequence data are encoded using a linear layer with hidden dimensions. The encoding is performed as shown in equation (1) below.
[0072] ( )
[0073] in, For the first level of linear transformation, the output dimension is d / 2 = 128. This is the activation function.
[0074] Time feature encoding: for timestamps Normalization (converted to minutes from midnight of the day) is performed and encoded through a linear layer of hidden dimensions, as shown in equation (2) below.
[0075] ( )
[0076] in, To normalize time, The output dimension is consistent with the spatial encoding.
[0077] Spatiotemporal fusion coding: concatenating spatial and temporal codes and adding location codes. (such as sine and cosine position coding), as shown in equation (3) below.
[0078] ( )
[0079] In this way, initial input features can be formed. That is, embedded feature representation.
[0080] Step 3: Encoder feature extraction, which can be performed using a multi-head self-attention mechanism.
[0081] The encoder can be composed of The system consists of layers, each containing layer normalization, multi-head attention (MHA), and a feed-forward neural network (FFN).
[0082] Layer normalization can be represented by the following equation (4).
[0083] ( )
[0084] Multi-head self-attention: For each head h, calculate the query, key, and value vector as shown in equation (5).
[0085] ( )
[0086] Attention weights and outputs can be represented by equations (6) and (7).
[0087] ( )
[0088] ( )
[0089] In each layer, residual connections can be used. Residual connections are a technique used in deep neural networks to mitigate the vanishing gradient problem that occurs when training deep networks by allowing inputs to be directly added to the output of a hidden layer. Residual connections aim to enhance the learning ability of the model, enabling it to capture complex features more effectively. They are commonly found in deep learning frameworks such as ResNet, as shown in Equation (8).
[0090] ( )
[0091] The feedforward neural network is shown in equation (9) below.
[0092] ( )
[0093] in, The final output encoder features That is, the third trajectory characterization feature.
[0094] Step 4: Decoder Reconstruction and Confidence Output
[0095] Location reconstruction: The decoder receives the encoder feature E and reconstructs the latitude and longitude coordinates of the mask / noisy point through a linear layer to obtain the second active trajectory. The latitude and longitude coordinates in the second active trajectory are shown in the following formula (10).
[0096] ( )
[0097] in, To reconstruct the coordinates.
[0098] Confidence estimation: Output confidence through independent branches , which represents the credibility of the reconstructed position, i.e., the trajectory point in the second activity trajectory, as shown in the following formula (11).
[0099] ( )
[0100] in, The output is normalized into a confidence score.
[0101] Step 5: Calculate the loss function to construct the first target loss, which can be obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level.
[0102] Among them, the reconstruction accuracy loss based on the second activity trajectory can be the noise-resistant adaptive Huber loss: defining the reconstruction error. Dynamic threshold Based on the batch mean absolute error (MAE), as shown in equations (12) and (13) below.
[0103] ( )
[0104] ( )
[0105] The Huber loss is shown in equation (14).
[0106] ( )
[0107] Where M is the mask / number of noise points.
[0108] Confidence regularization loss (KL divergence): can constrain the confidence distribution to approximate the prior distribution. As shown in equation (15).
[0109] ( )
[0110] By superimposing the two losses mentioned above, we can obtain the first target loss, whose total loss function is shown in equation (16) below.
[0111] ( )
[0112] in, , which is an experience value.
[0113] Step 6: Model pre-training.
[0114] Optimization process: The Adam optimizer (learning rate) can be used. ), iterate for T=100 rounds, with the goal of minimizing the total loss, as shown in equation (17) below.
[0115] ( )
[0116] Output signaling trajectory representation encoder: preserves the encoder parameters after training. It can extract trajectory representation features E containing spatiotemporal dependencies for subsequent trajectory reconstruction tasks, achieve robust repair of abnormal signaling (such as drift and jump cut), and thus enhance the representation of the coarse input signaling.
[0117] In this way, during the pre-training process of the signaling trajectory representation encoder, novel noise removal (combined with confidence regularization loss) and feature optimization (spatiotemporal feature encoding) techniques for mobile trajectory data are used to effectively identify and filter positioning errors and abnormal data, thereby constructing a high-quality signaling representation for mobile signaling and improving the data quality and reliability of trajectory reconstruction.
[0118] Accordingly, in some embodiments, the step of inputting the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation features includes:
[0119] The first signaling sequence data is input into the signaling trajectory representation encoder for spatiotemporal feature encoding to obtain embedded feature representation. The spatiotemporal feature encoding includes spatial feature encoding, temporal feature encoding, and spatiotemporal fusion encoding that fuses the spatial feature encoding and temporal feature encoding through position encoding.
[0120] Based on the embedded feature representation, the signaling trajectory representation encoder uses a multi-head self-attention mechanism to extract features and obtain the first trajectory representation feature.
[0121] In this way, the signaling trajectory representation encoder can effectively learn the spatiotemporal features of the signaling trajectory, balance reconstruction accuracy and noise robustness, and thus construct trajectory reconstruction based on spatiotemporal features, providing high-quality signaling representation for subsequent trajectory reconstruction tasks.
[0122] In some embodiments, prior to step 103, the method further includes:
[0123] The second sampling point sequence data of roads in the topological road network is obtained by masking the sampling point sequence data of roads in the topological road network.
[0124] The second sampling point sequence data is input into the road representation encoder for feature representation to obtain the second road representation features of the roads in the topological road network;
[0125] Based on the second road characterization features, feature decoding is performed to obtain the reconstructed sequence data of roads in the topological road network;
[0126] Based on the reconstructed sequence data, a second objective loss is constructed, which is obtained by superimposing the reconstruction accuracy loss and trajectory smoothness regularization loss based on the reconstructed sequence data.
[0127] The road representation encoder is pre-trained based on the second target loss.
[0128] The road representation encoder can include a masking module, an encoder, a decoder, and a loss function module. It can acquire roads in selected cities in the topological road network and process them into latitude and longitude sequences. The masking module can use a random mask of no more than 0.5 on the latitude and longitude sequences of each road to obtain second sampling point sequence data. Then, it is input into the encoder for feature extraction to obtain the road representation. After being output by the decoder, it is compared with the latitude and longitude sequences of the original roads. The road representation encoder containing road features is obtained through training by the trajectory similarity loss function.
[0129] The specific pre-training process of the road representation encoder is as follows:
[0130] Step 1: Road data preprocessing and masking operations.
[0131] Road data representation: Urban road networks can be abstracted as an ordered sequence of latitude and longitude points. ,in Let N be the coordinates of the i-th sampling point on the road, and N be the road length (i.e., the number of points).
[0132] Mask module operation: For each road sequence With random mask rate choose Each point has its coordinates replaced with a mask symbol. Generate masked road sequence That is, the sequence data of the second sampling point.
[0133] Step 2: Road feature encoding.
[0134] Spatial feature encoding: Latitude and longitude coordinates in the second sampling point sequence data are encoded using a linear layer with hidden dimensions. Encode it as shown in equation (18) below.
[0135] ( )
[0136] in, This is the first level of linear transformation, with an output dimension d=128. For the activation function, add sine and cosine position encoding. The sequence information of the road points is captured as shown in equation (19).
[0137] ( )
[0138] Forming initial input features
[0139] Step 3: Encoder Feature Extraction
[0140] The encoder is made by The system consists of layers, each containing layer normalization, multi-head self-attention, and a feedforward neural network.
[0141] Layer normalization is shown in equation (20) below.
[0142] ( )
[0143] Multi-head self-attention is shown in equation (21).
[0144] ( )
[0145] in, It is represented as shown in equation (22).
[0146] ( )
[0147] The residual connection is shown in equation (23).
[0148] ( )
[0149] The feedforward neural network is shown in equation (24).
[0150] ( )
[0151] The final output encoder feature E, which is the second road representation feature of the road in the topological road network, is shown in the following equation (25).
[0152] ( )
[0153] Step 4: Decoder reconstruction.
[0154] The decoder receives the encoder feature E and reconstructs the latitude and longitude coordinates of the mask point through a linear layer, as shown in equation (26).
[0155] ( )
[0156] Generate reconstructed sequence data of roads in the topological road network, using... This indicates that the unmasked points retain their original coordinates.
[0157] Step 5: Calculate the loss function to construct the second objective loss, which can be obtained by superimposing the reconstruction accuracy loss and trajectory smoothness regularization loss of the reconstructed sequence data.
[0158] The reconstruction accuracy loss based on reconstructed sequence data can be represented by the Top-k Hausdorff distance. Hausdorff distance is a metric used to measure the similarity between two sets of points. It is defined as the minimum distance from any point in one set to the farthest point in the other set. Hausdorff distance is commonly used in computer vision, shape analysis, and object recognition to assess the similarity between different shapes or objects.
[0159] The original road can be defined based on the Top-k Hausdorff distance. With reconstructed sequence data The distance between them is shown in the following formula (27).
[0160] ( )
[0161] in, This represents the minimum distance from a point to the set. Take the average of the top k largest values Retaining 10% as an empirical value not only represents the overall characteristics but also reduces the number of points that need to be calculated, thus improving the model's computational efficiency.
[0162] Furthermore, noise resistance can be improved based on Top-k Hausdorff distance. The distance value can be truncated to ignore abnormally large outliers, as shown in Equation (28).
[0163] ( )
[0164] By superimposing the reconstruction accuracy loss and the trajectory smoothness regularization loss, the second objective loss can be obtained, and its total loss function is shown in the following equation (29).
[0165] ( )
[0166] in, This is a trajectory smoothness regularization term, used to penalize rapidly changing reconstruction points. λ can be set to 0.05, which is an empirical value between 0.01 and 0.1.
[0167] Step 6: Model pre-training
[0168] Optimization process: The Adam optimizer (learning rate) can be used. ), iterative training for T=200 rounds, with the goal of minimizing the total loss L, as shown in equation (30) below.
[0169] ( )
[0170] Output the road representation encoder, retaining the trained encoder parameters. It can extract feature representations containing road geometry and topology, which can be used for subsequent matching tasks between signaling trajectories and road networks.
[0171] During the pre-training process of the road representation encoder, a novel noise removal method for mobile trajectory data (combined with trajectory smoothness regularization) is used to effectively identify and filter positioning errors and abnormal data, thereby constructing high-quality feature representations for roads and improving the data quality and reliability of trajectory reconstruction.
[0172] Furthermore, a multi-dimensional trajectory reconstruction quality assessment is adopted, and a reconstruction quality measurement technique based on Hausdorff distance based on trajectory similarity is proposed. Combined with trajectory smoothness regularization term, a multi-dimensional confidence evaluation system is established, which can accurately quantify the accuracy and reliability of trajectory reconstruction and provide comprehensive quality assurance for trajectory reconstruction.
[0173] Correspondingly, the first sampling point sequence data can be input into the pre-trained road representation encoder for feature representation to obtain the first road representation features of the target area.
[0174] After pre-training the signaling trajectory representation encoder and the road representation encoder, a trajectory reconstruction model can be constructed. The trajectory reconstruction model can include: a pre-trained signaling trajectory representation encoder, a pre-trained road representation encoder, an attention fusion module, a decoder, and a loss function module. The first signaling sequence data can be input into the pre-trained signaling trajectory representation encoder for feature representation, obtaining the first trajectory representation features. Simultaneously, the first signaling sequence data is spatially correlated with the road network to obtain roads in the target area, and samples are used for sequence representation to obtain the first sampling point sequence data. This data is then input into the road representation encoder for feature representation, obtaining the first road representation features of the target area. The attention fusion module fuses the first trajectory representation features and the first road representation features to obtain the enhanced trajectory representation, i.e., the second trajectory representation features. After feature decoding by the decoder, the reconstructed accurate trajectory, i.e., the first active trajectory, is output.
[0175] In some embodiments, the specific process of the trajectory reconstruction method includes the following:
[0176] Step 1: Multi-source data preprocessing and correlation.
[0177] Signaling trajectory standardization: Input the cleaned signaling trajectory sequence (i.e., the signaling trajectory sequence in the first signaling sequence data), where, Latitude and longitude coordinates For timestamps (unit: minutes).
[0178] Road network spatial correlation: for each signaling trajectory A 500-meter buffer zone is generated centered on each signaling point. The target area covered by the buffer zone is extracted to obtain the road set. (i.e., the sequence data of the first sampling point), each road Represented as an ordered sampling point sequence ,in, This represents the cumulative distance of a road point within a road segment.
[0179] Step 2: Bimodal feature encoding.
[0180] Signaling trajectory depth representation: representing the signaling trajectory Input a pre-trained signaling trajectory representation encoder, output a trajectory representation sequence containing spatiotemporal dependencies. That is, the first trajectory characterization feature.
[0181] Road network structure representation aggregation: for each road Road representations are obtained through a pre-trained road representation encoder. Aggregate road representation The first road characterization features are obtained as shown in the following formula (31).
[0182] ( )
[0183] The Max Pool layer reduces data dimensionality, computational load, and extracts important features by selecting the maximum value for each region through a sliding window of fixed size.
[0184] Step 3: In step 104, multimodal feature fusion can be achieved through trajectory-road network interaction and multi-head cross-attention feature fusion. Multimodal feature fusion refers to integrating features from different sources (such as images, text, and sound) to improve the performance of machine learning models, thereby enhancing the accuracy of classification, recognition, and prediction. In this embodiment, by combining the feature representations of signaling trajectories (time-series data) obtained from different encoders with the feature representations of map roads (graph data), the trajectory reconstruction model can obtain more comprehensive contextual information. This fusion method can fully utilize the complementary characteristics of various data, improving the trajectory reconstruction model's ability to understand complex situations.
[0185] A multi-head cross-attention mechanism with residuals can be used for feature fusion, with the first trajectory representing the features. As the query (Q), the first road representation feature Simultaneously serving as both key (K) and value (V), it enables cross-modal feature interaction.
[0186] Its multi-head linear transformation is shown in equation (32).
[0187] ( )
[0188] Where H=8 represents the number of attention heads, and the single-head dimension. =32, weight matrix .
[0189] Attention weights are calculated as shown in equations (33) and (34).
[0190] ( )
[0191] ( )
[0192] Output projection matrix This allows multiple results to be merged into a unified dimension.
[0193] During feature fusion, residual enhancement techniques can be used, as shown in equation (35).
[0194] ( )
[0195] In this way, the original trajectory features can be preserved through residual connections, and the training process can be stabilized through layer normalization, thereby obtaining the second trajectory representation features. .
[0196] Step 4: In step 105, a second trajectory representation can be input for feature decoding. In some embodiments, a time-guided decoder can be used for feature decoding to generate the first user's first activity trajectory. Step 105 specifically includes:
[0197] Using the target feature as the query and the second trajectory representation feature as key-value pairs, a cross-attention mechanism is employed for feature decoding to obtain the first activity trajectory of the first user; wherein...
[0198] The target features include pre-encoded trajectory timestamp sequence embedding features and trajectory location embedding features.
[0199] In other words, the target features are ordered features for time and trajectory location to guide the decoder in feature decoding.
[0200] One approach is to use timestamp sequence encoding to generate trajectory timestamp sequence embedding features, which can then be used to reconstruct the trajectory's timestamp sequence. Normalization The trajectory timestamp sequence embedding feature is obtained by encoding it into a time embedding through two linear layers, as shown in the following formula (36). Among them, the timestamp sequence of the restored trajectory can be a fine-grained timestamp sequence compared with the signaling trajectory sequence. For example, the timestamp sequence of the signaling trajectory is 1 minute, while the timestamp sequence of the restored trajectory is 30 seconds, so that more fine-grained trajectory restoration can be performed.
[0201] ( )
[0202] Trajectory timestamp sequence embedding features can be superimposed with learnable location encodings. That is, embedding features at trajectory locations to obtain target features. The decoder input query is formed as shown in equation (37).
[0203] ( )
[0204] Decoding attention with residuals can be used, and the decoder employs a two-layer cross-attention mechanism to achieve this. For querying, the second trajectory representation features For key-value pairs, after passing through the cross-modal attention layer, the processing is as shown in equation (38).
[0205] ( )
[0206] Afterwards, the coordinate regression is performed as shown in equation (39).
[0207] ( )
[0208] in, It consists of two fully connected layers, outputting latitude and longitude coordinates. These latitude and longitude coordinates are the coordinates in the first activity trajectory, which allows for trajectory reconstruction.
[0209] It should be noted that the trajectory reconstruction model also needs to be trained before application. During training, the loss function module can be designed with multiple constraints. In some embodiments, a geographic coordinate regression loss can be designed to calculate the reconstructed trajectory and the ground truth trajectory. The mean absolute error, to avoid the influence of outliers, is shown in the following formula (40).
[0210] ( )
[0211] During the training of the trajectory reconstruction model, a hierarchical training and optimization strategy can be adopted. For example, a parameter freezing strategy can be used, which can fix the parameters of the signaling trajectory representation encoder and the road representation encoder, and only train the attention fusion module. ) and decoder parameters.
[0212] The optimized configuration can use the AdamW optimizer (weight decay of 5e-5), with a piecewise constant decay of the learning rate (initial lambda=1e-4, decaying to 1e-5 after 100 rounds), a batch size of B=64, and iterative training T=200 rounds.
[0213] Model Output: The trained trajectory reconstruction model can reconstruct signaling trajectories containing anomalies and coarse-grained timestamps. Converted into a high-precision trajectory containing road network topology information. It supports subsequent tasks such as traffic flow analysis and stop point detection.
[0214] In this embodiment, a trajectory reconstruction method based on the fusion of multimodal mobile phone signaling and road network data is proposed. By deeply integrating the heterogeneous trajectories of various feature information in mobile phone signaling and road network structure, and utilizing collaborative modeling of multi-source multimodal data, the accuracy of trajectories in complex urban environments can be significantly improved.
[0215] The following is a detailed explanation of the trajectory restoration method provided in the embodiments of this application, using a specific example.
[0216] To address the shortcomings of trajectory reconstruction in related technologies, this embodiment provides a trajectory reconstruction method based on mobile phone signaling and road network data, solving the problems of data noise, positioning errors, and trajectory incompleteness faced by related technologies. By deeply fusing mobile phone signaling and road network data, and combining multimodal feature extraction and spatiotemporal correlation analysis, the accuracy and robustness of trajectory reconstruction are significantly improved. Its main features are: through multimodal data processing technology, road network constraint matching, and spatiotemporal feature reconstruction, the accuracy and adaptability of urban mobile trajectory reconstruction are ultimately improved.
[0217] Figure 2 This is a flowchart illustrating a specific example of a trajectory reconstruction method provided in an embodiment of this application, as shown below. Figure 2 As shown, it specifically includes the following steps:
[0218] Step 201: Obtain signaling data for one day from the selected city, perform preprocessing, including filtering abnormal signaling such as long-distance and short-term handover, to obtain clean preprocessed signaling data;
[0219] Step 202: Using preprocessed signaling data, train the signaling trajectory representation encoder. Apply a masking rate of no more than 20% and a noise rate of 30% to the trajectory sequence using a masking module and a noise module, respectively, to generate a second signaling sequence. Reconstruct the trajectory sequence using the encoder and decoder, and calculate the loss compared to the original sequence to obtain the signaling trajectory representation encoder.
[0220] Step 203: Process the city roads into latitude and longitude sequences and apply a road representation encoder. Use a masking module to randomly mask no more than 50% of the roads, input the mask into the encoder to obtain road representations, and then compare them with the original data through the decoder. Train the road representation encoder based on the trajectory similarity loss function to obtain the road representation encoder.
[0221] Step 204: After training the trajectory reconstruction model by combining urban road network data, input the first signaling sequence data into the pre-trained signaling trajectory representation encoder to obtain the first trajectory representation feature. At the same time, query the roads in the target area associated with the first signaling sequence data, obtain the first sampling point sequence data of the roads in the target area, input it into the pre-trained road representation encoder to obtain the first road representation feature, fuse the first trajectory representation feature and the first road representation feature to obtain the enhanced trajectory representation, i.e., the second trajectory representation feature, and output the reconstructed accurate trajectory, i.e., the first active trajectory, through the decoder.
[0222] This application embodiment significantly improves the spatial accuracy of trajectory reconstruction through deep fusion of multimodal data. For example, compared with existing technologies, its positioning accuracy can be significantly improved, and its adaptability in complex urban road network environments is significantly enhanced. Furthermore, this application embodiment combines mobile phone signaling and road network data, relying not only on geometric constraints but also on deep learning of road network topology features through graph neural networks, which can significantly improve trajectory matching accuracy, especially in complex urban road network environments.
[0223] This application has been successfully applied to spatiotemporal inference platforms, particularly in scenarios involving sparse mobile signaling data, complex urban road networks, and multimodal spatiotemporal information fusion, significantly improving the accuracy and robustness of trajectory reconstruction. Through multimodal data fusion and intelligent trajectory reconstruction algorithms, this technology provides a highly adaptable and interpretable solution for urban mobile trajectory analysis, widely applicable to key areas such as intelligent traffic management, mobile communication network optimization, smart city construction, and public health and epidemic prevention and control. It is expected to bring significant technological breakthroughs and economic benefits to related industries.
[0224] See Figure 3 , Figure 3 This is a schematic diagram of the structure of a trajectory reconstruction device provided in an embodiment of this application, as shown below. Figure 3 As shown, the trajectory reconstruction device 300 includes:
[0225] The first acquisition module 301 is used to acquire the first signaling sequence data of the first user;
[0226] The second acquisition module 302 is used to acquire first sampling point sequence data of roads in the target area associated with the first signaling sequence data based on the first signaling sequence data;
[0227] The feature representation module 303 is used to input the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain a first trajectory representation feature; and to input the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain a first road representation feature of the target area.
[0228] The feature fusion module 304 is used to fuse the first trajectory representation feature and the first road representation feature to obtain the second trajectory representation feature.
[0229] The feature decoding module 305 is used to perform feature decoding based on the second trajectory representation features to obtain the first activity trajectory of the first user.
[0230] Optionally, the feature decoding module 305 is specifically used for:
[0231] Using the target feature as the query and the second trajectory representation feature as key-value pairs, a cross-attention mechanism is employed for feature decoding to obtain the first activity trajectory of the first user; wherein...
[0232] The target features include pre-encoded trajectory timestamp sequence embedding features and trajectory location embedding features.
[0233] Optionally, the feature characterization module 303 is specifically used for:
[0234] The first signaling sequence data is input into the signaling trajectory representation encoder for spatiotemporal feature encoding to obtain embedded feature representation. The spatiotemporal feature encoding includes spatial feature encoding, temporal feature encoding, and spatiotemporal fusion encoding that fuses the spatial feature encoding and temporal feature encoding through position encoding.
[0235] Based on the embedded feature representation, the signaling trajectory representation encoder uses a multi-head self-attention mechanism to extract features and obtain the first trajectory representation feature.
[0236] Optionally, the device further includes a first pre-training module, the first pre-training module being configured to:
[0237] The second signaling sequence data of the second user is obtained, which is obtained by masking and adding noise to the signaling sequence data of the second user;
[0238] The second signaling sequence data is input into the signaling trajectory representation encoder for feature representation to obtain the third trajectory representation feature;
[0239] Based on the third trajectory representation features, feature decoding is performed to obtain the second user's second activity trajectory and the confidence level of each trajectory point in the second activity trajectory;
[0240] Based on the second activity trajectory and the confidence level, a first target loss is constructed. The first target loss is obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level.
[0241] Based on the first target loss, the signaling trajectory representation encoder is pre-trained.
[0242] Optionally, the device further includes a second pre-training module, the second pre-training module being used for:
[0243] The second sampling point sequence data of roads in the topological road network is obtained by masking the sampling point sequence data of roads in the topological road network.
[0244] The second sampling point sequence data is input into the road representation encoder for feature representation to obtain the second road representation features of the roads in the topological road network;
[0245] Based on the second road characterization features, feature decoding is performed to obtain the reconstructed sequence data of roads in the topological road network;
[0246] Based on the reconstructed sequence data, a second objective loss is constructed, which is obtained by superimposing the reconstruction accuracy loss and trajectory smoothness regularization loss based on the reconstructed sequence data.
[0247] The road representation encoder is pre-trained based on the second target loss.
[0248] Optionally, the second acquisition module 302 is specifically used for:
[0249] For each signaling trajectory in the first signaling sequence data, a buffer area within a preset range associated with each signaling point is determined, centered on each signaling point.
[0250] Extract the target area covered by the buffer area associated with each signaling point;
[0251] Extract the first sampling point sequence data of the roads in the target area, wherein the first sampling point sequence data includes the location of the road points and the cumulative distance of the road points in the road segment.
[0252] The trajectory restoration device 300 can implement all the processes implemented in the above trajectory restoration method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0253] See Figure 4 The figure shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 4 As shown, the electronic device 400 includes: a processor 401, a memory 402, a user interface 403, and a bus interface 404.
[0254] Processor 401 is used to read the program from memory 402 and execute the following procedures:
[0255] Obtain the first signaling sequence data of the first user;
[0256] Based on the first signaling sequence data, obtain the first sampling point sequence data of roads in the target area associated with the first signaling sequence data;
[0257] The first signaling sequence data is input into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation feature; and the first sampling point sequence data is input into a pre-trained road representation encoder for feature representation to obtain the first road representation feature of the target area.
[0258] The first trajectory representation feature and the first road representation feature are fused to obtain the second trajectory representation feature;
[0259] Based on the second trajectory representation features, feature decoding is performed to obtain the first activity trajectory of the first user.
[0260] exist Figure 4 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 401 and memory represented by memory 402 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 404 provides an interface. For different user devices, user interface 403 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.
[0261] The processor 401 is responsible for managing the bus architecture and general processing, while the memory 402 can store the data used by the processor 401 when performing operations.
[0262] In some embodiments, the processor 401 is further configured to:
[0263] Using the target feature as the query and the second trajectory representation feature as key-value pairs, a cross-attention mechanism is employed for feature decoding to obtain the first activity trajectory of the first user; wherein...
[0264] The target features include pre-encoded trajectory timestamp sequence embedding features and trajectory location embedding features.
[0265] In some embodiments, the processor 401 is further configured to:
[0266] The first signaling sequence data is input into the signaling trajectory representation encoder for spatiotemporal feature encoding to obtain embedded feature representation. The spatiotemporal feature encoding includes spatial feature encoding, temporal feature encoding, and spatiotemporal fusion encoding that fuses the spatial feature encoding and temporal feature encoding through position encoding.
[0267] Based on the embedded feature representation, the signaling trajectory representation encoder uses a multi-head self-attention mechanism to extract features and obtain the first trajectory representation feature.
[0268] In some embodiments, the processor 401 is further configured to:
[0269] The second signaling sequence data of the second user is obtained, which is obtained by masking and adding noise to the signaling sequence data of the second user;
[0270] The second signaling sequence data is input into the signaling trajectory representation encoder for feature representation to obtain the third trajectory representation feature;
[0271] Based on the third trajectory representation features, feature decoding is performed to obtain the second user's second activity trajectory and the confidence level of each trajectory point in the second activity trajectory;
[0272] Based on the second activity trajectory and the confidence level, a first target loss is constructed. The first target loss is obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level.
[0273] Based on the first target loss, the signaling trajectory representation encoder is pre-trained.
[0274] In some embodiments, the processor 401 is further configured to:
[0275] The second sampling point sequence data of roads in the topological road network is obtained by masking the sampling point sequence data of roads in the topological road network.
[0276] The second sampling point sequence data is input into the road representation encoder for feature representation to obtain the second road representation features of the roads in the topological road network;
[0277] Based on the second road characterization features, feature decoding is performed to obtain the reconstructed sequence data of roads in the topological road network;
[0278] Based on the reconstructed sequence data, a second objective loss is constructed, which is obtained by superimposing the reconstruction accuracy loss and trajectory smoothness regularization loss based on the reconstructed sequence data.
[0279] The road representation encoder is pre-trained based on the second target loss.
[0280] In some embodiments, the processor 401 is further configured to:
[0281] For each signaling trajectory in the first signaling sequence data, a buffer area within a preset range associated with each signaling point is determined, centered on each signaling point.
[0282] Extract the target area covered by the buffer area associated with each signaling point;
[0283] Extract the first sampling point sequence data of the roads in the target area, wherein the first sampling point sequence data includes the location of the road points and the cumulative distance of the road points in the road segment.
[0284] Preferably, the present invention also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the computer program is executed by the processor 401, it implements the various processes of the above-described trajectory restoration method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0285] This invention also provides a readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the trajectory reconstruction method embodiments described above and achieves the same technical effect. To avoid repetition, it will not be described again here. The readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0286] This application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the various processes of the above-described trajectory restoration method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0287] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0288] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0289] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0290] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0291] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0292] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0293] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A trajectory restoration method characterized by, The method includes: Obtain the first signaling sequence data of the first user; For each signaling trajectory in the first signaling sequence data, a buffer area within a preset range associated with each signaling point is determined, centered on each signaling point. Extract the target area covered by the buffer area associated with each signaling point; Extract the first sampling point sequence data of the roads in the target area, wherein the first sampling point sequence data includes the location of the road points and the cumulative distance of the road points in the road segment; The first signaling sequence data is input into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation feature; and the first sampling point sequence data is input into a pre-trained road representation encoder for feature representation to obtain the first road representation feature of the target area. The first trajectory representation feature and the first road representation feature are fused to obtain the second trajectory representation feature; Based on the second trajectory representation features, feature decoding is performed to obtain the first activity trajectory of the first user; Before inputting the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation features, the method further includes: The second signaling sequence data of the second user is obtained, which is obtained by masking and adding noise to the signaling sequence data of the second user; The second signaling sequence data is input into the signaling trajectory representation encoder for feature representation to obtain the third trajectory representation feature; Based on the third trajectory representation features, feature decoding is performed to obtain the second user's second activity trajectory and the confidence level of each trajectory point in the second activity trajectory; Based on the second activity trajectory and the confidence level, a first target loss is constructed. The first target loss is obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level. Based on the first target loss, the signaling trajectory representation encoder is pre-trained.
2. The method of claim 1, wherein, The step of decoding features based on the second trajectory representation features to obtain the first activity trajectory of the first user includes: Using the target features as the query and the second trajectory representation features as key-value pairs, a cross-attention mechanism is employed for feature decoding to obtain the first activity trajectory of the first user; wherein... The target features include pre-encoded trajectory timestamp sequence embedding features and trajectory location embedding features.
3. The method according to claim 1, characterized in that, The step of inputting the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain the first trajectory representation features includes: The first signaling sequence data is input into the signaling trajectory representation encoder for spatiotemporal feature encoding to obtain embedded feature representation. The spatiotemporal feature encoding includes spatial feature encoding, temporal feature encoding, and spatiotemporal fusion encoding that fuses the spatial feature encoding and temporal feature encoding through position encoding. Based on the embedded feature representation, the signaling trajectory representation encoder uses a multi-head self-attention mechanism to extract features and obtain the first trajectory representation feature.
4. The method according to claim 1, characterized in that, Before inputting the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain the first road representation features of the target region, the method further includes: The second sampling point sequence data of roads in the topological road network is obtained by masking the sampling point sequence data of roads in the topological road network. The second sampling point sequence data is input into the road representation encoder for feature representation to obtain the second road representation features of the roads in the topological road network; Based on the second road characterization features, feature decoding is performed to obtain the reconstructed sequence data of roads in the topological road network; Based on the reconstructed sequence data, a second objective loss is constructed, which is obtained by superimposing the reconstruction accuracy loss and trajectory smoothness regularization loss based on the reconstructed sequence data. The road representation encoder is pre-trained based on the second target loss.
5. A trajectory reconstruction device, characterized in that, The device includes: The first acquisition module is used to acquire the first signaling sequence data of the first user; The second acquisition module is used to acquire, based on the first signaling sequence data, the first sampling point sequence data of the road in the target area associated with the first signaling sequence data; The feature representation module is used to input the first signaling sequence data into a pre-trained signaling trajectory representation encoder for feature representation to obtain a first trajectory representation feature; and to input the first sampling point sequence data into a pre-trained road representation encoder for feature representation to obtain a first road representation feature of the target area. The feature fusion module is used to fuse the first trajectory representation feature and the first road representation feature to obtain the second trajectory representation feature. The feature decoding module is used to perform feature decoding based on the second trajectory representation features to obtain the first activity trajectory of the first user; The device further includes a first pre-training module, the first pre-training module being configured to: The second signaling sequence data of the second user is obtained, which is obtained by masking and adding noise to the signaling sequence data of the second user; The second signaling sequence data is input into the signaling trajectory representation encoder for feature representation to obtain the third trajectory representation feature; Based on the third trajectory representation features, feature decoding is performed to obtain the second user's second activity trajectory and the confidence level of each trajectory point in the second activity trajectory; Based on the second activity trajectory and the confidence level, a first target loss is constructed. The first target loss is obtained by superimposing the reconstruction accuracy loss based on the second activity trajectory and the confidence regularization loss based on the confidence level. Based on the first target loss, the signaling trajectory representation encoder is pre-trained; The second acquisition module is specifically used for: For each signaling trajectory in the first signaling sequence data, a buffer area within a preset range associated with each signaling point is determined, centered on each signaling point. Extract the target area covered by the buffer area associated with each signaling point; Extract the first sampling point sequence data of the roads in the target area, wherein the first sampling point sequence data includes the location of the road points and the cumulative distance of the road points in the road segment.
6. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the trajectory reconstruction method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the trajectory reconstruction method as described in any one of claims 1 to 4.
8. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the trajectory reconstruction method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Terminal track generation method and device, medium and product
CN120659013A
