A semantic enhanced graph contrastive learning method and system for road network representation

By combining road attributes and visual information through the SE-GCL framework, the limitations of traditional methods in the analysis of complex road networks are overcome, data processing efficiency and accuracy are improved, and more precise traffic management and prediction are supported.

CN118193628BActive Publication Date: 2026-07-21CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2024-03-15
Publication Date
2026-07-21

Smart Images

  • Figure CN118193628B_ABST
    Figure CN118193628B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of semantic enhancement graph contrast learning method and system for road network representation, belong to traffic data analysis and machine learning technical field.The present application provides a kind of semantic enhancement graph contrast learning framework, which effectively combines road attribute and visual information by multi-modal feature embedding, in-depth mining and using the characteristics of road network data.Construct a new type of road network data representation, not only have high-dimensional rich information, but also can be directly used as the input of machine learning model.This design makes various downstream tasks based on road network, such as road label classification, speed prediction, etc., become more convenient to implement.The present scheme combines the idea of graph contrast learning, improves the robustness and generalization ability of road network data representation by simulating the topological change and data loss of road network, effectively solves the limitations of traditional methods in complex road network analysis, improves the efficiency of road network data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of traffic data analysis and machine learning technology, and relates to a semantically enhanced graph contrastive learning method and system for road network representation. Background Technology

[0002] With accelerating urbanization, urban transportation networks are becoming increasingly complex and dynamic, posing growing challenges to traditional road network analysis methods. These methods often rely on simplified mathematical models and limited data sources, making it difficult to capture and interpret the complex dynamics and diversity within road networks. For example, in urban planning and traffic management, a deep understanding of key information such as traffic flow, congestion patterns, and accident risks is crucial, but existing technologies and methods often fail to effectively process and analyze large-scale, high-dimensional road network data. Furthermore, with technological advancements, the types and volumes of road network data have changed significantly. From vehicle GPS trajectories to real-time traffic monitoring, the richness and diversity of data are unprecedented. However, this also presents new challenges for data processing and analysis. Existing analytical tools and methods often fall short when dealing with this massive amount of data, especially in situations requiring real-time monitoring of traffic flow, prediction of traffic trends, and response to traffic emergencies. For example, in real-time traffic condition monitoring, traditional data analysis methods cannot reflect changes in traffic flow in real time; in traffic forecasting, due to a lack of in-depth analysis of big data, they often fail to accurately predict future traffic conditions; and in traffic accident response, traditional methods also have significant shortcomings in the timeliness and accuracy of data processing. Therefore, given the complex and ever-changing characteristics of modern urban transportation networks, there is an urgent need to develop new analytical methods and technologies to better understand and manage these complex transportation systems. These new methods and technologies should be able to effectively handle large-scale, high-dimensional traffic data to achieve a deep understanding and precise management of transportation networks. This includes not only efficiently processing existing data but also effectively simulating and predicting changes in traffic network topology and data gaps. Through such technological advancements, urban planning and traffic management can be supported more comprehensively and accurately, thereby improving the efficiency and safety of urban transportation systems. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a semantically enhanced graph contrastive learning method and system for road network representation. This method and system provide a framework called SE-GCL (Semantic Enhanced Graph Contrast Learning), which effectively combines road attributes and visual information through multimodal feature embedding, deeply mining and fully utilizing the features of road network data. It constructs a road network data representation that not only possesses rich, high-dimensional information but can also be directly used as input for machine learning models. This design makes various downstream tasks based on road networks, such as road label classification, speed prediction, and travel time prediction, more convenient to implement. SE-GCL integrates the idea of ​​graph contrastive learning, improving the robustness and generalization ability of road network data representation by simulating topological changes and data gaps in road networks, effectively addressing the limitations of traditional methods in complex road network analysis.

[0004] To achieve the above objectives, the present invention provides the following technical solution: A semantically enhanced graph contrastive learning method for road network representation is proposed. This method constructs a semantically enhanced graph contrastive learning framework for road network representation, specifically including the following stages: Phase 1: Construct a multimodal feature embedding module, which uses the attribute data of road segments and street view image data to obtain the attribute embedding (embedding, i.e., low-dimensional representation vector) and visual feature embedding of road segments respectively, and concatenates them together as the initial embedding of road segments. The second stage involves constructing a graph augmentation module. Based on modeling the road network as a graph, two different augmentation strategies are designed to apply perturbations to the topology and node features of the road network (graph), thereby generating two different augmented graphs (graph variants). The third stage: Construct a graph representation learning module. Based on the two graph variants generated by the graph augmentation module, a graph neural network model is used to extract the node level, i.e., the representation of road segments. Phase 4: Construct a contrast optimization module based on semantic enhancement, which uses road network characteristics and mobile semantics in historical trajectories to sample sample pairs, and designs a contrast loss function for dual views to guide the contrast optimization process.

[0005] Furthermore, the first stage is mainly divided into two parts: attribute feature embedding and visual feature embedding. The attribute feature embedding part includes: for any road segment An analysis was conducted based on attributes such as the road segment identifier (ID), road segment length (LEN), and road segment midpoint coordinates (LON, LAT). The symbols corresponding to these attributes are as follows: , , , Considering that the variation in latitude and longitude coordinates within a single road segment is very limited, it is only necessary to select the latitude and longitude of the geometric midpoint of the road segment to represent its location information. For real number type attributes... and They are transformed into a discretized form through binning operations. Then, a separate linear layer is used to map each attribute value to a corresponding feature vector. Subsequently, the four feature vectors are concatenated together to form the attribute embedding of the road segment. The visual feature embedding part includes: using a pre-trained Swin Transformer as the visual feature encoder, taking panoramic image data collected at the midpoint of the road segment as input, and outputting its visual embedding. Finally, the two different feature types are connected together to obtain the initial embedding of the road segment.

[0006] Furthermore, in the second stage, a graph augmentation module is constructed to augment the road network using two strategies: mobility-based edge removal and modality-based feature masking. The mobility-based edge removal strategy determines the removal probability of edges based on the transition probability between road segments in historical trajectory data, taking into account the topology of the road network. If two road segments frequently appear together in historical trajectories, their connection is considered strong and important, and therefore the probability of removing such a connection is low. The modality-based feature masking strategy is a perturbation strategy targeting node features. It randomly selects one of the attributes or image features for masking, allowing the contrastive learning model to adapt to the lack of road segment data, thereby enhancing the robustness of the model. During each training process, two graph views are generated simultaneously using these two different augmentation strategies for comparison.

[0007] Furthermore, in the third stage, a graph representation learning module is constructed, which takes the two graph views generated by the graph augmentation module as input and learns the representations of the two graph views respectively; specifically, it includes: using a graph encoder to learn and extract high-level features from the graph views, thereby generating a complex representation of each road segment, and finally, mapping the road segment representation generated by the graph encoder to a low-dimensional latent space through a nonlinear projection head.

[0008] Furthermore, in the fourth stage, a semantically enhanced contrast optimization module is constructed. This module includes a semantically enhanced sampling strategy that can utilize road network characteristics and motion semantics in historical trajectories to construct positive and negative samples. Specifically, given a target node (i.e., an anchor node) in a certain view, its neighboring nodes within the h-hop are considered as positive samples within the view, and its mirrored nodes in another view are considered as positive samples between views. For nodes outside the h-hop range, nodes that co-occur with the anchor node in the historical trajectory are further filtered out, and the remaining nodes are selected as true negative samples. Then, a contrast optimization strategy based on... The target design's contrastive loss function:

[0009] We calculate the contrast loss for all nodes in both graph views, and use this to obtain the final dual-view contrast loss function. in, express The mirror node is shown in another view; finally, this loss function is used to train the network to optimize the road network embedding representation.

[0010] The present invention also provides a semantically enhanced graph contrastive learning system for road network representation.

[0011] The beneficial effects of this invention are as follows: This invention provides a framework called SE-GCL (Semantic Augmented Graph Contrast Learning), which effectively combines road attributes and visual information through multimodal feature embedding, deeply mining and fully utilizing the features of road network data. It constructs a road network data representation that not only possesses rich, high-dimensional information but can also be directly used as input for machine learning models. This design makes various downstream tasks based on road networks, such as road label classification, speed prediction, and travel time prediction, more convenient to implement. SE-GCL integrates the idea of ​​graph contrast learning, improving the robustness and generalization ability of road network data representation by simulating topological changes and data gaps in road networks. It effectively addresses the limitations of traditional methods in analyzing complex road networks, improving the efficiency of road network data processing and the understanding of the complex dynamics of urban traffic networks.

[0012] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0013] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a system block diagram of the present invention; Figure 2 This is an illustrative example diagram of a semantic enhancement sampling strategy. Detailed Implementation

[0014] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0015] This invention provides a semantically enhanced graph contrastive learning framework for road network representation, used for road network representation learning. Currently, the increasing complexity of urban traffic networks has led to massive and diverse road network data, and the processing and analysis of this data incurs significant storage and computational overhead. Currently, road network data is typically processed by combining road attributes and visual information. This invention proposes a novel framework for the representation and optimization of this data, comprising the following four stages: First, a multimodal feature embedding module is constructed, utilizing road segment attribute data and street view image data to obtain the attribute and visual feature embeddings of road segments; second, through a graph augmentation module, two augmentation strategies are designed to perturb the topology and node features of the road network, generating two different augmented graphs; next, in the graph representation learning module, a graph neural network model is used to extract road segment representations from these two graph variants; finally, in the semantically enhanced contrastive optimization module, sample pairs are sampled by combining road network characteristics and movement semantics in historical trajectories, and a dual-view contrastive loss function is designed to guide the optimization process. This framework improves the efficiency of road network data processing and the understanding of the complex dynamics of urban traffic networks. Figure 1 This is a system block diagram of the present invention.

