Map generation method and apparatus, vehicle, and storage medium

By acquiring basic road data, a road model library is generated using the DBSCAN density clustering algorithm, and a target simulation map is dynamically generated based on a three-level screening rule. Combined with the Monte Carlo algorithm and the AI ​​traffic flow integration module, the problem of map switching interruption in autonomous driving simulation testing is solved, and an efficient, seamless, and continuous testing environment is achieved.

CN122176114APending Publication Date: 2026-06-09GUANGZHOU AUTOMOBILE GROUP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU AUTOMOBILE GROUP CO LTD
Filing Date
2026-01-14
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing simulation tests of autonomous driving technology, there is a lack of methods to generate high-quality simulation maps randomly in real time with the vehicle, which leads to frequent map switching during the test, causing interruptions and affecting test efficiency.

Method used

By acquiring basic road data, a road model library is generated using the DBSCAN density clustering algorithm, and a target simulation map is dynamically generated based on a three-level screening rule. Combined with the Monte Carlo algorithm and the AI ​​traffic flow integration module, the simulation map and traffic flow are dynamically generated in a coordinated manner.

Benefits of technology

It achieves a seamless and continuous testing environment, avoids interruptions during map switching, and improves testing efficiency, as well as the realism and coverage of simulation tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176114A_ABST
    Figure CN122176114A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a map generation method and device, a vehicle and a storage medium. The method comprises: acquiring a road model library, the road model library comprising a plurality of road types obtained by clustering basic road data and a probability of each road type; and when a map expansion condition is detected, dynamically generating a target simulation map based on the road model library, the target simulation map comprising a plurality of target road units determined based on a three-level screening rule. Through the above method, seamless continuous testing is achieved by dynamically generating a map in real time, interruption caused by frequent switching of maps during testing is avoided, and testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of vehicle technology, specifically relating to a map generation method, apparatus, vehicle, and storage medium. Background Technology

[0002] The testing and verification of autonomous driving technology heavily relies on high-quality simulation environments. Simulation maps, as the foundational architecture of virtual testing environments, bear the testing burden for key algorithms such as vehicle localization, path planning, and perception decision-making. As autonomous driving technology advances to higher levels, higher demands are placed on the realism and coverage of simulation testing, urgently requiring an innovative method that can generate simulation maps randomly in real-time as the vehicle operates. Summary of the Invention

[0003] In view of the above problems, this application proposes a map generation method, apparatus, vehicle, and storage medium to improve the above problems.

[0004] In a first aspect, embodiments of this application provide a map generation method, the method comprising: acquiring a road model library, the road model library including multiple road types obtained by clustering basic road data and the probability of each road type; and dynamically generating a target simulation map based on the road model library when a map expansion condition is detected, the target simulation map including multiple target road units determined based on a three-level screening rule.

[0005] Secondly, embodiments of this application provide a map generation apparatus, the apparatus comprising: an acquisition unit for acquiring a road model library, the road model library including multiple road types obtained by clustering basic road data and the probability of each road type; and a map generation unit for dynamically generating a target simulation map based on the road model library when a map expansion condition is detected, the target simulation map including multiple target road units determined based on a three-level filtering rule.

[0006] Thirdly, embodiments of this application provide a vehicle, including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the above-described method.

[0007] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the above-described method.

[0008] Fifthly, embodiments of this application provide a computer-readable storage medium storing program code, wherein the computer program, when executed by a processor, implements the above-described method.

[0009] This application provides a map generation method, apparatus, vehicle, and storage medium. First, a road model library is acquired, which includes various road types obtained by clustering basic road data and the probability of each road type. When map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. The target simulation map includes multiple target road units determined based on a three-level screening rule. Through this method, seamless and continuous testing is achieved by dynamically generating maps in real time, avoiding interruptions caused by frequent map switching during testing and improving testing efficiency. Attached Figure Description

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

