CN116383451A - Map segmentation method and device, electronic equipment and storage medium - Google Patents

Map segmentation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116383451A
CN116383451A CN202310658601.0A CN202310658601A CN116383451A CN 116383451 A CN116383451 A CN 116383451A CN 202310658601 A CN202310658601 A CN 202310658601A CN 116383451 A CN116383451 A CN 116383451A
Authority
CN
China
Prior art keywords
filled
sub
connection point
graph
road
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310658601.0A
Other languages
Chinese (zh)
Other versions
CN116383451B (en
Inventor
胡大林
叶云飞
杨强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Saimu Technology Co ltd
Original Assignee
Beijing Saimu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Saimu Technology Co ltd filed Critical Beijing Saimu Technology Co ltd
Priority to CN202310658601.0A priority Critical patent/CN116383451B/en
Publication of CN116383451A publication Critical patent/CN116383451A/en
Application granted granted Critical
Publication of CN116383451B publication Critical patent/CN116383451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a map segmentation method, a map segmentation device, electronic equipment and a storage medium, and relates to the technical field of map segmentation, comprising the following steps: for each sub-graph to be filled, the following processing is performed: determining a first difference set between a first connection point set and a second connection point set corresponding to the sub-graph to be filled; determining a target connection point from the first set of differences; filling the multi-item mark road corresponding to the target connection point in the road set to be divided into the sub-map to be filled, and deleting the multi-item mark road from the road set to be divided; constraining the roads in the sub-graph to be filled by using preset constraint conditions to finish filling the sub-graph to be filled; and finishing the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled. The road in the map is split in the subgraph mode through the integral relation between the connecting point and the road, so that the road topological structure integrity is guaranteed, and the segmentation efficiency is improved.

Description

Map segmentation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of map segmentation technologies, and in particular, to a map segmentation method, a device, an electronic device, and a storage medium.
Background
Map segmentation refers to the process of dividing a large-scale map data set or picture into many small blocks, and in map applications, map segmentation can help users load and view map data more quickly, while also facilitating processing and analysis of the map data.
The map segmentation method in the prior art mainly comprises the following steps:
gridding map segmentation algorithm: the map is divided into rectangular grids of fixed size, each grid typically containing the same number of pixels or geographic cells.
Navigation mesh (navigation mesh) algorithm: a complex three-dimensional space map is partitioned into one or more convex polygon areas that can be used for path planning for efficient navigation.
Graph-based road network partitioning algorithm: the graph is divided into a plurality of connected subgraphs by using a segmentation algorithm of the graph, and each subgraph represents a divided subarea.
For the gridding map segmentation algorithm and the navigation grid algorithm: the road integrity is damaged by utilizing grid division, the world coordinates of each point on the road are not given by the Opendrive format map, the conversion calculation amount is large, and the segmentation efficiency is reduced;
for graph-based road network division algorithms, only the road junction (junction) is used as a vertex for division, and the processed object is used as a vertex, so that the road integrity is also destroyed.
Disclosure of Invention
In view of this, an object of the present application is to provide at least a method, an apparatus, an electronic device, and a storage medium for dividing a map, wherein the method and the apparatus divide a road in the map in a sub-graph manner through an overall relationship between a connection point and the road, so as to ensure the integrity of a road topology structure and improve the dividing efficiency.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a map segmentation method, including: acquiring a to-be-divided road set, a to-be-divided connection point set and a plurality of to-be-filled subgraphs, wherein the to-be-divided road set comprises a plurality of roads, and the to-be-divided connection point set comprises a plurality of connection points among the plurality of roads; for each sub-graph to be filled, the following processing is performed: determining a first difference set between a first connection point set and a second connection point set corresponding to the sub-graph to be filled, wherein the first connection point set comprises a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set comprises a plurality of connection points with all adjacent edges in the sub-graph to be filled; determining a target connection point from the first set of differences; filling the multi-item mark road corresponding to the target connection point in the road set to be divided into the sub-map to be filled, and deleting the multi-item mark road from the road set to be divided; constraining the roads in the sub-graph to be filled by using preset constraint conditions to finish filling the sub-graph to be filled; and finishing the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled.
In one possible embodiment, the step of determining the target connection point from the first set of differences comprises:
judging whether the first difference set is empty; if the first difference set is empty, determining a second difference set between the to-be-divided connection point set and the first connection point set; randomly extracting a connection point from a plurality of connection points corresponding to the second difference set according to the extraction probability corresponding to each connection point in the second difference set to determine the connection point as a target connection point; if the first difference set is not empty, determining, for each connection point in the first difference set, a target number of adjacent connection points for the connection point in the second difference set; the connection point in the first difference set with the smallest number of target adjacent connection points is determined as the target connection point.
In one possible implementation manner, the target roads include a first target road and a second target road, wherein a plurality of target roads corresponding to target connection points in the road set to be divided are filled into each sub-graph to be filled by the following ways: respectively merging the target connection points corresponding to the sub-graph to be filled into a first connection point set and a second connection point set; merging a plurality of target adjacent connection points corresponding to the target connection points into a first connection point set; and for each target adjacent connection point, merging a first target road corresponding to the target adjacent connection point and the target connection point and a second target road corresponding to the target adjacent connection point and each connection point in the first connection point set into the sub-graph to be filled.
In one possible implementation manner, the step of constraining the road in the sub-graph to be filled by using a preset constraint condition to complete filling of the sub-graph to be filled includes: obtaining the number of roads and the weight sum of the roads corresponding to the subgraph to be filled; respectively judging whether the number of roads corresponding to the sub-graph to be filled is smaller than a preset road number and a road weight sum is smaller than a first balance factor, wherein the preset road number is the ratio between the product of a second balance factor and the total road number corresponding to the map to be processed and the number of the sub-graph to be filled; if the number of roads corresponding to the sub-graph to be filled is smaller than the preset road number, the road weight and the first balance factor, determining that the sub-graph to be filled meets the preset constraint condition, and returning to execute the first difference set to determine a target connection point; if the number of roads corresponding to the sub-graph to be filled is greater than the preset road number and/or the road weight sum is greater than the first balance factor, determining that the sub-graph to be filled does not meet the preset constraint condition, and completing filling of the sub-graph to be filled.
In one possible implementation, after completing the filling of each sub-graph to be filled, the method further includes: judging whether the road set to be divided is empty or not; if the road set to be divided is empty, directly completing the segmentation processing of the map to be processed; and if the road set to be divided is not empty, reassigning the rest roads in the road set to be divided until the road set to be divided is empty.
In one possible embodiment, the remaining roads in the set of roads to be divided are reassigned by: if the first difference set corresponding to each sub-graph to be filled is empty, randomly selecting one sub-graph to be filled from the plurality of sub-graphs to be filled, and randomly selecting one connection point to be filled from all connection points contained in the rest roads of the road set to be divided; and filling the multi-item mark roads corresponding to the target connection points in the road set to be divided into target sub-images to be filled.
In one possible implementation, for each sub-graph to be filled, the following process is performed: and if the first difference set corresponding to the sub-graph to be filled is not empty, determining a target connection point from the first difference set so as to fill the multi-item target road corresponding to the target connection point in the road set to be divided into the sub-graph to be filled.
In a second aspect, an embodiment of the present application further provides a map segmentation apparatus, where the apparatus includes: the first acquisition module is used for acquiring a road set to be divided, a connection point set to be divided and a plurality of sub-graphs to be filled, wherein the road set to be divided corresponds to the map to be processed, the road set to be divided comprises a plurality of roads, and the connection point set to be divided comprises a plurality of connection points among the plurality of roads; the first determining module is used for determining a first difference set between a first connection point set and a second connection point set corresponding to each sub-graph to be filled, wherein the first connection point set comprises a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set comprises a plurality of connection points with all adjacent edges in the sub-graph to be filled; the second determining module is used for determining a target connection point from the first difference set aiming at each sub-graph to be filled; the first filling module is used for filling the multi-item mark roads corresponding to the target connection points in the road set to be divided into the sub-images to be filled according to each sub-image to be filled, and deleting the multi-item mark roads from the road set to be divided; the constraint module is used for constraining the roads in each sub-graph to be filled by utilizing preset constraint conditions so as to finish filling the sub-graph to be filled; and the second filling module is used for completing the segmentation processing of the map to be processed by the filled multiple sub-images to be filled.
In a third aspect, embodiments of the present application further provide an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the map segmentation method as described in the first aspect or any of the possible implementation manners of the first aspect.
In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, on which a computer program is stored, which when executed by a processor performs the steps of the map segmentation method described in the first aspect or any of the possible implementation manners of the first aspect.
The embodiment of the application provides a map segmentation method, a map segmentation device, electronic equipment and a storage medium, which comprise the following steps: for each sub-graph to be filled, the following processing is performed: determining a first difference set between a first connection point set and a second connection point set corresponding to the sub-graph to be filled; determining a target connection point from the first set of differences; filling the multi-item mark road corresponding to the target connection point in the road set to be divided into the sub-map to be filled, and deleting the multi-item mark road from the road set to be divided; constraining the roads in the sub-graph to be filled by using preset constraint conditions to finish filling the sub-graph to be filled; and finishing the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled. The road in the map is split in the subgraph mode through the integral relation between the connecting point and the road, so that the road topological structure integrity is guaranteed, and the segmentation efficiency is improved.
The application has the advantages that:
1. the rapid processing of the map data in the Opendrive format is realized, and the map segmentation efficiency is improved;
2. maintaining road integrity and road topology integrity (e.g., intersections tend to be divided on the same map);
3. and ensuring the load balance of the split small map.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a map segmentation method provided in an embodiment of the present application;
FIG. 2 shows a schematic diagram of a G (V, E) format provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a map segmentation device according to an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this application, illustrates operations implemented according to some embodiments of the present application. It should be appreciated that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to the flow diagrams and one or more operations may be removed from the flow diagrams as directed by those skilled in the art.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
For an environmental vehicle of 10 ten thousand units of traffic flow/virtual city to run on a map, simulation software needs to divide the map for performance reasons to simulate rendering in parallel. The specific description is as follows: given an arbitrary large map (such as an Opendrive standard format), the map is uniformly divided into K sub-graphs, so that points at any position (the position of a traffic vehicle given by software such as Vissim) can quickly query the number of the sub-graph where the map is located.
In the prior art, the research work of the map segmentation algorithm is mainly divided into the following methods:
1. gridding map segmentation algorithm: is a common map segmentation method that segments a map into multiple regular grids for efficient data loading and processing. The algorithm generally includes the steps of: gridding, dividing the map into rectangular grids of fixed size, each grid typically containing the same number of pixels or geographic cells; grid index: each grid is numbered and an index table is built to quickly access the data of each grid.
2. Navigation grid algorithm: the map segmentation algorithm is used for the fields of game development, robot navigation, virtual reality and the like, and mainly aims to segment a complex three-dimensional space map into one or more convex polygon areas which can be used for path planning so as to perform efficient navigation.
3. Graph-based road network partitioning algorithm: an algorithm for dividing a road grid into subregions with certain attributes is characterized in that the road grid is expressed as a graph by using a graph theory method, the road grid is divided into a plurality of connected subgraphs by using a graph dividing algorithm, and each subgraph represents a divided subregion. Ali Kemal Sinop first aggregates the highly connected road ports by performing random walk, and then uniformly partitions the road network into two parts using inertial flow algorithm.
Map segmentation by a gridding algorithm/navigation grid, the drawbacks of which include:
the Opendrive format map does not give world coordinates of each point on the road, and the conversion calculation amount is large;
b. grid division will destroy the road integrity, and the environmental vehicle jumps back and forth between different small maps;
c. it is difficult to control traffic flow of different grids, creating a data imbalance problem.
The road network dividing algorithm based on the graph has the following defects:
A. dividing by using a road connection point (junction) as a vertex, and damaging the integrity of the road by using a processed object as the vertex;
B. focusing on road communication among different divided areas, and not restricting the load and flow in the same area;
C. the different areas after division can generate larger differences (such as road number and other information).
Based on this, the embodiment of the application provides a map segmentation method, a device, an electronic device and a storage medium, wherein the sub-graph splitting is performed on the road in the map through the integral relation between the connection point and the road, so that the road topological structure integrity is ensured, the segmentation efficiency is improved, and the method specifically comprises the following steps:
referring to fig. 1, fig. 1 shows a flowchart of a map segmentation method according to an embodiment of the present application. As shown in fig. 1, the map segmentation method provided in the embodiment of the present application includes the following steps:
s100, acquiring a road set to be divided, a connection point set to be divided and a plurality of sub-graphs to be filled, which correspond to a map to be processed.
In the application, the map to be processed is in an Opendrive format, the map to be processed in the Opendrive format can be converted into a data format of a graph G (V, E) according to a connection point (connection) attribute and a road attribute,
Figure SMS_1
representing a set of connection points to be divided, E representing a set of roads to be divided, the set of roads to be divided E comprising a plurality of roads, the set of connection points to be divided +.>
Figure SMS_2
Including multiple connection points between multiple roads.
According to the method and the device, the map is directly segmented based on the Opendrive format, so that the data conversion cost is reduced, and the segmentation efficiency is improved.
Referring to fig. 2, fig. 2 shows a schematic diagram of a G (V, E) format according to an embodiment of the present application. In FIG. 2, the road system comprises a plurality of roads L1-L12 and a plurality of connection points T1-T12 corresponding to the roads L1-L12.
S200, determining a first difference set between a first connection point set and a second connection point set corresponding to each sub-graph to be filled.
The first connection point set comprises a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set comprises a plurality of connection points with all adjacent edges in the sub-graph to be filled.
In one embodiment, for the first
Figure SMS_4
First connection point set corresponding to sub-graph to be filled +.>
Figure SMS_8
Wherein->
Figure SMS_11
Indicate->
Figure SMS_5
Opening a road set in a sub-graph to be filled, +.>
Figure SMS_7
I.e. indicate the overlay->
Figure SMS_10
First connection point set formed by a plurality of connection points of all roads in the sub-map to be filled +.>
Figure SMS_12
,/>
Figure SMS_3
Then indicate +.>
Figure SMS_6
The second set of connection points corresponding to the sub-graph to be filled, the first difference set can be expressed as +.>
Figure SMS_9
In the embodiment, if the first
Figure SMS_13
First connection point set corresponding to sub-graph to be filled +.>
Figure SMS_14
All roads in->
Figure SMS_15
Comprises a road L1, a road L2 and a road L3, and a first connection point set +.>
Figure SMS_16
Comprising a connection point T1, a connection point T2, a connection point T3 and a connection point T4, a second connection point set +.>
Figure SMS_17
Including connection point T1, connection point T2, and connection point T3, then the first difference set includes connection point T4.
In the application, after a plurality of sub-images to be filled are obtained, a first connection point set, a second connection point set and a road set corresponding to each sub-image to be filled are initialized to be empty, and then each sub-image to be filled is filled.
S300, determining target connection points from the first difference set for each sub-graph to be filled.
In a preferred embodiment, the step of determining the target connection point from the first set of differences comprises:
and judging whether the first difference set is empty, if the first difference set is empty, determining a second difference set between the to-be-divided connection point set and the first connection point set, and randomly extracting a connection point from a plurality of connection points corresponding to the second difference set according to the extraction probability corresponding to each connection point in the second difference set to determine the connection point as a target connection point.
Specifically, if the first difference set corresponding to the sub-graph to be filled is empty, it is stated that, for each connection point in the sub-graph to be filled, all adjacent edges related to the connection point are in the sub-graph to be filled or the sub-graph to be filled is not yet filled at the moment, at this moment, one needs to be extracted from the second difference set between the connection point set to be divided and the first connection point set as a target connection point, where the extraction probability = corresponding to each connection point in the second difference set
Figure SMS_18
Figure SMS_19
Representing the number of contiguous connection points of the connection point T.
If the first difference set is not empty, determining the number of target adjacent connection points of the connection point in the second difference set for each connection point in the first difference set, and determining the connection point with the minimum number of target adjacent connection points in the first difference set as the target connection point.
Wherein for each connection point in the first difference set, a portion of its corresponding plurality of adjacent connection points may already exist in the first difference set, and the target adjacent connection point refers to an adjacent connection point existing in the second difference set, and the intersection between the first difference set and the second difference set is always empty.
If at first
Figure SMS_20
First connection point set corresponding to sub-graph to be filled +.>
Figure SMS_21
Comprising a junction T6 and a junction T7, a second junction set +.>
Figure SMS_22
If the first difference set is empty, the first difference set includes a connection point T6 and a connection point T7, i.e., the first difference set is not empty, the number of adjacent connection points corresponding to the connection point T6 is 1, the number of target adjacent connection points is also 1, the number of adjacent connection points corresponding to the connection point T7 is 2, the number of target adjacent connection points is also 2, and the connection is then performedThe junction T6 is determined as the target junction.
S400, filling the multi-item target roads corresponding to the target connection points in the road set to be divided into the sub-map to be filled according to each sub-map to be filled, and deleting the multi-item target roads from the road set to be divided.
In a preferred embodiment, the target roads include a first target road and a second target road, and the multiple target roads corresponding to the target connection points in the road set to be divided are filled into each sub-graph to be filled by:
and respectively merging the target connection points corresponding to the sub-graph to be filled into a first connection point set and a second connection point set, merging a plurality of target adjacent connection points corresponding to the target connection points into the first connection point set, and merging a first target road corresponding to each target adjacent connection point and each target connection point and a second target road corresponding to each target adjacent connection point and each connection point in the first connection point set into the sub-graph to be filled.
Specifically, after the multiple target adjacent connection points are integrated into the first connection point set, at this time, for each target adjacent connection point, if a road exists between each connection point in the target connection point or the first connection point set and the target adjacent connection point, the road is added to the road set corresponding to the sub-graph to be filled, that is, each time the target connection point is added to the second connection point set, all the roads (including the first target road and the second target road) related to the target connection point are also added to the road set corresponding to the sub-graph to be filled, so that the topology structure of the road intersection is helped to be maintained.
As in the above embodiment, for the target connection point T6, the target adjacent connection point T5 corresponding to the target connection point T6 is incorporated into the first
Figure SMS_23
In the sub-graph to be filled, T5 is simultaneously incorporated in the +.>
Figure SMS_24
Sub-graph to be filledCorresponding first set of connection points +.>
Figure SMS_25
And a second set of connection points->
Figure SMS_26
Then the road L5 between the target adjacent connection points T5 corresponding to the target connection point T6 is incorporated +.>
Figure SMS_27
Road set corresponding to sub-graph to be filled>
Figure SMS_28
Is a kind of medium.
S500, restraining the roads in each sub-graph to be filled by using preset constraint conditions so as to finish filling the sub-graph to be filled.
In a preferred embodiment, step S500 includes:
acquiring the number of roads and the sum of road weights corresponding to the sub-graph to be filled, respectively judging whether the number of roads and the sum of road weights corresponding to the sub-graph to be filled are smaller than a preset road number and a first balance factor, if the number of roads corresponding to the sub-graph to be filled is smaller than the preset road number, the sum of road weights and the first balance factor, determining that the sub-graph to be filled meets a preset constraint condition, and returning to execute the sub-graph to be filled from the first difference set to determine a target connection point; if the number of roads corresponding to the sub-graph to be filled is greater than the preset road number and/or the road weight sum is greater than the first balance factor, determining that the sub-graph to be filled does not meet the preset constraint condition, and completing filling of the sub-graph to be filled.
The preset road number is the ratio between the product of the second equalization factor and the total road number corresponding to the map to be processed and the number of sub-images to be filled, specifically, for the ith sub-image to be filled, the constraint corresponding to the preset road number can be expressed as judgment:
Figure SMS_29
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_30
representing the number of roads in the ith sub-graph to be filled, < +.>
Figure SMS_31
The number of the preset road ways is indicated,
Figure SMS_32
representing a second equalization factor, ">
Figure SMS_33
And the number of the total road corresponding to the map to be processed is represented, and K represents the number of the subgraphs to be filled.
For road weights and corresponding constraints, this can be expressed as a decision:
Figure SMS_34
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_35
representing the weight corresponding to the road between the connection point m and the connection point n in the ith sub-graph to be filled,
Figure SMS_36
the road weight sum corresponding to the road set representing the ith sub-graph to be filled, +.>
Figure SMS_37
Representing a first equalization factor.
If the sub-graph to be filled meets the preset constraint condition, the method can return to the step S300 if the space available for filling exists in the sub-graph to be filled, and if the sub-graph to be filled does not meet the preset constraint condition, the method can finish filling of the sub-graph to be filled.
According to the method and the device, through the constraint condition, the sub-graph to be filled obtained through final segmentation can be ensured to be in a load balance state.
In a preferred embodiment, after completing the filling of each sub-graph to be filled, the method further comprises:
judging whether the road set to be divided is empty or not, if the road set to be divided is empty, directly completing the segmentation processing of the map to be processed, and if the road set to be divided is not empty, reassigning the rest roads in the road set to be divided until the road set to be divided is empty.
After all the sub-graphs to be filled meet the corresponding preset constraint conditions, unallocated roads may still exist in the road set to be divided, and division and complementation are needed for the unallocated roads, namely the unallocated roads are divided into the corresponding sub-graphs to be filled, so that the allocation of all the roads in the map to be processed is completed.
In another preferred embodiment, the remaining roads in the set of roads to be divided are reassigned by:
and if the first difference set corresponding to each sub-graph to be filled is empty, randomly selecting one sub-graph to be filled which is determined to be a target sub-graph to be filled from the plurality of sub-graphs to be filled, randomly selecting one connection point which is determined to be a target connection point from all connection points contained in the rest roads of the road set to be divided, and filling the multi-item target roads corresponding to the target connection points in the road set to be divided into the target sub-graph to be filled.
In a preferred embodiment, for each sub-graph to be filled, the following is performed:
and if the first difference set corresponding to the sub-graph to be filled is not empty, executing to determine a target connection point from the first difference set so as to fill the multi-item target road corresponding to the target connection point in the road set to be divided into the sub-graph to be filled.
Specifically, if the sub-graph to be filled does not meet the preset constraint condition and the first difference set is not empty, all roads corresponding to the connection points in the first difference set are integrated into the sub-graph to be filled under the condition that the preset constraint condition is not considered, so that the integrity of the sub-graph to be filled is ensured.
S600, completing the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled.
Based on the same application conception, the embodiment of the application also provides a map segmentation device corresponding to the map segmentation method provided by the embodiment, and because the principle of solving the problem by the device in the embodiment of the application is similar to that of the map segmentation method of the embodiment of the application, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a map segmentation apparatus according to an embodiment of the present application. As shown in fig. 3, the map dividing apparatus includes:
the first obtaining module 700 is configured to obtain a to-be-divided road set, a to-be-divided connection point set and a plurality of to-be-filled subgraphs, where the to-be-divided road set corresponds to the to-be-processed map, and the to-be-divided connection point set includes a plurality of roads and a plurality of connection points between the plurality of roads.
The first determining module 710 is configured to determine, for each sub-graph to be filled, a first difference set between a first connection point set and a second connection point set corresponding to the sub-graph to be filled, where the first connection point set includes a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set includes a plurality of connection points where all adjacent edges are in the sub-graph to be filled.
A second determining module 720, configured to determine, for each sub-graph to be filled, a target connection point from the first difference set.
The first filling module 730 is configured to fill, for each sub-graph to be filled, multiple target roads corresponding to the target connection point in the road set to be divided into the sub-graph to be filled, and delete the multiple target roads from the road set to be divided.
The constraint module 740 is configured to constrain, for each sub-graph to be filled, a road in the sub-graph to be filled by using a preset constraint condition, so as to complete filling of the sub-graph to be filled.
The second filling module 750 completes the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled.
Preferably, the second determining module 720 is further configured to: judging whether the first difference set is empty;
if the first difference set is empty, a second difference set between the to-be-divided connection point set and the first connection point set is determined, and according to the extraction probability corresponding to each connection point in the second difference set, a connection point is randomly extracted from a plurality of connection points corresponding to the second difference set to be determined as a target connection point;
if the first difference set is not empty, determining the number of target adjacent connection points of the connection point in the second difference set for each connection point in the first difference set, and determining the connection point with the minimum number of target adjacent connection points in the first difference set as the target connection point.
Preferably, the target link includes a first target link and a second target link, and the first filling module 730 is further configured to:
respectively merging target connection points corresponding to the sub-graph to be filled into a first connection point set and a second connection point set, and merging a plurality of target adjacent connection points corresponding to the target connection points into the first connection point set; and for each target adjacent connection point, merging a first target road corresponding to the target adjacent connection point and the target connection point and a second target road corresponding to the target adjacent connection point and each connection point in the first connection point set into the sub-graph to be filled.
Preferably, the constraint module 740 is further configured to:
obtaining the number of roads and the weight sum of the roads corresponding to the subgraph to be filled;
and respectively judging whether the number of roads corresponding to the sub-image to be filled is smaller than a preset road number and a road weight sum and smaller than a first balance factor, wherein the preset road number is the ratio between the product of the second balance factor and the total road number corresponding to the map to be processed and the number of the sub-image to be filled, if the number of roads corresponding to the sub-image to be filled is smaller than the preset road number, the road weight sum and smaller than the first balance factor, determining that the sub-image to be filled meets the preset constraint condition, returning to execute the first difference set, determining a target connection point, and if the number of roads corresponding to the sub-image to be filled is larger than the preset road number and/or the road weight sum and larger than the first balance factor, determining that the sub-image to be filled does not meet the preset constraint condition, and finishing filling the sub-image to be filled.
The map segmentation apparatus further includes a segmentation completion module (not shown in the figure) for:
judging whether the road set to be divided is empty or not, if the road set to be divided is empty, directly completing the segmentation processing of the map to be processed, and if the road set to be divided is not empty, reassigning the rest roads in the road set to be divided until the road set to be divided is empty.
Preferably, the division complement module is further configured to:
if the first difference set corresponding to each sub-graph to be filled is empty, randomly selecting one sub-graph to be filled from the plurality of sub-graphs to be filled, and randomly selecting one connection point to be filled from all connection points contained in the rest roads of the road set to be divided;
and filling the multi-item mark roads corresponding to the target connection points in the road set to be divided into target sub-images to be filled.
Preferably, the division complement module is further configured to: for each sub-graph to be filled: and if the first difference set corresponding to the sub-graph to be filled is not empty, determining a target connection point from the first difference set so as to fill the multi-item target road corresponding to the target connection point in the road set to be divided into the sub-graph to be filled.
Referring to fig. 4 based on the same application concept, fig. 4 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application, where the electronic device 800 includes: a processor 810, a memory 820 and a bus 830, the memory 820 storing machine-readable instructions executable by the processor 810, the processor 810 and the memory 820 communicating via the bus 830 when the electronic device 800 is running, the machine-readable instructions being executed by the processor 810 to perform the steps of the map segmentation method as provided in the embodiments above.
Based on the same application concept, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the map segmentation method provided in the above embodiment are performed.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application may be embodied in essence or a part contributing to the prior art or a part of the technical solutions, or in the form of a software product, which is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A map segmentation method, the method comprising:
acquiring a to-be-divided road set, a to-be-divided connection point set and a plurality of to-be-filled subgraphs, wherein the to-be-divided road set comprises a plurality of roads, and the to-be-divided connection point set comprises a plurality of connection points among the plurality of roads;
for each sub-graph to be filled, the following processing is performed:
determining a first difference set between a first connection point set and a second connection point set corresponding to the sub-graph to be filled, wherein the first connection point set comprises a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set comprises a plurality of connection points with all adjacent connection edges in the sub-graph to be filled;
determining a target connection point from the first set of differences;
filling the multi-item target road corresponding to the target connection point in the road set to be divided into the sub-graph to be filled, and deleting the multi-item target road from the road set to be divided;
constraining the roads in the sub-graph to be filled by using preset constraint conditions to finish filling the sub-graph to be filled;
and finishing the segmentation processing of the map to be processed by the filled multiple sub-graphs to be filled.
2. The method of claim 1, wherein the step of determining a target connection point from the first set of differences comprises:
judging whether the first difference set is empty;
if the first difference set is empty, determining a second difference set between the to-be-divided connection point set and the first connection point set;
randomly extracting a connection point from a plurality of connection points corresponding to the second difference set according to the extraction probability corresponding to each connection point in the second difference set to determine the connection point as a target connection point;
if the first difference set is not empty, determining, for each connection point in the first difference set, a target number of adjacent connection points for the connection point in the second difference set;
and determining the connection point with the minimum number of target adjacent connection points in the first difference set as the target connection point.
3. The method of claim 2, wherein the target link comprises a first target link and a second target link,
the method comprises the following steps of filling a plurality of target roads corresponding to the target connection point in the road set to be divided into each sub-graph to be filled:
respectively merging the target connection points corresponding to the sub-graph to be filled into the first connection point set and the second connection point set;
merging a plurality of target adjacent connection points corresponding to the target connection points into the first connection point set;
and for each target adjacent connection point, merging a first target road corresponding to the target adjacent connection point and the target connection point and a second target road corresponding to the target adjacent connection point and each connection point in the first connection point set into the sub-graph to be filled.
4. The method according to claim 1, wherein the step of constraining the roads in the sub-graph to be filled with the preset constraint to complete the filling of the sub-graph to be filled comprises:
obtaining the number of roads and the weight sum of the roads corresponding to the subgraph to be filled;
respectively judging whether the number of roads corresponding to the sub-graph to be filled is smaller than a preset road number and whether the sum of the road weights is smaller than a first balance factor, wherein the preset road number is the ratio between the product of a second balance factor and the total road number corresponding to the map to be processed and the number of the sub-graph to be filled;
if the number of roads corresponding to the sub-graph to be filled is smaller than the preset road number, the road weight and the first balance factor, determining that the sub-graph to be filled meets the preset constraint condition, and returning to execute the first difference set to determine a target connection point;
if the number of roads corresponding to the sub-graph to be filled is greater than the preset number of roads and/or the sum of the road weights is greater than a first balance factor, determining that the sub-graph to be filled does not meet the preset constraint condition, and completing filling of the sub-graph to be filled.
5. The method of claim 4, wherein after completing the filling of each sub-graph to be filled, the method further comprises:
judging whether the road set to be divided is empty or not;
if the road set to be divided is empty, directly completing the segmentation processing of the map to be processed;
and if the road set to be divided is not empty, reassigning the rest roads in the road set to be divided until the road set to be divided is empty.
6. The method of claim 5, wherein the remaining roads in the set of roads to be partitioned are reassigned by:
if the first difference set corresponding to each sub-graph to be filled is empty, randomly selecting one sub-graph to be filled from a plurality of sub-graphs to be filled, and randomly selecting one connection point to be filled from all connection points contained in the rest roads of the road set to be divided, wherein the connection point is determined as a target connection point;
and filling the multi-item target road corresponding to the target connection point in the road set to be divided into the target sub-graph to be filled.
7. The method according to claim 6, characterized in that for each sub-graph to be filled the following is performed:
and if the first difference set corresponding to the sub-graph to be filled is not empty, executing the first difference set, and determining a target connection point so as to fill the multi-item target road corresponding to the target connection point in the road set to be divided into the sub-graph to be filled.
8. A map segmentation apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a road set to be divided, a connection point set to be divided and a plurality of sub-graphs to be filled, wherein the road set to be divided corresponds to a map to be processed, the road set to be divided comprises a plurality of roads, and the connection point set to be divided comprises a plurality of connection points among the plurality of roads;
the first determining module is used for determining a first difference set between a first connection point set and a second connection point set corresponding to each sub-graph to be filled, wherein the first connection point set comprises a plurality of connection points covering all roads in the sub-graph to be filled, and the second connection point set comprises a plurality of connection points with all adjacent edges in the sub-graph to be filled;
a second determining module, configured to determine, for each sub-graph to be filled, a target connection point from the first difference set;
the first filling module is used for filling the multi-item target roads corresponding to the target connection points in the road set to be divided into the sub-images to be filled for each sub-image to be filled, and deleting the multi-item target roads from the road set to be divided;
the constraint module is used for constraining the roads in each sub-graph to be filled by utilizing preset constraint conditions so as to finish filling the sub-graph to be filled;
and the second filling module is used for completing the segmentation processing of the map to be processed by the filled multiple sub-images to be filled.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the map segmentation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the map segmentation method as defined in any one of claims 1 to 7.
CN202310658601.0A 2023-06-06 2023-06-06 Map segmentation method and device, electronic equipment and storage medium Active CN116383451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310658601.0A CN116383451B (en) 2023-06-06 2023-06-06 Map segmentation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310658601.0A CN116383451B (en) 2023-06-06 2023-06-06 Map segmentation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116383451A true CN116383451A (en) 2023-07-04
CN116383451B CN116383451B (en) 2023-08-18

Family

ID=86975452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310658601.0A Active CN116383451B (en) 2023-06-06 2023-06-06 Map segmentation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116383451B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010217459A (en) * 2009-03-17 2010-09-30 Nec Corp Device, system, program, and method for managing road network diagram
CN105222793A (en) * 2015-10-23 2016-01-06 华中科技大学 A kind of city stratification region partitioning method based on map vector data model
CN107564098A (en) * 2017-08-17 2018-01-09 中山大学 A kind of Fast rendering method of big Local Area Network three-dimensional noise map
CN110083670A (en) * 2019-03-26 2019-08-02 长安大学 A kind of map grid division methods based on section density
CN110827048A (en) * 2018-08-08 2020-02-21 菜鸟智能物流控股有限公司 Geographic region segmentation method and device based on road network and electronic equipment
CN113066150A (en) * 2020-01-02 2021-07-02 沈阳美行科技有限公司 Map data processing method, device, equipment and storage medium
CN114581620A (en) * 2022-02-25 2022-06-03 腾讯科技(深圳)有限公司 Road virtual elevation generation method and device, computer equipment and storage medium
CN115408410A (en) * 2022-08-30 2022-11-29 合肥四维图新科技有限公司 Method, device and equipment for matching electronic map data and map acquisition data
CN115509141A (en) * 2022-09-13 2022-12-23 深圳市无限动力发展有限公司 Map segmentation method, device and equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010217459A (en) * 2009-03-17 2010-09-30 Nec Corp Device, system, program, and method for managing road network diagram
CN105222793A (en) * 2015-10-23 2016-01-06 华中科技大学 A kind of city stratification region partitioning method based on map vector data model
CN107564098A (en) * 2017-08-17 2018-01-09 中山大学 A kind of Fast rendering method of big Local Area Network three-dimensional noise map
CN110827048A (en) * 2018-08-08 2020-02-21 菜鸟智能物流控股有限公司 Geographic region segmentation method and device based on road network and electronic equipment
CN110083670A (en) * 2019-03-26 2019-08-02 长安大学 A kind of map grid division methods based on section density
CN113066150A (en) * 2020-01-02 2021-07-02 沈阳美行科技有限公司 Map data processing method, device, equipment and storage medium
CN114581620A (en) * 2022-02-25 2022-06-03 腾讯科技(深圳)有限公司 Road virtual elevation generation method and device, computer equipment and storage medium
CN115408410A (en) * 2022-08-30 2022-11-29 合肥四维图新科技有限公司 Method, device and equipment for matching electronic map data and map acquisition data
CN115509141A (en) * 2022-09-13 2022-12-23 深圳市无限动力发展有限公司 Map segmentation method, device and equipment

Also Published As

Publication number Publication date
CN116383451B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
Müller et al. Area-patch generalisation: a competitive approach
CN106156138B (en) The foundation of the spatial index of point of interest, Perimeter method and apparatus
CN110135014B (en) Automatic modeling method and device for linear road elements
CN110428386B (en) Map grid merging method and device, storage medium and electronic device
CN112329789B (en) Point cloud extraction method and device, computer equipment and storage medium
CN111429560A (en) Three-dimensional terrain service fusion method and device and server
CN116628123B (en) Dynamic slice generation method and system based on spatial database
CN113750516A (en) Method, system and equipment for realizing three-dimensional GIS data loading in game engine
JP2010525491A (en) Geospatial modeling system and associated method for providing data decimation of geospatial data
Bucher et al. Geoxygene: Built on top of the expertise of the french nma to host and share advanced gi science research results
RU2296368C2 (en) Method for cutting off a line and method for displaying three-dimensional image based on this method
CN114359231A (en) Parking space detection method, device, equipment and storage medium
CN116383451B (en) Map segmentation method and device, electronic equipment and storage medium
CN112215864A (en) Contour processing method and device of electronic map and electronic equipment
CN112269848A (en) Crowdsourcing trajectory data fusion method and device
Namouchi et al. Piecewise horizontal 3d roof reconstruction from aerial lidar
CN111767295B (en) Map data processing method, device, computing equipment and medium
CN111488411A (en) Road facility construction method and device, rendering method, medium and terminal
CN115269600A (en) Airplane data management method and device, electronic equipment and storage medium
CN116681857A (en) Space collision detection method and device and electronic equipment
CN114463499A (en) Building three-dimensional modeling method and device
CN111383334B (en) System and method for rendering objects
CN114116948A (en) Geographic vector data space buffer area analysis method, device, equipment and medium
KR101947646B1 (en) Method for processing road information and method for simulating virtual combat simulation
CN110610544A (en) Drilling data thinning method and device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant