An intersection space structure extraction method, system, device and storage medium

By employing supervised classification and spatial clustering methods based on trajectory data, and utilizing the C-Transformer model and Meanshift clustering technology, the accuracy and cost issues of intersection extraction in existing technologies are resolved. This achieves efficient and accurate extraction of intersection spatial structures, supporting urban traffic management and planning.

CN116702021BActive Publication Date: 2026-04-07JIMEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing methods for intersection extraction based on trajectory data are insufficient to meet the requirements for accuracy and precision in intersection extraction. Furthermore, traditional methods are costly and have long update cycles, making it difficult to meet the fine-grained traffic management needs under rapid urban development.

Method used

Based on the original trajectory data, a supervised classification model is used to classify the turning patterns of motion features. Intersection data is extracted by combining spatial clustering methods. The C-Transformer model and Meanshift clustering technology are used to automatically learn the differences in features between intersection areas and road segment areas in the trajectory data.

Benefits of technology

It achieves efficient and accurate extraction of intersection spatial structure, reduces system construction and operation costs, improves the accuracy and timeliness of intersection extraction, supports traffic planning and management, and reduces the traffic accident rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116702021B_ABST
    Figure CN116702021B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intersection space structure extraction method, system, device and storage medium, method includes: based on original trajectory data, the motion characteristics of each trajectory point in original trajectory is determined;Using supervised classification model, the classification based on steering mode is carried out to motion characteristics, and the classification label of each trajectory point is obtained;Obtain trajectory point data set of classification label being turning point, determine intersection data by space clustering method;According to intersection data, the clustering of trajectory point is carried out in combination with original trajectory data, obtains turning path, completes space structure extraction.The embodiment of the application is based on the motion characteristics extracted based on original trajectory data, learns the difference of motion characteristics by supervised classification model based on label classification training, realizes the accurate classification of trajectory point, further combines classification data and efficiently realizes the extraction of intersection space structure by clustering method, and can be widely applied in road network structure data processing technical field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of road network structure data processing technology, and in particular to a method, system, device and storage medium for extracting the spatial structure of intersections. Background Technology

[0002] Road intersections play a crucial role in road networks, providing information about connectivity, topology, and permitted directions of movement. Traditional methods for extracting road intersections, based on traditional surveying and remote sensing imagery, suffer from high data acquisition costs and long update cycles, making them unsuitable for the fine-grained traffic management needs of rapidly developing cities.

[0003] Existing technical solutions include methods based on corner thresholds, grid density, hotspot analysis, and machine learning. Among these, the corner threshold-based method detects intersections by detecting changes in the direction of movement of road users along their trajectories. This method involves setting thresholds for speed and direction changes in trajectory data, detecting turning points in the trajectory data, and clustering these turning points as intersections. However, existing trajectory-based intersection extraction methods typically use single trajectory features for identification, such as cluster density or angle changes, which are insufficient to meet the accuracy and precision requirements for intersection extraction. Furthermore, existing trajectory-based intersection extraction methods often use global thresholds to divide intersection areas from road segment areas. This approach is limited by the difficulty in determining appropriate segmentation thresholds; incorrect thresholds can misclassify non-intersection areas as intersection areas or miss some genuine intersections. Therefore, how to efficiently and accurately extract the spatial structure of intersections is a problem that urgently needs to be solved. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method, system, device and storage medium for extracting the spatial structure of intersections, which can efficiently and accurately extract the spatial structure of intersections.

[0005] On one hand, embodiments of the present invention provide a method for extracting the spatial structure of an intersection, including:

[0006] Based on the original trajectory data, determine the motion characteristics of each trajectory point in the original trajectory;

[0007] Using a supervised classification model, motion features are classified based on turning patterns to obtain classification labels for each trajectory point;

[0008] The classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the labeled trajectory points.

[0009] Obtain a dataset of trajectory points with the classification label "turning points," and determine the intersection data using spatial clustering methods; the intersection data includes the intersection location and the intersection extent.

[0010] Based on the intersection data and the original trajectory data, the trajectory points are clustered to obtain the turning path and complete the spatial structure extraction.

[0011] Optionally, based on the original trajectory data, the motion characteristics of each trajectory point in the original trajectory are determined, including:

[0012] Based on the original trajectory data, a set of trajectory points is extracted from the original trajectory, and the spatiotemporal characteristics of each trajectory point are determined; the spatiotemporal characteristics include the longitude, latitude, and timestamp corresponding to the trajectory point;

[0013] Based on the spatiotemporal characteristics, the motion characteristics of each trajectory point are calculated.

[0014] Optionally, the method further includes:

[0015] Training samples are determined based on the motion characteristics of the labeled trajectory points.

[0016] A supervised classification model is set up by embedding layer, encoder and classifier. The supervised classification model is trained on training samples and adjusted based on the training results to obtain a trained supervised classification model.