[0011] Figure 1 A flowchart of a map generation method according to an embodiment of this application is shown; Figure 2 A flowchart of a map generation method according to another embodiment of this application is shown; Figure 3 This paper shows a structural block diagram of a map generation apparatus according to an embodiment of the present application; Figure 4 A structural block diagram of a vehicle for performing a map generation method according to an embodiment of this application is shown; Figure 5 The illustration shows a storage unit for storing or carrying program code that implements the map generation method according to the embodiments of the present application. Detailed Implementation

[0012] 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 some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0013] This application provides a map generation method, apparatus, vehicle, and storage medium.

[0014] First, a road model library is acquired. This library includes various road types obtained by clustering basic road data, along with the probability of each type. When map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. This target simulation map includes multiple target road units determined by a three-level filtering rule. This method, through dynamic real-time map generation, enables seamless and continuous testing, avoiding interruptions caused by frequent map switching during testing and improving testing efficiency.

[0015] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0016] Please see Figure 1 This application provides a map generation method, the method comprising: Step S110: Obtain basic road data.

[0017] In this embodiment, the basic road data refers to real-world basic road data, which may include various road features such as road curvature, lateral slope, longitudinal slope, number of lanes, intersection shape, and lane line shape at each sampling point. Specifically, road curvature is a geometric parameter describing the degree of road bending; lateral slope is the degree of inclination of the road cross-section relative to the horizontal plane; longitudinal slope is the degree of inclination of the road longitudinal section relative to the horizontal plane; the number of lanes is the total number of lanes for vehicle travel on the road cross-section; road shape describes the geometric structure and traffic organization of road intersections (including classifications such as crossroads, T-junctions, and roundabouts, and their geometric parameters); and lane line shape refers to the type, color, and layout of lane dividing lines (including solid lines, dashed lines, double solid lines, etc., and their line width and spacing parameters).

[0018] Optionally, in this embodiment, the basic road data may further include road functional characteristics and traffic flow pattern characteristics. Road functional characteristics refer to the road's level and role in the road network (e.g., arterial road, secondary road, expressway; including attributes such as design speed, service targets, and traffic functions); traffic flow pattern characteristics refer to the statistical characteristics of road traffic operation status (including the spatiotemporal distribution patterns of flow rate, density, and speed).

[0019] One approach is to acquire basic road data using a mobile measurement system. This system can be a measurement vehicle equipped with GNSS (Global Navigation Satellite System), IMU (Inertial Measurement Unit), lidar, and cameras. The vehicle travels along the road, collecting real-time road geometry, lane line features, and surrounding environmental characteristics.

[0020] Optionally, vehicle driving trajectories can be collected through onboard sensors, and information such as road slope and curvature can be obtained through smartphone crowdsourcing applications; road planar features can be measured using satellite imagery and aerial photography, and road slope information can be extracted through stereo image pairs; furthermore, road feature parameters can be measured manually on-site to mark intersection shapes, traffic signs, and lane functions.

[0021] Step S120: Based on the basic road data, determine the road model library, which includes multiple road types obtained by clustering the basic road data and the probability of each road type.

[0022] As one approach, determining the road model library based on the basic road data includes: performing cluster analysis on the basic road data using a preset clustering algorithm to obtain the road model library.

[0023] In this embodiment of the application, the preset clustering algorithm can be the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) density clustering algorithm.

[0024] After obtaining the basic road data, the basic road data can be standardized to obtain the processed basic road data.

[0025] After obtaining the processed basic road data, the DBSCAN density clustering algorithm can be used to perform cluster analysis on the processed basic road data, dividing it into different clusters such as "main road clusters," "minor road clusters," "micro-circulation road clusters," and "roundabouts." Each cluster is defined as a "road type," forming a road model library. The algorithm is primarily considered for its characteristics, such as no preset number of clusters and support for arbitrary shapes, which highly match the characteristics of road map data, such as "linear distribution, irregular shape, and uneven density." It is suitable for road sampling point denoising, road segment clustering, and intersection identification.

