CN112685530B - Method for determining isolated roads in electronic map, related device and storage medium - Google Patents
Method for determining isolated roads in electronic map, related device and storage medium Download PDFInfo
- Publication number
- CN112685530B CN112685530B CN202110025983.4A CN202110025983A CN112685530B CN 112685530 B CN112685530 B CN 112685530B CN 202110025983 A CN202110025983 A CN 202110025983A CN 112685530 B CN112685530 B CN 112685530B
- Authority
- CN
- China
- Prior art keywords
- road
- segmentation
- isolated
- road network
- determining
- 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.)
- Active
Links
Images
Landscapes
- Navigation (AREA)
Abstract
The invention discloses a method for determining isolated roads in an electronic map, related equipment and a storage medium, wherein the method comprises the following steps: acquiring target map data of each map identifier in the electronic map; constructing a road network to be inspected according to the target map data; extracting a target segmentation rule from the segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum segmentation granularity which is not extracted from the segmentation rule sequence; segmenting the road network to be checked according to the target segmentation rule to obtain a segmentation result; determining isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after the isolated roads are deleted, and updating the road network to be checked according to the merging result; and repeating the step of extracting the target segmentation rule until all the segmentation rules in the segmentation rule sequence are extracted. The invention greatly improves the inspection efficiency while ensuring the accuracy of the inspection of the isolated road and reduces the occupation of the memory space in the inspection process.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, related device, and storage medium for determining isolated roads in an electronic map.
Background
The isolated roads in the electronic map comprise isolated roads in physical positions and isolated roads in logical relations, wherein the isolated roads in the physical positions mean that one or more sections of roads which are communicated with each other are not communicated with any other roads in the physical positions; the isolated road in the logical relationship means that one or more sections of roads which are communicated with each other are not communicated with any other roads in the logical relationship. The existence of isolated roads in the electronic map may adversely affect the navigation effectiveness, and therefore, the isolated roads in the electronic map need to be accurately and comprehensively found for corresponding processing.
In the related technology, a mode of carrying out isolated road inspection by loading a full amount of global road network such as a national road network is adopted, and the inspection process is time-consuming, low in efficiency and occupies a large amount of memory space due to the large amount of data loaded in the whole inspection process; however, the method of inspecting the isolated roads based on the local road network cannot accurately determine the boundary roads, which results in low accuracy of inspecting the isolated roads.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, a related device, and a storage medium for determining isolated roads in an electronic map. The technical scheme is as follows:
in one aspect, a method for determining isolated roads in an electronic map is provided, the method comprising:
acquiring target map data of each map identifier in the electronic map;
constructing a road network to be inspected according to the target map sheet data of each map sheet mark;
extracting a target segmentation rule from a segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum unextracted segmentation granularity in the segmentation rule sequence;
segmenting the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result;
determining isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after the isolated roads are deleted, and updating the road network to be checked according to the merging result;
and repeating the step of extracting the target segmentation rule from the segmentation rule sequence until all the segmentation rules in the segmentation rule sequence are extracted.
In another aspect, an apparatus for determining isolated roads in an electronic map is provided, the apparatus comprising:
the first acquisition module is used for acquiring target map data of each map identifier in the electronic map;
the road network construction module to be inspected is used for constructing the road network to be inspected according to the target map sheet data of each map sheet mark;
the segmentation rule extraction module is used for extracting a target segmentation rule from a segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum unextracted segmentation granularity in the segmentation rule sequence;
the segmentation module is used for segmenting the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result;
the isolated road checking module is used for determining isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after deleting the isolated roads, and updating the road network to be checked according to the merging result;
and the repeated execution module is used for repeatedly executing the step of extracting the target segmentation rule from the segmentation rule sequence until all the segmentation rules in the segmentation rule sequence are extracted.
As a possible embodiment, the segmentation result includes at least one first road network; the isolated road inspection module includes:
a task creation module for creating at least one inspection task corresponding to the at least one first route;
the task distribution module is used for distributing the at least one inspection task to at least one inspection work process;
and the task execution module is used for determining an isolated road in the corresponding first road network by each checking work process in the at least one checking work process according to the corresponding checking task, deleting the isolated road in the first road network, and performing serialized storage on the first road network after the isolated road is deleted.
As a possible implementation, the task execution module includes:
the first judgment module is used for judging whether a road exists in the road network boundary of the first road network after the isolated road is deleted;
and the road emptying module is used for emptying the road in the first road network after the isolated road is deleted to obtain a second road network when the first judgment module judges that no road exists, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
And the direct serialization module is used for taking the first road network from which the isolated road is deleted as a second road network when the first judgment module judges that the road exists, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
As a possible implementation, the isolated road checking module further includes:
the second judgment module is used for judging whether the at least one checking task is executed completely;
the second acquisition module is used for acquiring a second road network after the serialization processing from the specified storage space when the execution of the at least one check task is completed;
the deserializing module is used for deserializing and analyzing the serialized second road network to obtain at least one second road network;
and the merging module is used for merging the at least one second network.
As a possible implementation manner, when determining an isolated road in the corresponding first road network, the task execution module is specifically configured to: determining a strong connection component in a corresponding first road network according to a preset road connection algorithm; and determining an isolated road in the first road network according to the strongly connected component in the first road network.
As a possible implementation manner, when determining an isolated road in the first road network according to the strongly connected component in the first road network, the task execution module is specifically configured to: for each strong connected component in the first road network, judging whether the strong connected component is associated with a road network boundary of the first road network; and if the strongly connected component is not associated with the road network boundary of the first road network, determining at least one road corresponding to the strongly connected component as an isolated road.
As a possible embodiment, there is a preset granularity increment in the segmentation granularity corresponding to the adjacent segmentation rule in the segmentation rule sequence.
In another aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to implement the method for determining isolated roads in an electronic map.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, the at least one instruction or the at least one program being loaded and executed by a processor to implement the method for determining isolated roads in an electronic map as described above.
In another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
The method comprises the steps of constructing a road network to be inspected by obtaining target map data of each map mark in an electronic map, further extracting unextracted target segmentation rules with the minimum segmentation granularity from a segmentation rule sequence, segmenting the road network to be inspected, determining isolated roads in segmentation results, deleting the isolated roads in the segmentation results, merging segmentation results after the isolated roads are deleted, updating the road network to be inspected according to merging results, and further repeatedly executing the step of extracting the target segmentation rules until all the segmentation rules in the segmentation rule sequence are extracted, so that the inspection accuracy of the isolated roads is improved, the inspection efficiency is greatly improved, and the occupation of memory space in the inspection process is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic diagram of an implementation environment provided by embodiments of the present invention;
fig. 1b is a schematic interface diagram of highlighting a road network related to an isolated road in an electronic map according to an embodiment of the present invention;
FIG. 2a is a schematic diagram of an isolated road in physical location provided by an embodiment of the present invention;
FIG. 2b is a schematic diagram of isolated roads in logical relationship provided by an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for determining isolated roads in an electronic map according to an embodiment of the present invention;
FIG. 4 is an alternative schematic diagram of a constructed road network to be inspected, provided by an embodiment of the invention;
FIG. 5a is a schematic representation of a circuit according to R provided in an embodiment of the present invention1(1 x 1) a segmentation result schematic diagram obtained by segmenting a specific road network to be inspected by the segmentation rule;
FIG. 5b is a schematic representation of a circuit according to R provided by an embodiment of the present invention2(2 x 2) a segmentation result schematic diagram obtained by segmenting a specific road network to be inspected by the segmentation rule;
fig. 6a is a schematic diagram of an alternative flow of determining isolated roads in the segmentation result and deleting isolated roads in the segmentation result according to an embodiment of the present invention;
fig. 6b is a schematic diagram of an alternative architecture for determining isolated roads in the segmentation result and deleting isolated roads in the segmentation result according to the embodiment of the present invention;
fig. 7 is a schematic diagram of an alternative flow of performing serialized storage on the first road after deleting an isolated road in an inspection work process according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an alternative implementation manner for step S309 according to an embodiment of the present invention;
fig. 9 is a block diagram illustrating an apparatus for determining isolated roads in an electronic map according to an embodiment of the present invention;
fig. 10 is a block diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1a, a schematic diagram of an implementation environment according to an embodiment of the present invention is shown, where the implementation environment may include a server 110 and a terminal 120.
The server 110 may execute the method for determining the isolated road in the electronic map according to the embodiment of the present invention, and send the determined related information of the isolated road to the terminal 110, and the terminal 110 may identify and display the corresponding isolated road in the electronic map according to the received related information of the isolated road, so that the service personnel may locally modify the isolated road identified in the electronic map, improve the data of the electronic map, and improve the effectiveness of navigation based on the electronic map. In a specific implementation, the terminal 110 may highlight the road network related to the isolated road in the electronic map to prompt the service personnel about the range to be checked, for example, the highlighted area outlined in fig. 1b is the road network related to the isolated road, so that the service personnel can check and locally modify the road network in the highlighted area according to the prompt.
The server 110 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The terminal 110 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
It should be noted that the isolated roads in the embodiment of the present invention include isolated roads at physical locations in the electronic map and isolated roads in logical relationships. As shown in fig. 2a, which is a schematic diagram of isolated roads in physical location, although the road c and the road d are connected with each other, they are not connected with any other road in physical location, resulting in fig. 2a forming an isolated road network in physical location; as shown in fig. 2b, which is a schematic diagram of isolated roads in logical relationship, since the road h- > road g, the road f- > road b and the road f- > road e are all in one-way communication, so that fig. 2b forms an isolated road network which is not in logical relationship.
Referring to fig. 3, a flowchart of a method for determining an isolated road in an electronic map according to an embodiment of the present invention is shown, where the method is applicable to an electronic device, and the electronic device may be a terminal or a server. The method will be described below by taking an example in which the method is applied to the server shown in fig. 1 a.
It is noted that the present specification provides the method steps as described in the examples or flowcharts, but may include more or less steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In actual system or product execution, sequential execution or parallel execution (e.g., parallel processor or multi-threaded environment) may be possible according to the embodiments or methods shown in the figures. Specifically, as shown in fig. 3, the method may include:
s301, acquiring target map data of each map identifier in the electronic map.
The map sheet identifier is used for uniquely identifying one map sheet in the electronic map. At present, the editing process of the electronic map is carried out by dividing the map into image frames, and the complete electronic map can be obtained by splicing the image frames after the editing of the image frames is finished.
The road data in the map database is stored in units of map sheets, the map sheet data is the road data corresponding to the map sheets, the road data includes road data of different road attributes, wherein the road attributes represent road grades, for example, the road attributes may be expressways, ordinary urban roads, rural roads, pedestrian roads, etc., and the specific road attribute division may be adjusted according to actual needs.
In the embodiment of the present invention, the target map data may be the map data described above, or may be road data having a preset road attribute, where the preset road attribute is a road attribute targeted for currently performing isolated road inspection, for example, if isolated road inspection needs to be performed on an expressway in an electronic map, the preset road attribute may be an expressway, that is, the road data corresponding to the preset road attribute in the map data to each map identifier in the electronic map is acquired from the map database in step S301, so that only isolated road inspection is performed on the expressway in the electronic map, occupation of memory in the isolated road inspection process is reduced, and inspection efficiency is improved.
In order to avoid the influence of data fluctuation in the map database on the inspection result, as a possible implementation manner, the target map data of each map identifier in the electronic map may be acquired from the backup database of the main map database, and before acquiring the data from the backup database, the backup of the backup database on the data in the main map database may be stopped, so as to avoid the influence of data fluctuation in the main map database on the inspection result while not affecting the map service.
And S303, constructing a road network to be inspected according to the target map sheet data of each map sheet mark.
Specifically, for target map sheet data corresponding to each map sheet identifier, a sub-road network corresponding to the map sheet identifier is constructed according to the target map sheet data, and then the sub-road networks are combined according to the adjacency relation of the map sheets corresponding to the map sheet identifiers in the electronic map, so that the road network to be inspected is obtained.
S305, extracting a target segmentation rule from the segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum unextracted segmentation granularity in the segmentation rule sequence.
In the embodiment of the invention, the preset granularity increment exists in the segmentation granularity corresponding to the adjacent segmentation rules in the segmentation rule sequence, that is, the segmentation granularity corresponding to each segmentation rule in the segmentation rule sequence is different, and each segmentation rule is stored in the segmentation rule sequence according to the incremental gradient of the segmentation granularity. The preset granularity increment can be determined according to the minimum segmentation granularity corresponding to the segmentation rule in the segmentation rule sequence.
Taking the road network to be inspected shown in fig. 4 as an example, the road network to be inspected is formed by merging n × n sub-road networks, each small square represents one sub-road network, a single sub-road network is used as the minimum segmentation granularity of the segmentation rules in the segmentation rule sequence, the road network to be inspected is the maximum segmentation granularity of the segmentation rules in the segmentation rule sequence, and the segmentation granularity corresponding to each segmentation rule is the transverse segmentation granularity component x × the longitudinal segmentation granularity component y. Suppose that two adjacent segmentation rules in the segmentation rule sequence are respectively A and B, wherein the segmentation rule A is a previous segmentation rule, and the segmentation granularity corresponding to the segmentation rule A is x1*y1Cutting intoThe division rule B is the next division rule, and the corresponding division granularity of the division rule B is x2*y2If the predetermined granularity increment between the segmentation rules a and B is x2*y2-x1*y1。
Assuming that the preset granularity increment includes a horizontal preset granularity increment component (denoted by a) and a vertical preset granularity increment component (denoted by B), the corresponding segmentation granularity of the next segmentation rule B of the segmentation rule a may be represented as (x)1+a)*(x1+ b), wherein the transverse preset granularity increment component a and the longitudinal preset granularity increment component b may be the same or different. For example, the horizontal preset granularity increment component a is the same as the vertical preset granularity increment component b, and may be 1 unit, the segmentation rule sequence may be represented as: { R1(1*1),R2(2*2),……,Rn(n x n) }, wherein, RnThe nth segmentation rule is represented, and (n × n) represents the segmentation granularity of the nth segmentation rule.
In the embodiment of the invention, when the target segmentation rule is extracted from the segmentation rule sequence, the target segmentation rule is always extracted from the segmentation rules which are not extracted from the segmentation rule sequence, and the segmentation rule with the minimum segmentation granularity is extracted from the segmentation rules which are not extracted each time. With the above-mentioned segmentation rule sequence { R1(1*1),R2(2*2),……,Rn(n x n) } the target segmentation rule of the first extraction is R1(1 x 1) from { R ] in the second extraction2(2*2),……,RnThe target segmentation rule extracted in (n x n) } is R2(2 x 2), from { R ] in the third extraction3(3*3),……,RnThe target segmentation rule extracted in (n x n) } is R3(3 x 3), and so on, the target segmentation rule extracted for the nth time is RnAnd (n x n), extracting all the segmentation rules in the segmentation rule sequence at the moment, and stopping extracting the segmentation rules, thereby finishing the inspection of the isolated roads of the road network to be inspected.
S307, segmenting the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result.
It will be appreciated that the segmentation result includes at least a first oneAnd the first road network is a road network matched with the corresponding segmentation granularity. Taking an example of a road network to be inspected consisting of 16 sub-road networks, as shown in FIG. 5a, R is the above1(1 x 1) segmenting the road network to be inspected by the segmentation rule to obtain a segmentation result, wherein the segmentation result comprises 16 first road networks; as shown in FIG. 5b for R according to above2(2 x 2) segmenting the road network to be inspected by the segmentation rule to obtain a segmentation result, wherein the segmentation result comprises 4 first road networks; by analogy, when the segmentation rule is R4(4 × 4), the obtained segmentation result includes 1 first net.
S309, determining the isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after deleting the isolated roads, and updating the road network to be checked according to the merging result.
It is understood that after determining the isolated road in the segmentation result, the related information of the isolated road may be output, for example, a road identifier of the isolated road may be output so that a service person can quickly locate the isolated road in the electronic map according to the road identifier.
In order to further improve the inspection efficiency while ensuring the accuracy of the inspection result, as a possible implementation manner, a distributed inspection may be performed on at least one first road network included in the segmentation result, and an isolated road inspection may be performed on each first road network simultaneously in the distributed inspection process, that is, as shown in fig. 6a, when an isolated road in the segmentation result is determined and an isolated road in the segmentation result is deleted, the following steps may be included:
s601, at least one checking task corresponding to the at least one first network is created.
S603, distributing the at least one checking task to at least one checking work process.
S605, determining an isolated road in the corresponding first road network by each checking work process in the at least one checking work process according to the corresponding checking task, deleting the isolated road in the first road network, and performing serialized storage on the first road network after deleting the isolated road.
In a specific implementation, the road networks to be checked may be segmented by the segmentation engine, the segmentation engine may create, after the segmentation is finished, an inspection task corresponding to each first road network according to at least one first road network in the segmentation result, for example, as shown in an optional architecture diagram provided in fig. 6b, the segmentation engine determines an isolated road in the segmentation result and deletes the isolated road in the segmentation result, the segmentation engine writes each inspection task into a pre-configured parallel task queue, each task in the parallel task queue corresponds to one inspection work process worker, so that the at least one inspection task may be executed by the corresponding at least one inspection work process synchronously, and since each inspection task corresponds to one first road network, an inspection range and a processed data amount of each inspection work process are only for one first road network, and an inspection range and a processed data amount are small, the inspection efficiency is greatly improved, and each inspection working process does not need to be configured with a memory highly, and a machine with low configuration can complete the inspection.
In a specific implementation, when each inspection work process determines an isolated road in the corresponding first road network, the strong traffic component in the first road network may be determined according to a preset road traffic algorithm, and the isolated road in the first road network may be determined according to the strong traffic component in the first road network.
In practical application, a corresponding first road network can be abstracted into a directed graph, the point in the directed graph is a road in the first road network, the edge in the directed graph is a connection relation between roads in the first road network, and the connection relation can be understood to include physical connection and logical connection. After the corresponding first road network is abstracted to be the directed graph, the directed graph can be searched for the strongly connected components by adopting a preset road connection algorithm, so that the strongly connected components in the first road network can be obtained, and it can be understood that one or more strongly connected components may exist in each first road network.
The preset link connection algorithm may be a Kosaraju algorithm, or may be other algorithms capable of detecting a strong connection component in the directed graph, such as a Tarjan algorithm, and the like.
In the embodiment of the present invention, in order to avoid a determination error of a road network boundary road, when determining an isolated road in a first road network according to a strongly connected component in the first road network, the method may include the following steps:
(1) for each strong connected component in the first road network, judging whether the strong connected component is associated with the road network boundary of the first road network.
Specifically, for each strong connection component in the first road network, respectively determining whether the strong connection component is associated with a road network boundary of the first road network, and if not, performing the following step (2); on the other hand, if the road network boundary of the first road network is concerned, the following step (3) may be executed.
The association with the road network boundary of the first road network means that a connection relation exists between the strongly connected component and the road network boundary.
(2) And if one strong connected component is not associated with the road network boundary of the first road network, determining at least one road corresponding to the strong connected component as an isolated road.
(3) If a strong connected component is associated with the road network boundary of the first road network, at least one road corresponding to the strong connected component is not an isolated road.
As a possible implementation manner, as shown in fig. 7, each inspection work process may include the following steps when performing serialized storage on the first road network after deleting the isolated road:
and S701, judging whether a road exists in the road network boundary of the first road network after the isolated road is deleted.
Specifically, if there is no road at the road network boundary of the first road network, step S703 may be executed; if a road network boundary of the first road network exists, step S705 may be executed.
And S703, emptying the road in the first road network after the isolated road is deleted to obtain a second road network, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
Specifically, if there is no road at the road network boundary of the first road network after the isolated road is deleted, it indicates that the first road network has no possibility of determining the error for the boundary road due to the boundary problem, that is, the road information in the first road network does not help the determination of whether the boundary road in the next cycle is the isolated road, and clearing the road in the first road network at this point reduces the data amount required to be processed for the inspection in the next cycle while not affecting the accuracy of the inspection result, which is beneficial to further improving the inspection efficiency.
S705, taking the first road network from which the isolated road is deleted as a second road network, performing serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
Specifically, if there is a road at the road network boundary of the first road network after the isolated road is deleted, it indicates that there is a possibility that the first road network has a wrong determination for the boundary road due to the boundary problem, that is, the road information in the first road network has an auxiliary effect on determining whether the boundary road in the next cycle is the isolated road, so that the first road network after the isolated road is deleted needs to be directly subjected to the serialized storage processing.
On this basis, as shown in the schematic diagram of an alternative embodiment of the foregoing step S309 provided in fig. 8, when merging the split results after deleting the isolated road, the method may include the following steps:
s801, judging whether the at least one checking task is executed completely.
Specifically, if all the checking tasks are executed completely, step S803 may be executed.
And S803, acquiring the serialized second road network from the designated storage space.
S805, performing deserialization analysis on the serialized second road networks to obtain at least one second road network.
S807, merging the at least one second network.
Specifically, during merging, merging is still performed based on the adjacency relation of the map identifier corresponding to each second road network in the electronic map, so that the road network to be inspected can be updated according to the merging result.
And S311, judging whether all the segmentation rules in the segmentation rule sequence are extracted, if not, repeatedly executing the steps S305 to S309 until all the segmentation rules in the segmentation rule sequence are extracted.
According to the technical scheme of the embodiment of the invention, the road network to be inspected is segmented, and the isolated roads in the segmentation result are determined, so that the inspection of the road network to be inspected is converted into the inspection of the segmentation result, namely, the large inspection range is thinned into the inspection of each small range, and the inspection efficiency is greatly improved. After the isolated roads in the segmentation result are determined, the isolated roads in the segmentation result are deleted, the segmentation results after the isolated roads are deleted are merged, the road network to be checked is updated according to the merging result, and the road network to be checked is further segmented based on the incremental segmentation granularity, so that the loaded data volume is reduced while the isolated road checking error caused by the boundary problem in the segmentation result is effectively avoided, and the large occupation of the memory in the whole isolated road checking process is avoided.
Corresponding to the methods for determining isolated roads in an electronic map provided by the above-mentioned several embodiments, embodiments of the present invention further provide an apparatus for determining isolated roads in an electronic map, and since the apparatus for determining isolated roads in an electronic map provided by embodiments of the present invention corresponds to the methods for determining isolated roads in an electronic map provided by the above-mentioned several embodiments, the foregoing embodiments of the method for determining isolated roads in an electronic map are also applicable to the apparatus for determining isolated roads in an electronic map provided by this embodiment, and will not be described in detail in this embodiment.
Please refer to fig. 9, which is a schematic structural diagram illustrating an apparatus for determining an isolated road in an electronic map according to an embodiment of the present invention, where the apparatus has a function of implementing the method for determining an isolated road in an electronic map according to the foregoing method embodiment, and the function may be implemented by hardware or by hardware executing corresponding software. As shown in fig. 9, the apparatus may include:
a first obtaining module 910, configured to obtain target map data of each map identifier in an electronic map;
a road network to be inspected constructing module 920, configured to construct a road network to be inspected according to the target map data of each map identifier;
a segmentation rule extraction module 930, configured to extract a target segmentation rule from a segmentation rule sequence, where the target segmentation rule is a segmentation rule with a minimum unextracted segmentation granularity in the segmentation rule sequence;
the segmentation module 940 is configured to segment the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result;
an isolated road checking module 950, configured to determine isolated roads in the segmentation result, delete isolated roads in the segmentation result, merge the segmentation results after deleting isolated roads, and update the road network to be checked according to a merging result;
the repeated execution module 960 is configured to repeatedly execute the step of extracting the target segmentation rule until each segmentation rule in the sequence of segmentation rules is extracted.
As a possible embodiment, the segmentation result includes at least one first road network; the isolated road checking module 950 may include:
a task creation module for creating at least one inspection task corresponding to the at least one first route;
the task distribution module is used for distributing the at least one inspection task to at least one inspection work process;
and the task execution module is used for determining an isolated road in the corresponding first road network by each checking work process in the at least one checking work process according to the corresponding checking task, deleting the isolated road in the first road network, and performing serialized storage on the first road network after the isolated road is deleted.
As one possible implementation, the task execution module may include:
the first judgment module is used for judging whether a road exists in the road network boundary of the first road network after the isolated road is deleted;
the road emptying module is used for emptying the road in the first road network after the isolated road is deleted to obtain a second road network when the first judgment module judges that no road exists, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space;
and the direct serialization module is used for taking the first road network from which the isolated road is deleted as a second road network when the first judgment module judges that the road exists, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
As a possible implementation, the isolated road checking module 950 may further include:
the second judgment module is used for judging whether the at least one checking task is executed completely;
the second acquisition module is used for acquiring a second road network after the serialization processing from the specified storage space when the execution of the at least one check task is completed;
the deserializing module is used for deserializing and analyzing the serialized second road network to obtain at least one second road network;
and the merging module is used for merging the at least one second network.
As a possible implementation manner, when determining an isolated road in the corresponding first road network, the task execution module is specifically configured to: determining a strong connection component in a corresponding first road network according to a preset road connection algorithm; and determining an isolated road in the first road network according to the strongly connected component in the first road network.
As a possible implementation manner, when determining an isolated road in the first road network according to the strongly connected component in the first road network, the task execution module is specifically configured to: for each strong connected component in the first road network, judging whether the strong connected component is associated with a road network boundary of the first road network; and if the strongly connected component is not associated with the road network boundary of the first road network, determining at least one road corresponding to the strongly connected component as an isolated road.
As a possible embodiment, there is a preset granularity increment in the segmentation granularity corresponding to the adjacent segmentation rule in the segmentation rule sequence.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The device for determining the isolated roads in the electronic map, provided by the embodiment of the invention, divides the road network to be inspected and determines the isolated roads in the division result, so that the inspection of the road network to be inspected is converted into the inspection of the division result, namely, the inspection of a large inspection range is refined into the inspection of each small range, and the inspection efficiency is greatly improved. After the isolated roads in the segmentation result are determined, the isolated roads in the segmentation result are deleted, the segmentation results after the isolated roads are deleted are merged, the road network to be checked is updated according to the merging result, and the road network to be checked is further segmented based on the incremental segmentation granularity, so that the loaded data volume is reduced while the isolated road checking error caused by the boundary problem in the segmentation result is effectively avoided, and the large occupation of the memory in the whole isolated road checking process is avoided.
The embodiment of the present invention provides a computer device, which includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for determining an isolated road in an electronic map as provided in the above method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and determine isolated roads in the electronic map by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The method provided by the embodiment of the invention can be executed in a computer terminal, a server or a similar operation device. Taking an example of the server running on the server, fig. 10 is a hardware block diagram of the server running a method for determining an isolated road in an electronic map according to an embodiment of the present invention, as shown in fig. 10, the server 1000 may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1010 (the processor 1010 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1030 for storing data, and one or more storage media 1020 (e.g., one or more mass storage devices) for storing an application 1023 or data 1022. Memory 1030 and storage media 1020 may be, among other things, transient or persistent storage. The program stored in the storage medium 1020 may include one or more modules, each of which may include a series of instruction operations for a server. Still further, the central processor 1010 may be configured to communicate with the storage medium 1020 and execute a series of instruction operations in the storage medium 1020 on the server 1000. The server 1000 may also include one or more power supplies 1060, one or more wired or wireless network interfaces 1050, one or more input-output interfaces 1040, and/or one or more operating systems 1021, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
Input-output interface 1040 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 1000. In one example, i/o Interface 1040 includes a Network adapter (NIC) that may be coupled to other Network devices via a base station to communicate with the internet. In one example, the input/output interface 1040 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 10 is merely illustrative and is not intended to limit the structure of the electronic device. For example, server 1000 may also include more or fewer components than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Embodiments of the present invention also provide a computer-readable storage medium, which may be disposed in a computer device to store at least one instruction or at least one program for implementing a method for determining isolated roads in an electronic map, where the at least one instruction or the at least one program is loaded and executed by a processor to implement the method for determining isolated roads in an electronic map provided by the above method embodiments.
Embodiments of the present invention also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (9)
1. A method of determining isolated roads in an electronic map, the method comprising:
acquiring target map data of each map identifier in the electronic map;
constructing a road network to be inspected according to the target map sheet data of each map sheet mark;
extracting a target segmentation rule from a segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum unextracted segmentation granularity in the segmentation rule sequence;
segmenting the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result; the segmentation result comprises at least one first road network;
determining isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after the isolated roads are deleted, and updating the road network to be checked according to the merging result;
repeatedly executing the step of extracting the target segmentation rule from the segmentation rule sequence until all the segmentation rules in the segmentation rule sequence are extracted;
wherein the determining of the isolated road in the segmentation result and the deleting of the isolated road in the segmentation result comprise:
creating at least one inspection task corresponding to the at least one first route;
distributing the at least one inspection task to at least one inspection work process;
and determining an isolated road in the corresponding first road network by each checking work process in the at least one checking work process according to the corresponding checking task, deleting the isolated road in the first road network, and performing serialized storage on the first road network after deleting the isolated road.
2. The method for determining the isolated road in the electronic map according to claim 1, wherein the sequentially storing the first road network after the isolated road is deleted comprises:
judging whether a road exists in the road network boundary of the first road network after the isolated road is deleted;
if no road exists, clearing the road in the first road network after the isolated road is deleted to obtain a second road network, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space;
and if the isolated road exists, taking the first road network from which the isolated road is deleted as a second road network, carrying out serialization processing on the second road network, and storing the second road network after the serialization processing to a specified storage space.
3. The method for determining the isolated road in the electronic map according to claim 2, wherein the merging of the segmentation results after the isolated road is deleted comprises:
judging whether the at least one checking task is executed completely;
if the execution of the at least one checking task is completed, acquiring a second road network after the serialization processing from the specified storage space;
performing deserialization analysis on the serialized second road network to obtain at least one second road network;
merging the at least one second network.
4. The method for determining isolated roads in electronic map according to claim 1, wherein said determining isolated roads in corresponding first road network comprises:
determining a strong connection component in a corresponding first road network according to a preset road connection algorithm;
and determining an isolated road in the first road network according to the strongly connected component in the first road network.
5. The method according to claim 4, wherein the determining the isolated road in the first road network according to the strongly connected component in the first road network comprises:
for each strong connected component in the first road network, judging whether the strong connected component is associated with a road network boundary of the first road network;
and if the strongly connected component is not associated with the road network boundary of the first road network, determining at least one road corresponding to the strongly connected component as an isolated road.
6. The method for determining the isolated road in the electronic map according to claim 1, wherein there is a preset granularity increment in the segmentation granularity corresponding to the adjacent segmentation rule in the segmentation rule sequence.
7. An apparatus for determining isolated roads in an electronic map, the apparatus comprising:
the first acquisition module is used for acquiring target map data of each map identifier in the electronic map;
the road network construction module to be inspected is used for constructing the road network to be inspected according to the target map sheet data of each map sheet mark;
the segmentation rule extraction module is used for extracting a target segmentation rule from a segmentation rule sequence, wherein the target segmentation rule is the segmentation rule with the minimum unextracted segmentation granularity in the segmentation rule sequence;
the segmentation module is used for segmenting the road network to be inspected according to the segmentation granularity corresponding to the target segmentation rule to obtain a segmentation result; the segmentation result comprises at least one first road network;
the isolated road checking module is used for determining isolated roads in the segmentation result, deleting the isolated roads in the segmentation result, merging the segmentation results after deleting the isolated roads, and updating the road network to be checked according to the merging result;
the repeated execution module is used for repeatedly executing the step of extracting the target segmentation rule from the segmentation rule sequence until all the segmentation rules in the segmentation rule sequence are extracted;
wherein the determining of the isolated road in the segmentation result and the deleting of the isolated road in the segmentation result comprise:
creating at least one inspection task corresponding to the at least one first route;
distributing the at least one inspection task to at least one inspection work process;
and determining an isolated road in the corresponding first road network by each checking work process in the at least one checking work process according to the corresponding checking task, deleting the isolated road in the first road network, and performing serialized storage on the first road network after deleting the isolated road.
8. A computer device, characterized by comprising a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded by the processor and executed to realize the method for determining the isolated road in the electronic map according to any one of claims 1-6.
9. A computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded by a processor and executed to implement the method for determining isolated roads in an electronic map according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110025983.4A CN112685530B (en) | 2021-01-08 | 2021-01-08 | Method for determining isolated roads in electronic map, related device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110025983.4A CN112685530B (en) | 2021-01-08 | 2021-01-08 | Method for determining isolated roads in electronic map, related device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112685530A CN112685530A (en) | 2021-04-20 |
CN112685530B true CN112685530B (en) | 2022-04-05 |
Family
ID=75456821
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110025983.4A Active CN112685530B (en) | 2021-01-08 | 2021-01-08 | Method for determining isolated roads in electronic map, related device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112685530B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118012976A (en) * | 2024-03-13 | 2024-05-10 | 北京抖音智图科技有限公司 | Road network data detection method, device, medium, equipment and computer program product |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5064870B2 (en) * | 2007-04-17 | 2012-10-31 | 株式会社日立製作所 | Digital road map generation method and map generation system |
CN100498871C (en) * | 2007-08-30 | 2009-06-10 | 济南卓信智能科技有限公司 | Road traffic parameter checking device and method thereof |
CN102200446B (en) * | 2010-03-23 | 2014-04-23 | 日电(中国)有限公司 | Continuous path detection device and method based on traffic data |
CN102567429B (en) * | 2010-12-30 | 2014-04-02 | 北京四维图新科技股份有限公司 | Method and device for checking connectedness of global network paths |
CN104634352B (en) * | 2015-03-02 | 2015-11-11 | 吉林大学 | A kind of road matching method merged based on Floating Car motion track and electronic chart |
US10546200B2 (en) * | 2018-05-23 | 2020-01-28 | Here Global B.V. | Method, apparatus, and system for detecting a physical divider on a road segment |
CN109710708B (en) * | 2018-12-07 | 2021-02-02 | 北京掌行通信息技术有限公司 | Electronic map mapping method and device |
CN111367649B (en) * | 2018-12-26 | 2024-03-01 | 北京四维图新科技股份有限公司 | High-precision map data parallel processing method and device |
CN111435089A (en) * | 2019-01-11 | 2020-07-21 | 阿里巴巴集团控股有限公司 | Map data compiling method, device, medium and server |
CN110471417B (en) * | 2019-08-22 | 2021-08-24 | 东北大学 | Multi-AGV collision prevention method based on load balancing |
CN111753032B (en) * | 2019-12-18 | 2024-05-28 | 腾讯云计算(北京)有限责任公司 | Map road network data processing method and related device |
CN111506682B (en) * | 2020-01-13 | 2023-04-25 | 阿里巴巴集团控股有限公司 | Map data processing method, data query method, device and electronic equipment |
-
2021
- 2021-01-08 CN CN202110025983.4A patent/CN112685530B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112685530A (en) | 2021-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Shang et al. | Planning unobstructed paths in traffic-aware spatial networks | |
CN109947881B (en) | POI weight judging method and device, mobile terminal and computer readable storage medium | |
CN105550225A (en) | Index construction method and query method and apparatus | |
JP2019075079A (en) | System and method for selecting proxy computer | |
CN111274241B (en) | Method and apparatus for parallel processing of map data | |
CN105426375A (en) | Relationship network calculation method and apparatus | |
CN112269827B (en) | Data processing method and device, computer equipment and computer readable storage medium | |
CN112685530B (en) | Method for determining isolated roads in electronic map, related device and storage medium | |
CN114519061A (en) | Map data updating method, device, electronic equipment and medium | |
US9595014B1 (en) | System and method for executing workflow instance and modifying same during execution | |
CN114610825A (en) | Method and device for confirming associated grid set, electronic equipment and storage medium | |
CN113868434A (en) | Data processing method, device and storage medium for graph database | |
CN103530369A (en) | De-weight method and system | |
CN113792026A (en) | Deployment method and device of database script and computer readable storage medium | |
CN112527943A (en) | Map rendering method, map rendering device, map rendering equipment and storage medium | |
JP6880962B2 (en) | Program analyzer, program analysis method and analysis program | |
CN113835728B (en) | Data updating method and device, electronic equipment and storage medium | |
CN111367500A (en) | Data processing method and device | |
CN113986866A (en) | Processing method, device, equipment and medium for large-scale point cloud data | |
CN114416895A (en) | Map data processing method and device, electronic equipment and storage medium | |
CN113804213A (en) | AStar fast path planning improvement algorithm | |
CN112181825A (en) | Test case library construction method and device, electronic equipment and medium | |
CN110990648A (en) | Virus query method, server and computer readable storage medium | |
CN113627837A (en) | Goods collection positioning method and device | |
CN117744907B (en) | Goods source route planning method and device, electronic 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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40041994 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |