Map matching model training method and device, storage medium, equipment and vehicle

By alternating between regular and targeted training of the map matching model, sub-graph matching pairs for challenging scenarios are selected and trained, thus solving the problem of poor performance of the map matching model in challenging scenarios and achieving high matching accuracy in all road scenarios.

CN118035754BActive Publication Date: 2026-07-31MOMENTA (SUZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MOMENTA (SUZHOU) TECHNOLOGY CO LTD
Filing Date
2022-11-04
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing map matching models suffer from a long-tail problem during training, resulting in good performance for most road scenarios but poor performance for some road scenarios (difficult scenarios).

Method used

By repeatedly performing target processing operations, the map matching model is first trained in a regular manner to obtain the second map matching model. Then, based on the precision and/or recall of the sub-graph matching pairs, sub-graph matching pairs for difficult scenarios are selected and trained specifically until the sub-graph matching pairs for difficult scenarios disappear, thus obtaining the third map matching model.

Benefits of technology

It improves the accuracy of map matching models for all road scenarios, avoids the long-tail problem, and enables the model to perform well in any road scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118035754B_ABST
    Figure CN118035754B_ABST
Patent Text Reader

Abstract

This application discloses a training method, apparatus, storage medium, device, and vehicle for a map matching model. The method includes: repeatedly executing a target processing operation until there are no difficult scene sub-map matching pairs in the sub-map matching pairs output by the second map matching model obtained in the target processing operation, and then determining the obtained second map matching model as the target map matching model; the target processing operation includes: training a first map matching model based on a training set to obtain a second map matching model and its output sub-map matching pairs; determining whether a sub-map matching pair is a difficult scene sub-map matching pair based on the precision and / or recall of each road element matching pair contained in the sub-map matching pair; when there is a difficult scene sub-map matching pair, training the second map matching model based on the difficult scene sub-map matching pair and the target training round number to obtain a third map matching model, and determining the third map matching model as a new first map matching model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of map processing technology, and more specifically, to a training method, apparatus, storage medium, device, and vehicle for a map matching model. Background Technology

[0002] To improve the accuracy of semantic maps when generating them, road elements can be matched between multiple initial semantic maps generated from multiple crowdsourced data trips. Then, based on the relative positional relationship of the same road element, the positions of the two successfully matched initial semantic maps can be shifted to reduce the positional offset between them. Finally, the multiple initial semantic maps that have completed matching and shifting are clustered to obtain the final semantic map.

[0003] Currently, map matching models are mainly used for automatic matching of semantic maps. The final map matching model can be obtained by directly inputting all datasets into an initial map matching model and training it until convergence. However, the map matching model obtained by this training method may perform well for most road scenarios but poorly for some road scenarios (hereinafter referred to as difficult scenarios), which is also known as the long-tail problem. Therefore, how to solve this long-tail problem is an urgent issue to be addressed. Summary of the Invention

[0004] This application provides a training method, apparatus, storage medium, device, and vehicle for a map matching model, which can solve the long-tail problem in map matching models.

[0005] The specific technical solution is as follows:

[0006] In a first aspect, embodiments of this application provide a method for training a map matching model, the method comprising:

[0007] The target processing operation is executed repeatedly until there is no sub-map matching pair of difficult scene in the sub-map matching pair output by the second map matching model obtained in the target processing operation. Then, the obtained second map matching model is determined as the target map matching model.

[0008] The target processing operation includes:

[0009] The first map matching model is trained based on the training set to obtain the second map matching model and the submap matching pairs output by the second map matching model. The training set includes multiple map data packages, each map data package includes multiple submaps and the number of submaps in each map data package is the same. The submap matching pairs include multiple road element matching pairs.

[0010] Based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair, determine whether the subgraph matching pair is a subgraph matching pair for a difficult scenario;

[0011] In the case of subgraph matching pairs in the difficult scenario, the second map matching model is trained according to the subgraph matching pairs in the difficult scenario and the target training round number to obtain a third map matching model, and the third map matching model is determined as the new first map matching model.

[0012] As can be seen from the above scheme, the embodiments of this application can first perform conventional training on the first map matching model using a complete training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model. Then, based on the precision and / or recall of each road element matching pair contained in the sub-map matching pair, sub-map matching pairs for difficult scenarios are selected. The second map matching model is then trained specifically based on the sub-map matching pairs for difficult scenarios and the target training round number. The obtained third map matching model is then used as the new first map matching model for the next round of conventional training. Compared with conventional training using only a complete training set, the embodiments of this application, through this alternating and iterative approach of conventional training and targeted training, can ensure good results for most road scenarios while strengthening targeted training for difficult scenarios where conventional training is ineffective. This allows the difficult scenarios to also achieve good results, meaning the final target map matching model can be applied to any road scenario, thus avoiding the long-tail problem.

[0013] In a first possible implementation of the first aspect, determining whether a subgraph matching pair is a subgraph matching pair for a difficult scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair includes:

[0014] For each subgraph matching pair, the precision and / or recall of each type of road element matching in the subgraph matching pair are calculated based on the road element matching pairs in the subgraph matching pair and their corresponding road element matching pair truth values.

[0015] The precision of matching road elements of the first target type is determined as the precision of the subgraph matching pair, and / or the recall of matching road elements of the second target type is determined as the recall of the subgraph matching pair, wherein the first target type includes the road element type with the lowest precision in the subgraph matching pair, and the second target type includes the road element type with the lowest recall in the subgraph matching pair;

[0016] Based on the precision and / or recall of the subgraph matching pair, determine whether the subgraph matching pair is a subgraph matching pair for the difficult scenario.

[0017] As can be seen from the above scheme, the embodiments of this application determine whether a subgraph matching pair is a subgraph matching pair for a difficult scene based on the precision of the road element type with the lowest precision in each subgraph matching pair, and / or the recall of the road element type with the lowest recall in the subgraph matching pair, rather than directly determining whether a subgraph matching pair is a subgraph matching pair for a difficult scene based on the mean of the precision and / or the mean of the recall of each road element type in the subgraph matching pair. This allows for targeted training on the road elements with the lowest precision and the road elements with the lowest recall, thereby reducing the number of subgraph matching pairs for difficult scenes and thus obtaining a target map matching model with higher matching accuracy.

[0018] In a second possible implementation of the first aspect, determining whether a subgraph matching pair is a subgraph matching pair for the difficult scenario based on the precision and / or recall of the subgraph matching pair includes:

[0019] If the precision of the subgraph matching pair is less than or equal to the precision threshold, or the recall of the subgraph matching pair is less than or equal to the recall threshold, then the subgraph matching pair is determined to be a subgraph matching pair of the difficult scenario.

[0020] If the precision of the subgraph matching pair is greater than a precision threshold and the recall of the subgraph matching pair is greater than a recall threshold, then the subgraph matching pair is determined not to be a subgraph matching pair for the difficult scenario.

[0021] As can be seen from the above scheme, the embodiments of this application identify subgraph matching pairs with low precision or recall as subgraph matching pairs in difficult scenarios, so as to conduct targeted training on subgraph matching pairs with low precision or recall in difficult scenarios, thereby further improving the matching accuracy of the target map matching model.

[0022] In a third possible implementation of the first aspect, training the second map matching model to obtain the third map matching model based on the subgraph matching pairs of the difficult scenario and the target training round number includes:

[0023] Based on the road elements of the first target type and the second target type contained in the subgraph matching pair of the difficult scene, and the number of target training rounds, the second map matching model is trained to obtain the third map matching model;

[0024] Alternatively, the second map matching model can be trained based on each type of road element contained in the subgraph matching pair of the difficult scenario and the target training round number to obtain the third map matching model.

[0025] As can be seen from the above scheme, when conducting targeted training, it is possible to conduct targeted training only on the road elements of the difficult scene in the subgraph matching pair of the difficult scene, or to conduct targeted training on each type of road element contained in the subgraph matching pair of the difficult scene, thereby improving the matching accuracy of the map matching model for road elements in difficult scenes.

[0026] In a fourth possible implementation of the first aspect, the target number of training rounds is the ratio of the number of sub-maps contained in each map data packet to the number of sub-map matching pairs of the difficult scene.

[0027] As can be seen from the above scheme, the embodiments of this application use the ratio of the number of sub-maps contained in each map data package to the number of sub-map matching pairs in difficult scenes as the target number of training rounds. This can make the target number of training rounds larger if the number of sub-map matching pairs in difficult scenes is smaller, and the target number of training rounds smaller if the number of sub-map matching pairs in difficult scenes is larger. Thus, the total number of target training rounds can be minimized while achieving the expected effect of targeted training.

[0028] In the fifth possible implementation of the first aspect, training the first map matching model based on the training set to obtain the second map matching model includes:

[0029] The training set is divided into multiple training subsets;

[0030] The first map matching model is iteratively trained based on multiple training subsets to obtain the second map matching model.

[0031] As can be seen from the above scheme, by adopting a batch iterative training method, the matching accuracy of the map matching model obtained in the later training is higher than that of the map matching model obtained in the previous training, and the convergence speed of the later training is higher than that of the previous training. As a result, the final second map matching model has a higher matching accuracy than the second map matching model obtained by directly using the training set.

[0032] Secondly, embodiments of this application provide a training apparatus for a map matching model, the apparatus comprising:

[0033] The loop unit is used to repeatedly execute the target processing operation until there is no sub-map matching pair of difficult scene in the sub-map matching pair output by the second map matching model obtained in the target processing operation. Then, the obtained second map matching model is determined as the target map matching model.

[0034] The target processing operation performed by the loop unit includes:

[0035] The first training module is used to train the first map matching model based on the training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model. The training set includes multiple map data packages, each map data package includes multiple sub-maps and the number of sub-maps in each map data package is the same. The sub-map matching pairs include multiple road element matching pairs.

[0036] The judgment module is used to determine whether the subgraph matching pair is a subgraph matching pair of a difficult scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair;

[0037] The second training module is used to train the second map matching model to obtain the third map matching model when there are subgraph matching pairs for the difficult scene and the target number of training rounds.

[0038] The determination module is used to determine the third map matching model as the new first map matching model.

[0039] In a first possible implementation of the second aspect, the determination module includes:

[0040] The calculation submodule is used to calculate the precision and / or recall of each type of road element matching in the subgraph matching pair for each subgraph matching pair, based on the road element matching pairs in the subgraph matching pair and their corresponding road element matching pair truth values.

[0041] A determination submodule is used to determine the precision rate of matching road elements of a first target type as the precision rate of the subgraph matching pair, and / or to determine the recall rate of matching road elements of a second target type as the recall rate of the subgraph matching pair, wherein the first target type includes the road element type with the lowest precision rate in the subgraph matching pair, and the second target type includes the road element type with the lowest recall rate in the subgraph matching pair;

[0042] The judgment submodule is used to determine whether the subgraph matching pair is a subgraph matching pair of the difficult scenario based on the precision and / or recall of the subgraph matching pair.

[0043] In a second possible implementation of the second aspect, the judgment submodule is configured to determine that the subgraph matching pair is a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is less than or equal to a precision threshold, or the recall of the subgraph matching pair is less than or equal to a recall threshold; and to determine that the subgraph matching pair is not a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is greater than a precision threshold and the recall of the subgraph matching pair is greater than a recall threshold.

[0044] In a third possible implementation of the second aspect, the second training module is used to train the second map matching model based on the road elements of the first target type and the second target type contained in the subgraph matching pair of the difficult scene, and the target training round number, to obtain the third map matching model; or, based on each type of road element contained in the subgraph matching pair of the difficult scene and the target training round number, the second map matching model is trained to obtain the third map matching model.

[0045] In a fourth possible implementation of the second aspect, the target number of training rounds is the ratio of the number of sub-maps contained in each map data packet to the number of sub-map matching pairs of the difficult scene.

[0046] In the fifth possible implementation of the second aspect, the root first training module includes:

[0047] A partitioning submodule is used to divide the training set into multiple training subsets;

[0048] The iterative training submodule is used to iteratively train the first map matching model based on multiple training subsets to obtain the second map matching model.

[0049] As can be seen from the above scheme, the embodiments of this application can first perform conventional training on the first map matching model using a complete training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model. Then, based on the precision and / or recall of each road element matching pair contained in the sub-map matching pair, sub-map matching pairs for difficult scenarios are selected. The second map matching model is then trained specifically based on the sub-map matching pairs for difficult scenarios and the target training round number. The obtained third map matching model is then used as the new first map matching model for the next round of conventional training. Compared with conventional training using only a complete training set, the embodiments of this application, through this alternating and iterative approach of conventional training and targeted training, can ensure good results for most road scenarios while strengthening targeted training for difficult scenarios where conventional training is ineffective. This allows the difficult scenarios to also achieve good results, meaning the final target map matching model can be applied to any road scenario, thus avoiding the long-tail problem.

[0050] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any possible implementation of the first aspect.

[0051] Fourthly, embodiments of this application provide an electronic device, which includes:

[0052] One or more processors;

[0053] The processor is coupled to a storage device for storing one or more programs;

[0054] When one or more programs are executed by one or more processors, the electronic device enables the method described in any possible implementation of the first aspect.

[0055] Fifthly, embodiments of this application provide a vehicle that includes the means as described in any possible implementation of the second aspect, or includes electronic equipment as described in the fourth aspect.

[0056] In a sixth aspect, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the first aspect. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0058] Figure 1 A flowchart illustrating a training method for a map matching model provided in an embodiment of this application;

[0059] Figure 2 Example graphs showing the precision and recall of each sub-map matching pair in a second map matching model obtained from initial training, as provided in an embodiment of this application;

[0060] Figure 3 Example diagrams showing the precision and recall of each sub-map matching pair in a second map matching model obtained through multiple iterations of training, provided in an embodiment of this application;

[0061] Figure 4 This is a block diagram illustrating the composition of a training device for a map matching model provided in an embodiment of this application. Detailed Implementation

[0062] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0063] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0064] Figure 1 This is a flowchart illustrating a training method for a map matching model. This method addresses the long-tail problem and yields a target map matching model applicable to various road scenarios, including highways, urban roads, parking lanes, bridge entrances and exits, ramps, intersections, etc. This method can be applied to electronic devices or computer equipment, specifically vehicles or servers, and may include the following steps:

[0065] S110: Train the first map matching model based on the training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model.

[0066] The training set includes multiple map data packages, each containing multiple submaps of the same number. Submap matching pairs include multiple road element matching pairs, where each matching pair represents two matching road elements, including road signs, traffic lights, streetlights, lane markings, and non-lane markings on the road surface. The map data packages can be semantic vector map data packages and can be generated based on crowdsourced data. Crowdsourced data includes road images captured by cameras and vehicle trajectories. Furthermore, it should be noted that "training the first map matching model based on the training set" can be understood as performing regular training on the first map matching model; that is, the training set used when training the first map matching model includes all training samples.

[0067] When dividing a map data packet into multiple sub-maps, each map data packet can be directly divided into multiple equal sub-maps, or the skeleton frames of each map data packet can be obtained first (e.g., image frames extracted at certain distance intervals), and then each road element can be assigned to the nearest skeleton frame, so that multiple road elements near a skeleton frame form a sub-map. The distance between a road element and a skeleton frame is determined primarily by the road element's position within the map data packet and the camera's position when the skeleton frame was captured, and is unrelated to the image content of the skeleton frame itself.

[0068] When training for the first time based on the training set, the first map matching model used is the initial map matching model. After training the first map matching model multiple times based on the training set and reaching the convergence condition, a second map matching model and the sub-map matching pairs output by the second map matching model are obtained. The convergence condition includes, but is not limited to: the number of training rounds reaches a preset number of training rounds, or the loss value calculated based on the positional distance difference between the currently output sub-map matching pairs is less than or equal to a preset loss threshold.

[0069] It should be added that although the training set includes multiple map data packets, during training, the two map data packets in the multiple map data packets are matched separately, that is, they are matched one by one, rather than multiple map data packets being matched at the same time.

[0070] To improve the matching accuracy of the second map matching model, this embodiment of the application may first divide the training set into multiple training subsets, and then iteratively train the first map matching model based on the multiple training subsets to obtain the second map matching model.