[0026] Specifically, the clustering effect of the DBSCAN density clustering algorithm is entirely determined by two parameters.

[0027] ε (Epsilon, neighborhood radius): Defines the range of the "neighborhood". For any data point p (i.e., the sampling point), the circular area centered at p and with radius ε (in road maps, this is often a rectangular neighborhood in a Cartesian coordinate system to adapt to the linear distribution of roads) is called the ε neighborhood of p.

[0028] MinPts (Minimum number of neighborhood points): Defines the threshold for a "high-density region". If the number of points (including p itself) contained in the ε-neighborhood of a point p is greater than or equal to MinPts, then p is determined to be a core point, and this neighborhood is a high-density region.

[0029] The specific steps of the DBSCAN density-based clustering algorithm for clustering are as follows: Initialize data: Input dataset D (the set of road sampling points, i.e., the processed basic road data), parameter ε and MinPts, and mark all points as "unvisited".

[0030] Traverse unvisited points: Randomly select an unvisited point p from the dataset D and mark it as "visited".

[0031] Querying the ε-neighborhood: Calculate all points within the ε-neighborhood of p, denoted as the set Nε(p).

[0032] Determine the core points and expand the cluster: If |Nε(p)| ≥ MinPts (p is the core point): Create a new cluster C and add all points in Nε(p) to the "processing queue"; Traverse the queue to be processed: For each point q in the queue, if q has not been visited, mark it as "visited" and calculate its ε neighborhood Nε(q); if |Nε(q)| ≥ MinPts (q is the core point), add the points in Nε(q) that have not been added to C to the queue and cluster C; Repeat the above process until the queue to be processed is empty, and cluster C is generated.

[0033] Determine noise points: If |Nε(p)|<MinPts (p is not a core point), then mark p as a "noise point".

[0034] Repeat the steps until all points have been visited, and assign the data in dataset D to a cluster or label it as noise. That is, the final clustering yields multiple road types.

[0035] In practical applications, challenges such as density differences, massive scale, and spatial overlap of road data need to be addressed. Optimization strategies such as "adaptive parameters," "spatial indexing," and "multi-dimensional expansion" should be used to further improve clustering accuracy and efficiency, providing high-quality data support for downstream applications such as road map topology construction and route planning.

[0036] In this embodiment, the probability of each road type can be understood as the probability Pi (ΣPi=1) of each road type being selected. The probabilities of multiple road types can be a configurable road type probability distribution table maintained by the system, which can be obtained by calculating the initial probability of each road type based on the clustering results of the DBSCAN density clustering algorithm. Here, "configurable" means that users can adjust the probability of specific road types through a dictionary to increase the probability of different road topologies appearing during random generation. For example, for a roundabout test scenario, users can increase the probability of roundabout road features, which will increase the probability of generating roundabouts in actual simulation applications.

[0037] Step S130: When the map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. The target simulation map includes multiple target road units determined based on three-level filtering rules.

[0038] In this embodiment, the map expansion condition is a pre-set condition that can trigger map expansion. For example, the map expansion condition can be set to the distance between the tested vehicle and the boundary of the current simulation map being less than a preset threshold. Here, the current simulation map can be understood as the virtual road network at the location of the tested vehicle.

[0039] The three-level filtering rules are pre-defined rules for filtering road units corresponding to each road type in the road type library. A road unit is the smallest modular component in a road network that has specific geometric, topological, and contextual characteristics.

[0040] The target simulation map is a road topology composed of multiple road units determined by a three-level filtering rule. That is, the road units included in the road model library can be filtered in multiple levels through the three-level filtering rule to obtain multiple target road units that meet the map expansion conditions, and then the target simulation map can be generated based on the multiple target road units obtained by the filtering.

[0041] Optionally, the target simulation map is not generated using an offline map in OpenDrive format. Because real-time performance and dynamic generation need to be considered, the road topology is calculated and loaded into memory using a dynamic caching method. Map information about the surrounding area of ​​the main vehicle is then transmitted to the autonomous vehicle via OSIMSSAGE.