[0017] Optionally, the supervised classification model includes an embedding layer, an encoder, and a classifier. Using the supervised classification model, motion features are classified based on turning patterns to obtain classification labels for each trajectory point, including:

[0018] Motion features are vectorized through an embedding layer and combined with position encoding to obtain feature vectors; the feature vectors include query vectors, key vectors, and value vectors.

[0019] The feature vector is encoded using an encoder based on multi-head attention to obtain the encoded feature representation; the encoder includes a multi-head attention layer, an addition and normalization layer, and a feedforward fully connected layer.

[0020] The encoded feature representation is classified by a classifier to obtain the classification label of each trajectory point.

[0021] Optionally, the data processing steps of the multi-head attention layer in the step of encoding the feature vector by the encoder to obtain the encoded feature representation include:

[0022] Linear projections are performed on the query vector, key vector, and value vector respectively, and the output vector is obtained through convolutional self-attention operations; the convolutional self-attention operations include normalization and convolution operations.

[0023] The expression for the convolutional self-attention operation is as follows:

[0024]

[0025] In the formula, ConvAttention(Q,K,V) represents the output vector, softmax represents the normalization process, conv represents the convolution operation, and Q, K, and V represent the query vector, key vector, and value vector, respectively. k Represents the dimension of the key vector;

[0026] Based on the output vector, the output data of the multi-head attention layer is obtained through concatenation and linear projection.

[0027] Optionally, obtain a dataset of trajectory points with the classification label of turning points, and determine the intersection data using spatial clustering methods, including:

[0028] The location with the highest density in the trajectory point dataset with the classification label "turning point" is determined by using a sliding window.

[0029] Initialize cluster centers, update cluster centers based on probability density gradient function until cluster centers converge to the position of maximum density, and determine cluster clusters;

[0030] Using the cluster center point as the center, the intersection range is determined by the coverage area of ​​the circle's central region; the intersection location is determined by the cluster center point, and the radius of the circle's central region is determined by the longest distance from the cluster center point to all points in the cluster.

[0031] Optionally, based on the intersection data and the original trajectory data, clustering of trajectory points is performed to obtain the turning path and complete the spatial structure extraction, including:

[0032] Determine the intersection boundary circle based on the intersection area;

[0033] Candidate point clusters are determined based on the intersection points of the intersection boundary circle and each trajectory segment in the original trajectory data, and the directional attributes of each candidate point in the candidate point cluster are obtained based on motion features; the candidate point clusters include entrance candidate point clusters and exit candidate point clusters;

[0034] Based on the candidate point clusters, entry and exit point pairs are determined using a hierarchical clustering method based on directional attributes; each entry and exit point pair includes an entry point and an exit point.

[0035] By fitting the connectivity of the entrance and exit points in the entrance-exit pair, the spatial structure of the intersection is constructed, and the turning path is obtained.

[0036] On the other hand, embodiments of the present invention provide an intersection spatial structure extraction system, comprising:

[0037] The first module is used to determine the motion characteristics of each trajectory point in the original trajectory based on the original trajectory data;

[0038] The second module is used to classify motion features based on turning patterns using a supervised classification model to obtain classification labels for each trajectory point.

[0039] The classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the labeled trajectory points.

[0040] The third module is used to obtain a dataset of trajectory points with the classification label of turning points, and to determine the intersection data through spatial clustering methods; the intersection data includes the intersection location and the intersection range.

[0041] The fourth module is used to cluster trajectory points based on intersection data and original trajectory data to obtain turning paths and complete spatial structure extraction.

[0042] On the other hand, embodiments of the present invention provide an intersection spatial structure extraction device, including a processor and a memory;

[0043] Memory is used to store programs;

[0044] The processor executes the program as described above.

[0045] On the other hand, embodiments of the present invention provide a computer-readable storage medium storing a program that is executed by a processor to implement the method described above.

[0046] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0047] This invention first determines the motion characteristics of each trajectory point in the original trajectory based on the original trajectory data. Then, using a supervised classification model, the motion characteristics are classified based on turning patterns to obtain classification labels for each trajectory point. These labels include turning points and non-turning points. The supervised classification model is trained using the motion characteristics of the labeled trajectory points. A dataset of trajectory points with turning points as the classification label is obtained, and intersection data is determined using spatial clustering methods. The intersection data includes the intersection location and intersection range. Based on the intersection data and the original trajectory data, the trajectory points are clustered to obtain the turning paths, thus completing the spatial structure extraction. This invention, considering the motion characteristics extracted from the original trajectory data, learns the differences in motion characteristics through a supervised classification model trained on label classification, achieving accurate classification of trajectory points. Furthermore, it combines the classified data with clustering methods to efficiently extract the spatial structure of intersections. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating a method for extracting the spatial structure of an intersection, provided in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram illustrating the extraction of motion features from trajectory data provided in an embodiment of the present invention.