[0071] Iterative training of the first map matching model based on multiple training subsets includes: training the first map matching model based on the first training subset to obtain the fourth map matching model, training the fourth map matching model based on the second training subset to obtain the fifth map matching model, training the fourth map matching model based on the third training subset to obtain the sixth map matching model, and so on, until the second map matching model is obtained by training based on the last training subset.

[0072] This batch-based iterative training method allows the matching accuracy of the map matching model obtained in the later training to be higher than that of the map matching model obtained in the earlier training, and the convergence speed of the later training is higher than that of the earlier training. As a result, the final second map matching model has a higher matching accuracy than the second map matching model obtained by directly using the training set.

[0073] S120: Determine whether a subgraph matching pair is a subgraph matching pair for a challenging scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair.

[0074] Precision is relative to the prediction result; it represents the percentage of positive predictions that are actually correct. Recall is relative to the number of samples; it represents the percentage of positive samples that are correctly predicted. Therefore, when precision and / or recall are too low, it indicates that the current model is not performing well in matching the road elements corresponding to that road element pair. Further training can be performed based on the submap containing that road element. In other words, when the precision and / or recall of each road element pair within a submap matching pair are too low, it indicates that the submap matching pair represents a challenging scenario and requires further targeted training.

[0075] Therefore, the specific implementation method of this step includes steps A1-A3:

[0076] A1. For each subgraph matching pair, calculate the precision and / or recall of each type of road element matching in the subgraph matching pair based on the road element matching pairs in the subgraph matching pair and their corresponding ground truth values.

[0077] The training set can also contain ground truth values ​​for road element matching pairs, indicating which road elements actually refer to the same road element in the real world. Therefore, when obtaining the subgraph matching pairs output by the second map matching model, the ground truth values ​​for each road element matching pair in that subgraph matching pair in the training set can also be obtained.

