Lane topology construction method, electronic device, and computer-readable storage medium

CN122949474APending Publication Date: 2026-10-20CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611420872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本发明的目的之一在于提供一种应用于模型训练阶段的车道拓扑构建方法,以解决相关技术中的车道提取方法无法满足交叉口车道级拓扑信息的精准提取的问题;目的之二在于提供一种应用于模型训练阶段的车道拓扑构建方法;目的之三在于提供一种电子设备;目的之四在于提供一种计算机可读存储介质

Benefits of technology

(1)提出了面向稀疏车道的轨迹图增强方法,在将交叉口轨迹构建为全连接关系图之后,对轨迹稀疏车道的轨迹节点进行插值增强,同时同步生成对应边特征,实现轨迹关系图均衡化,从而提升少样本车道、低频转向车道和新增车道的提取稳定性,保证了图神经网络模型的训练效果,为后续参照轨迹的识别精度提供了保障;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to a lane topology construction method, an electronic device, and a computer-readable storage medium. The method includes: constructing a first trajectory relationship graph of the intersection based on a set of historical driving trajectories; identifying sparsely spaced lanes in the first trajectory relationship graph and performing parameter enhancement on the first trajectory relationship graph based on the sparsely spaced lanes; training a graph neural network model based on the parameter-enhanced first trajectory relationship graph, so as to output a reference trajectory for each lane corresponding to the trajectory relationship graph using the trained graph neural network model. This invention improves the structural balance of the first trajectory relationship graph by enhancing the parameters of sparsely spaced lanes, thereby improving the extraction stability of lanes with few samples, low-frequency turning lanes, and newly added lanes, ensuring the training effect of the graph neural network model, and providing a guarantee for the recognition accuracy of the reference trajectory, thus meeting the high-precision construction requirements of lane-level topology at intersections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, specifically to a lane topology construction method, electronic device, and computer-readable storage medium. Background Technology

[0002] High-precision maps are a crucial foundation for autonomous driving and intelligent transportation systems. The lane centerlines, turning connections, and lane-level topology of intersection areas directly impact vehicle positioning, path planning, decision-making and control, and traffic organization. Compared to ordinary road sections, intersections involve a complex interplay of various traffic flows, including straight-ahead, left-turn, right-turn, and U-turn traffic, resulting in complex trajectory patterns, significant directional changes, and highly unstructured lane connections.

[0003] In related technologies, clustering methods and probability density estimation methods are used to extract lanes based on trajectory data. Clustering methods group trajectory points or segments based on spatial similarity, such as K-Means (K-Means Clustering Algorithm), DBSCAN (Density-Based Spatial Clustering of Applications with Noise), and hierarchical clustering. However, in scenarios with interwoven, overlapping, and complex turning trajectories at intersections, adjacent lanes can be easily confused. Probability density estimation methods infer the number and location of lanes based on trajectory density distribution, such as Gaussian mixture models and kernel density estimation. However, these methods rely on the main road direction or regular road morphology, making them difficult to adapt to multi-directional flow scenarios at intersections. Therefore, none of the lane extraction methods used in the above solutions can accurately extract lane-level topology information at intersections. Summary of the Invention

[0004] One objective of this invention is to provide a lane topology construction method for use in the model training phase, so as to solve the problem that lane extraction methods in related technologies cannot accurately extract lane-level topology information at intersections; a second objective is to provide a lane topology construction method for use in the model training phase; a third objective is to provide an electronic device; and a fourth objective is to provide a computer-readable storage medium.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A lane topology construction method is applied in the model training stage. The method includes: obtaining a set of historical driving trajectories of an intersection and constructing a first trajectory relationship graph of the intersection based on the set of historical driving trajectories; identifying sparse lanes in the first trajectory relationship graph and performing parameter enhancement on the first trajectory relationship graph based on the sparse lanes; training a graph neural network model based on the parameter-enhanced first trajectory relationship graph to obtain a trained graph neural network model, so as to output a reference trajectory for each lane corresponding to the trajectory relationship graph using the trained graph neural network model, wherein the first trajectory relationship graph includes multiple nodes constructed based on historical driving trajectories and multiple edges constructed based on the trajectory relationships between historical driving trajectories.

[0006] Based on the aforementioned technical means, after constructing a first trajectory relationship graph of the intersection using the historical driving trajectory set, sparse lanes in the first trajectory relationship graph are identified. The parameters of the first trajectory relationship graph are then enhanced based on these sparse lanes. A graph neural network model is then trained using the enhanced graph, resulting in a trained graph neural network model. This trained model outputs a reference trajectory for each lane corresponding to the trajectory relationship graph. This method, after constructing the intersection trajectory as a fully connected relationship graph, enhances the parameters of sparse lanes to improve the structural balance of the first trajectory relationship graph. This improves the extraction stability of lanes with few samples, low-frequency turning lanes, and newly added lanes, ensuring the training effect of the graph neural network model and guaranteeing the accuracy of reference trajectory recognition. This improves the construction accuracy of the intersection lane-level topology and solves the problem that lane extraction methods in related technologies cannot accurately extract intersection lane-level topology information.

[0007] Furthermore, constructing the first trajectory relationship graph of the intersection based on the set of historical driving trajectories includes: determining multiple nodes and node features of each node based on multiple driving trajectories in the set of historical driving trajectories, wherein the node features include directional features, morphological features, and positional features of the driving trajectories; identifying the trajectory relationships between the multiple driving trajectories, and determining the edges used for node connection and the edge features of each edge based on the trajectory relationships, wherein the edge features include overall similarity features between two driving trajectories and spatial proximity features at multiple local locations; and constructing the first trajectory relationship graph based on the multiple nodes, the node features, the edges used for node connection, and the edge features.

[0008] Based on the above technical means, the trajectory data of the intersection is constructed into a fully connected relationship graph. Three types of node features, namely direction, shape and position, and edge features based on distance are designed and calculated, so that the trajectory relationship graph can fully reflect the relationship between trajectories.

[0009] Furthermore, identifying sparse lanes in the first trajectory relationship graph includes: identifying the number of driving trajectories corresponding to each lane in the intersection based on the positional characteristics of each node in the first trajectory relationship graph; and determining the lane as a sparse lane when the number of driving trajectories corresponding to the lane is less than a preset number.

[0010] Based on the aforementioned technical means, the identification efficiency and accuracy of sparsely traversed lanes are improved by recognizing the number of driving trajectories corresponding to each lane in the first trajectory relationship diagram.

[0011] Furthermore, the parameter enhancement of the first trajectory relationship graph based on the sparse trajectory lane includes: determining a node embedding matrix of the first trajectory relationship graph according to the node features of each node in the first trajectory relationship graph, wherein the node embedding matrix includes the embedding vector of each node in the first trajectory relationship graph; identifying multiple original nodes of the sparse trajectory lane in the first trajectory relationship graph, and determining the embedding vector and corresponding edge features of at least one newly added node of the sparse trajectory lane according to the multiple original nodes and the embedding vector of each original node, so as to obtain the enhancement parameters of the first trajectory relationship graph; and determining the parameter-enhanced first trajectory relationship graph according to the enhancement parameters and the first trajectory relationship graph.

[0012] Based on the above technical means, the embedding vectors of new nodes and the corresponding edge features are generated based on the original nodes and corresponding embedding vectors of the sparse track lanes. The embedding vectors integrate the geometric features of the driving trajectory and the graph topology information, which ensures the accuracy of the information of the enhanced parameters of the first trajectory relationship graph.

[0013] Further, determining the embedding vector and corresponding edge features of at least one new node in the sparse trajectory lane based on the plurality of original nodes and the embedding vector of each original node includes: determining a first parent node and a second parent node based on two of the plurality of original nodes; determining the embedding vector of the new node based on the embedding vector of the first parent node and the embedding vector of the second parent node; identifying a target node in the first trajectory relationship graph that has an edge connection relationship with the first parent node and / or the second parent node, and determining the edge features corresponding to the new node based on the embedding vector of the target node, the edge features between the target node and the corresponding parent node, and the edge features between the first parent node and the second parent node.

[0014] Based on the above technical means, new nodes are determined based on two parent nodes, and target nodes that have edge connections with the new nodes are identified by combining the edge connection relationships of the parent nodes in the first trajectory relationship graph. Corresponding edge features are generated simultaneously to achieve the balancing of the trajectory relationship graph structure.

[0015] Further, determining the first mother node and the second mother node based on two of the plurality of original nodes includes: determining one of the plurality of original nodes as the first mother node; determining the relative distance between the first mother node and the other original nodes in the plurality of original nodes other than the first mother node based on the embedding vector of the plurality of original nodes; and determining the second mother node based on the relative distance.

[0016] Based on the above technical means, after selecting the first mother node, the closest node is selected as the second mother node by combining the relative distance between the first mother node and other nodes of the sparse track lane, thereby improving the generation accuracy of new nodes.

[0017] Furthermore, determining the embedding vector of the newly added node based on the embedding vector of the first parent node and the embedding vector of the second parent node includes: determining a target interpolation ratio; performing linear interpolation calculation on the embedding vector of the first parent node and the embedding vector of the second parent node according to the target interpolation ratio to obtain the embedding vector of the newly added node.

[0018] Based on the above technical means, the linear interpolation method is used to generate new nodes for lane categories with few trajectory samples, so that the number of trajectory samples of sparse lanes reaches a level comparable to that of other lanes, thereby improving the balance of the trajectory relationship graph structure.