[0051] Figure 3 This is a schematic diagram of a steering point recognition framework based on a Transformer encoder structure provided in an embodiment of the present invention;

[0052] Figure 4 A schematic diagram of the self-attention layer of the Transformer model and the C-Transformer model provided in the embodiments of the present invention;

[0053] Figure 5 This is a schematic diagram of the intersection entrance / exit point clustering process provided in an embodiment of the present invention;

[0054] Figure 6 This is a schematic diagram of the overall process of a method for extracting the spatial structure of an intersection, provided in an embodiment of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0056] On the one hand, such as Figure 1 As shown, an embodiment of the present invention provides a method for extracting the spatial structure of an intersection, including:

[0057] S100. Based on the original trajectory data, determine the motion characteristics of each trajectory point in the original trajectory;

[0058] It should be noted that in some embodiments, the steps include: extracting a set of trajectory points from the original trajectory based on the original trajectory data, and determining the spatiotemporal characteristics of each trajectory point; the spatiotemporal characteristics include the longitude, latitude, and timestamp corresponding to the trajectory point; calculating the motion characteristics of each trajectory point based on the spatiotemporal characteristics; the motion characteristics include the velocity, acceleration, orientation angle, turning angle, turning angular rate, and curvature of the trajectory point.

[0059] The original trajectory data can be sourced from crowdsourced trajectory data. With the rapid development of sensor and mobile internet technologies, and the widespread application of smart terminal devices, the scale and quality of vehicle trajectory data are constantly increasing. Large-scale spatiotemporal trajectory data collected through crowdsourcing has become an important information source. Crowdsourced trajectory data contains a wealth of vehicle travel routes and movement trajectory information, continuously recording the spatial location and temporal information of moving targets, reflecting information such as the geometry, topology, and attributes of the roads traversed by vehicles during their journey. Based on user-shared crowdsourced trajectory data, obtaining trajectory information of traffic participants through crowdsourcing provides a new solution for road intersection extraction. Advantages and applications of crowdsourced trajectory data: Crowdsourced trajectory data, collected through smart devices such as smartphones and in-vehicle equipment, can provide more comprehensive and accurate trajectory information of traffic participants, thus having broad application prospects in urban traffic analysis, traffic management, and intelligent transportation.

[0060] Specifically, in some embodiments, motion features of each trajectory point are constructed based on the longitude, latitude, and timestamp of the original trajectory data, including velocity, acceleration, orientation angle, steering angle, steering angular rate, and curvature. The trajectory points in this step can be obtained in various ways, such as GPS trajectories during vehicle movement, base station data, and mobile applications. After extracting the trajectory points, feature extraction algorithms are needed to extract the features of each trajectory point.

[0061] Specifically, such as Figure 2 As shown, for a given trajectory, the motion characteristics of each trajectory point can be calculated using the following formula:

[0062] Velocity is defined as the ratio of the distance between two adjacent trajectory points to the time difference, representing the moving speed of the target trajectory point. The formula for calculating the velocity of a trajectory point is as follows:

[0063]

[0064] In the formula, dist(P) i ,P i-1 ) represents the trajectory point P i Compared with the previous trajectory point P i-1 The distance between them; t i With t i-1 Distribution representing trajectory point P i Compared with the previous trajectory point P i-1 Timestamp.

[0065] Acceleration is defined as the ratio of the velocity to the time difference between two adjacent trajectory points, representing the rate of change of velocity of the target trajectory point. For trajectory point P... i The formula for calculating its acceleration is as follows:

[0066]

[0067] The direction angle is defined as the angle between the straight line connecting two adjacent trajectory points and the north direction, indicating the direction of travel of the target trajectory point. For trajectory point P... i The formula for calculating its direction angle is as follows:

[0068] course i =arctan(x,y)

[0069] x = cos(lat) i )·sin(lng i -lng i-1 )

[0070] y = cos(lat) i-1 )·sin(lat i )-sin(lat i-1 )·cos(lat i )·cos(lng i -lng i-1 )

[0071] In the formula, course i Indicates the direction angle, lat i Represents the trajectory point P i latitude; lng i Represents the trajectory point P i Longitude.

[0072] The steering angle is defined as the difference in direction angle between two adjacent trajectory points, representing the change in the travel direction of the target trajectory point. For trajectory point P... i The formula for calculating its steering angle is as follows:

[0073] turnAngle i =course i-1 -course i

[0074] The steering angle ratio is defined as the ratio of the steering angle of two adjacent trajectory points to the time difference, representing the rate of change of the steering angle. For trajectory point P... i The formula for calculating its steering angle is as follows:

[0075]

[0076] Curvature is defined as the ratio of the distance traveled between three adjacent trajectory points to the straight-line distance between the two endpoints, and is used to describe the degree of curvature of the trajectory curve. For trajectory point P... i The formula for calculating its curvature is as follows:

[0077]