[0042] Step S140: If the rationality verification of the target simulation map is passed, a dynamic traffic flow that conforms to the target simulation map is generated based on the vehicle's operating status.

[0043] In this embodiment, the rationality of the target simulation map refers to whether the rationality score of each road unit in the target simulation map is greater than a preset score. The vehicle's operating status may include vehicle pose, speed, etc.

[0044] To ensure the realism of the simulation scenario, a commonly used real-time AI traffic flow integration module was added. This module includes a driver model library and a random parameter generator. The driver model library contains various types of driver models (aggressive, conservative, law-abiding, etc.); the random parameter generator automatically generates traffic flow parameters suitable for the scenario based on the currently generated target simulation map, including vehicle type, speed, and density, and assigns driving behaviors accordingly. The behavior of the tested vehicles also affects the real-time traffic flow integration module, adjusting the traffic flow response to form a closed-loop system.

[0045] This application provides a map generation method that first acquires basic road data, then determines a road model library based on the basic road data. The road model library includes multiple road types obtained by clustering the basic road data and the probability of each road type. When map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. The target simulation map includes multiple target road units determined based on a three-level screening rule. If the rationality verification of the target simulation map passes, a dynamic traffic flow conforming to the target simulation map is generated based on the vehicle's operating status. Through this method, the collaborative dynamic generation of simulation maps and traffic flow can be achieved, forming a more realistic and coherent testing environment.

[0046] Please see Figure 2 This application provides a map generation method, the method comprising: Step S210: Obtain a road model library, which includes multiple road types obtained by clustering basic road data and the probability of each road type.

[0047] Step S220: Obtain the current vehicle location information.

[0048] In this embodiment of the application, the vehicle refers to the vehicle under test, and its current location information can be determined by sensor data obtained from various sensors installed in the vehicle under test.

[0049] Step S230: If the distance between the vehicle and the current simulation map boundary is less than a preset threshold based on the location information, the map expansion condition is met, and a target simulation map is dynamically generated based on the road model library.

[0050] In this embodiment, the preset threshold is a pre-set minimum distance at which map expansion cannot be triggered. The system can monitor the position of the vehicle in real time, and when the distance between the vehicle and the boundary of the current simulation map is less than the preset threshold (e.g., 50 meters), the road expansion process is triggered.

[0051] As one approach, dynamically generating the target simulation map based on the road model library includes: determining the target road type from the multiple road types based on the probability of each road type; and filtering the road units corresponding to the target road type based on a three-level filtering rule to obtain the target road units as part of the target simulation map.

[0052] In this embodiment of the application, when map expansion is triggered, the dynamic road random generation algorithm can randomly select a road type T (i.e., the target type) based on the probability distribution of each road type using a roulette wheel selection algorithm. This method ensures that the selection is both random and strictly follows the probability preferences set by the user.

[0053] After determining the target road type, the road units corresponding to the target road type can be filtered in multiple levels based on the three-level filtering rules to obtain multiple target road units, and then a target simulation map can be generated based on the multiple target road units.

[0054] Before performing multi-level filtering of road units corresponding to the target road type based on the three-level filtering rules, the following preparatory work needs to be done: 1. Based on the road type library, establish a road unit label index database to address different clusters: create a multi-dimensional index for each road type T to facilitate fast retrieval.

[0055] Multidimensional indexes can include geometric feature indexes, topological feature indexes, and contextual indexes. Geometric feature indexes can include length ranges, curvature ranges, angle ranges, etc.; topological feature indexes can include the number of lanes at the start / end point and connection types (such as straight, turning, intersection, etc.); contextual indexes can include road class, typical vehicle speed, environment type (such as urban / highway / rural), etc.

[0056] 2. Boundary point context analysis: Before filtering, the system can analyze the characteristics of the current boundary point: the number of lanes, width, and direction of the connecting roads; the requirements of the current test scenario (such as the need for complex intersections, long straight roads, etc.); and the historical records of recently generated road units.

