Map matching method and device, navigation method and device and computer program product
By performing grouped self-attention processing on road section features and learning local details and global connectivity relationships, the positioning error and topological relationship loss problems in the matching of standard precision maps and high-precision maps are solved, and the matching accuracy and navigation effect are improved.
Patent Information
- Application Number
- CN202510934397.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, there are positioning errors and missing topological relationships when matching standard precision maps with high precision maps, resulting in insufficient matching accuracy.
By performing the first group self-attention processing and the second group self-attention processing on the road section features, the local detail features and global connectivity relationships are learned to determine the map matching relationship.
It improves the accuracy of map matching, overcomes the problems of positioning offset and missing topological relationships, and achieves higher-precision information sharing and hybrid navigation.
Smart Images

Figure CN120668159A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of map data technology, and in particular to a map matching and navigation method, device, and computer program product. Background Art
[0002] Currently, electronic maps mainly include standard definition maps (SD maps) and high definition maps (HD maps).
[0003] In order to realize information sharing and hybrid navigation between standard precision maps and high precision maps, it is necessary to match standard precision maps with high precision maps. However, how to improve the accuracy of matching between standard precision maps and high precision maps has become an important technical issue. Summary of the Invention
[0004] The present application provides a map matching and navigation method, apparatus, and computer program product.
[0005] This application provides the following solutions:
[0006] According to a first aspect, a map matching method is provided, the method comprising:
[0007] Obtaining road segment features, the road segment features including a first road segment feature corresponding to the target geographical area in the first map and a second road segment feature corresponding to the target geographical area in the second map, where the accuracy of the first map is lower than that of the second map;
[0008] Performing a first grouping self-attention process and / or a second grouping self-attention process on the road segment features to obtain enhanced first road segment features and enhanced second road segment features; wherein the first grouping self-attention process includes: performing a first self-attention process on the road segment features to learn local detail features between different road segments; and the second grouping self-attention process includes: performing a second grouping on the road segment features based on the road segment connectivity relationship, and performing a second self-attention process on the obtained road segment features within each group;
[0009] Based on the enhanced first road section features and the enhanced second road section features, a matching relationship between the first map and the second map is determined.
[0010] According to a second aspect, there is provided a navigation method, the method comprising:
[0011] Obtaining a matching relationship between the first map and the second map, where the matching relationship is determined based on the aforementioned map matching method;
[0012] Navigation processing is performed based on matching relationships.
[0013] According to a third aspect, a map matching device is provided, the device comprising:
[0014] a road segment feature acquisition module, configured to acquire road segment features, the road segment features including first road segment features corresponding to a target geographical area in a first map and second road segment features corresponding to the target geographical area in a second map, wherein the accuracy of the first map is lower than that of the second map;
[0015] A grouped self-attention processing module is configured to perform a first grouped self-attention processing and / or a second grouped self-attention processing on the road segment features to obtain enhanced first road segment features and enhanced second road segment features; wherein the first grouped self-attention processing includes: performing a first self-attention processing on the road segment features to learn local detail features between different road segments; and the second grouped self-attention processing includes: performing a second grouping on the road segment features based on the road segment connectivity relationship, and performing a second self-attention processing on the obtained road segment features within each group;
[0016] The matching module is used to determine the matching relationship between the first map and the second map based on the enhanced first road section features and the enhanced second road section features.
[0017] According to a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned map matching or navigation method when executed by a processor.
[0018] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0019] In the embodiment of the present application, by obtaining the first road segment features corresponding to the target geographic area in the first map and the second road segment features corresponding to the target geographic area in the second map, the first group self-attention processing and / or the second group self-attention processing are performed on the first road segment features and the second road segment features to obtain enhanced first road segment features and enhanced second road segment features. Then, based on the enhanced first road segment features and the enhanced second road segment features, the matching relationship between the first map and the second map is determined. In this solution, the first group self-attention processing can learn the local detailed features between different road segments, which helps to enhance local matching capabilities. The second group self-attention processing can learn the global road segment connectivity relationship, which helps to understand the topological relationship of the road, thereby improving the accuracy of map matching.
[0020] Of course, any product implementing this application does not necessarily need to achieve all of the above advantages at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a system architecture diagram applicable to the embodiments of the present application;
[0023] Figure 2 A flowchart of a map matching method provided in an embodiment of the present application;
[0024] Figure 3 Schematic diagram of the process of performing the second group self-attention processing on the shared road segment;
[0025] Figure 4 This is a structural diagram of a typical implementation of the map matching model;
[0026] Figure 5 A flowchart of a navigation method provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of the structure of a map matching device provided in an embodiment of the present application;
[0028] Figure 7 A schematic diagram of the structure of a navigation device provided in an embodiment of the present application;
[0029] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0031] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a," "an," and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0032] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0033] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0034] Standard precision maps and high precision maps provide different levels of environmental details. Figure 1 Generally, it can only provide lane-level details with meter-level accuracy, but it has the advantages of high coverage, low production cost and short update cycle. Figure 1 While it typically provides more detailed lane information with centimeter-level accuracy, it suffers from low coverage, high production costs, and long update cycles. To achieve information sharing and hybrid navigation between standard and high-precision maps, standard and high-precision maps must be matched. Improving the accuracy of this matching process has become a key technical challenge.
[0035] Currently, when matching standard and high-precision maps, positioning errors or differences in map accuracy can cause offsets in road segment positioning, leading to errors in positioning-based matching and affecting the accuracy of matching between standard and high-precision maps. Furthermore, some high-precision maps (such as online high-precision maps) may lack lane centerlines, leading to missing local topological relationships, which can also affect the accuracy of matching between standard and high-precision maps.
[0036] In view of this, this application provides a new idea. In order to facilitate the understanding of this application, the system architecture on which this application is based is first described. Figure 1 The following is an exemplary system architecture to which the embodiments of the present application can be applied: Figure 1 As shown in , the system architecture may include: a server side and a user side running on a user terminal.
[0037] The server and client are the two main components of an application service. The server, with the server as the primary hardware infrastructure, can include one or more software service modules. The client can be a client running on the user's terminal, a mini-program, or a web application running through a browser.
[0038] User terminals where the user end resides may include, but are not limited to, smart mobile terminals, wearable devices, and PCs (Personal Computers). Smart mobile devices may include mobile phones, tablets, PDAs (Personal Digital Assistants), and internet-connected car terminals. Wearable devices may include smart watches, smart glasses, smart bracelets, VR (Virtual Reality) devices, AR (Augmented Reality) devices, and mixed reality devices (i.e., devices that support both VR and AR).
[0039] A server can be a standalone server, a server cluster, or even a cloud server. A cloud server, also known as a cloud computing server or cloud host, is a hosting product within the cloud computing service ecosystem. It addresses the management difficulties and limited scalability of traditional physical hosting and virtual private server (VPS) services.
[0040] As an optional method, the map matching method provided in the embodiment of the present application can be executed on the server side to determine the matching relationship between the first road section in the first map and the second road section in the second map, and based on the matching relationship, the sharing of road information in the first map and the second map is realized, or the hybrid navigation based on the first map and the second map is realized, or the matching relationship is sent to the user side, so that the user side can realize the sharing of road information in the first map and the second map based on the matching relationship, or the hybrid navigation based on the first map and the second map.
[0041] As another optional method, the map matching method provided in the embodiment of the present application can be executed on the user side to determine the matching relationship between the first road section in the first map and the second road section in the second map, and based on the matching relationship, the sharing of road information in the first map and the second map is realized, or the hybrid navigation based on the first map and the second map is realized, or the matching relationship is sent to the server side, so that the server side can realize the sharing of road information in the first map and the second map based on the matching relationship, or the hybrid navigation based on the first map and the second map.
[0042] It should be understood that Figure 1 The numbers of the server ends, user ends, and user terminals in the embodiment are merely illustrative. Any number of server ends, user ends, and user terminals may be provided according to implementation requirements.
[0043] Figure 2 This is a flowchart of the map matching method provided in the embodiment of the present application. The method can be performed by Figure 1 The server or user side of the system is executed. Figure 2 As shown in , the method may include the following steps:
[0044] Step S210: Obtaining road segment features, the road segment features include first road segment features corresponding to the target geographical area in the first map, and second road segment features corresponding to the target geographical area in the second map, where the accuracy of the first map is lower than that of the second map.
[0045] Step S220: performing a first grouping self-attention processing and / or a second grouping self-attention processing on the road section features to obtain enhanced first road section features and enhanced second road section features; wherein, the first grouping self-attention processing includes: performing a first self-attention processing on the road section features to learn local detail features between different road sections; the second grouping self-attention processing includes: performing a second grouping on the road section features based on the road section connectivity relationship, and performing a second self-attention processing on the obtained road section features in each group.
[0046] Step S230: determining a matching relationship between the first map and the second map based on the enhanced first road segment features and the enhanced second road segment features.
[0047] As can be seen from the above process, in the embodiment of the present application, by obtaining the first road section features corresponding to the target geographical area in the first map and the second road section features corresponding to the second map, the first road section features and the second road section features are subjected to first group self-attention processing and / or second group self-attention processing to obtain enhanced first road section features and enhanced second road section features, and then based on the enhanced first road section features and enhanced second road section features, the matching relationship between the first map and the second map is determined. In this solution, the first group self-attention processing can learn the local detail features between different road sections, which helps to enhance local matching capabilities, and the second group self-attention processing can learn the global road section connectivity relationship, which helps to understand the topological relationship of the road, thereby improving the accuracy of map matching.
[0048] The following describes in detail each step in the above process and the effects it can produce, in conjunction with the examples. It should be noted that the terms "first" and "second" in this disclosure do not restrict size, order, or quantity, but are merely used to distinguish between them in terms of name. For example, "first map" and "second map" are used to distinguish between two maps of different accuracy.
[0049] First, the above-mentioned step S210, namely "obtaining road section features, the road section features including first road section features corresponding to the target geographical area in the first map, and second road section features corresponding to the target geographical area in the second map, where the accuracy of the first map is lower than that of the second map" is described in detail in combination with the embodiment.
[0050] Among them, the first map and the second map are two maps to be matched, and the accuracy of the first map is lower than that of the second map. For example, the first map is a standard precision map, and the second map is a high precision map.
[0051] The target geographic area is the physical space covered by both the first map and the second map, for example, the urban area, highway, and overpass area of a city.
[0052] The first road segment feature is a representation of a road segment located within the target geographical area in the first map, and the second road segment feature is a representation of a road segment located within the target geographical area in the second map.
[0053] For example, a road segment in the first map that is within the target geographic area can be recorded as the first road segment, and a road segment in the second map that is also within the target geographic area can be recorded as the second road segment. Both the first road segment and the second road segment are road segments in the map that correspond to actual road segments within the target geographic area. By limiting the first road segment and the second road segment to the same geographic range, cross-region mismatching can be avoided.
[0054] For example, the first segment feature can be extracted based on data of the first segment, which is vector road data for the first segment in the first map. The second segment feature can be extracted based on data of the second segment, which is vector road data for the second segment in the second map.
[0055] For example, the data of the first section includes the starting point coordinates, the ending point coordinates, and the direction angle of the first section, and the data of the second section may include the starting point coordinates, the ending point coordinates, and the direction angle of the second section.
[0056] For example, when the first map is a standard precision map and the second map is a high-precision map, the data for the first road segment can be road data in the standard precision map, and the data for the second road segment can be lane centerline data in the high-precision map. By performing feature encoding on the data for the first road segment, first road segment features can be obtained, and the first road segment features serve as a representation of the first road segment. By performing feature encoding on the data for the second road segment, second road segment features can be obtained, and the second road segment features serve as a representation of the second road segment.
[0057] Exemplarily, when the data of the first section and the data of the second section include starting point coordinates, end point coordinates, and direction angles, the first section features and the second section features can be 5-dimensional feature vectors obtained by uniformly encoding the starting point coordinates, end point coordinates, and direction angles, wherein the horizontal coordinate in the starting point coordinates, the vertical coordinate in the starting point coordinates, the horizontal coordinate in the end point coordinates, the vertical coordinate in the end point coordinates, and the direction angle are respectively used as one of the feature dimensions.
[0058] For example, after feature encoding is performed based on the data of the first road section to obtain the first road section feature, and feature encoding is performed based on the data of the second road section to obtain the second road section feature, the first road section feature and the second road section feature can be input together into at least one layer of multilayer perceptron (MLP), and the first road section feature and the second road section feature can be projected into a high-dimensional feature vector. For example, the 5-dimensional feature vector is projected into a 128-dimensional feature vector, so that the road section feature is projected into a high-dimensional feature space, which can achieve a unified representation of heterogeneous map data and provide a unified feature space for subsequent feature interaction.
[0059] The following describes in detail the above step S220, namely, "performing a first grouping self-attention processing and / or a second grouping self-attention processing on the road section features to obtain enhanced first road section features and enhanced second road section features; wherein, the first grouping self-attention processing includes: performing a first self-attention processing on the road section features to learn local detail features between different road sections; the second grouping self-attention processing includes: performing a second grouping on the road section features based on the road section connectivity relationship, and performing a second self-attention processing on the obtained road section features within the group" in conjunction with the embodiments.
[0060] Among them, in the first group self-attention processing, feature interaction is carried out between different road section features, which can focus on local road section features, thereby learning local detail features between different road sections, which helps to enhance local matching capabilities and thus improve map matching accuracy.
[0061] The link connectivity relationship is the spatial connectivity relationship between different links, which can reflect the topological connection dependency between links. The link connectivity relationship provides a basis for the second grouping, so that links that meet the specific connectivity relationship are divided into the same group. After the second grouping, self-attention processing is performed on the features of each link within the group, so that the features obtained after self-attention processing can incorporate the global link connectivity relationship.
[0062] The second group self-attention can learn the global road segment connectivity relationship, which helps to understand the topological relationship of the road and thus improve the accuracy of map matching.
[0063] It should be noted that the grouped self-attention processing can be performed once or multiple times. When performing multiple grouped self-attention processing, the features output by the previous grouped self-attention processing can be used as the input features for the next grouped self-attention processing. The grouped self-attention processing can include only the first grouped self-attention processing, or only the second grouped self-attention processing, or both the first grouped self-attention processing and the second grouped self-attention processing. When the grouped self-attention processing includes the first grouped self-attention processing and the second grouped self-attention processing, the road section features can first undergo the first grouped self-attention processing, and the features output by the first grouped self-attention processing can be subjected to the second grouped self-attention processing; the road section features can also first undergo the second grouped self-attention processing, and the features output by the second grouped self-attention processing can be subjected to the first grouped self-attention processing.
[0064] Exemplarily, the specific steps of self-attention processing are: perform linear transformation on each road section feature in the group to generate a query vector (Query), a key vector (Key), and a value vector (Value); calculate the similarity between vectors, i.e., the attention weight, through the dot product of the Query and the Key; use the attention weight to weightedly fuse the Value to obtain the self-attention output corresponding to each road section feature.
[0065] In addition, by grouping the road section features and performing self-attention processing on the features within the group, the high complexity of global calculation can be avoided, and the interaction of the road section features within the group can be focused, thereby improving the feature interaction effect.
[0066] The above step S230, namely "determining the matching relationship between the first map and the second map based on the enhanced first road section features and the enhanced second road section features", is described in detail below with reference to an embodiment.
[0067] The enhanced first and second road segment features incorporate local detail features between road segments and / or global road segment connectivity. By determining matching relationships using features that incorporate local detail features between road segments, matching errors caused by offsets in road segment positioning can be overcome, thereby improving matching accuracy. By determining matching relationships using features that incorporate global road segment connectivity, missing local topological relationships can be overcome, thereby improving matching accuracy.
[0068] For example, the matching relationship between the first map and the second map can be specifically reflected as the matching relationship between the first road section and the second road section. The similarity between the enhanced features of the first road section and the enhanced features of the second road section can be calculated, and the similarity can be normalized as the matching rate between the first road section and the second road section, thereby determining the matching relationship between the first road section and the second road section.
[0069] For example, in the first group self-attention processing and the second group self-attention processing, before grouping the path features, the input road segment features can be layer normalized to reduce the feature scale difference, thereby alleviating the gradient vanishing or gradient exploding problem.
[0070] For example, in the first group self-attention processing and the second group self-attention processing, after the self-attention processing within the group, the road section features after the self-attention processing can be input into the feedforward network, thereby realizing complex feature extraction and high-dimensional data mapping through layer-by-layer nonlinear transformation.
[0071] For example, in the first group self-attention processing and the second group self-attention processing, after the road segment features after self-attention processing are input into the feedforward network, the features output by the feedforward network can be residually connected with the road segment features before layer normalization to retain more of the original road segment features and prevent detail loss.
[0072] In an optional embodiment of the present application, a first self-attention process is performed on the road segment features, including:
[0073] Determine the spatial proximity of features across road segments;
[0074] Performing a first grouping process on the road section features based on spatial proximity to obtain a first group;
[0075] Perform the first self-attention processing on the features of each road section in the first group.
[0076] Among them, spatial proximity refers to the spatial adjacent relationship between the corresponding road sections of each road section feature.
[0077] The spatial proximity can be determined by the data of the road segments. For example, the spatial proximity between the road segments can be determined based on the starting coordinates, ending coordinates, and direction angles of the road segments.
[0078] For example, the road segment features whose spatial proximity meets a preset proximity condition may be divided into the same group.
[0079] When the spatial proximity between multiple road segments meets the preset proximity condition, it means that these road segments are highly adjacent in the geographic space. For example, these road segments may form a cluster distribution locally.
[0080] Using spatial proximity as the grouping basis can enable spatially close road sections to be divided into the same group, so that the geometric information of the road sections can be integrated into the features obtained after self-attention processing of the features of each road section in the group, thereby supplementing local geometric details such as the curvature of the road section, the direction angle, etc., which helps to better overcome the matching errors caused by the offset of the road section positioning.
[0081] In an optional method of the present application, determining the spatial proximity of each road segment feature includes:
[0082] Determine the multi-dimensional position coordinates corresponding to each road section feature based on the data corresponding to each road section feature;
[0083] The multidimensional position coordinates are mapped to a one-dimensional sequence using the spatial distribution curve, and the proximity of the points in the one-dimensional sequence is used to characterize the spatial proximity of the features of each road section.
[0084] The data of the road section may specifically include the starting coordinates, end coordinates and direction angle of the road section. Based on the starting coordinates, end coordinates and direction angle of the road section, multi-dimensional position coordinates can be determined, and the multi-dimensional position coordinates can represent the spatial geometric information of the road section.
[0085] For example, the multidimensional position coordinates may be three-dimensional coordinates (x, y, r). The center of the road segment can be determined based on the starting and ending coordinates of the road segment, and the center of the road segment is projected onto gridded coordinates, i.e., x and y in three-dimensional coordinates. The direction angle is discretized and quantized, for example, using sixteen-degree quantization, to obtain a quantized direction angle, i.e., r in three-dimensional coordinates.
[0086] After the multi-dimensional position coordinates are determined, the multi-dimensional position coordinates can be mapped to a one-dimensional sequence using a spatial distribution curve. In the one-dimensional sequence, adjacent points correspond to road segment features with strong spatial proximity.
[0087] For example, a target number of features included in a group may be preset, and according to the number of points in the one-dimensional sequence, the target number of points may be extracted each time, and the road segment features corresponding to the extracted points may be divided into the same group.
[0088] By using spatial distribution curves to map multidimensional position coordinates to a one-dimensional sequence, the computational complexity can be reduced while effectively preserving the geometric proximity of road sections and ensuring the accuracy of the spatial proximity between the determined road section features.
[0089] For example, the spatial distribution curve may include a Hilbert curve (Hibert), a Z-curve (Z-Ordering), a transposed Hilbert (Trans-Hibert), and a transposed Z-curve (Trans-Z-Ordering).
[0090] For example, in the map matching method provided in the embodiment of the present application, if there are multiple first-group self-attention processings, the above-mentioned multiple spatial distribution curves can be selected and used in each first-group self-attention processing, and the spatial distribution curves used in each first-group self-attention processing are not exactly the same, thereby realizing the combined use of multiple spatial distribution curves.
[0091] In an optional manner of the present application, performing a second grouping of the road segment features based on the road segment connectivity relationship includes:
[0092] Determine a complete connected path consisting of at least one road segment, where the starting point of the complete connected path is a road segment node that is not connected to a road segment, and the end point of the complete connected path is a road segment node that is not connected to a road segment;
[0093] The road segment features are secondly grouped based on the complete connected path to which each road segment feature corresponds.
[0094] A complete connected path can be understood as a complete path consisting of a sequence of sequentially connected road segments, reflecting the global connectivity of the road network. A complete connected path has no incoming road segments at its starting point, and no outgoing road segments at its end point. This means that there is no path connection between the front and back ends of a complete connected path.
[0095] By splitting complex road networks into complete connected paths, global topological dependencies can be effectively resolved.
[0096] By constructing a complete connected path and performing a second grouping of segment features based on the segments of the complete connected path, it is possible to establish mutual connectivity dependencies between segments within the group. Self-attention processing is then performed on the features of each segment within the group, allowing the resulting features to incorporate global segment connectivity relationships. By determining matching relationships using segment features that incorporate global segment connectivity relationships, the correct matching relationship can be inferred based on global segment connectivity even when local topological relationships are missing. Furthermore, the correct matching relationship can be inferred based on global connectivity constraints even when local topology is complex, thereby improving matching accuracy.
[0097] In an optional embodiment of the present application, determining a complete connected path consisting of at least one road segment includes:
[0098] Establishing a first road segment graph network corresponding to each road segment feature, wherein the first road segment graph network has the road segment nodes as nodes and the road segments as edges;
[0099] The road segments corresponding to the edges from the root node to the leaf nodes are determined as complete connected paths, the root node is a node with no in-degree, and the leaf node is a node with no out-degree.
[0100] The road segment nodes may specifically include intersections or road endpoints. The road endpoints may be actual road endpoints or manually defined road endpoints, for example, road endpoints may be defined at specified road length intervals on a continuous road, thereby dividing the road into multiple road segments.
[0101] By using the link nodes of the first link and the link nodes of the second link as nodes in a graph network, and using the first link and the second link as edges in the graph network, a first link graph network can be constructed.
[0102] Nodes without in-degree in the first segment graph network are determined as root nodes, corresponding to segment nodes with no segments connected to them. Nodes without out-degree in the first segment graph network are determined as root nodes, corresponding to segment nodes with no segments connected to them. The root node is the starting point of a complete connected path, and the leaf node is the end point of the complete connected path.
[0103] By constructing the first road segment graph network, the connectivity relationship from the root node to the leaf node can be accurately constructed, thereby providing the accuracy of the complete connectivity path.
[0104] Exemplarily, the second grouping of the road segment features based on the complete connected path to which each road segment feature corresponds includes:
[0105] The road segment features corresponding to the road segments belonging to the same complete connected path are divided into the same group;
[0106] The second grouping also includes:
[0107] In response to the existence of shared road segments that respectively belong to different complete connected paths, the groups corresponding to the different complete connected paths respectively include independent instances of the road segment features of the shared road segments;
[0108] After the second group self-attention processing, the results of the second group self-attention processing on each independent instance are fused to obtain the enhanced first section feature or the enhanced second section feature corresponding to the shared section.
[0109] When performing the second grouping, the road segment features corresponding to the road segments belonging to the same complete connected path may be divided into the same group, that is, the road segment features within the same group have a connected relationship.
[0110] In actual situations, the same road section may belong to different complete connected paths. This road section is called a shared road section. In this case, the path features of the shared road section can be copied into multiple independent instances and divided into groups corresponding to different complete connected paths to ensure the complete connectivity relationship within each group.
[0111] Correspondingly, after the second group self-attention processing, each independent instance will correspond to an output feature of the second group self-attention processing. At this time, the output features corresponding to each independent instance can be fused, for example, the output features corresponding to all independent instances are weighted averaged to obtain the enhanced first section feature or the enhanced second section feature corresponding to the shared section.
[0112] By replicating the segment features of a shared segment into multiple independent instances in multiple groups, the global topology integrity can be ensured, thereby solving the multi-path attribution problem of the shared segment.
[0113] As an example, Figure 3 Schematic diagram of the process of performing the second grouping self-attention processing on shared road segments.
[0114] like Figure 3 As shown in , segments a1, a2, and b together form the first complete connected path, while segments a1, a2, c1, and c2 together form the second complete connected path. Since segments a1 and a2 exist in both the first and second complete connected paths, segments a1 and a2 are shared paths.
[0115] The input features include the segment features corresponding to each of segment a1, segment a2, segment b, segment c1, and segment c2.
[0116] When performing the second grouping of the segment features, the segment features of segments a1, a2, and b, which belong to the first complete connected path, are assigned to group 1. The segment features of segments a1, a2, c1, and c2, which belong to the second complete connected path, are assigned to group 2. The segment feature of segment a1 is copied into two independent instances, one assigned to group 1 and one to group 2. The segment feature of segment a2 is copied into two independent instances, one assigned to group 1 and one to group 2.
[0117] After the self-attention processing is performed on the road segment features in group 1, the output features corresponding to the road segment features of section b, the output features corresponding to the independent instance of section a1, and the output features corresponding to the independent instance of section a2 will be output. After the self-attention processing is performed on the road segment features in group 2, the output features corresponding to the road segment features of section c1, the output features corresponding to the road segment features of section c2, the output features corresponding to the independent instance of section a1, and the output features corresponding to the independent instance of section a2 will be output. The output features corresponding to the independent instances of section a1 can then be fused as the output features corresponding to the road segment features of section a1, and the output features corresponding to the independent instances of section a2 can be fused as the output features corresponding to the road segment features of section a2, thereby determining Figure 3 The output features of all road section features after the second group self-attention processing.
[0118] In an optional method of the present application, grouping self-attention processing is performed on the road segment features, including:
[0119] Generate location coding features corresponding to each road section feature;
[0120] Splicing the road section features with the corresponding position coding features to obtain spliced road section features;
[0121] Perform group self-attention processing based on the spliced road segment features;
[0122] In response to performing the first group self-attention processing on the road segment features, the position encoding features include a start point code corresponding to the start point of the road segment, an end point code corresponding to the end point of the road segment, and a direction code corresponding to the direction of the road segment;
[0123] In response to performing the second group self-attention processing on the segment features, the position encoding features include a complete connected path encoding of the complete connected path and a segment encoding of each segment in the complete connected path.
[0124] Among them, when performing group self-attention processing, it is also necessary to perform position encoding features on the features of each road section, so as to inject the position information of each road section and improve the perception of the road section location.
[0125] For the first group self-attention process, its position encoding can include three levels of encoding: the starting point encoding of the road segment, the end point encoding of the road segment, and the direction encoding of the road segment. This position encoding can accurately represent the geometric information of the road segment, thereby improving the ability to perceive the geometric relationship of the road segment.
[0126] For example, feature coding can be performed based on the starting coordinates of the starting point of the road section to obtain a starting point code, feature coding can be performed based on the end coordinates of the end point of the road section to obtain an end point code, and feature coding can be performed based on the direction angle of the road section to obtain a direction code.
[0127] For the second group self-attention processing, its position encoding can include two levels of encoding consisting of a complete connected path encoding and a segment encoding of each segment within the complete connected path. The position encoding can accurately represent the global topological information, thereby improving the perception of global topological relationships.
[0128] The map matching method in the above example can be based on a map matching model. For example, Figure 4 A structural diagram of a typical implementation of a map matching model.
[0129] like Figure 4 As shown in , the map matching model can include a vector mapping layer, multiple grouped self-attention processing modules, and a matching network.
[0130] After constructing the first road section features and the second road section features, the first road section features and the second road section features can be vector mapped. For example, the first road section features and the second road section features can be input into at least one layer of MLP together, so that the first road section features and the second road section features are projected into a high-dimensional feature vector.
[0131] In this example, the group self-attention processing in the map matching model may include a first group self-attention processing module and a second group self-attention processing module.
[0132] The output features of the vector mapping layer can be input into the first group self-attention processing module, where layer normalization is first performed, the layer-normalized output features are first grouped, and then self-attention processing is performed on the features within each group. The features output by the self-attention processing are input into the feedforward network, and the features output by the feedforward network are residually connected with the features input into the first group self-attention processing module, and the obtained features are used as the output features of the first group self-attention processing module.
[0133] The output features of the first group self-attention processing module can be input into the second group self-attention processing module. In the second group self-attention processing module, layer normalization is first performed, and the layer-normalized output features are grouped for the second time. Then, self-attention processing is performed on the features within each group. The features output by the self-attention processing are input into the feedforward network. The features output by the feedforward network are residually connected with the features input into the second group self-attention processing module, and the obtained features are used as the output features of the second group self-attention processing module.
[0134] The output features of the second group self-attention processing module can be input into the matching network to perform matching calculations and finally output the matching relationship.
[0135] Illustratively, when training the map matching model, its loss function may adopt at least one of a cross entropy loss function and a connectionist temporal classification (CTC) loss function.
[0136] Among them, the cross entropy loss function can be expressed by the following formula 1.
[0137]
[0138] Among them, L CE represents the cross entropy loss, SD represents the set of the first segment, HD represents the set of the second segment, p ij represents the predicted value of the matching probability between the first and second road segments, y ij The predicted value representing the probability of the first road segment matching the second road segment.
[0139] The CTC loss function can be expressed by the following formula 2.
[0140]
[0141] Among them, L CTC Denotes the CTC loss, x denotes the sequence of road segment features input to the map matching model, and y denotes the sequence of road segment features output by the desired map matching model. ―1 Denotes the deduplication function. B ―1 (y) is the set of all valid paths that map to sequence y. π represents the path predicted by the map matching model at each time step, and p(π|x) is the probability of path π when the input is sequence x and the output is .
[0142] The specific calculation method of p(π|x) can be expressed by the following formula 3.
[0143]
[0144] Among them, t represents any time step, T represents the set of all time steps, π t represents the path predicted by the map matching model at time step t, p t (π t |x) is the path π predicted by the map matching model at time step t t probability.
[0145] In this example, minimizing the cross entropy loss and / or minimizing the CTC loss can be used as training objectives to train the map matching model.
[0146] Exemplarily, after determining the matching relationship between the first map and the second map, the method further includes:
[0147] Based on the connectivity relationship of the first road segment and the connectivity relationship of the second road segment, the matching relationship is optimized to obtain an optimized matching relationship.
[0148] In an embodiment of the present application, a global topological dependency relationship can be provided based on the connectivity relationship of the first road segment and the connectivity relationship of the second road segment, so that the optimized matching relationship can comply with the connectivity rules of the actual road network and improve the accuracy of the matching relationship.
[0149] For example, the matching relationship may include a matching ratio between the first road and the second road, and the size of the matching ratio can reflect the degree of matching between the first road and the second road.
[0150] In this example, the matching relationship is optimized based on the connectivity relationship of the first road segment and / or the connectivity relationship of the second road segment to obtain an optimized matching relationship, including:
[0151] Establishing a second road segment graph network for the second road segment, wherein the second road segment graph network has the road segment nodes of the second road segment as nodes and the second road segment as edges;
[0152] Determining the second road segment at the starting point based on the matching rate between the first road segment and each second road segment;
[0153] Performing an expansion process on the second road segment at the starting point, the expansion process comprising: searching for second road segments in the second road segment graph network along an incoming direction and / or an outgoing direction of the second road segment at the starting point to determine a candidate second road segment connected to the second road segment at the starting point, and determining a subsequent second road segment from the candidate second road segments, wherein the candidate matching first road segment of the subsequent second road segment is the same road segment as or connected to the candidate matching first road segment of the second road segment at the starting point, and the candidate first road segment is a first road segment whose matching rate with the second road segment satisfies a preset matching rate condition;
[0154] Repeat the steps of using the subsequent second road segment as the starting second road segment and performing the expansion process until no subsequent second road segment can be found;
[0155] Based on the matching relationship between the starting second segment and the candidate matching first segment of the starting second segment, and the matching relationship between the subsequent second segment and the candidate matching first segment of the subsequent second segment, an optimized matching relationship is determined.
[0156] The second road segment at the starting point is used as the starting point for searching for the subsequent second road segment, and the matching relationship between the second road segment at the starting point and the first road segment should be more reliable.
[0157] For example, a group of second road segments and first road segments with the highest matching rate may be selected from the matching rates of all second road segments and all first road segments, and the second road segment may be used as the starting second road segment.
[0158] The second road section at the starting point can be used as the starting point of the expansion processing. Along the access direction and / or the exit direction of the second road section at the starting point, the candidate second road section connected to the second road section at the starting point is searched from the second road section graph network. At this time, the connectivity between the searched candidate second road section and the second road section at the starting point can meet the constraints of the connectivity relationship of the second road section.
[0159] The candidate first road segment is a first road segment whose matching rate with the second road segment meets the preset matching rate condition. When the matching rate between a first road segment and the second road segment meets the preset matching rate condition, it indicates that the matching relationship between the second road segment and the corresponding first road segment has a high credibility.
[0160] For example, the first road segments with the top three highest matching rates with the second road segment may be selected as candidate first road segments.
[0161] By screening the subsequent second segment from the candidate second segments, the candidate matching first segment of the subsequent second segment and the candidate matching first segment of the starting second segment are the same segment or connected, thereby ensuring that the connectivity between the starting second segment and the subsequent second segment can meet the connectivity constraint of the first segment.
[0162] After determining the first group of subsequent second road segments, the expansion process can be repeated using the subsequent second road segments as the starting second road segments until no subsequent second road segments that meet the connectivity constraints of the first road segment and the second road segment can be found.
[0163] After all subsequent second segments are searched, the starting second segment and the subsequent second segments can form a complete connected path that satisfies global connectivity. Then, based on the matching relationship between the starting second segment and the candidate matching first segment of the starting second segment, and the matching relationship between the subsequent second segment and the candidate matching first segment of the subsequent second segment, an optimized matching relationship can be determined.
[0164] For example, the candidate matching first segment with the highest matching rate with the second path at the starting point can be selected from the candidate matching first segments of the second segment at the starting point, and a matching relationship can be established between the candidate matching first segment and the second path at the starting point. The candidate matching first segment with the highest matching rate with the subsequent second path can be selected from the candidate matching first segments of the subsequent second segment, and a matching relationship can be established between the candidate matching first segment and the second segment at the starting point, thereby constructing a global matching relationship.
[0165] By strictly optimizing the matching relationship according to the connectivity relationship of the first road segment and the connectivity relationship of the second road segment, a matching relationship that satisfies global connectivity can be obtained, thereby improving the accuracy of the matching relationship.
[0166] In addition, the initially obtained matching relationship is generally reflected by the matching rate, which can be specifically in the form of a probability matrix, which can only provide an unstructured matching relationship. By based on the connectivity relationship of the first road segment and the connectivity relationship of the second road segment, the matching relationship can be optimized into a structured matching relationship, so that the matching relationship has a clear logical organization form, which is convenient for storage, query and analysis.
[0167] It is understandable that a unidirectional search may be performed along the incoming direction or the outgoing direction of the second road section at the starting point. More preferably, a bidirectional search may be performed along the incoming direction and the outgoing direction of the second road section to improve search efficiency.
[0168] Exemplarily, searching for the second road segment in the second road segment graph network includes:
[0169] Based on a preset beam width, a beam search is performed on the second road segment in the second road segment graph network.
[0170] Among the multiple second road segments found in the search, there are generally multiple candidate paths consisting of multiple sequentially connected second road segments. The preset beam width can control the number of candidate paths in each search step, thereby controlling the computational complexity of each search step, avoiding the computational explosion caused by exhaustive search, and effectively balancing efficiency and accuracy.
[0171] For example, when the preset beam width is set to 5, only the five candidate paths with the highest comprehensive matching probability are retained. The comprehensive matching probability may be the sum of the matching probabilities corresponding to all second road segments in the candidate paths.
[0172] In an optional embodiment of the present application, the first road segment feature includes a road feature, and the second road segment feature includes any one of the following:
[0173] The centerline characteristics of the second road segment;
[0174] A centerline feature of the second road segment, and a boundary line feature of the second road segment.
[0175] The first road segment feature may be a road feature extracted based on road data in the first map.
[0176] The centerline feature of the second road segment may be a feature extracted based on the data of the centerline of the second road segment (such as the centerline starting point coordinates, the centerline ending point coordinates, and the centerline direction). The boundary line feature of the second road segment may be a feature extracted based on the data of the boundary (such as the boundary starting point coordinates, the boundary ending point coordinates, and the boundary direction).
[0177] Centerline features accurately describe the geometric center position and orientation of lanes and can be used as positioning parameters in map matching. Boundary line features provide detailed information such as lane width, curvature, and relative position between lanes. However, boundary line features are not suitable for matching with first-segment features. Therefore, the enhanced first-segment features and enhanced centerline features can be used to determine the matching relationship, while boundary line features are only used for mid-layer feature enhancement to avoid introducing noise.
[0178] In the first group self-attention processing and the second group self-attention processing, the boundary line features can be uniformly divided into independent groups to avoid mixing with the center line features and the first road section features, ensuring that the geometric details contained in the boundary line features can be fully preserved.
[0179] Exemplarily, before obtaining the road segment features, the above method further includes:
[0180] The initial road segment in the first map is divided into first road segments, where the length of the first road segment and the length of the second road segment satisfy a preset length relationship;
[0181] Determining a matching relationship between the first road segment and the second road segment based on the enhanced first road segment feature and the enhanced second road segment feature includes:
[0182] Aggregating the enhanced first road segment features corresponding to the first road segments obtained by segmenting the same initial road segment to obtain aggregated first road segment features;
[0183] Based on the aggregated first road segment features and the enhanced second road segment features, a matching relationship between the initial road segment and the second road segment is determined.
[0184] The initial road segment can be understood as the road segment originally divided in the first map, which is generally long. Taking the standard map as an example, the lane lines in the standard map can be used to represent the initial road segment, which is generally tens of meters long.
[0185] Since the second map has a higher accuracy, the length of the second road section is also shorter. Taking the high-precision map as an example, the center line in the high-precision map can be used to represent the second road section. The length of the second road section is generally about 2 meters.
[0186] The initial road segment is divided so that the length of the first segment is close to the length of the second segment. For example, the lane line in the standard map is divided into segments of about 3 meters to be close to the length of the center line in the high-precision map.
[0187] By segmenting the initial route, the scale difference between the first and second sections can be reduced. After segmentation, the section features of the first section can also express road details more finely, thereby enhancing the perception of local geometric information.
[0188] Figure 5 This is a flowchart of a navigation method provided in an embodiment of the present application. The method can be performed by Figure 1 The server or user side of the system is executed. Figure 5 As shown in , the method may include the following steps:
[0189] Step S510: Obtain a matching relationship between the first map and the second map, where the matching relationship is determined based on the above map matching method.
[0190] Step S520: performing navigation processing based on the matching relationship.
[0191] It can be seen from the above process that since the matching relationship determined by the map matching method provided in the embodiment of the present application has high accuracy, performing navigation processing based on the matching relationship can effectively improve the effect of navigation processing.
[0192] For example, in the above navigation process, at least one of the following processes may be performed based on the matching relationship:
[0193] Associating road related information corresponding to the first road segment with a matching second road segment;
[0194] Associating road related information corresponding to the second road segment with the matching first road segment;
[0195] Based on the matching relationship, the first navigation path constructed based on the first map is projected onto the second map to obtain a second navigation path, where the first navigation path includes at least one first segment, and the second navigation path includes a second segment that matches the first segment in the first navigation path.
[0196] Among them, road-related information may include but is not limited to road attribute data, environmental object information such as roadside infrastructure, obstacles, traffic signs, and real-time dynamic information such as traffic flow and traffic light status information.
[0197] For example, if the first map is a standard-precision map and the second map is a high-precision map, the high-precision map contains richer road-related information. Based on the matching relationship, the road-related information in the high-precision map can be migrated to the standard-precision map for use. The standard-precision map generally has a wider coverage area than the high-precision map, and the high-precision map may lack road-related information in some areas. In this case, the road-related information in the corresponding areas in the standard-precision map can be migrated to the high-precision map for use.
[0198] Based on the matching relationship, road-related information can be structured and migrated between the first map and the second map, effectively realizing data reuse.
[0199] Based on the matching relationship, the first navigation path constructed based on the first map can be projected into the second navigation path in the second map. This allows the unstructured first navigation path to be converted into a lane-level second navigation path, improving the accuracy of the navigation path and thus enhancing navigation accuracy in hybrid navigation scenarios.
[0200] The above method provided in the embodiment of the present application can be applied to a variety of application scenarios, including but not limited to: a navigation system based on online maps or offline maps, and a hybrid navigation system that integrates multiple maps of different accuracy.
[0201] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0202] According to another embodiment, a map matching device is provided. Figure 6A schematic block diagram of a map matching device according to an embodiment is shown. Figure 1 The server side or user side in the architecture shown. Figure 6 As shown, the map matching device 600 includes:
[0203] a road segment feature acquisition module 610 for acquiring road segment features, the road segment features including first road segment features corresponding to the target geographical area in the first map and second road segment features corresponding to the target geographical area in the second map, where the accuracy of the first map is lower than that of the second map;
[0204] The grouped self-attention processing module 620 is configured to perform a first grouped self-attention processing and / or a second grouped self-attention processing on the road segment features to obtain enhanced first road segment features and enhanced second road segment features. The first grouped self-attention processing includes: performing a first self-attention processing on the road segment features to learn local detail features between different road segments; the second grouped self-attention processing includes: performing a second grouping on the road segment features based on the road segment connectivity relationship, and performing a second self-attention processing on the obtained road segment features within each group.
[0205] The matching module 630 is configured to determine a matching relationship between the first map and the second map based on the enhanced first road segment features and the enhanced second road segment features.
[0206] As an optional method, when performing the first self-attention processing on the road segment features, the grouping self-attention processing module 620 is specifically configured to:
[0207] Determine the spatial proximity of features across road segments;
[0208] Performing a first grouping process on the road section features based on spatial proximity to obtain a first group;
[0209] Perform the first self-attention processing on the features of each road section in the first group.
[0210] As an optional approach, the grouped self-attention processing module 620 determines the spatial proximity of each road segment feature by:
[0211] Determine the multi-dimensional position coordinates corresponding to each road section feature based on the data corresponding to each road section feature;
[0212] The multidimensional position coordinates are mapped to a one-dimensional sequence using the spatial distribution curve, and the proximity of the points in the one-dimensional sequence is used to characterize the spatial proximity of the features of each road section.
[0213] As an optional manner, when performing the second grouping of the road segment features based on the road segment connectivity relationship, the grouping self-attention processing module 620 is specifically configured to:
[0214] Determine a complete connected path consisting of at least one road segment, where the starting point of the complete connected path has no road segment connected to it, and the end point of the complete connected path has no road segment connected to it;
[0215] The road segment features are secondly grouped based on the complete connected path to which each road segment feature corresponds.
[0216] As an optional approach, when determining a complete connected path consisting of at least one road segment, the grouped self-attention processing module 620 is specifically configured to:
[0217] Establishing a first road segment graph network corresponding to each road segment feature, wherein the first road segment graph network has the road segment nodes as nodes and the road segments as edges;
[0218] The road segments corresponding to the edges from the root node to the leaf nodes are determined as complete connected paths, the root node is a node with no in-degree, and the leaf node is a node with no out-degree.
[0219] As an optional method, the grouping self-attention processing module 620 performs grouping self-attention processing on the road segment features, including:
[0220] Generate position coding features corresponding to each road section feature;
[0221] Splicing the road section features with the corresponding position coding features to obtain spliced road section features;
[0222] Perform group self-attention processing based on the spliced road segment features;
[0223] In response to performing the first group self-attention processing on the road segment features, the position encoding features include a start point code corresponding to the start point of the road segment, an end point code corresponding to the end point of the road segment, and a direction code corresponding to the direction of the road segment;
[0224] In response to the second grouped self-attention processing on the segment features, the position encoding features include a complete connected path encoding of the complete connected path and a segment encoding of each segment in the complete connected path.
[0225] As an optional manner, the first road segment feature includes a road feature;
[0226] The second segment characteristics include any of the following:
[0227] The centerline characteristics of the second road segment;
[0228] A centerline feature of the second road segment, and a boundary line feature of the second road segment.
[0229] According to an embodiment of another aspect, a navigation device is provided. Figure 7 A schematic block diagram of a navigation device according to an embodiment is shown. Figure 1The server side or user side in the architecture shown. Figure 7 As shown, the navigation 700 includes:
[0230] A matching relationship acquisition module 710 is used to obtain a matching relationship between the first map and the second map, where the matching relationship is determined based on the above-mentioned map matching method;
[0231] The navigation module 720 is used to perform navigation processing based on the matching relationship.
[0232] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without making any creative efforts.
[0233] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0234] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0235] And an electronic device comprising:
[0236] one or more processors; and
[0237] A memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by one or more processors, execute the steps of any one of the method embodiments described above.
[0238] The present application also provides a computer program product, comprising a computer program, which implements the steps of any one of the method embodiments described above when executed by a processor.
[0239] in, Figure 8 The electronic device architecture is shown as an example, and may include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, the video display adapter 811, the disk drive 812, the input / output interface 813, the network interface 814, and the memory 820 may be communicatively connected via a communication bus 830.
[0240] Among them, the processor 810 can be implemented by a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in this application.
[0241] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store an operating system 821 for controlling the operation of the electronic device 800, and a basic input and output system (BIOS) 822 for controlling the low-level operations of the electronic device 800. In addition, a web browser 823, a data storage management system 824, and a map matching or navigation device 825, etc. can also be stored. The above-mentioned map matching or navigation device 825 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.
[0242] The input / output interface 813 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0243] The network interface 814 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0244] The bus 830 comprises a pathway for transmitting information between the various components of the device (eg, the processor 810 , the video display adapter 811 , the disk drive 812 , the input / output interface 813 , the network interface 814 , and the memory 820 ).
[0245] It should be noted that although the above device only shows the processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, memory 820, bus 830, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may also include only the components necessary to implement the solution of the present application, and does not necessarily include all the components shown in the figure.
[0246] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer program product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0247] The above is a detailed introduction to the technical solutions provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The description of the above embodiments is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting this application.
Claims
1. A map matching method, characterized in that: include: Obtaining road segment features, the road segment features including a first road segment feature corresponding to the target geographical area in a first map and a second road segment feature corresponding to the target geographical area in a second map, where the accuracy of the first map is lower than that of the second map; performing a first grouping self-attention process and / or a second grouping self-attention process on the road segment features to obtain enhanced first road segment features and enhanced second road segment features; wherein the first grouping self-attention process includes: performing a first self-attention process on the road segment features to learn local detail features between different road segments; and the second grouping self-attention process includes: performing a second grouping on the road segment features based on the road segment connectivity relationship, and performing a second self-attention process on the obtained road segment features within each group; Based on the enhanced first road section features and the enhanced second road section features, a matching relationship between the first map and the second map is determined.
2. The method according to claim 1, characterized in that The performing a first self-attention processing on the road segment feature includes: determining the spatial proximity of each of the road segment features; Performing a first grouping process on the road segment features based on the spatial proximity to obtain a first group; Perform a first self-attention process on the features of each road section in the first group.
3. The method according to claim 2, characterized in that Determining the spatial proximity of each of the road segment features includes: Determining the multi-dimensional position coordinates corresponding to each of the road section features based on the data of the road section corresponding to each of the road section features; The multi-dimensional position coordinates are mapped to a one-dimensional sequence using a spatial distribution curve, and the proximity of points in the one-dimensional sequence is used to characterize the spatial proximity of each of the road segment features.
4. The method according to claim 1, wherein The second grouping of the road section features based on the road section connectivity relationship includes: Determine a complete connected path consisting of at least one road segment, wherein a starting point of the complete connected path has no road segment connected thereto, and an end point of the complete connected path has no road segment connected thereto; The road segment features are secondly grouped based on the complete connected path to which each road segment feature corresponds.
5. The method according to claim 4, characterized in that Determining a complete connected path consisting of at least one road segment includes: Establishing a first road segment graph network corresponding to each of the road segment features, wherein the first road segment graph network has the road segment nodes as nodes and the road segments as edges; The road segment corresponding to the edge from the root node to the leaf node is determined as a complete connected path, the root node is a node with no in-degree, and the leaf node is a node with no out-degree.
6. The method according to claim 1, characterized in that The performing the first grouping self-attention processing and / or the second grouping self-attention processing on the road section features includes: Generating position coding features corresponding to each of the road section features; Splicing the road section feature with the corresponding position coding feature to obtain a spliced road section feature; Performing a first grouping self-attention process and / or a second grouping self-attention process based on the spliced road segment features; wherein, in response to performing the first group self-attention processing on the road segment feature, the position coding feature includes a start point code corresponding to a start point of the road segment, an end point code corresponding to an end point of the road segment, and a direction code corresponding to a direction of the road segment; In response to performing the second grouped self-attention processing on the segment features, the position encoding features include a complete connected path encoding of the complete connected path and a segment encoding of each segment in the complete connected path.
7. The method according to any one of claims 1 to 6, characterized in that The first road segment feature includes a road feature; The second road segment feature includes any one of the following: a centerline feature of the second road segment; A centerline feature of the second road segment, and a boundary line feature of the second road segment.
8. A navigation method, characterized in that: include: Obtaining a matching relationship between the first map and the second map, wherein the matching relationship is determined based on the method according to any one of claims 1 to 7; Navigation processing is performed based on the matching relationship.
9. A map matching device, characterized in that: include: a road segment feature acquisition module, configured to acquire road segment features, the road segment features including first road segment features corresponding to a target geographical area in a first map and second road segment features corresponding to the target geographical area in a second map, wherein the accuracy of the first map is lower than that of the second map; a grouping self-attention processing module, configured to perform a first grouping self-attention processing and / or a second grouping self-attention processing on the road segment features to obtain enhanced first road segment features and enhanced second road segment features; wherein the first grouping self-attention processing includes: performing a first self-attention processing on the road segment features to learn local detail features between different road segments; and the second grouping self-attention processing includes: performing a second grouping on the road segment features based on the road segment connectivity relationship, and performing a second self-attention processing on the obtained road segment features within each group; A matching module is used to determine a matching relationship between the first map and the second map based on the enhanced first road section feature and the enhanced second road section feature.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.