[0078] S200. Using a supervised classification model, the motion features are classified based on the turning pattern to obtain the classification labels of each trajectory point.

[0079] It should be noted that the classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the labeled trajectory points.

[0080] In some embodiments, the method further includes the steps of: determining training samples based on the motion features of the labeled trajectory points; setting up a supervised classification model through an embedding layer, an encoder, and a classifier; training the supervised classification model for classification based on the training samples; and adjusting the supervised classification model based on the training results to obtain a trained supervised classification model.

[0081] The supervised classification model includes an embedding layer, an encoder, and a classifier. In some embodiments, the supervised classification model is used to classify motion features based on turning patterns to obtain classification labels for each trajectory point. The steps include: vectorizing the motion features through the embedding layer and combining them with position encoding to obtain feature vectors; the feature vectors include query vectors, key vectors, and value vectors; encoding the feature vectors based on multi-head attention through the encoder to obtain encoded feature representations; the encoder includes a multi-head attention layer, a summation and normalization layer, and a feedforward fully connected layer; and classifying the encoded feature representations through the classifier to obtain classification labels for each trajectory point.

[0082] In some embodiments, the data processing steps of the multi-head attention layer include: performing linear projections on the query vector, key vector, and value vector respectively, and obtaining the output vector through a convolutional self-attention operation; the convolutional self-attention operation includes normalization processing and convolution operations; and obtaining the output data of the multi-head attention layer based on the output vector through concatenation and linear projection. The expression for the convolutional self-attention operation is as follows:

[0083]

[0084] In the formula, ConvAttention(Q,K,V) represents the output vector, softmax represents the normalization process, conv represents the convolution operation, and Q, K, and V represent the query vector, key vector, and value vector, respectively. k This represents the dimension of the key vector.

[0085] Specifically, in some embodiments, the supervised classification model can employ the C-Transformer model, which is trained to classify points as turning points within intersections or non-turning points within road segments. Each trajectory point in the training set is labeled as either a turning point within an intersection or a non-turning point within a road segment. The trained model then classifies trajectory points in the test set. It should be noted that the Transformer model has advantages and applications: The Transformer is a neural network model based on an attention mechanism. Due to its parallel computing capabilities and strong modeling abilities, it is widely used in natural language processing, computer vision, and other fields. This technology uses the C-Transformer supervised classification model to classify trajectory data, introducing convolution operations on top of the Transformer to capture local features in sequence data, better capturing key features in trajectory data, and improving the accuracy and efficiency of intersection extraction. Specifically, based on the motion features of the trajectory points obtained in the previous steps, a turning point identification method within the intersection area based on the C-Transformer model is implemented. The specific implementation steps are as follows:

[0086] The trajectory points extracted in the previous steps are grouped according to vehicle ID and sorted in chronological order. The 6-dimensional motion features (velocity, acceleration, direction angle, steering angle, steering angular rate, and curvature) of each trajectory point are represented as an input vector. The trajectory point sequence is then input into a C-Transformer supervised classification model for classification to obtain steering point labels.

[0087] The classic Transformer model includes a data embedding layer, an encoder, and a decoder. In natural language processing tasks, the encoder and decoder have symmetrical structures, and the decoder is used to generate the output sequence. However, in the trajectory classification problem proposed in this invention, only each input needs to be classified; therefore, the C-Transformer model used does not include a decoder part, and a classifier layer is chosen instead. Figure 3 As shown, the turn point recognition framework based on the C-Transformer model includes an embedding layer (data embedding shown), an encoder, and a classifier.

[0088] Data embedding can be achieved through Embedding, a method that constructs low-dimensional vector representations based on feature data, preserving the contextual similarity of the feature data. Positional encoding tells the Transformers model the position of an entity / word in a sequence, assigning a unique representation to each position. Addition and normalization (ADD & Normalization, also known as residual connection and additive normalization) is a general technique that effectively improves the vanishing gradient problem in deep models, breaks network symmetry, improves network degradation, accelerates convergence, and normalizes the optimization space. Feedforward Network (FFN) performs spatial transformation. FFN contains two linear transformation layers with ReLU activation function in between.

[0089] In addition, such as Figure 4 As shown, compared to the self-attention layer of the traditional Transformer model (left figure), the self-attention layer of the C-Transformer model in this embodiment of the invention (right figure) captures local contextual information in the sequence by introducing convolution operations. Specifically, when calculating the query vector Q, key vector K, and value vector V, a convolution operation with a kernel size of k and a stride of 1 is used. This allows the information of the current position and its left and right (k-1 positions) to be considered simultaneously when calculating attention, thereby capturing local information in the sequence and improving the model's performance and generalization ability.

[0090] The formula for calculating convolutional self-attention in a multi-head attention layer is as follows:

[0091]

[0092] Where Q, K, and V are inputs from the previous layer, and d kThe dimension of the key vector is denoted by '\r'. `conv` is the convolution operation, which convolves the input query vector Q through a convolution kernel. This combines the context information of the current position with the query and key values ​​point by point, allowing attention to focus on both local and global information simultaneously. Finally, the `softmax` function is used to normalize the importance of each key value, and the normalized weights are applied to the value vector to obtain the output.

[0093] It should also be noted that in some specific embodiments, traditional machine learning algorithms, such as support vector machines and decision trees, can be used to classify and analyze crowdsourced trajectory data and extract turning points within intersections. Although these methods may require manual feature extraction and model training, they can still achieve relatively high accuracy and efficiency.

[0094] S300. Obtain the trajectory point dataset with the classification label as turning point, and determine the intersection data through spatial clustering method;

[0095] It should be noted that the intersection data includes the intersection location and the intersection range; in some embodiments, the steps include: determining the location with the highest density in the trajectory point dataset with the classification label as turning point through a sliding window; initializing the cluster center point, updating the cluster center point based on the probability density gradient function until the cluster center point converges to the location with the highest density, and determining the cluster cluster; determining the intersection range by using the cluster center point as the center and the coverage area of ​​the circle region; wherein, the intersection location is determined by the cluster center point, and the radius of the circle region is determined by the longest distance from the cluster center point to all points in the cluster cluster.

[0096] Specifically, in some embodiments, based on the trajectory point dataset with turning points extracted in the previous steps, the Meanshift spatial clustering method is used to identify the center location of the intersection, and a circular region is created for each cluster as the coverage area of ​​the intersection, providing a reliable foundation for subsequent intersection spatial structure extraction. The specific implementation steps are as follows:

[0097] A sliding window is applied to the extracted turning point dataset, moving data points within the window to their highest density positions until convergence. Then, starting from the initially estimated cluster centers, the mean offset of the discrete data in each spatial dimension is estimated based on the probability density gradient function. The position of the center point is updated iteratively along the direction of increasing density until the cluster centers converge to the highest density point, thus achieving the average value of the discrete data within the sliding window.

[0098] For each cluster, a circular region is created to cover the intersection. The center of the circle is defined as the cluster center point, and the radius is determined by the longest distance from the center to all points in the cluster. For each point in the cluster, calculate its distance to the cluster center, and take the maximum value as the radius of the circle. The calculation formula is as follows:

[0099]

[0100] In the formula, n represents the number of points in the cluster, and x i Let be the coordinates of the i-th point, and c be the coordinates of the cluster center.

[0101] This invention example only extracts the spatial structure of at-grade intersections. Specifically, based on the conventional dimensions of the land area for urban road at-grade and grade-separated intersections, this invention example selects intersections with a boundary circle radius of less than 80m as at-grade intersections.

[0102] S400: Based on the intersection data and the original trajectory data, cluster the trajectory points to obtain the turning path and complete the spatial structure extraction.

[0103] It should be noted that some embodiments include the following steps: determining the intersection boundary circle based on the intersection range; determining candidate point clusters based on the intersection boundary circle and the intersection points of each trajectory segment in the original trajectory data, and obtaining the directional attributes of each candidate point in the candidate point cluster based on motion features; the candidate point clusters include an entrance candidate point cluster and an exit candidate point cluster; determining entrance / exit point pairs based on the candidate point clusters and directional attributes using a hierarchical clustering method; the entrance / exit point pairs include an entrance point and an exit point; performing connectivity fitting on the entrance and exit points in the entrance / exit point pairs to construct the intersection spatial structure and obtain the turning path.

[0104] In some embodiments, based on the candidate point clusters and directional attributes, entrance and exit point pairs are determined using a hierarchical clustering method. This includes the following steps: clustering the candidate point clusters based on directional attributes, and determining several sets of entrance and exit candidate point pairs by matching the entrance candidate point clusters and exit candidate point clusters; determining the path properties (driving direction) based on the directional difference between the entrance and exit candidate point pairs; the path properties include straight lines, left turns, right turns, and U-turns; and determining the entrance and exit point pairs by calculating the center and average direction of each cluster with directional features during the clustering process.

[0105] Specifically, in some embodiments, based on the intersection location and spatial range extracted in the preceding steps, the turning path is obtained by identifying entrance and exit points on the intersection boundary and clustering trajectory points of each driving direction within the intersection area, thereby achieving spatial structure extraction. The specific implementation steps are as follows:

[0106] After determining the spatial range of the intersection area, select the initial point and the trajectory segment of the previous point of each vehicle's trajectory within the intersection area. The intersection of this trajectory segment and the boundary circle is set as the candidate entry point s. i The direction of the candidate entrance point is the same as the direction of the trajectory segment, pointing towards the interior of the intersection; similarly, the trajectory segment of each vehicle's trajectory within the intersection area, including the last point and the point immediately following it, is selected, and the intersection of this trajectory segment and the boundary circle is set as the candidate exit point e. i The direction of the candidate exit point is the same as the direction of the trajectory segment, facing outwards from the intersection.