[0057] Through multidimensional indexing, the system can efficiently locate and match road units in the road type library; through boundary point context analysis, it can ensure seamless connection between generated units and boundary points.

[0058] The step of filtering road units corresponding to the target road type based on a three-level filtering rule to obtain target road units as part of the target simulation map includes: performing a first-level filtering on road units corresponding to the target road type based on a fast geometric matching rule to obtain a first candidate road unit set, wherein the fast geometric matching rule includes at least one of directional continuity constraints, scale adaptability constraints, and lane number compatibility constraints; performing a second-level filtering on the first candidate road unit set based on a topology rationality depth evaluation rule to obtain a second candidate road unit set, wherein the topology rationality depth evaluation rule includes at least one of connection smoothness evaluation, network integrity evaluation, and traffic feasibility evaluation; and performing a third-level filtering on the second candidate road units based on a weighted comprehensive scoring selection rule to obtain multiple target road units, wherein the weighted comprehensive scoring selection rule includes at least one of typicality score, diversity score, and randomness score.

[0059] Furthermore, the step of performing a third-level screening on the second candidate road units based on the weighted comprehensive scoring selection rule to obtain the target simulation map includes: performing multi-factor weighted scoring on each candidate road unit in the second candidate road units to determine the weighted comprehensive score of each candidate road unit in the second candidate road units; calculating the selection probability of each candidate road unit in the second candidate road unit set based on the weighted comprehensive score of each candidate road unit in the second candidate road units; and determining multiple target road units from the second candidate road unit set based on the selection probability using a roulette wheel algorithm.

[0060] In this embodiment, the first candidate road unit set is the road units remaining after filtering all road units corresponding to the target road type using a fast geometric matching rule (first-level filtering). The fast geometric matching rule refers to quickly filtering mismatched road units based on boundary point geometric constraints (e.g., in the case of a straight two-lane road, avoiding matching road units from the road type library that are directly connected to a three-lane map or have opposite directions).

[0061] The fast geometric matching rule can filter road units from multiple aspects to obtain the first candidate road unit set. Firstly, directional continuity constraint: only road units corresponding to the target road type whose starting direction deviates from the exit direction of the boundary point by more than ±30° are selected (e.g., road units with an angle range of ±15° are allowed). Secondly, scale adaptability constraint: road units corresponding to the target road type whose length exceeds three times the average length of the road before and after the boundary point (e.g., if the average is 100 meters, exclude >300 meters) or is less than one-third (e.g., <33 meters) are excluded. Thirdly, lane number compatibility constraint: road units corresponding to the target road type whose starting lane number differs from the boundary point lane number by more than 1 are excluded (e.g., if the boundary point has 2 lanes, exclude 3-lane units).

[0062] The second candidate road unit set consists of the road units remaining after filtering the second candidate road unit set using the topology rationality depth evaluation rule (second-level screening). The topology rationality depth evaluation rule refers to performing a topology evaluation on the road units in the first candidate road unit set.

[0063] The topology rationality assessment rule can filter road units in the first candidate road unit set from multiple aspects to obtain the second candidate road unit set. Firstly, it assesses connectivity smoothness: evaluating the connectivity probability between the endpoint of a road unit in the second candidate road unit set and potential subsequent units (e.g., the endpoint of a branch road unit must be able to connect to other branch roads or main roads). Secondly, it assesses network integrity: avoiding the generation of dead ends or isolated road segments that cannot form closed loops (e.g., ensuring that the endpoint of a unit can connect to other roads). Thirdly, it assesses traffic feasibility: ensuring that lane width, gradient, etc., meet vehicle traffic requirements.

[0064] The target road units are the remaining road units after filtering the second candidate road unit set through a weighted comprehensive scoring selection rule (i.e., the third-level screening). The weighted comprehensive scoring selection rule refers to applying a multi-factor (which may include typicality, diversity, and randomness) weighted score to the road units in the second candidate road unit set.