[0078] Road elements include road signs, traffic lights, streetlights, lane markings, and non-lane markings on the road surface.

[0079] A subgraph matching pair may include various types of road elements such as road signs, traffic lights, streetlights, lane lines, and non-lane line markings on the road surface. The precision and / or recall of each road element can be calculated separately.

[0080] A2. Determine the precision of matching road elements of the first target type as the precision of the subgraph matching pair, and / or determine the recall of matching road elements of the second target type as the recall of the subgraph matching pair.

[0081] The first target type includes the road element type with the lowest precision in the subgraph matching pairs, and the second target type includes the road element type with the lowest recall in the subgraph matching pairs. The first target type and the second target type may be the same or different.

[0082] When the precision of matching road elements of the first target type is determined as the precision of the subgraph matching pair, the recall of matching road elements of the first target type can be determined as the recall of the subgraph matching pair; when the recall of matching road elements of the second target type is determined as the recall of the subgraph matching pair, the precision of matching road elements of the second target type can be determined as the precision of the subgraph matching pair.

[0083] A3. Determine whether a subgraph matching pair is a subgraph matching pair for a challenging scenario based on the precision and / or recall of the subgraph matching pair.

[0084] When the quality requirements for the target map matching model are relatively low, this step can be implemented as follows: if the precision of the subgraph matching pair is less than or equal to a precision threshold, and the recall of the subgraph matching pair is less than or equal to a recall threshold, then the subgraph matching pair is determined to be a subgraph matching pair for a difficult scene; if the precision of the subgraph matching pair is greater than a precision threshold, or the recall of the subgraph matching pair is greater than a recall threshold, then the subgraph matching pair is determined not to be a subgraph matching pair for a difficult scene. The precision threshold can be 0.8, and the recall threshold can be 0.5.

[0085] When the quality requirements for the target map matching model are high, this step can be implemented as follows: if the precision of the subgraph matching pair is less than or equal to the precision threshold, or the recall of the subgraph matching pair is less than or equal to the recall threshold, determine that the subgraph matching pair is a subgraph matching pair of the difficult scene; if the precision of the subgraph matching pair is greater than the precision threshold, and the recall of the subgraph matching pair is greater than the recall threshold, determine that the subgraph matching pair is not a subgraph matching pair of the difficult scene.

[0086] The method provided in steps A1-A3 determines whether a subgraph matching pair is a difficult scene based on the precision of the road element type with the lowest precision in each subgraph matching pair, and / or the recall of the road element type with the lowest recall in that subgraph matching pair, rather than directly determining whether a subgraph matching pair is a difficult scene based on the mean of the precision and / or the mean of the recall of each road element type in the subgraph matching pair. This allows for targeted training on the road elements with the lowest precision and the lowest recall, thereby reducing the number of subgraph matching pairs in difficult scenes and resulting in a target map matching model with higher matching accuracy.

[0087] S130: In the case of subgraph matching pairs in difficult scenarios, train the second map matching model according to the subgraph matching pairs in difficult scenarios and the target training rounds to obtain the third map matching model, and determine the third map matching model as the new first map matching model, and return to the execution step S110.

[0088] "Training the second map matching model based on the subgraph matching pairs of the difficult scenarios and the target training rounds" can be understood as training the second map matching model specifically for difficult scenarios. That is, the training set used when training the second map matching model is a training set that only includes the subgraph matching pairs of the difficult scenarios, rather than the complete training set mentioned in step S110.

[0089] The specific implementation methods for training the second map matching model to obtain the third map matching model based on the subgraph matching pairs of the difficult scene and the target training rounds include: training the second map matching model based on the road elements of the first and second target types contained in the subgraph matching pairs of the difficult scene, as well as the target training rounds, to obtain the third map matching model; or, training the second map matching model based on each type of road element contained in the subgraph matching pairs of the difficult scene and the target training rounds, to obtain the third map matching model.

[0090] In other words, when conducting targeted training, you can either train the road elements of the difficult scene in the subgraph matching pair of the difficult scene, or you can train the road elements of each type contained in the subgraph matching pair of the difficult scene.

[0091] The target training rounds are defined as the ratio of the number of submaps in each map data package to the number of submap matching pairs in challenging scenarios. A smaller number of submap matching pairs in challenging scenarios results in a larger target training round, while a larger number of submap matching pairs in challenging scenarios results in a smaller target training round. This approach aims to minimize the total number of target training rounds while achieving the desired effect through targeted training.

[0092] S140: In the absence of subgraph matching pairs with difficult scenarios, the obtained second map matching model is determined as the target map matching model.