[0107] For each pair of entry candidate points and exit candidate points i ,e i >, its attributes include i ,e i >={x,y,h,△h,label}, where x and y represent the latitude and longitude of the point, respectively; h represents the direction of the exit / entry candidate point; △h represents the direction difference between the exit / entry candidate point pairs; label represents the label of the exit / entry candidate point, label=s indicates that the point is an entry candidate point, label=e indicates that the point is an exit candidate point.

[0108] Hierarchical clustering was used to identify entrance and exit points for each driving direction on both the entrance and exit candidate point clusters. The clustering process is as follows: Figure 5 As shown, the specific steps are as follows:

[0109] 1) Taking the entrance candidate point cluster as an example, firstly, cluster according to the direction attribute h of each entrance point, group those with an angle difference less than the threshold θ into one class, corresponding to one side of the intersection, and add a cluster number IC = 0, 1, ...; perform the same operation on the exit candidate point cluster.

[0110] 2) Based on the direction difference △h between each group of candidate entrance and exit points, they are classified into straight exit points, straight entrance points, left turn exit points, right turn exit points, U-turn exit points, straight entrance points, left turn entrance points, right turn entrance points, and U-turn entrance points.

[0111] 3) Calculate the center point and average direction of each cluster with directional features, and use them as the final entry and exit points.

[0112] ​​After determining the entrance and exit points of the intersection boundary circle based on turning point clustering, the spatial structure of the intersection is constructed by exploring the connectivity between the entrance and exit points. Each trajectory within the intersection boundary circle represents a connection from one entrance point to one exit point, and trajectories with the same combination of entrance and exit points are grouped together. For the trajectory points in each group, a cubic polynomial is fitted to obtain the turning path connecting the pair of entrance and exit points. In this way, all possible combinations of the intersection area can be determined, thereby obtaining all turning rules and turning paths for a given intersection, including straight, left turn, right turn, and U-turn.

[0113] In some specific embodiments, such as Figure 6 As shown, the overall process for extracting the spatial structure of an intersection based on the method of this embodiment includes:

[0114] Step 1: Extract physically meaningful features from the original trajectory sequence and construct the motion features of each trajectory point, including velocity, acceleration, direction angle, steering angle, steering angle rate, and curvature.

[0115] Step 2: Using a supervised classification method based on the C-Transformer model, the 6-dimensional motion features of each trajectory point are represented as an input vector. The model is then trained to classify these points as either turning points within intersections or non-turning points within road segments. Each trajectory point in the training set is labeled as either a turning point within an intersection or a non-turning point within a road segment. The trained model then classifies trajectory points in the test set. By analyzing the motion features and turning patterns in the trajectory data, the model predicts whether the current point is a turning point based on previous trajectory points.

[0116] Step 3: Identify the center point of each road intersection using the Meanshift clustering method, and create a circular region for each cluster as the coverage area of ​​the intersection (determine the intersection boundary circle). The center of the circle is defined as the cluster center point, and the radius is determined as the longest distance from the center to all points in the cluster. The purpose of this step is to locate the position and extent of the intersection, providing a foundation for subsequent steps.

[0117] Step 4: By acquiring the entrance and exit points and driving direction attributes of vehicles entering and exiting the intersection, clustering the trajectory points of each driving direction within the intersection area to obtain the turning path, thereby extracting the spatial structure inside the intersection. Specifically, this includes:

[0118] After determining the spatial extent of the intersection area, the initial point and the trajectory segment preceding each vehicle's trajectory within the intersection area are selected, and the intersection of this trajectory segment with the boundary circle is designated as a candidate entrance point. Similarly, the last point and the trajectory segment following each vehicle's trajectory within the intersection area are selected, and the intersection of this trajectory segment with the boundary circle is designated as a candidate exit point. Hierarchical clustering is used to identify the entrance and exit points for each driving direction, including straight, left turn, right turn, and U-turn, for both the entrance and exit candidate point clusters. The center point and average direction of each cluster with directional features are further calculated as the final entrance and exit points. After determining the entrance and exit points of the intersection boundary circle based on turning point clustering, the spatial structure of the intersection is constructed by exploring the connectivity between the entrance and exit points (determining turning paths).