[0019] Furthermore, the edge features corresponding to the newly added node include the edge features between the newly added node and the target node, the edge features between the newly added node and the first parent node, and the edge features between the newly added node and the second parent node. Determining the edge features corresponding to the newly added node based on the embedding vector of the target node, the edge features between the target node and its corresponding parent node, and the edge features between the first parent node and the second parent node includes: determining the lane category corresponding to the target node based on the embedding vector of the target node; determining a target generation strategy based on the lane category corresponding to the target node and the lane category corresponding to the newly added node, and determining the edge features between the newly added node and the target node based on the target generation strategy and the edge features between the target node and its corresponding parent node; determining a proportional allocation coefficient, and performing an interpolation proportional allocation on the edge features between the first parent node and the second parent node based on the proportional allocation coefficient to determine the edge features between the newly added node and the first parent node, and the edge features between the newly added node and the second parent node.

[0020] Based on the above technical means, after generating the embedding vector of the new node based on the embedding vector of the two parent nodes, the generation strategy is distinguished according to whether the target node and the new node belong to the same lane category, which is combined with the category prior information. This improves the generation accuracy of the edge features between the new node and the target node. At the same time, the edge features between the new node and the corresponding parent node are generated by combining the proportional allocation coefficient, which ensures the rationality of the edge feature generation.

[0021] Further, determining the target generation strategy based on the lane category corresponding to the target node and the lane category corresponding to the new node includes: when it is determined that the target node and the new node are in different lane categories based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be a first generation strategy, wherein the first generation strategy is to calculate the arithmetic mean of the edge features between the first parent node and the target node and the edge features between the second parent node and the target node, as the edge features between the new node and the target node; when it is determined that the target node and the new node are in the same lane category based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be a second generation strategy, wherein the second generation strategy is to perform linear interpolation calculation on the edge features between the first parent node and the target node and the edge features between the second parent node and the target node to obtain the edge features between the new node and the target node.

[0022] Based on the above technical means, considering that the spatial distance between different lane trajectories is far and the feature values ​​are discrete, the arithmetic mean of the edge features between the two parent nodes and the target node is used as the edge features between the new node and the target nodes of different lane categories. Considering that there is a high spatial proximity between trajectories of the same lane and good linear additivity on the same cross section, a linear interpolation algorithm is used to calculate the edge features between the new node and the target nodes of the same lane category, thereby ensuring the accuracy of edge feature construction.

[0023] Further, when the target generation strategy is the first generation strategy, determining the edge features between the new node and the target node based on the target generation strategy and the edge features between the target node and the corresponding parent node includes: when the target node has no edge connection with one of the parent nodes (the first parent node and the second parent node) but has an edge connection with the other parent node (the first parent node and the second parent node), determining the edge features between the parent node and the target node as preset edge features, and determining the actual edge features between the other parent node and the target node based on the first trajectory relationship graph, obtaining the arithmetic mean of the preset edge features and the actual edge features to obtain the edge features between the new node and the target node; when the target node has edge connections with both the first parent node and the second parent node, determining the first actual edge features between the first parent node and the target node, and the second actual edge features between the second parent node and the target node based on the first trajectory relationship graph, obtaining the arithmetic mean of the first actual edge features and the second actual edge features to obtain the edge features between the new node and the target node.

[0024] Based on the above technical means, when the target node has an edge connection with only one of the parent nodes, the edge features between the new node and the target node are calculated by combining the preset edge features. When the target node has an edge connection with both parent nodes, the edge features obtained by the trajectory relationship graph are used to calculate the edge features between the new node and the target node, thereby ensuring the smooth generation of edge features.

[0025] Furthermore, the method further includes: constructing a one-to-one matching loss function, an auxiliary one-to-many matching loss function, and a quality focus loss function corresponding to the graph neural network model; constructing a target loss function based on the one-to-one matching loss function, the auxiliary one-to-many matching loss function, and the quality focus loss function; and adjusting the model parameters based on the error parameters output by the target loss function during the training of the graph neural network model to be trained based on the first trajectory relationship graph after parameter enhancement, so as to obtain the trained graph neural network model.

[0026] Based on the above technical means, one-to-one matching loss provides accurate sparse supervision, one-to-many matching loss provides dense gradients to accelerate convergence, and quality focus loss guides the alignment of prediction probability with geometric quality. By weighting and jointly optimizing the network parameters through the three types of losses, the model can both constrain each lane to match a unique representative trajectory and enhance the training supervision density, and keep the prediction results consistent with the geometric quality of the trajectory.

[0027] Furthermore, the trajectory relationship graph includes edge features and node features. The step of using the trained graph neural network model to output a reference trajectory for each lane corresponding to the trajectory relationship graph includes: performing convolution processing on the node features based on the edge features of the trajectory relationship graph to obtain a first node feature; updating the edge features based on the first node features to obtain an updated edge feature; performing convolution processing on the first node features based on the updated edge features to obtain a second node feature; and outputting the reference trajectory for each lane based on the first node feature and the second node feature.

[0028] Based on the above technical means, the co-evolution of node features and edge features of trajectory relationship graph is realized, and the final deep node features are output to accurately capture the complex spatial dependencies between trajectories. This makes it more accurate to express the spatial proximity, morphological similarity and topological association between trajectories at the intersection, which ensures the recognition accuracy of reference trajectories and improves the construction accuracy of lane-level topology at intersections.

[0029] Further, the step of updating the edge features based on the first node features to obtain the updated edge features includes: performing feature projection processing on the first node features to obtain projected node features, wherein the dimension of the projected node features is lower than the dimension of the first node features; determining two projected node features corresponding to each edge feature according to the node connection relationship of the first trajectory relationship graph; concatenating the edge features with the corresponding two projected node features to obtain a joint vector corresponding to the edge features; inputting the joint vector into a multilayer fully connected network to obtain a residual update amount, wherein the dimension of the residual update amount is the same as the dimension of the edge features; adding the residual update amount to the edge features and performing layer normalization processing to obtain the updated edge features.

[0030] Based on the above technical means, the edge features are updated by combining feature projection, topological context fusion, residual learning and layer normalization. This not only accurately captures the interactions between nodes and ensures that the edge features can dynamically evolve according to the graph structure, but also ensures the feasibility of training deep graph neural networks through residual and normalization mechanisms. Ultimately, this makes the entire model more accurate, faster and more stable during inference.

[0031] Further, the step of performing feature projection processing on the first node features to obtain projected node features includes: sequentially processing the first node features through linear transformation, layer normalization, and activation function processing to obtain projected node features, wherein the dimension of the projected node features is the same as the dimension of the edge features; the multilayer fully connected network includes a first fully connected layer, an activation function layer, and a second fully connected layer connected sequentially; the step of inputting the joint vector into the multilayer fully connected network to obtain the residual update amount includes: inputting the joint vector into the first fully connected layer to map the joint vector to the dimension of the edge features and outputting the mapped joint vector; inputting the mapped joint vector into the activation function layer to apply a nonlinear transformation to the mapped joint vector and outputting the activated joint vector; inputting the activated joint vector into the second fully connected layer to perform a linear transformation and recombination on the activated joint vector within the dimension of the edge features and outputting the residual update amount.

[0032] Based on the above technical means, the high-dimensional node features are reduced to the dimension of edge features and combined to generate residual increments, which not only ensures the accuracy of updates, but also greatly improves the numerical stability and convergence efficiency during training.

[0033] A lane topology construction method is applied in the model application stage. The method uses the above-mentioned trained graph neural network model. The method includes: obtaining a set of driving trajectories of the intersection, and constructing a second trajectory relationship graph of the intersection based on the set of driving trajectories; inputting the second trajectory relationship graph into the trained graph neural network model to output a reference trajectory for each lane in the intersection; and generating the lane topology structure of the intersection based on the reference trajectory of each lane.

[0034] An electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.

[0035] A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed, implements the above-described method.

[0036] The beneficial effects of this invention are: (1) A trajectory graph enhancement method for sparse lanes is proposed. After constructing the intersection trajectory into a fully connected graph, the trajectory nodes of the sparse lanes are interpolated and enhanced. At the same time, the corresponding edge features are generated simultaneously to achieve the equalization of the trajectory graph, thereby improving the extraction stability of lanes with few samples, low-frequency turning lanes and newly added lanes, ensuring the training effect of the graph neural network model, and providing a guarantee for the recognition accuracy of subsequent reference trajectories. (2) A graph attention modeling mechanism for node-edge collaborative updating is proposed. Based on the first trajectory relationship graph, the trajectory node features and trajectory edge features corresponding to the intersection are designed at the same time. The node information and edge relationship are dynamically updated through double-layer graph attention convolution and edge features, so that the node information and edge relationship can co-evolve in the graph neural network model, thereby more accurately expressing the spatial proximity, morphological similarity and topological relationship between trajectories at the intersection. (3) A multi-level supervision mechanism for representative trajectory selection is proposed. Representative trajectories are directly selected from the trajectory relationship graph through node representative prediction as reference trajectories for lane topology construction. The model is optimized by combining one-to-one matching loss, auxiliary one-to-many matching loss and quality focus loss, so that the model can both constrain each lane to match a unique representative trajectory, enhance the training supervision density, and keep the prediction results consistent with the trajectory geometric quality. Attached Figure Description

[0037] Figure 1 A flowchart illustrating a lane topology construction method applied during the model training phase, as provided in one embodiment of this application; Figure 2 A schematic diagram of the architecture of a graph neural network model provided in one embodiment of this application; Figure 3 A schematic diagram illustrating the enhancement processing of a trajectory relationship graph provided in one embodiment of this application; Figure 4 This is a schematic diagram of an auxiliary one-to-many supervision strategy provided in one embodiment of this application; Figure 5 This is a schematic diagram of the operation of a graph attention interaction layer provided in one embodiment of this application; Figure 6 This is a schematic diagram of a single-node attention convolution provided in one embodiment of this application; Figure 7 This is a schematic diagram of node attention convolution provided in one embodiment of this application; Figure 8 A schematic diagram illustrating node-set prediction matching as an embodiment of this application; Figure 9 A flowchart illustrating a lane topology construction method applied in the model application stage, as provided in one embodiment of this application; Figure 10 This is a connection diagram of an electronic device provided in one embodiment of this application.