[0093] If there are no subgraph matching pairs in difficult scenarios, it means that the currently obtained second map matching model can be applied to any road scenario. Therefore, the currently obtained second map matching model can be determined as the final target map matching model.

[0094] For example, the number of subgraph matching pairs with different precision and recall rates in the second map matching model obtained from the first training can be as follows: Figure 2 As shown, after multiple iterations of steps S110-S130, the number of sub-map matching pairs obtained with the second map matching model and the precision and recall rates can be as follows: Figure 3 As shown. Figure 2 and Figure 3In this graph, the horizontal axis represents recall, and the vertical axis represents precision. Each grid cell represents the number of matching pairs in the corresponding subgraph for that specific recall and precision. For example... Figure 2 The grid in the bottom left corner represents 112 subgraph matching pairs with a recall of 0 and a precision of 0.9. If a subgraph matching pair is determined to be a difficult scenario if its precision is less than or equal to 0.8 or its recall is less than or equal to 0.5, then... Figure 2 and Figure 3 Subgraph matching pairs within the medium-thick wireframe area are normal, while subgraph matching pairs outside the thick wireframe area are subgraph matching pairs in challenging scenarios. The number of normal subgraph matching pairs has increased from 54 to 821, significantly reducing the number of subgraph matching pairs in challenging scenarios.

[0095] It should be added that the first map matching model, the second map matching model, the third map matching model and the target map matching model mentioned in the embodiments of this application can be GAT (Graph Attention Networks) or other types of neural networks.

[0096] The map matching model training method provided in this application embodiment first performs conventional training on a first map matching model using a complete training set to obtain a second map matching model and its output sub-map matching pairs. Then, based on the precision and / or recall of each road element matching pair in the sub-map matching pairs, sub-map matching pairs for challenging scenarios are selected. The second map matching model is then trained specifically based on the sub-map matching pairs for challenging scenarios and the target training round number. The resulting third map matching model is then used as a new first map matching model for the next round of conventional training. Compared to conventional training using only a complete training set, this application embodiment, through alternating and iterative conventional and targeted training, ensures good results for most road scenarios while strengthening targeted training for challenging scenarios where conventional training is ineffective. This allows the target map matching model to achieve good results even in challenging scenarios, enabling it to be applied to any road scenario and avoiding the long-tail problem.

[0097] Corresponding to the above method embodiments, another embodiment of this application provides a training apparatus for a map matching model, such as... Figure 4 As shown, the device includes:

[0098] The loop unit 210 is used to repeatedly execute the target processing operation until there is no sub-map matching pair of difficult scene in the sub-map matching pair output by the second map matching model obtained in the target processing operation. Then, the obtained second map matching model is determined as the target map matching model.

[0099] The target processing operation performed by the loop unit 210 includes:

[0100] The first training module 211 is used to train the first map matching model according to the training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model. The training set includes multiple map data packages, each map data package includes multiple sub-maps and the number of sub-maps in each map data package is the same. The sub-map matching pairs include multiple road element matching pairs.

[0101] The judgment module 212 is used to determine whether the subgraph matching pair is a subgraph matching pair of a difficult scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair.

[0102] The second training module 213 is used to train the second map matching model based on the subgraph matching pairs of the difficult scene and the target training round number when there are subgraph matching pairs of the difficult scene, so as to obtain the third map matching model.

[0103] The determining module 214 is used to determine the third map matching model as the new first map matching model.

[0104] In one possible implementation, the determination module 212 includes:

[0105] The calculation submodule is used to calculate the precision and / or recall of each type of road element matching in the subgraph matching pair for each subgraph matching pair, based on the road element matching pairs in the subgraph matching pair and their corresponding road element matching pair truth values.

[0106] A determination submodule is used to determine the precision rate of matching road elements of a first target type as the precision rate of the subgraph matching pair, and / or to determine the recall rate of matching road elements of a second target type as the recall rate of the subgraph matching pair, wherein the first target type includes the road element type with the lowest precision rate in the subgraph matching pair, and the second target type includes the road element type with the lowest recall rate in the subgraph matching pair;

[0107] The judgment submodule is used to determine whether the subgraph matching pair is a subgraph matching pair of the difficult scenario based on the precision and / or recall of the subgraph matching pair.

[0108] In one possible implementation, the judgment submodule is configured to determine that the subgraph matching pair is a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is less than or equal to a precision threshold, or the recall of the subgraph matching pair is less than or equal to a recall threshold; and to determine that the subgraph matching pair is not a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is greater than a precision threshold and the recall of the subgraph matching pair is greater than a recall threshold.