[0119] In summary, this invention addresses the shortcomings of existing technologies by providing a method for extracting the spatial structure of urban intersections based on trajectory data. This method eliminates the need for complex transformations and preprocessing of trajectory data. It automatically learns the differences in trajectory motion characteristics between the centralized intersection area and the road segment area within the trajectory data, taking into account factors such as velocity, direction, and acceleration of trajectory points, thus efficiently and accurately extracting the spatial structure of urban intersections. Compared to technologies based on traditional surveying and remote sensing imagery, this invention, employing a crowdsourced trajectory data method to extract the spatial structure of urban intersections, offers the following advantages. First, this invention avoids data protection and privacy issues. By using crowdsourced trajectory data to extract intersections, it obtains more comprehensive and accurate trajectory information of traffic participants, improving the accuracy and timeliness of intersection extraction. Simultaneously, compared to traditional technologies, this invention does not require substantial human and material resources for installing and maintaining sensors and equipment, nor does it require complex image processing and computation. It enables real-time extraction and updating of intersection spatial structures, reducing system construction and operation costs. Second, this invention uses a C-Transformer supervised classification model to classify trajectory data, effectively extracting turning points within intersections, whereas traditional methods require extensive manual feature extraction and model training. This invention leverages the advantages of deep learning, directly using trajectory data as input, avoiding the complexity of manual feature extraction and improving the accuracy and efficiency of the algorithm. This makes the method of this invention more efficient and accurate in extracting intersections, better adaptable to changes in urban road traffic and practical application needs. Specifically, this invention includes at least the following beneficial effects:

[0120] 1. Accurate extraction of spatial structure of urban intersections: This invention adopts a trajectory data-based method, which does not require complex conversion and preprocessing of trajectory data. It can explore a method to automatically learn the differences in trajectory motion characteristics between the centralized intersection area and the road segment area of ​​the trajectory data, based on considering multiple aspects such as the speed, direction, and acceleration of trajectory points, and efficiently and accurately extract the spatial structure of urban intersections.

[0121] 2. Improve the efficiency of traffic planning and management: This invention provides an automated and efficient method for extracting the spatial structure of intersections, which can accurately extract the spatial structure information of intersections, providing strong support for traffic planning and management.

[0122] 3. Reducing the traffic accident rate: The occurrence of traffic accidents is closely related to the traffic flow operation and the spatial structure of intersections. The intersection spatial structure extraction method provided by this invention can improve the efficiency of traffic planning and management, thereby optimizing the traffic flow operation and reducing the traffic accident rate.

[0123] On the other hand, embodiments of the present invention provide an intersection spatial structure extraction system, comprising: a first module for determining the motion features of each trajectory point in the original trajectory based on the original trajectory data; a second module for classifying the motion features based on turning patterns using a supervised classification model to obtain classification labels for each trajectory point; wherein the classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the trajectory points with labeled classification labels; a third module for acquiring a dataset of trajectory points with the classification label of turning points, and determining intersection data through a spatial clustering method; the intersection data includes the intersection location and the intersection range; and a fourth module for clustering the trajectory points based on the intersection data and the original trajectory data to obtain turning paths and complete the spatial structure extraction.

[0124] It should be noted that in some embodiments, the system further includes: a fifth module, used to determine training samples based on the motion features of the labeled trajectory point classification labels; to set up a supervised classification model through an embedding layer, an encoder, and a classifier; to perform classification training on the supervised classification model based on the training samples; and to adjust the supervised classification model based on the training results to obtain a trained supervised classification model.

[0125] The content of the method embodiments of the present invention is applicable to the system embodiments. The specific functions implemented in the system embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0126] Another aspect of the present invention provides an intersection spatial structure extraction device, including a processor and a memory;

[0127] Memory is used to store programs;

[0128] The processor executes the program as described above.

[0129] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0130] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the method described above.

[0131] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0132] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0133] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0134] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0135] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part 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 of 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, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0136] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.

[0137] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0138] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0139] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0140] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0141] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for extracting the spatial structure of an intersection, characterized in that, include: Based on the original trajectory data, determine the motion characteristics of each trajectory point in the original trajectory; Using a supervised classification model, the motion features are classified based on turning patterns to obtain classification labels for each trajectory point; The classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the labeled trajectory point classification labels. Obtain the trajectory point dataset with the classification label of the turning point, and determine the intersection data using a spatial clustering method; the intersection data includes the intersection location and the intersection range. The step of obtaining the trajectory point dataset with the classification label as the turning point and determining the intersection data through spatial clustering methods includes: The location with the highest density of trajectory points whose classification label is the turning point is determined by a sliding window. Initialize cluster centers, update the cluster centers based on the probability density gradient function until the cluster centers converge to the position of maximum density, and determine the cluster cluster. Using the cluster center point as the center, the intersection range is determined by the coverage area of ​​the circle's central region; wherein, the intersection location is determined by the cluster center point, and the radius of the circle's central region is determined by the longest distance from the cluster center point to all points in the cluster; Based on the intersection data and the original trajectory data, the trajectory points are clustered to obtain the turning path and complete the spatial structure extraction. The step of clustering the trajectory points based on the intersection data and the original trajectory data to obtain the turning path and complete the spatial structure extraction includes: Determine the intersection boundary circle based on the intersection range; Candidate point clusters are determined based on the intersection points of the intersection boundary circle and each trajectory segment in the original trajectory data, and the directional attributes of each candidate point in the candidate point cluster are obtained based on the motion features; the candidate point clusters include an entrance candidate point cluster and an exit candidate point cluster. Based on the candidate point cluster, and using the directional attribute, an entry / exit point pair is determined through hierarchical clustering; the entry / exit point pair includes an entry point and an exit point. Connectivity fitting is performed on the entrance point and the exit point in the entrance / exit point pair to construct the intersection spatial structure and obtain the turning path.