[0038] Among them, 100 is electronic equipment; 110 is memory; and 120 is processor. Detailed Implementation

[0039] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0040] The lane topology construction method, electronic device, and computer-readable storage medium proposed in this application will be described in detail below with reference to the accompanying drawings.

[0041] Figure 1 This is a schematic diagram of the process of a lane topology construction method during the model training phase, provided as an embodiment of this application.

[0042] Reference Figure 1 As shown, the lane topology construction method of this application embodiment is applied in the model training stage, and the method includes the following steps: S110, obtain the historical driving trajectory set of the intersection, and construct the first trajectory relationship graph of the intersection based on the historical driving trajectory set; Specifically, considering that intersections are the meeting points in the road network, the driving trajectories of vehicles entering and exiting from different directions are highly intertwined in space, and there is potential spatial interaction between any two trajectories. In addition, there are a large number of complex driving behaviors such as turning and changing lanes within the intersection, making it difficult to fully capture the real relationship between trajectories through preset geometric threshold rules. Therefore, a fully connected approach is adopted to construct the first trajectory relationship graph, which includes multiple nodes constructed based on historical driving trajectories and multiple edges constructed based on the trajectory relationships between historical driving trajectories.

[0043] In other words, the set of historical driving trajectories within an intersection is abstracted into a fully connected graph, which serves as the first trajectory graph of the intersection. Each intersection corresponds to an independent trajectory graph. Within the first trajectory graph of an intersection, each trajectory corresponds to a node in the graph structure, and the relationship between each pair of trajectories corresponds to an edge.

[0044] S120, identify sparse lanes in the first trajectory relationship graph, and perform parameter enhancement on the first trajectory relationship graph based on the sparse lanes.

[0045] Specifically, a sparsely traversed lane is a lane with a relatively small number of traversals. Specifically, a trajectory threshold can be pre-defined. When it is identified that the number of traversals in a certain lane in the first trajectory relationship graph is less than the trajectory threshold, the lane is determined to be a sparsely traversed lane.

[0046] After identifying sparse lanes in the first trajectory relationship graph, and determining enhancement parameters for the first trajectory relationship graph based on these sparse lanes, graph augmentation processing is performed on the first trajectory relationship graph by supplementing the graph features of the sparse lanes, thereby improving the equalization of the trajectory relationship graph structure. For example... Figure 2 As shown, a graph augmentation module is introduced into the graph feature encoding module of the graph neural network model. The graph augmentation module performs equalization processing on the encoded graph structure based on the model training results. Parameter augmentation can include adding trajectory nodes and corresponding edges for sparse lanes, and the specific additions are not limited.

[0047] S130, the graph neural network model is trained based on the first trajectory relationship map after parameter enhancement to obtain the trained graph neural network model, so as to use the trained graph neural network model to output the reference trajectory of each lane corresponding to the trajectory relationship map.

[0048] In other words, the training sample set is determined based on the first trajectory relationship graph after parameter enhancement, and the graph neural network model is trained. After the trained graph neural network model meets the recognition accuracy requirements, the trained graph neural network model is obtained. This allows the trained graph neural network model to output the reference trajectory for each lane based on the actual trajectory relationship graph of the intersection. The reference trajectory of the lane serves as the benchmark trajectory for determining the geometry and connectivity of the lanes, and thus as the basis for constructing the lane-level topology of the intersection.

[0049] In the training phase of the graph neural network model, this embodiment performs graph augmentation processing on the sparse lanes in the first trajectory relationship graph to improve the structural balance of the trajectory relationship graph, thereby ensuring the training effect of the graph neural network model and meeting the requirements of subsequent intersection topology construction.

[0050] In some embodiments of this application, constructing a first trajectory relationship graph of an intersection based on a set of historical driving trajectories includes: determining multiple nodes and node features of each node based on multiple driving trajectories in the set of historical driving trajectories, wherein the node features include the direction features, morphological features, and position features of the driving trajectory; identifying the trajectory relationships between multiple driving trajectories, and determining the edges used for node connection and the edge features of each edge based on the trajectory relationships, wherein the edge features include the overall similarity features between two driving trajectories and the spatial proximity features at multiple local locations; and constructing a first trajectory relationship graph based on multiple nodes, node features, edges used for node connection, and edge features.

[0051] Specifically, the first trajectory relationship graph is a fully connected relationship graph abstracted from the set of historical driving trajectories. Each driving trajectory corresponds to a node in the graph structure, and the relationship between each pair of driving trajectories corresponds to an edge.

[0052] The node features are obtained from three dimensions: direction information, shape information, and position information of the driving trajectory. These include the direction features, shape features, and position features of the driving trajectory, and the specific acquisition methods are as follows: Directional features are derived from the azimuth angles of the starting and ending points of the driving trajectory. Since the azimuth angle has a 360-degree periodicity, it is converted into sine and cosine components to eliminate the influence of periodicity. Directional features include starting point directional features, ending point directional features, directional change features, and overall starting and ending point directional features. Here, it is assumed that the starting point azimuth angle of the driving trajectory is... The direction angle of the endpoint is The starting point direction features include , The characteristics of the endpoint direction include , ; Characteristics of directional change include , The overall directional characteristics of the start and end points include , The starting direction angle is... and the direction angle of the endpoint is The displacement vectors of adjacent trajectory points can be used for estimation. Taking a driving trajectory consisting of n trajectory points as an example, the trajectory points are represented by P1 to Pn according to the direction from the starting point to the end point. Then, the starting point direction angle... The direction of the vector pointing from trajectory point P1 to trajectory point P2, and the overall directional characteristics of the start and end points. The sine of the direction angle of the global displacement vector from trajectory point P1 to Pn. The cosine of the direction angle of the global displacement vector from trajectory point P1 to Pn.

[0053] The morphological characteristics consist of the curvature and radius of the trajectory. The curvature is defined as follows: , For the trajectory length, This is the straight-line distance between the starting and ending points of the trajectory. When the driving trajectory is a straight line... The curvature is set to 1; the greater the curvature of the trajectory, the larger the curvature value. Curvature is defined as... ,in, For trajectory points azimuth angle, The number of points on the trajectory. Both curvature and radius of curvature are Z-score normalized to have zero mean and unit variance.

[0054] The location feature consists of the mean location of the trajectory and the starting location of the trajectory. Mean location of the trajectory , ,in, The number of points on the trajectory, Let be the coordinates of the i-th trajectory point along the x-axis. The coordinates of the i-th trajectory point along the y-axis reflect the approximate spatial range of the driving trajectory within the intersection; the starting position of the trajectory... , This helps the model distinguish trajectories entering the intersection from different directions. Additionally, the location features are standardized using the intersection-level Z-score.

[0055] Finally, a 14-dimensional feature vector is generated for each trajectory: , in, , The starting direction feature is, where, The sine value of the starting direction angle. The cosine of the starting direction angle; , The endpoint direction feature, where, The sine of the endpoint direction angle. The cosine of the endpoint direction angle; , The characteristic of directional change is that, This is the sine of the angle difference between the endpoint direction angle and the starting direction angle. It is the cosine of the angle difference between the endpoint direction angle and the starting direction angle; , The overall directional characteristics of the origin and destination, among which, Let be the sine of the direction angle of the overall displacement vector from the starting point to the ending point of the trajectory. The cosine of the direction angle of the overall displacement vector from the starting point to the ending point of the trajectory; The curvature after Z-score normalization; The curvature after Z-score normalization; , The mean position of the trajectory after Z-score standardization is given, where, This represents the x-axis coordinate of the trajectory mean position after Z-score standardization. The y-axis coordinate of the mean position of the trajectory after Z-score standardization; , The starting position of the trajectory after Z-score normalization is given, where, The x-axis coordinate of the starting point of the trajectory after Z-score normalization. This represents the y-axis coordinate of the starting point of the trajectory after Z-score standardization.

[0056] Edge features include overall similarity features between two driving trajectories and spatial proximity features at multiple local locations. For example, edge features can be characterized using bidirectional Hausdorff distance and sampling point distance sequences.

[0057] The bidirectional Hausdorff distance measures the overall similarity between two trajectories, comprehensively reflecting their differences in spatial location and geometric shape. The calculation formula is as follows: , in, For trajectory trajectory points, For trajectory trajectory points, This represents the distance between two points, usually in Euclidean form. For trajectory trajectory points on To trajectory The shortest distance, For trajectory All trajectory points on the trajectory The maximum value among the shortest distances, For trajectory trajectory points on To trajectory The shortest distance, For trajectory All trajectory points on the trajectory The maximum value among the shortest distances.

[0058] The sampling point distance sequence is used to describe the spatial proximity of two trajectories at multiple local locations. For example, sampling 10 points at equal intervals along the paths of two driving trajectories, and calculating the Euclidean distance between the corresponding sampling points to form a 10-dimensional distance vector. This is used as the distance sequence of sampling points, where, The Euclidean distance between the first set of sampling points. The Euclidean distance between the second set of sampling points, and so on. This represents the Euclidean distance between the tenth set of sampling points.

[0059] Furthermore, to eliminate the influence of distance dimensions, both the bidirectional Hausdorff distance and the sampling point distance are normalized using an exponential decay function: , in, The distance value is the normalized value; The original distance values ​​to be normalized, for example, when normalizing bidirectional Hausdorff distance. Given the original Hausdorff distance value calculated in the previous step, when normalizing the distance between sampling points, The original Euclidean distance between two sampling points on the trajectory; This is a scale parameter. For example, it can be set as follows: The distance is set to 3 meters, causing the correlation between two trajectories that are close to or beyond the lane width to decay rapidly. Finally, an 11-dimensional feature vector is generated for each edge. ,in, The normalized bidirectional Hausdorff distance. The Euclidean distance between the first set of sampling points after normalization. This represents the Euclidean distance between the second set of sampling points after normalization, and so on. This represents the Euclidean distance between the tenth set of sampling points after normalization.