[0016] This embodiment involves seven essential concepts, as follows: The first concept: road network, which is a directed graph. Each vertex A represents a road segment, containing attributes such as its length and coordinates on the map. A is an adjacency matrix where each entry... It is a binary number representing a road segment. Is it related to the road section? Connected.

[0017] The second concept: Street View Images These are photographs taken by vehicles at specific locations on the road network. Specifically, we collected multiple images of each road segment and stitched them together to create a 360-degree panoramic view. The panoramic image represents a snapshot, illustrating the visual details of the surrounding environment.

[0018] The third concept: trajectory It is the sequence of GPS points recorded when a vehicle moves on the road network, denoted as .in, These are the coordinates of the i-th point. This represents the total number of points. We further map each trajectory onto the road network using our proposed L2MM deep model. Therefore, a trajectory consists of a series of connected road segments in the road network G. express.

[0019] The fourth concept, An embedding refers to the embedding or representation of a specific node (such as a road segment). In a graph, each node has a unique embedding to represent its features. This represents the embedding of a positive sample. In contrastive learning, a positive sample is the embedding associated with the anchor node ( Similar or related nodes. This represents the embedding of a negative sample. In contrast to a positive sample, a negative sample is a node that is dissimilar to or unrelated to the anchor node.

[0020] The fifth concept is that of an anchor node, which is a reference point or target node used for comparison. During the learning process, the representation (or feature vector) of the anchor node is usually compared with the representations of other nodes (positive or negative samples) to learn discriminative node embeddings.

[0021] The sixth concept, Used to describe the neighborhood of a node in a graph. In a graph, the neighborhood of a node... The neighborhood refers to the set of all nodes that can be reached from this node in no more than h hops.

[0022] The 7th concept, The objective function is a loss function commonly used in contrastive learning. Its basic idea is to maximize the similarity between positive sample pairs while minimizing the similarity between negative sample pairs. In contrastive learning, positive sample pairs are typically similar or related entities, while negative sample pairs are unrelated entities.

[0023] Figure 2 The diagram illustrates the semantic enhancement sampling strategy. The system framework of this system mainly includes four modules: a multimodal feature embedding module, a graph augmentation module, a graph representation learning module, and a semantic enhancement-based contrastive optimization module. Figure 1 The diagram shown is a system block diagram of the present invention, wherein: the multimodal feature embedding module: the starting point of this module is to use the attribute data of the road segment and the street view image data to obtain the attribute embedding and visual feature embedding of the road segment respectively, and then combine them together as the initial embedding of the road segment, including the following steps: Step 1: Input the road network Street view image data and historical GPS trajectory data The attribute embeddings of road segments are obtained through the multimodal feature embedding module. and visual feature embedding ; Step 2: Concatenate the attribute embeddings and visual feature embeddings of the road segment to construct the initial embedding of the road segment. This is used as the feature matrix of the road network's nodes (road segments).

[0024] Graph Augmentation Module: This module uses two different augmentation strategies to perturb the topology and node features of the road network (graph), thereby generating two different augmented graphs (graph variants), including the following steps: Step 1: Calculate the edge deletion probability based on historical road trajectory data. ,in Indicates road segment and The edges between them are connected. Indicates from road segment arrive Transition probability estimation; Step 2: Based on the edge deletion probability and road network As input, the road network is perturbed twice (each perturbation involves both topological and node characteristics) to obtain the first augmented graph. Its adjacency matrix is The characteristic matrix is ; and the second augmented graph Its adjacency matrix is The characteristic matrix is .

[0025] Graph Representation Learning Module: This module aims to extract node-level, i.e., road segment representations, based on the two graph variants generated by the graph augmentation module. The steps include: Step 1: Using a graph encoder, process the adjacency matrix of the first type of augmented graph obtained from the graph augmentation module. and characteristic matrix Perform encoding operations to obtain the embedding matrix. ; Step 2: Using a graph encoder, process the adjacency matrix of the second type of augmented graph obtained from the graph augmentation module. and characteristic matrix Perform encoding operations to obtain the embedding matrix. ; Step 3: Using a nonlinear projection head, map the two embedding matrices obtained from the graph encoder to the low-dimensional latent space to obtain two sets of road segment embeddings. and .

[0026] A semantically enhanced contrast optimization module: This module aims to sample sample pairs using road network characteristics and movement semantics from historical trajectories, and designs a dual-view contrast loss function to guide the contrast optimization process. This loss function is then used to train the network to optimize the road network embedding representation, including the following steps: Step 1: Construct a co-occurrence matrix M based on the road historical trajectory T. Then, based on the co-occurrence matrix M and the number of neighboring nodes h, calculate the adjacency matrices of the two augmented graphs respectively. and Sampling is performed for both positive and negative samples. Specifically, given a target node (i.e., the anchor node) in a certain view, its neighboring nodes within h hops are considered positive samples within the view, and its mirrored nodes in another view are considered positive samples between views. For nodes outside h hops, nodes that co-occur with the anchor node in the historical trajectory are further excluded, and the remaining nodes are selected as true negative samples. Step 2: Using the sampling results from Step 1 as input, use a method based on... Target design dual-view contrast loss function Calculate the loss value and use it as a guide for training the network.

[0027] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications should be covered within the scope of the claims of the present invention.

Claims

1. A semantically enhanced graph contrastive learning method for road network representation, characterized in that: This method constructs a semantically enhanced graph contrastive learning framework for road network representation, which specifically includes the following stages: Phase 1: Construct a multimodal feature embedding module, which uses the attribute data of road segments and street view image data to obtain the attribute embedding and visual feature embedding of road segments respectively, and splices them together as the initial embedding of road segments. The second stage involves constructing a graph augmentation module. Based on modeling the road network as a graph, two different augmentation strategies are designed to apply perturbations to the topology and node features of the road network, thereby generating two different augmented graphs. The third stage: Construct a graph representation learning module. Based on the two graph variants generated by the graph augmentation module, a graph neural network model is used to extract the node level, i.e., the representation of road segments. Phase 4: Construct a contrast optimization module based on semantic enhancement, which uses road network characteristics and mobile semantics in historical trajectories to sample sample pairs, and designs a contrast loss function for dual views to guide the contrast optimization process; The first stage is divided into two parts: attribute feature embedding and visual feature embedding. The attribute feature embedding part includes: for any road segment An analysis was conducted based on the road segment identifier (ID), road segment length (LEN), and road segment midpoint coordinates (LON, LAT). The symbols corresponding to these attributes are as follows: , , , For properties of real number types and They are transformed into a discretized form through binning operations. Then, a separate linear layer is used to map each attribute value to a corresponding feature vector. Subsequently, the four feature vectors are concatenated together to form the attribute embedding of the road segment. The visual feature embedding part includes: using a pre-trained Swin Transformer as the visual feature encoder, taking panoramic image data collected at the midpoint of the road segment as input, and outputting its visual embedding. Finally, the two different feature types are connected together to obtain the initial embedding of the road segment; In the second stage, a graph augmentation module is constructed to augment the road network using two strategies: mobility-based edge removal and modality-based feature masking. The mobility-based edge removal strategy determines the removal probability of edges based on the transition probability between road segments in historical trajectory data, considering the road network's topology. If two road segments frequently appear together in historical trajectories, their connection is considered strong and important, thus the probability of removing such a connection is low. The modality-based feature masking strategy is a perturbation strategy targeting node features. It randomly selects one of the attributes or image features for masking, allowing the contrastive learning model to adapt to missing road segment data, thereby enhancing the model's robustness. During each training process, two graph views are generated simultaneously using these two different augmentation strategies for comparison. In the third stage, a graph representation learning module is constructed, which takes two graph views generated by the graph augmentation module as input and learns the representations of the two graph views respectively. Specifically, it includes: using a graph encoder to learn and extract high-level features from the graph views to generate a complex representation of each road segment; and finally, mapping the road segment representation generated by the graph encoder to a low-dimensional latent space through a nonlinear projection head.

2. The semantically enhanced graph contrastive learning method for road network representation according to claim 1, characterized in that: In the fourth stage, a semantically enhanced contrast optimization module is constructed. This module includes a semantically enhanced sampling strategy that can utilize road network characteristics and movement semantics in historical trajectories to construct positive and negative samples. Specifically, given a target node in a certain view, its neighboring nodes within the h-hop are considered as positive samples within the view, and its mirrored nodes in another view are considered as positive samples between views. For nodes outside the h-hop range, nodes that co-occur with anchor nodes in historical trajectories are further filtered out, and the remaining nodes are selected as true negative samples. Then, a contrast optimization strategy based on... The target design's contrastive loss function: We calculate the contrast loss for all nodes in both graph views, and use this to obtain the final dual-view contrast loss function. in, express The mirror node is shown in another view; finally, this loss function is used to train the network to optimize the road network embedding representation.

3. A semantically enhanced graph contrastive learning system for road network representation, characterized in that: The system employs the method described in any one of claims 1 to 2.