2. The method for extracting the spatial structure of an intersection according to claim 1, characterized in that, The process of determining the motion characteristics of each trajectory point in the original trajectory based on the original trajectory data includes: Based on the original trajectory data, a set of trajectory points is extracted from the original trajectory, and the spatiotemporal characteristics of each trajectory point are determined; the spatiotemporal characteristics include the longitude, latitude, and timestamp corresponding to the trajectory point; Based on the spatiotemporal characteristics, the motion characteristics of each trajectory point are calculated.

3. The method for extracting the spatial structure of an intersection according to claim 1, characterized in that, Also includes: Training samples are determined based on the motion characteristics of the labeled trajectory points. A supervised classification model is set up by embedding layer, encoder and classifier, the supervised classification model is trained on the training samples, and the supervised classification model is adjusted on the training results to obtain the trained supervised classification model.

4. A method for extracting the spatial structure of an intersection according to any one of claims 1 or 3, characterized in that, The supervised classification model includes an embedding layer, an encoder, and a classifier. The process of using the supervised classification model to classify the motion features based on turning patterns and obtain classification labels for each trajectory point includes: The motion features are vectorized through the embedding layer and combined with position encoding to obtain a feature vector; the feature vector includes a query vector, a key vector, and a value vector. The encoder performs multi-head attention-based encoding on the feature vector to obtain an encoded feature representation; the encoder includes a multi-head attention layer, an addition and normalization layer, and a feedforward fully connected layer. The coded feature representation is classified by the classifier to obtain the classification label of each trajectory point.

5. The method for extracting the spatial structure of an intersection according to claim 4, characterized in that, In the step of encoding the feature vector using the encoder based on multi-head attention to obtain the encoded feature representation, the data processing steps of the multi-head attention layer include: Linear projection is performed on the query vector, the key vector, and the value vector respectively, and an output vector is obtained through a convolutional self-attention operation; the convolutional self-attention operation includes normalization processing and convolution operation. The expression for the convolutional self-attention operation is as follows: In the formula, Indicates the output vector. This indicates normalization processing. This represents the convolution operation. , and These represent the query vector, key vector, and value vector, respectively. Represents the dimension of the key vector; Based on the output vector, the output data of the multi-head attention layer is obtained through concatenation and linear projection.

6. A system for extracting the spatial structure of an intersection, characterized in that, include: The first module is used to determine the motion characteristics of each trajectory point in the original trajectory based on the original trajectory data; The second module is used to classify the motion features based on turning patterns using a supervised classification model to obtain classification labels for each trajectory point. The classification labels include turning points and non-turning points; the supervised classification model is generated by training on the motion features of the labeled trajectory point classification labels. The third module is used to obtain the trajectory point dataset with the classification label as the turning point, and to determine the intersection data through spatial clustering methods; the intersection data includes the intersection location and the intersection range. The step of obtaining the trajectory point dataset with the classification label as the turning point and determining the intersection data through spatial clustering methods includes: The location with the highest density of trajectory points whose classification label is the turning point is determined by a sliding window. Initialize cluster centers, update the cluster centers based on the probability density gradient function until the cluster centers converge to the position of maximum density, and determine the cluster cluster. Using the cluster center point as the center, the intersection range is determined by the coverage area of ​​the circle's central region; wherein, the intersection location is determined by the cluster center point, and the radius of the circle's central region is determined by the longest distance from the cluster center point to all points in the cluster; The fourth module is used to cluster the trajectory points based on the intersection data and the original trajectory data to obtain the turning path and complete the spatial structure extraction. The step of clustering the trajectory points based on the intersection data and the original trajectory data to obtain the turning path and complete the spatial structure extraction includes: Determine the intersection boundary circle based on the intersection range; Candidate point clusters are determined based on the intersection points of the intersection boundary circle and each trajectory segment in the original trajectory data, and the directional attributes of each candidate point in the candidate point cluster are obtained based on the motion features; the candidate point clusters include an entrance candidate point cluster and an exit candidate point cluster. Based on the candidate point cluster, and using the directional attribute, an entry / exit point pair is determined through hierarchical clustering; the entry / exit point pair includes an entry point and an exit point. Connectivity fitting is performed on the entrance point and the exit point in the entrance / exit point pair to construct the intersection spatial structure and obtain the turning path.

7. A device for extracting the spatial structure of an intersection, comprising a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Three-dimensional intersection fine road information acquisition method and device based on trajectory big data

    CN114170057A

  • Three-dimensional intersection structure prediction for autonomous driving applications

    US20210201145A1