[0065] The weighted comprehensive scoring selection rule can filter road units in the second candidate road unit set based on multiple scoring factors to obtain the target simulation map. The first scoring factor, typicality score (weight 30%), is based on the unit's position in the cluster; the closer to the cluster center, the higher the score (e.g., the closer to the cluster center, the higher the score). The second scoring factor, diversity score (weight 30%), is based on recent usage frequency; the less frequently used, the higher the score (e.g., units not used in the past 5 times receive a higher score). The third scoring factor, randomness score (weight 40%), introduces a random factor to avoid selecting overly deterministic elements (e.g., random perturbation scores).

[0066] Furthermore, based on the aforementioned three scoring factors, the weighted comprehensive score of each road unit in the second candidate road unit set is calculated. For example: Unit A: Typicality 0.8×30% + Diversity 0.7×30% + Randomness 0.6×40% = 69 points.

[0067] After calculating the weighted composite score of each road unit in the second candidate road unit set, the selection probability of each road unit can be further calculated. The calculation formula is: P_i = (score_i)^k / Σ(score_j)^k; where k is the selection sharpness parameter (k>1 favors high-scoring units, k<1 increases randomness). For example: the probability of unit A is 69^1.5 / (69^1.5 + 65^1.5) ≈ 0.52.

[0068] After calculating the selection probability of each road unit in the second candidate road unit set, the roulette wheel algorithm can be used for the final selection to generate the target simulation map.

[0069] Special Circumstances Explanation: Strategies for dealing with insufficient candidate sets: If there are fewer than 3 candidate road units after screening, relax the geometric constraints (e.g., allow the length range to be expanded to 50-300 meters) and re-screen; if still insufficient, activate the parametric deformation mechanism to adaptively modify similar road units (e.g., adjust the curvature or connection type); as a last resort, allow cross-type selection (e.g., select main road units when there are insufficient branch road units), but record this abnormal selection.

[0070] Continuity guarantee mechanism: Record the reasons (such as "geometric constraints passed", "topology evaluation passed") and parameters (such as k value, weight) for each selection decision to form a selection chain; when similar road units are selected multiple times in a row, the diversity weight is automatically increased (such as from 30% to 40%); establish selection history analysis to avoid getting trapped in local optimum selection mode.

[0071] Add the selected cell (such as cell A) to the boundary of the simulation map to expand the road network and generate the target simulation map.

[0072] DBSCAN clustering is responsible for inducing reasonable road patterns from the real world, while the configurable probabilistic selection algorithm gives users the ability to perform deductive and orientation testing. The combination of these two makes the dynamically generated roads both realistic and controllable, greatly enhancing the practical value of simulation testing.

[0073] Step S240: Calculate the rationality score of the target simulation map using the Monte Carlo algorithm.

[0074] In this embodiment, the Monte Carlo method is used to evaluate the probability Pi of road existence in the generated simulation map. A large-scale sample evaluation of the generated map is performed to calculate its "reasonableness score." For example, it checks for "dead loop roads" or "unconnectable intersections" to ensure the generated scenario is usable. This step ensures the reasonableness and realism of the generated map while also providing diversity, filtering out illogical road connection methods. If unreasonable, a dynamic road random generation algorithm is then executed.

[0075] Step S250: If the rationality score is greater than the preset score, the rationality verification of the target simulation map is determined to be passed.

[0076] In this embodiment of the application, the preset score is a pre-set maximum reasonableness score that represents the unreasonable selection of road units.

[0077] After calculating the rationality score of each road unit in the target simulation map, the rationality score of each road unit can be compared with the preset score. If the rationality score of each road unit in the target simulation map is greater than the preset score, the rationality verification of the target simulation map can be determined to be passed; otherwise, the rationality verification of the target simulation map can be determined to be failed.

[0078] Step S260: Generate a dynamic traffic flow that conforms to the target simulation map based on the vehicle's operating status.

[0079] This application provides a map generation method that can preset road feature probabilities according to different test scenario requirements, thereby specifically increasing the probability of corresponding road conditions occurring during simulation testing. Based on a road feature statistical model and a random generation algorithm, it can create a large number of diverse road topologies, better covering long-tail scenarios in autonomous driving testing.

[0080] Please see Figure 3 This application provides a map generation device 300, which includes: The acquisition unit 310 is used for a road model library, which includes multiple road types obtained by clustering basic road data and the probability of each road type.

[0081] In one approach, the acquisition unit 310 is specifically used to perform cluster analysis on the basic road data using a preset clustering algorithm to obtain the road model library.

[0082] The map generation unit 320 is used to dynamically generate a target simulation map based on the road model library when the map expansion conditions are detected. The target simulation map includes multiple target road units determined based on three-level filtering rules.

[0083] In one approach, the map generation unit 320 is specifically used to obtain the current vehicle's location information; if it is determined based on the location information that the distance between the vehicle and the current simulation map boundary is less than a preset threshold, it is determined that the map expansion condition is met, and a target simulation map is dynamically generated based on the road model library.

[0084] Furthermore, the map generation unit 320 is specifically used to determine the target road type from the multiple road types based on the probability of each road type; and to filter the road units corresponding to the target road type based on a three-level filtering rule to obtain the target road units as part of the target simulation map.

[0085] Optionally, the map generation unit 320 is specifically used to perform a first-level screening of road units corresponding to the target road type based on fast geometric matching rules to obtain a first candidate road unit set. The fast geometric matching rules include at least one of directional continuity constraints, scale adaptability constraints, and lane number compatibility constraints. Based on topological rationality depth evaluation rules, the first candidate road unit set is screened in a second level to obtain a second candidate road unit set. The topological rationality depth evaluation rules include at least one of connection smoothness evaluation, network integrity evaluation, and traffic feasibility evaluation. Based on weighted comprehensive scoring selection rules, the second candidate road units are screened in a third level to obtain multiple target road units. The weighted comprehensive scoring selection rules include at least one of typicality score, diversity score, and randomness score.

[0086] Optionally, the map generation unit 320 is specifically used to perform multi-factor weighted scoring on each candidate road unit in the second candidate road unit to determine the weighted comprehensive score of each candidate road unit in the second candidate road unit; based on the weighted comprehensive score of each candidate road unit in the second candidate road unit, calculate the selection probability of each candidate road unit in the second candidate road unit set; and based on the selection probability, determine multiple target road units from the second candidate road unit set using a roulette wheel algorithm.

[0087] Traffic flow generation unit 330 is used to generate dynamic traffic flow that conforms to the target simulation map based on the vehicle's operating status if the rationality verification of the target simulation map is passed.

[0088] In one approach, the traffic flow generation unit 330 is specifically used to calculate the rationality score of the target simulation map using the Monte Carlo algorithm; if the rationality score is greater than a preset score, the rationality verification of the target simulation map is determined to be passed; and dynamic traffic flow conforming to the target simulation map is generated based on the vehicle's operating status.

[0089] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.

[0090] The following will combine Figure 4 This application describes one type of vehicle.

[0091] Please see Figure 4 Based on the aforementioned map generation method and apparatus, this application embodiment also provides another vehicle or electronic device 800 capable of executing the aforementioned map generation method. The vehicle or electronic device 800 includes one or more (only one shown in the figure) processors 802, a memory 804, and a network module 806 coupled together. The memory 804 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 802 can execute the programs stored in the memory 804.

[0092] The processor 802 may include one or more processing cores. The processor 802 connects to various parts within the vehicle or electronic device 800 via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in the memory 804, and calling data stored in the memory 804 to perform various functions and process data within the vehicle or electronic device 800. Optionally, the processor 802 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 802 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 802 and may be implemented separately using a communication chip.

[0093] The memory 804 may include random access memory (RAM) or read-only memory (ROM). The memory 804 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 804 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created during the use of the vehicle or electronic device 800 (such as phonebooks, audio and video data, chat log data, etc.).

[0094] The network module 806 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as communicating with vehicles. The network module 806 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM cards), memory, etc. The network module 806 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices through wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). For example, the network module 806 can exchange information with base stations.

[0095] Please refer to Figure 4 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 900 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0096] The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 910 may, for example, be compressed in a suitable form.

[0097] This application provides a map generation method, apparatus, vehicle, and storage medium. First, a road model library is acquired, which includes various road types obtained by clustering basic road data and the probability of each road type. When map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. The target simulation map includes multiple target road units determined based on a three-level screening rule. Through this method, seamless and continuous testing is achieved by dynamically generating maps in real time, avoiding interruptions caused by frequent map switching during testing and improving testing efficiency.

[0098] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A map generation method, characterized in that, The method includes: Obtain a road model library, which includes multiple road types obtained by clustering basic road data and the probability of each road type; When the map expansion conditions are met, a target simulation map is dynamically generated based on the road model library. The target simulation map includes multiple target road units determined based on a three-level filtering rule.

2. The method according to claim 1, characterized in that, When the map expansion conditions are detected, the process of dynamically generating a target simulation map based on the road model library includes: Obtain the current vehicle's location information; If, based on the location information, it is determined that the distance between the vehicle and the current simulation map boundary is less than a preset threshold, the map expansion condition is met, and a target simulation map is dynamically generated based on the road model library.

3. The method according to claim 1 or 2, characterized in that, The dynamic generation of the target simulation map based on the road model library includes: Based on the probability of each road type, the target road type is determined from the multiple road types; The road units corresponding to the target road type are filtered based on a three-level filtering rule to obtain the target road units as part of the target simulation map.

4. The method according to claim 3, characterized in that, The process of filtering road units corresponding to the target road type based on a three-level filtering rule to obtain target road units as part of the target simulation map includes: Based on the fast geometric matching rules, the road units corresponding to the target road type are screened at the first level to obtain the first candidate road unit set. The fast geometric matching rules include at least one of the following: directional continuity constraints, scale adaptability constraints, and lane number compatibility constraints. Based on the topology rationality deep evaluation rules, the first candidate road unit set is subjected to a second-level screening to obtain the second candidate road unit set. The topology rationality deep evaluation rules include at least one of connection smoothness evaluation, network integrity evaluation, and traffic feasibility evaluation. Based on the weighted comprehensive scoring selection rule, the second candidate road unit is subjected to a third-level screening to obtain multiple target road units. The weighted comprehensive scoring selection rule includes at least one of typicality score, diversity score and randomness score.

5. The method according to claim 4, characterized in that, The weighted comprehensive scoring selection rule is used to perform a third-level screening on the second candidate road units, resulting in multiple target road units, including: A multi-factor weighted score is applied to each candidate road unit in the second candidate road unit to determine the weighted comprehensive score of each candidate road unit in the second candidate road unit; Based on the weighted comprehensive score of each candidate road unit in the second candidate road unit set, the selection probability of each candidate road unit in the second candidate road unit set is calculated; Based on the selection probability, multiple target road units are determined from the second candidate road unit set using the roulette wheel algorithm.

6. The method according to claim 1, characterized in that, The method further includes: If the rationality verification of the target simulation map is passed, a dynamic traffic flow that conforms to the target simulation map is generated based on the vehicle's operating status.

7. A map generation device, characterized in that, The device includes: An acquisition unit is used to acquire a road model library, which includes multiple road types obtained by clustering basic road data and the probability of each road type. The map generation unit is used to dynamically generate a target simulation map based on the road model library when the map expansion conditions are detected. The target simulation map includes multiple target road units determined based on three-level filtering rules.

8. A vehicle, characterized in that, Including processor and memory, among which Memory, used to store computer programs; A processor for executing a program stored in memory to implement the method described in any one of claims 1-6.

9. An electronic device, characterized in that, Including processor and memory, among which Memory, used to store computer programs; A processor for executing a program stored in memory to implement the method described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.