[0109] In one possible implementation, the second training module 213 is used to train the second map matching model based on the road elements of the first target type and the second target type contained in the subgraph matching pairs of the difficult scene, and the target training rounds, to obtain the third map matching model; or, based on each type of road element contained in the subgraph matching pairs of the difficult scene and the target training rounds, the second map matching model is trained to obtain the third map matching model.

[0110] In one possible implementation, the target training rounds are the ratio of the number of sub-maps contained in each map data package to the number of sub-map matching pairs of the challenging scene.

[0111] In one possible implementation, the root first training module 211 includes:

[0112] A partitioning submodule is used to divide the training set into multiple training subsets;

[0113] The iterative training submodule is used to iteratively train the first map matching model based on multiple training subsets to obtain the second map matching model.

[0114] The training apparatus for the map matching model provided in this application embodiment can first perform conventional training on a first map matching model using a complete training set to obtain a second map matching model and sub-map matching pairs output by the second map matching model. Then, based on the precision and / or recall of each road element matching pair contained in the sub-map matching pair, sub-map matching pairs for difficult scenarios are selected. The second map matching model is then trained specifically based on the sub-map matching pairs for difficult scenarios and the target training round number. The obtained third map matching model is then used as a new first map matching model for the next round of conventional training. Compared to conventional training using only a complete training set, this application embodiment, through this alternating and iterative approach of conventional and targeted training, can ensure good results for most road scenarios while strengthening targeted training for difficult scenarios where conventional training is ineffective. This allows the difficult scenarios to also achieve good results, meaning the final target map matching model can be applied to any road scenario, thus avoiding the long-tail problem.

[0115] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the above embodiments.

[0116] Based on the above method embodiments, another embodiment of this application provides an electronic device or computer device, including:

[0117] One or more processors;

[0118] The processor is coupled to a storage device for storing one or more programs;

[0119] When the one or more programs are executed by the one or more processors, the electronic device or computer device performs the method as described in any of the above embodiments.

[0120] Based on the above method embodiments, another embodiment of this application provides a vehicle that includes the apparatus as described in any of the above embodiments, or includes electronic devices as described above.

[0121] The vehicle includes a CPU (Central Processing Unit) and a T-Box (Telematics Box). The T-Box can act as a gateway to communicate with the server. The CPU can obtain a target map matching model without long-tail problems by executing the training method described above. Alternatively, the CPU can send the training set to the server via the T-Box, and the server can execute the training method to obtain a target map matching model without long-tail problems. Or, technicians can directly store the training set on the server, and the server can execute the training method to obtain a target map matching model without long-tail problems.

[0122] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.

[0123] The above-described apparatus embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The apparatus embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0124] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for training a map matching model, characterized in that, The method includes: The target processing operation is executed repeatedly until there is no sub-map matching pair of difficult scene in the sub-map matching pair output by the second map matching model obtained in the target processing operation. Then, the obtained second map matching model is determined as the target map matching model. The target processing operation includes: The first map matching model is trained based on the training set to obtain the second map matching model and the submap matching pairs output by the second map matching model. The training set includes multiple map data packages, each map data package includes multiple submaps and the number of submaps in each map data package is the same. The submap matching pairs include multiple road element matching pairs. Based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair, determine whether the subgraph matching pair is a subgraph matching pair for a difficult scenario; In the case of subgraph matching pairs in the difficult scene, the second map matching model is trained according to the subgraph matching pairs in the difficult scene and the target training round number to obtain a third map matching model, and the third map matching model is determined as the new first map matching model. The step of determining whether a subgraph matching pair is a subgraph matching pair for a difficult scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair includes: For each subgraph matching pair, the precision and / or recall of each type of road element matching in the subgraph matching pair are calculated based on the road element matching pairs in the subgraph matching pair and their corresponding road element matching pair truth values. The precision of matching road elements of the first target type is determined as the precision of the subgraph matching pair, and / or the recall of matching road elements of the second target type is determined as the recall of the subgraph matching pair, wherein the first target type includes the road element type with the lowest precision in the subgraph matching pair, and the second target type includes the road element type with the lowest recall in the subgraph matching pair; Based on the precision and / or recall of the subgraph matching pair, determine whether the subgraph matching pair is a subgraph matching pair for the difficult scenario.

