Expressway pedestrian and vehicle in-transit track matching method and device and medium
By using GRU algorithm and GASTC model to match the trajectory sequences of users and vehicles to highway sections in highway environments, the problem of low accuracy in human-vehicle tracking in the prior art is solved, and the precise matching of human-vehicle trajectory and High accuracy matching effect.
Patent Information
- Application Number
- CN202411526103.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The tracking of human-vehicles in the prior art is not very accurate in highway environments, especially when the vehicle is not equipped with a GPS Beidou positioning system or the positioning fails, it is difficult to achieve timely tracking.
By obtaining the original trajectory sequence of users and vehicles on the highway, combining the highway road network structure, the trajectory sequence is matched to the highway section using the GRU algorithm and the deep representation learning model (GASTC model), and the embedded representation of the trajectory sequence is calculated to determine the Similarity between human-car pairs.
It realizes accurate matching of human-vehicle trajectories in highway environments, improves the accuracy and robustness of human-vehicle matching, and can work effectively under noise and low sampling frequency conditions.
Smart Images

Figure CN119402825A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of intelligent transportation technology, and in particular to a method, device and medium for matching on-the-way trajectories of people and vehicles on a highway. Background Art
[0002] With the development of expressways and the rapid increase in the number of vehicles, many problems have arisen. For example, it is impossible to obtain the specific information of the people in the car in time, and rescue cannot be carried out in time if an accident occurs. For example, when the vehicle is not equipped with the GPS Beidou positioning system or it fails, it is difficult to track the vehicle in time.
[0003] The problem of human-vehicle tracking in the existing technology can usually be solved by human-vehicle matching. However, due to the errors in the human signaling trajectory information, vehicle GPS and Beidou information, the accuracy of human-vehicle matching is not very ideal. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and medium for matching on-the-way trajectories of people and vehicles on a highway to solve the above-mentioned technical problems.
[0005] In a first aspect, an embodiment of the present invention provides a method for matching on-the-way trajectories of people and vehicles on a highway, comprising:
[0006] Obtaining the original trajectory sequences of multiple users and multiple vehicles on the highway, wherein the original trajectory sequence of each user is from the mobile phone signaling data, and the original trajectory sequence of each vehicle is from the highway vehicle checkpoint data;
[0007] Match each original trajectory sequence to the highway section to obtain each matched trajectory sequence;
[0008] Combined with the highway network structure, the embedded representation of each matched trajectory sequence is calculated;
[0009] The similarity between the embedded representation of each user's matched trajectory sequence and the embedded representation of each vehicle's matched trajectory sequence is calculated, and the matched person-vehicle pairs are determined according to the similarities.
[0010] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0011] one or more processors;
[0012] a memory for storing one or more programs,
[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for matching on-the-way trajectories of people and vehicles on highways as described in any embodiment.
[0014] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for matching on-the-way trajectories of people and vehicles on highways as described in any embodiment.
[0015] Embodiments of the Invention In summary, embodiments of the present invention provide a method, device and medium for matching on-the-road trajectories of people and vehicles on a highway, which matches mobile phone users on a highway with their vehicles by fusing raw data from different sources such as vehicle checkpoint data, mobile phone signaling desensitization data and road network data. Compared with the prior art, the present invention has the following advantages:
[0016] 1) The method of this embodiment fully considers the constraints of the road network on the trajectory when considering road segment matching. Based on the mobile phone signaling data and vehicle checkpoint data from different sources, the GRU algorithm is used to match the trajectory sequence data of the vehicle and the user to the highway network, thereby extracting the trajectories of the two.
[0017] 2) Compared with the traditional human-vehicle matching model, this embodiment proposes a new deep representation learning model (GRU highway section matching + trajectory embedding representation). This model not only considers the impact of noise and low sampling frequency on the trajectory, but also has a strong feature extraction capability. It can accurately calculate the spatiotemporal similarity of the trajectories of people and vehicles on the highway, thereby accurately matching people and their vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is a flow chart of a method for matching on-the-way trajectories of people and vehicles on a highway provided by an embodiment of the present invention;
[0020] Figure 2 is a spatial distribution diagram of original trajectory points provided by an embodiment of the present invention;
[0021] Figure 3 is a matching result between a vehicle and a highway section provided by an embodiment of the present invention;
[0022] Figure 4 is a matching result between another vehicle and a highway section provided by an embodiment of the present invention;
[0023] Figure 5is a matching result between a user and a highway section provided by an embodiment of the present invention;
[0024] Figure 6 is a matching result between another user and a highway section provided by an embodiment of the present invention;
[0025] Figure 7 Schematic diagram of the processing flow of the GATSC model provided by an embodiment of the present invention;
[0026] Figure 8 is a comparison diagram of model effects provided by an embodiment of the present invention;
[0027] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0029] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0030] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0031] Figure 1 is a flow chart of a method for matching the on-the-way trajectories of a person or a vehicle on a highway provided by an embodiment of the present invention. The method is executed by an electronic device, such as Figure 1 As shown, the method specifically includes:
[0032] S110, obtaining original trajectory sequences of multiple users and multiple vehicles on the highway, wherein the original trajectory sequence of each user is from mobile phone signaling data, and the original trajectory sequence of each vehicle is from highway vehicle checkpoint data.
[0033] This embodiment extracts the original trajectory sequences of multiple users and multiple vehicles from the operator's original mobile phone signaling dataset and the highway vehicle checkpoint dataset respectively as the data source of the entire method. Optionally, the missing data, redundant data, ping-pong data and drift data in the original mobile phone signaling dataset can be processed, and abnormal vehicle trajectory data can be removed to construct the mobile phone signaling dataset and the vehicle trajectory dataset.
[0034] Invalid data refers to data records in the original data that cannot be effectively used and cannot participate in subsequent calculations. Invalid data generally has information missing in one or more fields. For invalid data, it is processed by direct deletion.
[0035] Duplicate data mainly refers to data where the values of multiple fields are exactly the same, or only the time field has a very short time interval difference, while the values of other fields are exactly the same. The generation of duplicate mobile phone data is related to the signal transmission and data storage of the communication network. These data actually record the location switching or location update process of the same mobile phone. Duplicate vehicle data is mainly generated because the camera repeatedly records the information of the vehicle, which has no substantial significance for subsequent research. Therefore, for this type of data, when processing, keep the first record that is recorded first, and delete the rest of the records.
[0036] The generation of ping-pong data is related to the overlap of base station signal coverage in the communication network. That is, when certain areas where the mobile phone is located are covered by the signals of two communication base stations at the same time, the signal source received by the mobile phone may change back and forth between the two base stations, resulting in repeated switching of the communication cell fields of several consecutive data in the data records generated by the mobile phone. The identification process of ping-pong data is to arrange the data records of each mobile phone in chronological order on the basis of deleting duplicate data, and then group three data adjacent in time. If the base station information when the three data are switched switches back and forth between the two base stations, and this situation occurs more than twice, and the switching time interval is less than the minimum time threshold, it is determined to be ping-pong data. The processing method for ping-pong data is to retain the first and last data in time, and delete the remaining data records.
[0037] S120 , matching each original trajectory sequence to a highway section to obtain each matched trajectory sequence.
[0038] After obtaining the mobile phone signaling data set and the vehicle trajectory data set through S110, the spatial distribution of the trajectory points can be analyzed for spatial characteristics, that is, the trajectory data points can be located in the actual road network on the electronic map, such as Figure 2 As shown in the figure, it can be seen that most of the trajectory sampling points are evenly distributed on the road network, but some sampling points are not on the road network, so this step is to match the mobile phone signaling trajectory data points and vehicle trajectory data points with the highway sections respectively.
[0039] Optionally, each sampling point in the user and vehicle trajectory data set can be matched to a road section on the actual road network through a GRU model, and a moving trajectory sequence between the two can be obtained. In a specific embodiment, for any original trajectory sequence (which can be the original trajectory sequence of the user or the original trajectory sequence of the vehicle), the original trajectory point at the current moment and the hidden state at the previous moment are input into a trained GRU model to obtain the highway section to which the original trajectory point at the current moment belongs, and the hidden state at the current moment. The original trajectory point at the next moment and the hidden state at the current moment are input into the trained GRU model to obtain the highway section to which the original trajectory point at the next moment belongs, and the hidden state at the next moment. This cycle is repeated until the highway sections to which each original trajectory point belongs are determined. According to the highway sections to which each original trajectory point belongs, the matched trajectory sequence can be determined. In the same way, after performing the above operations on each original trajectory sequence using the trained GRU model, the matched trajectory sequence of each user and the matched trajectory sequence of each vehicle can be obtained.
[0040] Specifically, the GRU model first uses the MinMaxScaler function to normalize the latitude and longitude information of the input trajectory sampling points, converting them into a two-dimensional vector containing the latitude and longitude position information of the sampling points, and then adds the vector to the previous hidden state h i-1 Together as the input of the GRU model, the GRU model calculates and predicts a road segment s i and the current time hidden state h i . And so on, until all the sampling points of the trajectory are input into the model. It is worth noting that the GRU model does not directly output the sequence number of the predicted road section, but uses softmax as the activation function of the GRU output layer to output a |V|-dimensional probability vector, where |V| represents the number of road sections in the road network model. Each element in the predicted probability vector represents the probability that the model predicts that the current sampling point is located in the road section corresponding to the sequence number, and the hidden state h i The first i-1 sampling points of the trajectory are included <t1,t2…t i-1> location information. In each time period, the model shares weight parameters. When performing real-time road network matching on multiple mobile objects or multiple trajectories at the same time, each mobile object needs to maintain a hidden state belonging to the mobile object, which represents the current state of the trajectory generated by the mobile object.
[0041] Furthermore, during the training process of the GRU model, a loss function can be constructed based on the actual road section to which the original trajectory point input into the GRU model belongs and the distance between multiple road sections adjacent to the actual road section, so that the greater the distance between the road section to which the original trajectory point predicted by the GRU model belongs and the actual road section, the greater the penalty term in the loss function.
[0042] In a specific implementation, road network matching can be regarded as a multi-classification problem. Each trajectory sampling point may be matched to any road segment in the entire road network. Therefore, the cross entropy loss function can be used directly. Specifically, a trajectory sequence can be regarded as a sample, and the cross entropy loss of a single sample is mm Defined as:
[0043]
[0044] Where |T| represents the number of sampling points in the path, |V| represents the number of road segments in the road network; y ij represents the indicator variable. If the correct section (i.e., the section to which the ith trajectory point actually belongs) is the jth section, then y ij is 1, otherwise y ij is 0; p ij Represents the probability of the j-th road section predicted by the i-th output of the model.
[0045] In order to consider the location information between the road networks in the model prediction results, this embodiment uses the indicator variable y in the loss function ij Defined as a distance multiplier:
[0046]
[0047] Among them, s o represents the target road segment, that is, the actual road segment to which the trajectory point currently predicted by the model belongs; d(s o ,s j ) represents the target road segment s o To the jth road segment s in the road network jThe shortest distance in the road network. This distance multiplier can impose a higher penalty on predicted sections that are far away, so that the model tends to predict sections that are close to the target section. However, this definition requires that each time the model outputs a prediction probability, it needs to traverse the entire road network model graph from the target section in a breadth-first manner to calculate the shortest distance from the target section to all other sections in the road network, which will make the model training computational cost too high. In order to solve this problem, it can be observed that the distance multiplier corresponding to the section far away from the target section is basically close to 0, so we can directly calculate only the K sections closest to the target section to obtain a new distance multiplier:
[0048]
[0049] Among them, KNN(s o ) represents the K nearest vertices around the vertex corresponding to the target road segment. Combining equations (1)-(3), we can get the final loss function of the model:
[0050]
[0051] In addition, this embodiment also verifies the road network matching operation based on the GRU model. The verification method generally includes two parts. First, a mobile phone signaling data set and a vehicle trajectory data set are constructed. The training set includes a trajectory data set of 220 users and a trajectory data set of 108 vehicles. The verification set includes a trajectory data set of 55 users and a trajectory data set of 27 vehicles. Secondly, the road network matching algorithm based on the GRU model is visualized. The GRU model is used to match the offset original vehicle and user trajectory data points to the actual road network, thereby obtaining the movement trajectories of different vehicles and users on the highway. Figure 3-Figure 6 The matching results of vehicle *A4***9, vehicle *A5***K, and personnel a and b on some sections of the road are selected respectively. The horizontal and vertical coordinates in the figure represent longitude and latitude respectively, the blue continuous solid line represents the highway section, the blue dotted line represents the original trajectory sequence, the blue dots on the blue dotted line represent the original trajectory points, and the points on the highway section connected by the original trajectory points are the matched trajectory points.
[0052] S130, calculating the embedded representation of each matched trajectory sequence in combination with the highway network structure.
[0053] In this step, each matched trajectory sequence is represented as an embedding vector, which is used to calculate the similarity between the human and vehicle trajectories. Since there are two relationships between the trajectories in the road network, the first relationship is the topological structure relationship between the trajectory points in the road network, which will directly affect the distance between them; the second relationship is the neighbor attribute of the trajectory point. Therefore, this embodiment proposes a random walk algorithm based on edge weight bias and trajectory perception to generate a trajectory sequence, which can consider the constraints of the road network on the trajectory. Specifically, it is required that the starting point and the node passed by the walk must appear in the same trajectory. This is because the edges (road sections) in the road network may be inaccessible to the vehicle trajectory, and the transition probability is set according to the weight of the edge during the walk. For a given starting node v0 and the length of the walk l (the average length of the road section is taken in this embodiment), the formula for walking to the current node vi is expressed as:
[0054]
[0055] Among them, p(v i =y|v i-1 = x) indicates that the node v i-1 Walk to the current node v i The probability of xy The value of represents the transition probability from node x to node y, and Z is a normalization constant. Set its second-order transition probability π xy =α tx , which is defined as follows:
[0056]
[0057] Among them, p and q represent the hyperparameters of breadth-first and depth-first walk characteristics, respectively, and d tx represents the minimum number of nodes required from node t to node x, w vx represents the number of occurrences of the edge from node v to node x, τ represents the vertex set of the trajectory, and {v0,t}∈τ means that vertices v0 and t belong to τ.
[0058] Although the topological structure information of the road network is obtained through the above graph sampling, it is still necessary to further obtain the embedded representation of the nodes. In order to capture the attribute information of neighbor nodes in the road network, the Skip-gram model can be used. For the trajectory sequence T = {t1, t2, …, t n}, the following objective function can be obtained through the Skip-gram model:
[0059]
[0060] Among them, N s(v) represents the neighbor nodes of node v obtained by sampling strategy s, f represents the function of generating node embedding vector, P r (N S (v)|f(v)) means to get the neighbor trajectory point N under given f(v) s (v). Assume that the observed neighbor nodes are independent of each other, that is, N s (v) is independent of the embedding vector of node v:
[0061]
[0062] Then, use the Softmax function to calculate the neighboring node v under a given node f(v) i The conditional probability P r (v i |f(v)), as follows:
[0063]
[0064] Based on the above analysis, S130 may include the following steps:
[0065] Step 1: Use the Skip-gram model to embed each matched trajectory point.
[0066] Step 2: Take the highway network structure as a graph topology, take the embedded representation of each matched trajectory point as a node, and execute the random walk algorithm based on the graph topology to obtain the final embedded representation of each matched trajectory point. In this process, the random walk algorithm based on the graph topology is executed according to the objective function (7), and the variables in the objective function (7) can be calculated by formula (8)(5)(6).
[0067] Step 3: Based on the embedded representation of each matched trajectory point in the same matched trajectory sequence, learn the spatial structural features and contextual features of the same matched trajectory sequence to obtain the embedded representation of the same matched trajectory sequence. Although the embedded representation of each node is obtained through the above graph embedding layer, it only considers the topological structure characteristics of the road network and does not consider other information of the trajectory. Therefore, it is necessary to consider the potential information of the trajectory from multiple angles so that the low-dimensional vector representation of the trajectory has better stability and robustness. In a specific implementation, it can be achieved by Figure 7 The network model shown in the figure obtains the embedded representation of the trajectory sequence, and its specific processing process includes the following steps:
[0068] Step A, the embedding of each trajectory point in any matched trajectory sequence is sequentially represented and input into another trained GRU model, and the hidden state at the last moment output by the other trained GRU model is used as the first feature vector of any matched trajectory sequence. The GRU model used in this step has the same basic structure as the GRU model in S120, but the specific parameters are different. In this step, a GRU unit is used to capture the spatial and structural characteristics of the trajectory. The GRU model includes an update gate and a reset gate. The update gate is used to control the extent to which the state of the previous moment is used at the current moment, and the reset gate is used to control how much of the state information of the previous moment is written into the hidden layer state; and the hidden layer state h at the last moment is used. l As a vector representation of the trajectory.
[0069] At the same time, the embedding representation of each trajectory point in any matched trajectory sequence is input into the trained Transformer model, and the encoder output of the trained Transformer model is used as the second feature vector of any matched trajectory sequence. The Transform structure based on the attention mechanism captures the long-distance dependent feature information of the trajectory, and its input vector c i It consists of the following formula:
[0070]
[0071] Among them, c i , and posi∈R d×1 , d represents the vector dimension of each node; i represents the position of the trajectory point in the trajectory sequence; Obtained from the above graph embedding layer, it represents the vector representation of the i-th node in the road network; pos i Represents a position encoding vector that follows a pattern of cosine and sine functions of predefined node positions.
[0072] After obtaining the input vector, this embodiment uses a multi-channel attention mechanism to focus on the different representations of the model at different positions. The multi-channel attention mechanism is based on the attention mechanism. An attention mechanism can be regarded as a mapping from query (Q) and key (K)-value (V) to output. The output attention weight matrix can be obtained by the following formula:
[0073]
[0074] Among them, Q, K, V∈R b×l×drepresents the query, key, and value matrix, b represents the batch size of each training, l represents the maximum trajectory length, and d represents the embedding dimension. However, the single-head attention mechanism cannot obtain information from different subspaces, so the following multi-head attention mechanism is proposed:
[0075] (Q i ,K i ,V i )=M×(W i Q ,W i K ,W i V )(13)
[0076]
[0077] Z=Concat(Head1,Head2,...,Head k )W 0 (15)
[0078] Where M∈R b×l×d represents the input matrix; W Q , W K and W V ∈R d×d Head represents the weight matrix of Q, K, and V; i is the result of the i-th attention mechanism; Concat represents the concatenation operation; W 0 ∈R d×d represents the fully connected layer used to process the results; d k = d / k represents the hidden layer size of each part, and k represents the number of multi-head attention mechanisms.
[0079] In order to obtain the embedding representation of the entire trajectory, average pooling is used to process the embedding representation of the node:
[0080] h s =mean(z1,z2,…,z l )(16)
[0081] Among them, z i is the i-th row vector in the output matrix Z, representing the embedded representation of the i-th node in the trajectory; finally, the mean of these row vectors h is obtained s As a new d-dimensional vector to represent the entire trajectory.
[0082] Step B: Fuse the first feature vector and the second feature vector to obtain the final embedding representation r of any matched trajectory sequence. That is, fuse the feature vectors learned by the attention mechanism and GRU to enhance the feature expression ability of the model:
[0083] r=h s +h l (17)
[0084] Among them, h s is the output of the multi-head attention mechanism, h l is the hidden layer state of GRU at the last moment. By fusing h s and h l , the vector representation r of the trajectory can simultaneously retain the long-distance dependency, spatial and structural features of the trajectory. After performing the above operations on all matched trajectory sequences, the embedded representation of each matched trajectory sequence can be obtained.
[0085] Combination Figure 7 , the overall process of using the graph embedding algorithm, Transform model and GRU model can be described as the trajectory representation model GATSC. Among them, the graph embedding algorithm is used to learn the embedded representation of each matched trajectory point, the multi-channel attention mechanism of the Transform model is used to extract the long-distance dependency features of the trajectory, and the GRU model is used to extract the spatial and structural features of the trajectory. The entire GATSC model can use the reconstruction error of the encoder-decoder model as the final loss function L, and its goal is to predict the conditional probability of the node appearing:
[0086] L=-logΠ t P r (y t |y 1:t-1 ,x) (18)
[0087] Among them, P r (y t |y 1:t-1 ,x) represents the hidden state h t Capture [x,y1,y2,…y t-1 ], predict node y t The conditional probability of occurrence.
[0088] Since formula (18) has a large number of function calculations, this embodiment uses an approximate spatial proximity perception loss function as the final loss function:
[0089]
[0090] Among them, N k (y t ) represents node y t The first K nearest neighbor nodes of t represents the hidden state, W is h t The projection matrix from the hidden state space to the vocabulary space, v represents the fixed-dimensional vector that the encoder reads the sequence x and encodes, represents the vector after encoding the x sequence in the transposed matrix of W, represents the u-th row of the transposed matrix of W, is the decoding target y t is the spatial neighbor weight of unit u, |y| represents the length of trajectory sequence y, and t represents the t-th position node.
[0091] Optionally, after the parameter optimization process of the test set, this embodiment determines the optimal hyperparameter configuration. For the graph embedding layer, the length of the random walk is set to 80, the values of p and q are adjusted to 0.8, and the embedding dimension of the nodes and trajectories is 256. In the setting of the attention layer, we select the number of channels as 8. For the recurrent neural network layer, a three-layer GRU network is adopted, and the number of hidden units in each layer is set to 256. During the training process, the Adam optimization algorithm was selected, and the size of the training batch was set to 128, and the learning rate was adjusted to 0.001 to optimize the convergence speed. In addition, in order to prevent overfitting, the dropout mechanism can be introduced, and its probability is set to 0.2.
[0092] S140: Calculate the similarity between the embedded representation of the matched trajectory sequence of each user and the embedded representation of the matched trajectory sequence of each vehicle, and determine the matched person-vehicle pairs according to the similarities.
[0093] Specifically, any user and any vehicle can be selected to form a person-vehicle pair. For the person-vehicle pair, the embedding representation of the user's matched trajectory sequence and the similarity of the embedding representation of the vehicle's matched trajectory sequence are calculated. If the similarity is greater than a set threshold, the user and the vehicle are determined to be a matched person-vehicle pair. The same operation is performed on all person-vehicle pairs to obtain each matched person-vehicle pair.
[0094] Furthermore, in order to measure the impact of outliers (trajectory points that deviate from the highway section) in the mobile phone signaling data on the matching of people and vehicles, this embodiment uses the user's original trajectory sequence and the matched trajectory sequence to calculate the similarity with the vehicle's matched trajectory sequence, and proves the necessity of using the GRU model for road matching (S120) based on the two similarities. Optionally, the embedded representation of the original trajectory sequence of each user can be calculated in combination with the highway network structure, that is, the user trajectory is not subjected to trajectory matching in S120, and S130 is directly executed to obtain the embedded representation of the user's original trajectory sequence. Then, the similarity between the embedded representation of the original trajectory sequence of each user and the embedded representation of the matched trajectory sequence of each vehicle is calculated. For the convenience of distinction and description, this similarity is called the first similarity, and the embedded representation of the trajectory sequence after matching each user and the embedded representation of the trajectory sequence after matching each vehicle are called the second similarity (that is, the similarity obtained by the method S110-S140 of this embodiment). The first similarity and the second similarity of the same person-vehicle pair are compared. If the difference between the two similarities is greater, it means that the method of this embodiment improves the accuracy of person-vehicle pair matching more significantly.
[0095] In a specific implementation, multiple human-vehicle matching methods can be used to select trajectories with different outliers from the original mobile phone signaling data, and use different methods to calculate the similarity between the offset trajectory (i.e., the mobile phone trajectory) and the original trajectory (the vehicle trajectory). The two calculated similarities are marked as sim outlier (Similarity between unmatched mobile phone trajectories and vehicle trajectories) and sim match (Similarity between the matched mobile phone trajectory and the vehicle trajectory), and define an influence ratio to represent the accuracy of measuring trajectory similarity, as shown in formula (20):
[0096] IR=(sim match -sim outlier ) / (sim match )(20)
[0097] Finally get Figure 8 Model comparison effect. It can be seen that under different levels of average outlier deviation, especially when the deviation is more significant, the method of this embodiment (corresponding to the GASTC model) shows a lower IR value, and the overall performance exceeds other comparison models, highlighting its excellent robustness in dealing with trajectory outliers. It is worth noting that the two measurement methods, LCSS and EDR, also show lower IR values under various outlier deviation conditions. This is because in this implementation, in the algorithm they use, the setting of the distance threshold is directly related to the actual deviation distance of the outlier, and prior information is used, so better performance is achieved.
[0098] In summary, the embodiments of the present invention provide a method, device and medium for matching the on-the-way trajectories of people and vehicles on a highway, which matches mobile phone users on a highway with their vehicles by fusing raw data from different sources such as vehicle checkpoint data, mobile phone signaling desensitization data and road network data. Compared with the prior art, the present invention has the following advantages:
[0099] 1) The method of this embodiment fully considers the constraints of the road network on the trajectory when considering road segment matching. Based on the mobile phone signaling data and vehicle checkpoint data from different sources, the GRU algorithm is used to match the trajectory sequence data of the vehicle and the user to the highway network, thereby extracting the trajectories of the two.
[0100] 2) Compared with the traditional human-vehicle matching model, this embodiment proposes a new deep representation learning model (GRU highway section matching + GASTC model), which not only considers the impact of noise and low sampling frequency on the trajectory, but also has a strong feature extraction capability; it can accurately calculate the spatiotemporal similarity of the trajectories of people and vehicles on the highway, thereby accurately matching people and their vehicles.
[0101] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Fig. 9 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0102] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the highway vehicle-on-the-way trajectory matching method in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the above-mentioned highway vehicle-on-the-way trajectory matching method.
[0103] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0104] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0105] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for matching on-the-way trajectories of people and vehicles on highways of any embodiment is implemented.
[0106] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0107] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0108] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0109] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A method for matching the trajectories of people and vehicles on a highway, characterized in that: include: Obtaining the original trajectory sequences of multiple users and multiple vehicles on the highway, wherein the original trajectory sequence of each user is from the mobile phone signaling data, and the original trajectory sequence of each vehicle is from the highway vehicle checkpoint data; Match each original trajectory sequence to the highway section to obtain each matched trajectory sequence; Combined with the highway network structure, the embedded representation of each matched trajectory sequence is calculated; The similarity between the embedded representation of each user's matched trajectory sequence and the embedded representation of each vehicle's matched trajectory sequence is calculated, and the matched person-vehicle pairs are determined according to the similarities.
2. The method according to claim 1, characterized in that The step of matching each original trajectory sequence to a highway section to obtain each matched trajectory sequence includes: For any original trajectory sequence, the original trajectory point at the current moment and the hidden state at the previous moment are input into a trained GRU model to obtain the highway section to which the original trajectory point at the current moment belongs and the hidden state at the current moment; Inputting the original trajectory point at the next moment and the hidden state at the current moment into the trained GRU model to obtain the highway section to which the original trajectory point at the next moment belongs and the hidden state at the next moment; This cycle is repeated until the highway sections to which the original trajectory points belong are determined; According to the highway section to which each original trajectory point belongs, the matched trajectory sequence is determined.
3. The method according to claim 2, characterized in that Before the original trajectory point at the current moment and the hidden state at the previous moment are input into the trained GRU model, the method further includes: The loss function of the GRU model is constructed based on the actual road section to which the original trajectory point input into the GRU model belongs and the distance between multiple road sections adjacent to the actual road section, so that the greater the distance between the road section to which the original trajectory point predicted by the GRU model belongs and the actual road section, the greater the penalty term in the loss function.
4. The method according to claim 1, characterized in that: The step of calculating the embedded representation of each matched trajectory sequence in combination with the highway network structure includes: Embedding each matched trajectory point; The highway network structure is used as a graph topology structure, and the embedded representation of each matched trajectory point is used as a node. The random walk algorithm based on the graph topology structure is executed to obtain the final embedded representation of each matched trajectory point. According to the final embedded representation of each matched trajectory point in the same matched trajectory sequence, an embedded representation of the same matched trajectory sequence is obtained.
5. The method according to claim 4, characterized in that The embedding representation of each matched trajectory point includes: embedding the matched trajectory point by using a Skip-gram model; The executing of the random walk algorithm based on the graph topology structure to obtain the final embedding representation of each matched trajectory point includes: executing the random walk algorithm based on the graph topology structure according to the following objective function: Among them, N s (v) represents the neighboring trajectory points of trajectory point v obtained by the random walk algorithm, f(v) represents the embedding representation of trajectory point v generated by the Skip-gram model, P r (N S (v)|f(v)) means to get the neighbor trajectory point N under given f(v) s (v), V represents the set of matched trajectory points.
6. The method according to claim 1, characterized in that The step of matching each original trajectory sequence to a highway section to obtain each matched trajectory sequence includes: Combined with the highway network structure, the embedded representation of each matched trajectory point is calculated; According to the embedded representation of each matched trajectory point in the same matched trajectory sequence, the spatial structure feature and the context feature of the same matched trajectory sequence are learned to obtain the embedded representation of the same matched trajectory sequence.
7. The method according to claim 6, characterized in that The method of learning the spatial structural features and context features of the same matched trajectory sequence according to the embedded representations of each matched trajectory point in the same matched trajectory sequence to obtain the embedded representation of the same matched trajectory sequence includes: The embedded representations of the matched trajectory points in the same matched trajectory sequence are sequentially input into another trained GRU model, and the hidden state at the last moment output by the other trained GRU model is used as the first feature vector of the same matched trajectory sequence; Inputting the embedded representation of each matched trajectory point in the same matched trajectory sequence into the trained Transformer model, and outputting the encoder of the trained Transformer model as the second feature vector of the same matched trajectory sequence; The first feature vector and the second feature vector are fused to obtain an embedded representation of the same matched trajectory sequence.
8. The method according to claim 1, characterized in that Also includes: Combined with the highway network structure, the embedding representation of each user's original trajectory sequence is calculated; Calculate the first similarity between the embedding representation of the original trajectory sequence of each user and the embedding representation of the trajectory sequence after matching each vehicle; Compare the first similarities, the embedded representation of the trajectory sequence matched with each user, and the second similarities of the embedded representation of the trajectory sequence matched with each vehicle; According to the difference between the two similarities corresponding to the same user, the improvement in the accuracy of the person-vehicle matching is determined.
9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for matching on-the-way trajectories of people and vehicles on highways as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for matching the on-the-way trajectories of people and vehicles on highways as described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Method and apparatus for identifying target moving object through trajectory matching
CN105788271A
Vehicle trajectory prediction method and system based on space-time attention mechanism
CN117171582A
Pedestrian, vehicle and road matching method and device based on multi-source information fusion and medium
CN118042416A
Multi-target lane tracking
EP4261738A1
Map matching method and device based on trajectory topology
WO2024192788A1
Cited By
Human spatio-temporal trajectory representation learning method based on feature fusion and related device
CN120180035A