[0060] Furthermore, the trajectory relationship between two driving trajectories can be determined by calculating the bidirectional Hausdorff distance and the sampling point distance sequence between any two driving trajectories, which can be used to evaluate whether an edge connection is established between the two trajectories. For example, an evaluation threshold can be pre-defined. When the bidirectional Hausdorff distance and the sampling point distance sequence between two driving trajectories reach the evaluation threshold, it is considered that an edge connection exists between the two trajectories. That is, in the trajectory relationship graph, the two trajectory nodes are connected by an edge, and the edge between the two nodes is labeled with features. Otherwise, it is considered that no edge connection exists between the two driving trajectories, that is, no edge connection is needed in the trajectory relationship graph.

[0061] Therefore, by connecting multiple nodes based on the edges used for node connection, and labeling each node with its node features as node attribute information and edge features as corresponding edge attributes, a first trajectory relationship graph is constructed.

[0062] It is understandable that the construction method of the first trajectory relationship diagram is the same as that of the trajectory relationship diagram of the intersection in the application stage, and will not be elaborated here.

[0063] This embodiment constructs the trajectory data of the intersection into a fully connected graph, designs and calculates three types of node features (direction, shape, and position) and edge features based on distance, so that the trajectory graph can fully reflect the relationship between trajectories.

[0064] In some embodiments of this application, identifying sparse lanes in the first trajectory relationship graph includes: identifying the number of driving trajectories corresponding to each lane in the intersection based on the positional characteristics of each node in the first trajectory relationship graph; and determining the lane as a sparse lane when the number of driving trajectories corresponding to the lane is less than a preset number.

[0065] Specifically, the preset number is a pre-defined evaluation threshold for sparsely oriented lanes. When the number of driving trajectories corresponding to a lane is less than the preset number, the lane is considered a sparsely oriented lane; when the number of driving trajectories corresponding to a lane is greater than or equal to the preset number, the lane is considered a non-sparsely oriented lane. Furthermore, the preset number can be a pre-calibrated value, dynamically determined based on the number of driving trajectories for each lane in the first trajectory relationship graph. This value is used to select at least one lane with a relatively small number of driving trajectories in the first trajectory relationship graph for graph augmentation processing.

[0066] By clustering the positional features of each node in the first trajectory relationship graph, the number of driving trajectories corresponding to each lane in the intersection is identified. When the number of driving trajectories corresponding to a lane is less than a preset number, the lane is determined to be a sparse trajectory lane. This is used to obtain the enhancement parameters of the first trajectory relationship graph and perform graph augmentation processing on the first trajectory relationship graph.

[0067] This embodiment evaluates sparse lanes based on the identification of the number of driving trajectories corresponding to each lane in the first trajectory relationship graph, thereby improving the identification efficiency and accuracy of sparse lanes.

[0068] In some embodiments of this application, parameter enhancement of a first trajectory relationship graph based on a sparse trajectory lane includes: determining a node embedding matrix of the first trajectory relationship graph based on the node features of each node in the first trajectory relationship graph, wherein the node embedding matrix includes the embedding vector of each node in the first trajectory relationship graph; identifying multiple original nodes of the sparse trajectory lane in the first trajectory relationship graph, and determining the embedding vector of at least one newly added node of the sparse trajectory lane and its corresponding edge features based on the multiple original nodes and the embedding vector of each original node, so as to obtain enhancement parameters of the first trajectory relationship graph; and determining the parameter-enhanced first trajectory relationship graph based on the enhancement parameters and the first trajectory relationship graph.

[0069] Specifically, firstly, the node feature vector matrix in the first trajectory relationship graph is mapped to the embedding space using a graph encoder to obtain the node embedding matrix. The node embedding matrix includes the embedding vector of each node in the first trajectory relationship graph. This embedding vector integrates the geometric features of the driving trajectory with graph topology information.

[0070] Based on the original nodes corresponding to the sparse trajectory lanes and their embedding vectors, the embedding vectors of at least one new node in the sparse trajectory lanes and their corresponding edge features are identified as enhancement parameters for the first trajectory relationship graph. For example, the embedding vector of the new node is obtained by interpolation based on the embedding vectors of multiple original nodes, and the edge connection relationship between the new node and each original node is constructed to calculate the strain features.

[0071] This embodiment generates the embedding vector of the new node and the corresponding edge features based on the original nodes and corresponding embedding vectors of the sparse track lane. The embedding vector integrates the geometric features of the driving trajectory and the graph topology information, which ensures the accuracy of the information of the enhanced parameters of the first trajectory relationship graph.

[0072] Combination Figure 3 As shown, in some embodiments of this application, determining the embedding vector and corresponding edge features of at least one new node in a sparse trajectory lane based on multiple original nodes and the embedding vector of each original node includes: determining a first parent node and a second parent node based on two of the multiple original nodes; determining the embedding vector of the new node based on the embedding vector of the first parent node and the embedding vector of the second parent node; identifying target nodes in the first trajectory relationship graph that have edge connection relationships with the first parent node and / or the second parent node, and determining the edge features corresponding to the new node based on the embedding vector of the target node, the edge features between the target node and the corresponding parent node, and the edge features between the first parent node and the second parent node.

[0073] In other words, during the enhancement of the trajectory relationship graph, firstly, two original nodes from multiple original nodes are selected as the first and second parent nodes. For example, any two original nodes can be selected as the first and second parent nodes, or the first parent node can be labeled first, and then the second parent node can be identified based on the feature information of the first parent node. Then, the first and second parent nodes are used as reference nodes for the generation of new nodes. The embedding vector of the new node is calculated based on the embedding vector of the first and second parent nodes. Next, nodes in the first trajectory relationship graph that are connected to one or more of the first and second parent nodes with edges are selected as target nodes that have edge connections with the new nodes. The edge features corresponding to the new node are determined based on the embedding vector of the target node, the edge features between the target node and the corresponding parent node, and the edge features between the first and second parent nodes. For example, the edge features between the new node and the target node are calculated based on the embedding vector of the target node and the edge features between the target node and the corresponding parent node, and the edge features between the new node and the first parent node and the new node and the second parent node are calculated based on the edge features between the first and second parent nodes.

[0074] This embodiment determines the new node based on two parent nodes, and identifies the target node that has an edge connection with the new node by combining the edge connection relationship of the parent node in the first trajectory relationship graph, and generates the corresponding edge features simultaneously to achieve the equalization of the trajectory relationship graph structure.

[0075] In some embodiments of this application, determining a first mother node and a second mother node based on two of a plurality of original nodes includes: determining one of the plurality of original nodes as the first mother node; determining the relative distance between the first mother node and the other original nodes in the plurality of original nodes other than the first mother node based on the embedding vectors of the plurality of original nodes; and determining the second mother node based on the relative distance.

[0076] Specifically, lanes with sparse identified trajectories are used as lanes. For example, let's start with the sparsely spaced lanes that need enhancement. Randomly select a node as the first parent node. Calculate the first mother node same lane Euclidean distance of the embedding vectors of all other trajectory nodes: , in, For the first parent node and node The Euclidean distance between them; The first parent node, i.e., the lane. The node; For lane The node, This is the embedding vector of the first parent node. For nodes Embedded vector, For lane A set of nodes.

[0077] Then, select the first parent node. The node with the smallest distance is selected as the second parent node. , used for generating new nodes.

[0078] In this embodiment, after selecting the first mother node, the closest node is selected as the second mother node based on the relative distance between the first mother node and other nodes in the sparse track lane, thereby improving the generation accuracy of new nodes.

[0079] In some embodiments of this application, determining the embedding vector of a new node based on the embedding vector of the first parent node and the embedding vector of the second parent node includes: determining a target interpolation ratio; and performing linear interpolation calculation on the embedding vectors of the first parent node and the second parent node based on the target interpolation ratio to obtain the embedding vector of the new node.

[0080] In other words, after selecting the first mother node Second Mother Node Next, the target interpolation ratio is determined. This target interpolation ratio can be randomly generated. It can also be combined with the first mother node. Second Mother Node The relative distance between them can be generated, or determined in combination with the generation strategy, without any specific restrictions.

[0081] Then, using linear interpolation, the first mother node... Embedded vector, second mother node Substituting the embedding vector and the target interpolation ratio into the following formula, the new node is calculated. Embedding vector: , in, This is the embedding vector for the newly added node. This is the embedding vector of the first parent node. For the target interpolation ratio, This is the embedding vector of the second parent node.

[0082] By repeating this process, node generation is performed on all lane categories with few trajectory samples, bringing the number of trajectory samples for sparse lanes to a level comparable to that of other lanes, thus achieving a balance among lane categories within the intersection. Therefore, the enhanced node embedding matrix is: , in, For the enhanced node embedding matrix, The original node embedding matrix of the first trajectory relationship graph. The node embedding matrix for newly added nodes.

[0083] After node enhancement is completed in the embedding space, the enhanced node embedding matrix is ​​directly used as the input of the graph attention interaction module.

[0084] This embodiment uses linear interpolation to generate new nodes for lane categories with few trajectory samples, so that the number of trajectory samples of sparse lanes reaches a level comparable to that of other lanes, thereby improving the balance of the trajectory relationship graph structure.

[0085] In some embodiments of this application, the edge features corresponding to the newly added node include the edge features between the newly added node and the target node, the edge features between the newly added node and the first parent node, and the edge features between the newly added node and the second parent node. Determining the edge features corresponding to the newly added node based on the embedding vector of the target node, the edge features between the target node and its corresponding parent node, and the edge features between the first parent node and the second parent node includes: determining the lane category corresponding to the target node based on the embedding vector of the target node; determining a target generation strategy based on the lane category corresponding to the target node and the lane category corresponding to the newly added node, and then determining the edge features between the newly added node and the target node based on the edge features between the target node and its corresponding parent node; determining a proportional allocation coefficient, and then performing an interpolation proportional allocation on the edge features between the first parent node and the second parent node based on the proportional allocation coefficient to determine the edge features between the newly added node and the first parent node, and the edge features between the newly added node and the second parent node.

[0086] In other words, for a target node that has an edge connection with the parent node, the lane category corresponding to the target node is first determined based on the embedding vector of the target node. Then, different target generation strategies are matched according to whether the target node and the new node are in the same lane category. Based on the target generation strategy, the edge features between the new node and the target node are determined based on the edge features between the target node and the corresponding parent node.

[0087] For the first and second mother nodes, firstly, the proportional allocation coefficients are determined. For example, these coefficients can be determined based on the target interpolation ratio mentioned above, or they can be pre-calibrated; there are no specific restrictions. Then, according to the linear allocation algorithm based on the interpolation ratio, the edge features between the newly added node and the first mother node, and the edge features between the newly added node and the second mother node, are generated using the following formulas: , , in, The edge characteristics between the newly added node and the first parent node. This is the proportional allocation coefficient. The edge characteristics between the first parent node and the second parent node. The edge characteristics between the newly added node and the second parent node, To add a new node, As the first parent node, It is the second parent node.

[0088] This embodiment generates the embedding vector of the new node based on the embedding vectors of the two parent nodes. It then combines category prior information to distinguish the generation strategy based on whether the target node and the new node belong to the same lane category, which improves the generation accuracy of the edge features between the new node and the target node. At the same time, it combines the proportional allocation coefficient to generate the edge features between the new node and the corresponding parent node, ensuring the rationality of the edge feature generation.

[0089] In some embodiments of this application, determining a target generation strategy based on the lane category corresponding to the target node and the lane category corresponding to the new node includes: when it is determined that the target node and the new node are in different lane categories based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be a first generation strategy, wherein the first generation strategy is to calculate the arithmetic mean of the edge features between the first parent node and the target node and the edge features between the second parent node and the target node, as the edge features between the new node and the target node; when it is determined that the target node and the new node are in the same lane category based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be a second generation strategy, wherein the second generation strategy is to perform linear interpolation calculation on the edge features between the first parent node and the target node and the edge features between the second parent node and the target node to obtain the edge features between the new node and the target node.

[0090] In other words, in the edge generation step of the trajectory map enhancement method, the generation strategy is distinguished based on the category prior information and whether the target node and the newly added node belong to the same lane category.

[0091] For new nodes Target nodes of different lane categories Considering the large spatial distance and discrete feature values ​​of different lane trajectories, the arithmetic mean is used as a robust approximation to avoid the uncertainty introduced by fine interpolation. The calculation formula is as follows: , in, The edge features between the newly added node and the target node. The edge features between the first parent node and the target node are represented by these features. The edge features between the second parent node and the target node are represented by these features. To add a new node, For the target node, As the first parent node, It is the second parent node.

[0092] For new nodes Target nodes of the same lane category Considering the high spatial proximity between trajectories in the same lane and their good linear additivity on the same cross section, linear interpolation is used to more finely characterize their spatial relationship. The calculation formula is obtained by linear interpolation of the edge features between the parent node and the node: , in, The edge features between the newly added node and the target node. This is the third interpolation ratio. The edge features between the first parent node and the target node are represented by these features. The edge features between the second parent node and the target node are represented by these features. To add a new node, For the target node, As the first parent node, It is the second parent node.

[0093] This embodiment takes into account the large spatial distance between different lane trajectories and the discrete feature values. It uses the arithmetic mean of the edge features between the two parent nodes and the target node as the edge features between the new node and the target nodes of different lane categories. Considering that there is a high spatial proximity between trajectories of the same lane and good linear additivity on the same cross section, a linear interpolation algorithm is used to calculate the edge features between the new node and the target nodes of the same lane category, thereby ensuring the accuracy of edge feature construction.

[0094] In some embodiments of this application, when the target generation strategy is the first generation strategy, the edge features between the new node and the target node are determined based on the target generation strategy and the edge features between the target node and the corresponding parent node. This includes: when the target node has no edge connection with one of the parent nodes (first and second parent nodes) but has an edge connection with the other parent node (first and second parent nodes), the edge features between one parent node and the target node are determined as preset edge features, and the actual edge features between the other parent node and the target node are determined according to the first trajectory relationship graph. The arithmetic mean of the preset edge features and the actual edge features is obtained to obtain the edge features between the new node and the target node. When the target node has edge connections with both the first and second parent nodes, the first actual edge features between the first parent node and the target node and the second actual edge features between the second parent node and the target node are determined according to the first trajectory relationship graph. The arithmetic mean of the first actual edge features and the second actual edge features is obtained to obtain the edge features between the new node and the target node.

[0095] In other words, if the target node has an edge connection with only one of the first and second parent nodes—for example, the target node has an edge connection with the first parent node but no edge connection with the second parent node—then the first trajectory graph only contains the actual edge features between the first parent node and the target node. Therefore, the edge features between the second parent node and the target node are... Set it as a preset edge feature, for example, set it to 1, and then calculate. The arithmetic mean of the edge features is used to obtain the edge features between the new node and the target node. .

[0096] If the target node has edge connections to both the first and second parent nodes, then the actual edge features between the first parent node and the target node can be directly obtained from the first trajectory relationship graph. and the edge features between the second parent node and the target node. ,calculate and The arithmetic mean is used to obtain the edge features between the new node and the target node. .

[0097] In this embodiment, when the target node has an edge connection with only one of the parent nodes in the first trajectory relationship graph, the edge features between the new node and the target node are calculated by combining the preset edge features. When the target node has an edge connection with both parent nodes in the first trajectory relationship graph, the edge features obtained from the trajectory relationship graph are used to calculate the edge features between the new node and the target node, thereby ensuring the smooth generation of edge features.

[0098] In some embodiments of this application, the lane topology construction method further includes: constructing a one-to-one matching loss function, an auxiliary one-to-many matching loss function, and a quality focus loss function corresponding to the graph neural network model to be trained; constructing a target loss function based on the one-to-one matching loss function, the auxiliary one-to-many matching loss function, and the quality focus loss function; and adjusting the model parameters based on the error parameters output by the target loss function during the training of the graph neural network model according to the first trajectory relationship graph after parameter enhancement, so as to obtain the trained graph neural network model.

[0099] Specifically, in combination Figure 4 As shown, the calculation method for the one-to-one matching loss function is as follows: Let there be 100,0 ... A trajectory and assume it has Construct a cost matrix for each real lane. The elements in the constructed cost matrix are... For trajectory Corresponding node With lane The normalized bidirectional Hausdorff distance between them. The Hungarian matching algorithm is used to solve for the optimal one-to-one assignment: ,in, Indicates that it is assigned to the first The original row index (i.e., track number) of the track for each lane. Represents the construction cost matrix in which the th line, number The elements of the column are the normalized distance costs between the lane and its assigned trajectory. This represents the total cost for the corresponding lane. This means selecting the minimum total cost among all lanes, and using the permutations and combinations corresponding to the minimum total cost as the final matching result.

[0100] This one-to-one matching loss function forces each real lane to match only a single predicted node. On the dense lane side, the model is forced to autonomously select the geometrically optimal unique representative from multiple candidate trajectories, suppressing redundant extraction; on the sparse lane side, the matching process always ensures that each real lane has at least one corresponding predicted node, avoiding complete omission.

[0101] Let the set of successfully matched nodes be . The one-to-one matching loss is defined as: , in, The loss value for a one-to-one match; the first term For positive sample loss, matching nodes are encouraged to output high probabilities, which are then divided by the number of lanes to balance the number of positive and negative samples. This represents the total number of actual lanes within the intersection. The track number that was successfully matched. For the first The probability that a trajectory is predicted as a positive sample by a graph neural network model; the second term For negative sample loss, unmatched nodes are encouraged to output low probabilities, where, For the track numbers that failed to match, For the first The probability that a trajectory is predicted as a positive sample by a graph neural network model; the third term For matching cost penalty, where, To track The column index of the matching lanes. The cost matrix is ​​the first Line (i.e., trajectory) ) and the Column (i.e., trajectory) Matching lanes The specific value at the intersection (i.e., the normalized bidirectional Hausdorff distance).

[0102] The method for calculating the loss function of the auxiliary one-to-many matching is as follows: [The cost matrix is ​​then used as a reference]. Column repetition Secondary construction of extended cost matrix Set the number of repetitions for the valid column. To ensure that at least one unmatched node is retained to provide negative sample supervision, the algorithm adaptively adjusts based on the number of nodes and lanes as follows: ,in, For the number of lanes, For the number of nodes, Set the preset number of repetitions for each column.

[0103] In the extended cost matrix Perform Hungarian matching on the above to obtain an expanded set of matching nodes. The auxiliary one-to-many matching loss function is defined as: , in, To assist in one-to-many matching loss value; The number of times the valid column is repeated; This represents the total number of actual lanes within the intersection. The track number is assigned to the successfully matched track. To expand the set of matching nodes, i.e., in the expanded matrix After running the Hungarian algorithm, the set of successfully matched trajectory nodes is obtained. The predicted probability of the auxiliary branch output, i.e., the first... The probability that a trajectory is predicted as a positive sample in the auxiliary branch. For the track numbers that failed to match, For the first The loss is the probability that a trajectory is predicted as a positive sample in the auxiliary branch. This loss is calculated through the auxiliary branch, which shares the node embedding features of the encoder output with the main branch but uses an independent prediction head and is only used during the training phase.

[0104] The mass focus loss function is calculated as follows: for each trajectory node... Calculate its trajectory Minimize the bidirectional Hausdorff distances from all actual lane centerlines: ,in, For the first The center line of a real lane, For trajectory With the The bidirectional Hausdorf distance between the center lines of the actual lanes. To calculate the trajectory The minimum bidirectional Hausdorff distance between the centerline of all real lanes.

[0105] Convert it back to the original quality fraction using an exponential decay function: , in, For the first The original quality score of each trajectory; For the first The minimum bidirectional Hausdorff distance between the trajectory and the centerline of all real lanes; Temperature is a parameter used to control the decay rate. For the original quality score of each trajectory, max-min normalization is performed within the intersection, so that the quality label of the best trajectory within each intersection is 1, and the labels of the remaining nodes are continuously distributed between 0 and 1, resulting in the final quality label. .

[0106] make The predicted probability output by the main branch, and the quality focus loss function are calculated as follows: , in, This represents the quality focus loss value. For the first Quality labels for each trajectory; For the first The probability that a trajectory is predicted as a positive sample by a graph neural network model; As a focus index, This is the focus weighting factor, which makes the model focus on samples whose predicted probability deviates significantly from the quality label.

[0107] The target loss function is then a weighted sum of the three types of losses, and the specific formula is as follows: , in, The target loss value; This represents the loss value for a one-to-one match. To assist in one-to-many matching loss value; This represents the quality focus loss value. and These are the weighting coefficients for the corresponding losses, i.e. To assist in the weighting coefficients of the one-to-many matching loss value, These are the weighting coefficients for the quality focus loss value. The gradient of the main branch is... and Contribution, gradient of auxiliary branch is The gradients of both branches contribute to the backpropagation of the gradients to update the parameters of the shared encoder.

[0108] like Figure 2 As shown, the multi-level loss optimization module in this graph neural network model provides accurate sparse supervision through one-to-one matching loss, provides dense gradients to accelerate convergence through auxiliary one-to-many matching loss, and guides the alignment of predicted probability with geometric quality through quality focus loss. The network parameters are optimized by weighting and jointly optimizing the three types of losses.

[0109] In some embodiments of this application, the trajectory relationship graph includes edge features and node features. The trained graph neural network model is used to output a reference trajectory for each lane corresponding to the trajectory relationship graph, including: performing convolution processing on the node features based on the edge features of the trajectory relationship graph to obtain a first node feature; updating the edge features based on the first node features to obtain an updated edge feature; performing convolution processing on the first node features based on the updated edge features to obtain a second node feature; and outputting the reference trajectory for each lane based on the first node features and the second node features.

[0110] Specifically, in the application process, a trajectory relationship map of the intersection is constructed based on the actual driving trajectory of the intersection. Then, the trajectory relationship map is input into the trained graph neural network model to identify and output the reference trajectory of each lane.

[0111] Combination Figure 2 As shown, the graph neural network model includes a graph feature encoding module, a graph attention interaction module, a node prediction module, and a multi-level loss optimization module. In application, the working process of each module is as follows.

[0112] The graph feature encoding module is used to map the raw features of nodes and edges in the first trajectory relationship graph to a high-dimensional embedding space through a fully connected network, providing a unified feature representation for subsequent interactions. The graph feature encoding module includes a node feature encoder and an edge feature encoder.

[0113] For example, suppose the node features in the first trajectory graph are 14-dimensional and the edge features are 11-dimensional. Then, the node feature encoder is used to map the 14-dimensional original node features to a 64-dimensional embedding space: , in, For the first Each trajectory node, For the first A trajectory node, For the first The original node characteristics of each trajectory node, This is the weight matrix of the node feature encoder. This is the bias vector of the node feature encoder. , For learnable parameters, For activation function, For random inactivation.

[0114] The edge feature encoder maps the 11-dimensional original edge features to a 64-dimensional embedding space through a three-layer fully connected network: , in, For the edge The updated edge features, For connecting nodes and nodes The edge, For the edge The original edge features, This is a multilayer perceptron edge feature encoder. Each layer in the edge feature encoder has the following structure: ,in, For the edge feature encoder, the first The weight matrix of each layer contains three weight matrices. and , This is the corresponding bias vector in the edge feature encoder.

[0115] The graph attention interaction module employs a bidirectional propagation mechanism that iteratively updates node and edge features. This mechanism enables the co-evolution of node and edge features through two-layer multi-head graph attention convolution and dynamic updates of inter-layer edge features. Finally, it outputs the deep node features through a cross-layer residual update strategy, capturing the complex spatial dependencies between trajectories.

[0116] Specifically, it includes a first-layer graph attention convolutional layer, an edge feature update layer, and a second-layer graph attention convolutional layer, combined with... Figure 5 , Figure 6 and Figure 7 As shown, the working process of the graph attention interaction module is as follows: The first graph attention convolutional layer uses four attention heads computed in parallel. For the... One attention point ( The node features are mapped to query vectors, key vectors, and value vectors through three sets of linear transformations: , in, , , The first The query matrix (i.e., query vector), key matrix (i.e., key vector), and value matrix (i.e., value vector) are obtained by linear projection of each attention head. For input to the first The initial node feature matrix of each attention head. It is the first A dedicated weight matrix for each attention point.

[0117] The edge features in the first trajectory relationship graph are linearly projected. Then it is used in the attention score calculation, where, For the first The edge feature matrix after linear projection of each attention head This is the original edge feature matrix. For the first The edge feature projection weight matrix of each attention. .node For neighboring nodes The original attention score is: , in, In the first In a single attention head, the central node For neighboring nodes The original attention score; For nodes In the The query vector in the attention head. For neighboring nodes In the The key vector in the attention head The dimension of the key vector is, i.e. This is a scaling factor used to prevent the dot product value from becoming too large, which could lead to gradient saturation. It is a two-layer perceptron with a 64-dimensional input layer, a 64-dimensional hidden layer, and a 1-dimensional scalar output layer. It transforms the geometric priors between trajectory pairs into trainable scalar biases. For connecting nodes For neighboring nodes The edge features of the edges, obtained after the above linear projection, are... The edge feature vectors corresponding to each attention head.

[0118] Attention weights are obtained through Softmax normalization: , in, In the first In a single attention head, the central node Assigned to neighboring nodes The final normalized attention weights, In the first Nodes in each attention head For neighboring nodes The original attention score, For nodes The set of neighboring nodes.

[0119] The new feature representation of a node is obtained by weighted summing of the value vectors of its neighbors: , in, For the first Each node outputs attention. New node characteristics, In the first In each attention head, the node Assigned to neighboring nodes The final normalized attention weights, For nodes The set of neighboring nodes, For neighboring nodes The value vector.

[0120] by Figure 6 For example, the central node The trajectory node whose features are currently being updated includes 6 neighboring nodes labeled with 1, 2, 3, 4, 5, and 6 respectively. After the above normalization process, the central node... The attention weights assigned to the 6 neighboring nodes are as follows: , , , , , From the central node The node features are linearly projected to obtain the query vector q. The node features of each neighboring node are linearly projected to obtain the key vector k and value vector v. Then, the value vector of each neighboring node is multiplied by its corresponding attention weight. Finally, the six weighted vectors are summed element-wise to obtain a new 64-dimensional vector, which serves as the center node. The new node features under the current attention focus are .

[0121] The outputs of the four attention heads in the first graph attention convolutional layer are concatenated along the feature dimension to obtain a 256-dimensional output. After layer normalization and ReLU activation, the final output of the first graph attention convolutional layer is obtained, which yields the first node feature.

[0122] The edge feature update layer is used to update the edge features based on the features of the first node, so that the geometric prior information in the original edge features can be directly passed to subsequent layers, avoiding information decay in deep networks. The updated edge features are used as the input of the second graph attention convolutional layer.

[0123] The second-layer graph attention convolutional layer performs secondary depth feature extraction by combining the projected node features (i.e., the first node features) with the updated edge features, outputting a 256-dimensional feature. ,in, This is the second node feature matrix output by the second attention convolutional layer.

[0124] Finally, the outputs of the first and second graph attention convolutional layers are added together using a residual update strategy: , in, This is the final node embedding matrix output through the residual update strategy. This is the feature matrix of the first node output by the first attention convolutional layer. This is the second node feature matrix output by the second attention convolutional layer. This is the normalization function. This is the activation function.

[0125] Combination Figure 8 As shown, the node representativeness prediction module maps node embeddings to representative trajectory probabilities using a two-layer fully connected network and a log-Softmax function. During the inference phase, it filters and outputs the reference trajectory for each lane based on a threshold. The calculation process is as follows: The 256-dimensional node representation output by the graph attention interaction module is reduced in dimensionality using a two-layer fully connected network: , in, For the first The 128-dimensional intermediate features are obtained by applying the first-level linear transformation, ReLU activation, and Dropout regularization to each node; For matrix of Line, i.e., the first The final 256-dimensional embedding features of each node; These are the trainable weights of the first fully connected layer, used to map 256-dimensional features to a 128-dimensional hidden space. For the trainable bias of the first fully connected layer, , ; For activation function, For random inactivation.

[0126] , in, The original output score, i.e., the score of the first... An unnormalized classification score vector for each node, containing the original values ​​for both classes; These are the trainable weights for the second fully connected layer, used to map the 128-dimensional features to a 2-dimensional output space. This is a trainable bias for the second fully connected layer. , ; For the first The 128-dimensional intermediate features are obtained by applying the first-level linear transformation, ReLU activation, and Dropout regularization to each node.

[0127] The logarithmic probabilities of the two classes are output using the log-softmax function: , in, For the first The logarithmic probability of each node For the first The original output scores of each node. and Let represent the probabilities of a node belonging to a non-representative trajectory and a representative trajectory, respectively. The probability of a node being predicted as a representative trajectory is: .

[0128] In the reasoning stage, The node determination is the representative trajectory, i.e., the reference trajectory of the lane, where This is a preset threshold. Because the model learns the constraint that each lane should only match one optimal node during training using a set-based loss function, the actual output usually shows a significantly higher probability of each lane having only one node than the threshold.

[0129] For example, a one-to-one matching loss function is used to construct a constraint that each lane matches only one optimal node. The calculation method for this one-to-one matching loss function is as follows: Let there be an intersection. A trajectory and assume it has Construct a cost matrix for each real lane. , among which, element For trajectory Corresponding node With lane The normalized bidirectional Hausdorff distance between them is used. Then, the Hungarian matching algorithm is employed to solve for the optimal one-to-one assignment: , in, Indicates that it is assigned to the first The original row index (i.e., track number) of the track for each lane. Represents the construction cost matrix in which the th line, number The elements of the column are the normalized distance costs between the lane and its assigned trajectory. This represents the total cost for the corresponding lane. This means selecting the minimum total cost among all lanes, and using the permutations and combinations corresponding to the minimum total cost as the final matching result. .

[0130] This method forces each real lane to match only a single predicted node. On the dense lane side, the model is forced to autonomously select the geometrically optimal unique representative from multiple candidate trajectories, suppressing redundant extraction. On the sparse lane side, the matching process always ensures that each real lane has at least one corresponding predicted node, avoiding complete omission.

[0131] Let the set of successfully matched nodes be . The one-to-one matching loss is defined as: , in, The loss value for a one-to-one match; the first term For positive sample loss, matching nodes are encouraged to output high probabilities, which are then divided by the number of lanes to balance the number of positive and negative samples. This represents the total number of actual lanes within the intersection. The track number that was successfully matched. For the first The probability that a trajectory is predicted as a positive sample by a graph neural network model; the second term For negative sample loss, unmatched nodes are encouraged to output low probabilities, where, For the track numbers that failed to match, For the first The probability that a trajectory is predicted as a positive sample by a graph neural network model; the third term For matching cost penalty, where, To track The column index of the matching lanes. The cost matrix is ​​the first Line (i.e., trajectory) ) and the Column (i.e., trajectory) Matching lanes The specific value at the intersection (i.e., the normalized bidirectional Hausdorff distance).

[0132] The first term is the positive sample loss, which encourages matching nodes to output high probabilities, and is divided by the number of lanes to balance the number of positive and negative samples; the second term is the negative sample loss, which encourages unmatched nodes to output low probabilities; and the third term is the matching cost penalty.

[0133] The trained graph neural network model will The node is determined as the representative trajectory of the corresponding lane. After using the trajectory corresponding to the node as the reference trajectory of the lane, the selected reference trajectory forms a line element as the lane centerline of the intersection, thereby constructing and generating the lane topology of the intersection.

[0134] This embodiment uses a trajectory relationship graph to fully represent the real relationship between trajectories at the intersection. Then, a trained graph neural network model is used to perform a two-layer multi-head graph attention convolution and inter-layer edge feature update to achieve the co-evolution of node and edge features of the trajectory relationship graph. The final deep node features are output, which can accurately capture the complex spatial dependencies between trajectories, ensuring the accuracy of reference trajectory recognition and improving the accuracy of lane-level topology construction at the intersection.

[0135] In some embodiments of this application, updating edge features based on first node features to obtain updated edge features includes: performing feature projection processing on the first node features to obtain projected node features, wherein the dimension of the projected node features is lower than the dimension of the first node features; determining two projected node features corresponding to each edge feature according to the node connection relationship of the first trajectory relationship graph; concatenating the edge features with the corresponding two projected node features to obtain a joint vector corresponding to the edge features; inputting the joint vector into a multilayer fully connected network to obtain a residual update amount, wherein the dimension of the residual update amount is the same as the dimension of the edge features; adding the residual update amount to the edge features and performing layer normalization processing to obtain the updated edge features.

[0136] Specifically, to facilitate the subsequent calculation of the edge feature update layer and the second graph attention convolutional layer, the output dimension of the first graph attention convolutional layer is first projected and reduced through the feature projection layer. Specifically, a learnable fully connected layer can be used to compress high-dimensional features into low-dimensional compact vectors, thereby reducing the amount of subsequent computation. In addition, noise filtering can be achieved by forcing the model to extract the core semantic features from the node features.

[0137] Then, based on traversing each edge in the graph (edge ​​features correspond to the connection between two nodes), the two projected node features corresponding to the start and end points of this edge are found according to the node connection relationship. Assuming that edge O1 represents the connection between trajectory node A and trajectory node B, then the two projected node features corresponding to the edge feature of edge O1 are the projected node features of trajectory node A and trajectory node B. Then, the edge feature of edge O1 itself is concatenated with the projected node features of trajectory node A and trajectory node B to form a comprehensive vector containing all contextual information of the triple (start point-relationship-end point), which serves as the corresponding joint vector.

[0138] Then, the concatenated high-dimensional vector, i.e., the joint vector, is input into a multi-layer fully connected network, which outputs a residual update value, the dimension of which is the same as the dimension of the edge features. The edge features are then corrected based on the residual update value, and layer normalization is applied to bring the corrected features back to the standard normal distribution range to prevent the values ​​from being too large or too small, ensuring processing stability and convergence speed, thus obtaining the updated edge features.

[0139] This embodiment achieves edge feature updates through a combination of feature projection, topological context fusion, residual learning, and layer normalization. This not only accurately captures interactions between nodes and ensures that edge features can dynamically evolve according to the graph structure, but also ensures the feasibility of training deep graph neural networks through residual and normalization mechanisms. Ultimately, this makes the entire model more accurate, faster, and more stable during inference.

[0140] In some embodiments of this application, feature projection processing is performed on the first node features to obtain projected node features, including: sequentially processing the first node features through linear transformation, layer normalization, and activation function processing to obtain projected node features, wherein the dimension of the projected node features is the same as the dimension of the edge features; the multilayer fully connected network includes a first fully connected layer, an activation function layer, and a second fully connected layer connected sequentially, and inputting the joint vector into the multilayer fully connected network to obtain the residual update amount includes: inputting the joint vector into the first fully connected layer to map the joint vector to the dimension of the edge features and outputting the mapped joint vector; inputting the mapped joint vector into the activation function layer to apply a nonlinear transformation to the mapped joint vector and outputting the activated joint vector; inputting the activated joint vector into the second fully connected layer to perform a linear transformation and recombination on the activated joint vector within the dimension of the edge features and outputting the residual update amount.

[0141] Specifically, taking the outputs of the four attention heads in the first layer of graph attention convolutional layer as an example, which are concatenated along the feature dimension to obtain a 256-dimensional output, and the edge feature encoder mapping the 11-dimensional original edge features to a 64-dimensional embedding space through a three-layer fully connected network, as an example.

[0142] To facilitate the computation of subsequent edge feature update layers and the second graph attention convolutional layer, the output of the first graph attention convolutional layer is compressed from 256 dimensions to 64 dimensions through a feature projection layer: , in, The compressed node feature matrix output by the feature projection layer is also known as the projected node feature matrix. The projection weight matrix is... The node feature matrix output by the first graph attention convolutional layer is the first node feature matrix.

[0143] The edge feature update layer updates the edge features based on the features of the first node. The calculation process is as follows: The features of the first nodes of the two nodes connected by the edge are concatenated with the original edge features along the feature dimension to form a 192-dimensional joint vector: , in, For joint vectors, For nodes exist Projection node features in For nodes exist Projection node features in For connecting nodes and nodes The original edge characteristics of the edge.

[0144] Residual update values ​​are generated through a two-layer fully connected network: , in, This is the residual update amount. For joint vectors, This is the weight matrix of the first fully connected layer. This represents the bias vector of the first fully connected layer. This is the weight matrix of the second fully connected layer. This is the bias vector for the second fully connected layer. , , For learnable parameters, This is the activation function.

[0145] The updated edge features are obtained through residual connections and layer normalization: , in, For connecting nodes and nodes The updated edge features corresponding to the edges. For connecting nodes and nodes The original edge characteristics of the edge, This is the residual update amount. This is the normalization function.

[0146] The design of residual connections allows the geometric prior information in the original edge features to be directly passed to subsequent layers, avoiding information decay in deep networks. The updated edge features serve as the input to the second graph attention convolutional layer.

[0147] This embodiment reduces the dimensionality of high-dimensional node features to the dimension of edge features and combines them to generate residual increments, which not only ensures the accuracy of updates but also significantly improves the numerical stability and convergence efficiency during training.

[0148] This application also provides a lane topology construction method, applied in the model application stage, using the above-mentioned trained graph neural network model, such as... Figure 9 As shown, the method includes: S210, obtain the set of driving trajectories at the intersection, and construct the second trajectory relationship diagram of the intersection based on the set of driving trajectories; S220, input the second trajectory relationship graph into the trained graph neural network model to output the reference trajectory of each lane in the intersection; S230 generates the lane topology of the intersection based on the reference trajectory of each lane.

[0149] Therefore, the lane topology construction method in this embodiment, at the data augmentation level, constructs a trajectory relationship graph and designs a graph augmentation strategy for sparse trajectory lanes. By interpolating features of sparse lane nodes and simultaneously generating edge features in the embedded feature space, it expands the feature distribution of a few classes without introducing external noise, thus alleviating the constraint of data imbalance on model learning. At the model design level, it constructs an end-to-end graph neural network framework, introducing a two-layer graph attention convolution, dynamic edge feature update, and residual update mechanism to enhance the model's ability to capture complex spatial dependencies between trajectories. Simultaneously, it constructs a multi-level loss function system, using three strategies—set-level optimal matching, dense gradient, and node-level geometric quality alignment—for collaborative supervision, guiding the model to improve centerline positioning accuracy while ensuring topological integrity. Thus, this method, combining trajectory relationship graph construction, sparse lane graph augmentation, node-edge collaborative graph attention, and multi-level loss supervision strategies, achieves end-to-end extraction of lane centerlines and topology structures in complex intersection scenarios, effectively improving lane extraction integrity, geometric accuracy, and topological stability under conditions of uneven trajectory distribution.

[0150] This application also provides an electronic device 100, which is described in reference to... Figure 10 As shown, the electronic device 100 includes: a memory 110, a processor 120, and a computer program stored on the memory 110 and executable on the processor 120. The processor 120 executes the program to implement the lane topology construction method described in any embodiment of this application.

[0151] This application also provides a computer-readable storage medium storing a computer program that, when executed, implements the lane topology construction method described in any embodiment of this application.

[0152] In this application, "multiple" refers to two or more.

[0153] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0154] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0155] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0156] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if a method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if a method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.

[0157] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A lane topology construction method, characterized in that, Applied to the model training phase, the method includes: Obtain a set of historical driving trajectories for the intersection, and construct a first trajectory relationship graph for the intersection based on the set of historical driving trajectories. The first trajectory relationship graph includes multiple nodes constructed based on the historical driving trajectories and multiple edges constructed based on the trajectory relationships between the historical driving trajectories. Identify sparse lanes in the first trajectory relationship graph, and perform parameter enhancement on the first trajectory relationship graph based on the sparse lanes; The graph neural network model is trained based on the first trajectory relationship graph with enhanced parameters to obtain the trained graph neural network model, which is then used to output the reference trajectory of each lane corresponding to the trajectory relationship graph.

2. The method according to claim 1, characterized in that, The step of constructing the first trajectory relationship graph of the intersection based on the set of historical driving trajectories includes: Multiple nodes and node features of each node are determined based on multiple driving trajectories in the historical driving trajectory set, wherein the node features include the directional features, morphological features and positional features of the driving trajectory; Identify the trajectory relationships between the multiple driving trajectories, and determine the edges used for node connection and the edge features of each edge based on the trajectory relationships, wherein the edge features include the overall similarity features between two driving trajectories and the spatial proximity features at multiple local locations; The first trajectory relationship graph is constructed based on the plurality of nodes, the node features, the edges used for node connection, and the edge features.

3. The method according to claim 2, characterized in that, The identification of sparse lanes in the first trajectory relationship graph includes: Based on the positional characteristics of each node in the first trajectory relationship graph, identify the number of driving trajectories corresponding to each lane in the intersection; When the number of driving trajectories corresponding to a lane is less than a preset number, the lane is determined to be a sparse trajectory lane.

4. The method according to claim 2, characterized in that, The parameter enhancement of the first trajectory relationship graph based on the sparse lanes of the trajectory includes: The node embedding matrix of the first trajectory relationship graph is determined based on the node features of each node in the first trajectory relationship graph, and the node embedding matrix includes the embedding vector of each node in the first trajectory relationship graph. Identify multiple original nodes of the sparse trajectory lane in the first trajectory relationship graph, and determine the embedding vector of at least one newly added node of the sparse trajectory lane and the corresponding edge features based on the multiple original nodes and the embedding vector of each original node, so as to obtain the enhancement parameters of the first trajectory relationship graph. The first trajectory relationship diagram after parameter enhancement is determined based on the enhancement parameters and the first trajectory relationship diagram.

5. The method according to claim 4, characterized in that, The step of determining the embedding vector of at least one newly added node of the trajectory sparse lane and the corresponding edge features based on the plurality of original nodes and the embedding vector of each original node includes: The first mother node and the second mother node are determined based on two of the plurality of original nodes; The embedding vector of the newly added node is determined based on the embedding vector of the first parent node and the embedding vector of the second parent node; Identify target nodes in the first trajectory relationship graph that have edge connections with the first parent node and / or the second parent node, and determine the edge features corresponding to the newly added node based on the embedding vector of the target node, the edge features between the target node and the corresponding parent node, and the edge features between the first parent node and the second parent node.

6. The method according to claim 5, characterized in that, The step of determining the first mother node and the second mother node based on two original nodes from the plurality of original nodes includes: One of the plurality of original nodes is determined as the first parent node; The relative distance between the first mother node and the other original nodes among the plurality of original nodes is determined based on the embedding vectors of the plurality of original nodes. The second mother node is determined based on the relative distance.

7. The method according to claim 5, characterized in that, Determining the embedding vector of the newly added node based on the embedding vector of the first parent node and the embedding vector of the second parent node includes: Determine the target interpolation ratio; The embedding vector of the first mother node and the embedding vector of the second mother node are linearly interpolated according to the target interpolation ratio to obtain the embedding vector of the newly added node.

8. The method according to claim 5, characterized in that, The edge features corresponding to the newly added node include the edge features between the newly added node and the target node, the edge features between the newly added node and the first parent node, and the edge features between the newly added node and the second parent node, wherein... The step of determining the edge features corresponding to the newly added node based on the embedding vector of the target node, the edge features between the target node and the corresponding parent node, and the edge features between the first parent node and the second parent node includes: The lane category corresponding to the target node is determined based on the embedding vector of the target node; A target generation strategy is determined based on the lane category corresponding to the target node and the lane category corresponding to the new node. Based on the target generation strategy, the edge features between the new node and the target node are determined according to the edge features between the target node and the corresponding parent node. Determine the proportional allocation coefficient, and perform interpolation proportional allocation on the edge features between the first parent node and the second parent node according to the proportional allocation coefficient, so as to determine the edge features between the newly added node and the first parent node and the edge features between the newly added node and the second parent node.

9. The method according to claim 8, characterized in that, The step of determining the target generation strategy based on the lane category corresponding to the target node and the lane category corresponding to the newly added node includes: When it is determined that the target node and the new node are in different lane categories based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be the first generation strategy. The first generation strategy is to calculate the arithmetic mean of the edge features between the first parent node and the target node and the edge features between the second parent node and the target node, and use it as the edge features between the new node and the target node. When it is determined that the target node and the new node are in the same lane category based on the lane category corresponding to the target node and the lane category corresponding to the new node, the target generation strategy is determined to be the second generation strategy. The second generation strategy is to perform linear interpolation calculation on the edge features between the first parent node and the target node and the edge features between the second parent node and the target node to obtain the edge features between the new node and the target node.

10. The method according to claim 9, characterized in that, When the target generation strategy is the first generation strategy, determining the edge features between the newly added node and the target node based on the target generation strategy and the edge features between the target node and the corresponding parent node includes: If the target node has no edge connection with one of the first and second parent nodes, but has an edge connection with the other of the first and second parent nodes, the edge feature between the target node and the parent node is determined as a preset edge feature. The actual edge feature between the other parent node and the target node is determined according to the first trajectory relationship graph. The arithmetic mean of the preset edge feature and the actual edge feature is obtained to obtain the edge feature between the newly added node and the target node. When the target node has edge connections with both the first parent node and the second parent node, the first actual edge feature between the first parent node and the target node and the second actual edge feature between the second parent node and the target node are determined according to the first trajectory relationship graph. The arithmetic mean of the first actual edge feature and the second actual edge feature is obtained to obtain the edge feature between the newly added node and the target node.

11. The method according to any one of claims 1-10, characterized in that, The method further includes: Construct the one-to-one matching loss function, the auxiliary one-to-many matching loss function, and the quality focus loss function corresponding to the graph neural network model; Construct a target loss function based on the one-to-one matching loss function, the auxiliary one-to-many matching loss function, and the quality focus loss function; During the training of the graph neural network model based on the first trajectory relationship graph after parameter enhancement, the model parameters are adjusted based on the error parameters output by the target loss function to obtain the trained graph neural network model.

12. The method according to claim 1, characterized in that, The trajectory relationship graph includes edge features and node features. The step of using a trained graph neural network model to output a reference trajectory for each lane corresponding to the trajectory relationship graph includes: The node features are convolved based on the edge features of the trajectory relationship graph to obtain the first node features; The edge features are updated based on the first node features to obtain the updated edge features. Based on the updated edge features, the first node features are convolved to obtain the second node features; The reference trajectory of each lane is output based on the features of the first node and the features of the second node.

13. The method according to claim 12, characterized in that, The step of updating the edge features based on the first node features to obtain the updated edge features includes: The first node feature is subjected to feature projection processing to obtain the projected node feature, wherein the dimension of the projected node feature is lower than the dimension of the first node feature. Based on the node connection relationship of the first trajectory relationship graph, determine the two projected node features corresponding to each edge feature; The edge feature is concatenated with the features of the two corresponding projected nodes to obtain the joint vector corresponding to the edge feature. The joint vector is input into a multilayer fully connected network to obtain the residual update amount, wherein the dimension of the residual update amount is the same as the dimension of the edge feature; The residual update amount is added to the edge feature, and then subjected to layer normalization to obtain the updated edge feature.

14. The method according to claim 13, characterized in that, The step of performing feature projection processing on the first node features to obtain projected node features includes: The first node features are sequentially processed by linear transformation, layer normalization, and activation function to obtain the projected node features, wherein the dimension of the projected node features is the same as the dimension of the edge features. The multilayer fully connected network comprises a first fully connected layer, an activation function layer, and a second fully connected layer connected sequentially. The step of inputting the joint vector into the multilayer fully connected network to obtain the residual update includes: The joint vector is input into the first fully connected layer to map the joint vector to the dimension of the edge feature, and the mapped joint vector is output. The joint vector after the mapping process is input into the activation function layer to apply a nonlinear transformation to the joint vector after the mapping process, and output the activated joint vector. The activated joint vector is input into the second fully connected layer to perform a linear transformation and recombination on the activated joint vector within the dimension of the edge features, and output the residual update amount.

15. A method for constructing lane topology, characterized in that, When applied to the model application stage, using a graph neural network model trained as described in any one of claims 1-13, the method includes: Obtain the set of driving trajectories at the intersection, and construct a second trajectory relationship diagram of the intersection based on the set of driving trajectories; The second trajectory relationship graph is input into the trained graph neural network model to output the reference trajectory of each lane in the intersection; The lane topology of the intersection is generated based on the reference trajectory of each lane.

16. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method as described in any one of claims 1-14, or to implement the method as described in claim 15.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1-14, or the method as described in claim 15.