2. The method of claim 1, wherein, The step of determining whether a subgraph matching pair is a subgraph matching pair for the challenging scenario based on the precision and / or recall of the subgraph matching pair includes: If the precision of the subgraph matching pair is less than or equal to the precision threshold, or the recall of the subgraph matching pair is less than or equal to the recall threshold, then the subgraph matching pair is determined to be a subgraph matching pair of the difficult scenario. If the precision of the subgraph matching pair is greater than a precision threshold and the recall of the subgraph matching pair is greater than a recall threshold, then the subgraph matching pair is determined not to be a subgraph matching pair for the difficult scenario.

3. The method of claim 1, wherein, The step of training the second map matching model based on the subgraph matching pairs of the difficult scene and the target training round number to obtain the third map matching model includes: Based on the road elements of the first target type and the second target type contained in the subgraph matching pair of the difficult scene, and the number of target training rounds, the second map matching model is trained to obtain the third map matching model; Alternatively, the second map matching model can be trained based on each type of road element contained in the subgraph matching pair of the difficult scenario and the target training round number to obtain the third map matching model.

4. The method of claim 1, wherein, The target training round number is the ratio of the number of sub-maps contained in each map data package to the number of sub-map matching pairs of the difficult scene.

5. The method according to any one of claims 1-4, characterized in that, The step of training the first map matching model based on the training set to obtain the second map matching model includes: The training set is divided into multiple training subsets; The first map matching model is iteratively trained based on multiple training subsets to obtain the second map matching model.

6. A device for training a map matching model, characterized in that The device includes: The loop unit is used to repeatedly execute the target processing operation until there is no sub-map matching pair of difficult scene in the sub-map matching pair output by the second map matching model obtained in the target processing operation. Then, the obtained second map matching model is determined as the target map matching model. The target processing operation performed by the loop unit includes: The first training module is used to train the first map matching model based on the training set to obtain the second map matching model and the sub-map matching pairs output by the second map matching model. The training set includes multiple map data packages, each map data package includes multiple sub-maps and the number of sub-maps in each map data package is the same. The sub-map matching pairs include multiple road element matching pairs. The judgment module is used to determine whether the subgraph matching pair is a subgraph matching pair of a difficult scenario based on the precision and / or recall of each road element matching pair contained in the subgraph matching pair; The second training module is used to train the second map matching model based on the subgraph matching pairs of the difficult scene and the target number of training rounds when there are subgraph matching pairs of the difficult scene, to obtain a third map matching model, and to determine the third map matching model as the new first map matching model. The determination module is used to determine the third map matching model as the new first map matching model; The judgment module includes: The calculation submodule is used to calculate the precision and / or recall of each type of road element matching in the subgraph matching pair for each subgraph matching pair, based on the road element matching pairs in the subgraph matching pair and their corresponding road element matching pair truth values. A determination submodule is used to determine the precision rate of matching road elements of a first target type as the precision rate of the subgraph matching pair, and / or to determine the recall rate of matching road elements of a second target type as the recall rate of the subgraph matching pair, wherein the first target type includes the road element type with the lowest precision rate in the subgraph matching pair, and the second target type includes the road element type with the lowest recall rate in the subgraph matching pair; The judgment submodule is used to determine whether the subgraph matching pair is a subgraph matching pair of the difficult scenario based on the precision and / or recall of the subgraph matching pair.

7. The apparatus of claim 6, wherein, The determination submodule is configured to: determine that the subgraph matching pair is a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is less than or equal to a precision threshold, or the recall of the subgraph matching pair is less than or equal to a recall threshold; and determine that the subgraph matching pair is not a subgraph matching pair of the difficult scenario when the precision of the subgraph matching pair is greater than a precision threshold and the recall of the subgraph matching pair is greater than a recall threshold.

8. The apparatus of claim 6, wherein, The second training module is used to train the second map matching model based on the road elements of the first target type and the second target type contained in the subgraph matching pair of the difficult scene, and the target training round number, to obtain the third map matching model; or, to train the second map matching model based on each type of road element contained in the subgraph matching pair of the difficult scene and the target training round number, to obtain the third map matching model.

9. The apparatus of claim 6, wherein, The target training round number is the ratio of the number of sub-maps contained in each map data package to the number of sub-map matching pairs of the difficult scene.

10. The apparatus of any one of claims 6-9, wherein, The first training module includes: A partitioning submodule is used to divide the training set into multiple training subsets; The iterative training submodule is used to iteratively train the first map matching model based on multiple training subsets to obtain the second map matching model.

11. A computer readable storage medium having stored thereon a computer program, characterized in that When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

12. An electronic device, comprising: The electronic device includes: One or more processors; The processor is coupled to a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the electronic device performs the method as described in any one of claims 1-5.

13. A vehicle characterized by comprising: The vehicle includes the device as described in any one of claims 6-10, or the electronic device as described in claim 12.