CN116561240A - Electronic map processing method, related device and medium - Google Patents

Electronic map processing method, related device and medium Download PDF

Info

Publication number
CN116561240A
CN116561240A CN202310530576.8A CN202310530576A CN116561240A CN 116561240 A CN116561240 A CN 116561240A CN 202310530576 A CN202310530576 A CN 202310530576A CN 116561240 A CN116561240 A CN 116561240A
Authority
CN
China
Prior art keywords
point
line
points
processed
edge
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.)
Pending
Application number
CN202310530576.8A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310530576.8A priority Critical patent/CN116561240A/en
Publication of CN116561240A publication Critical patent/CN116561240A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data
    • 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
    • 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
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/09Arrangements for giving variable traffic instructions
    • G08G1/0962Arrangements for giving variable traffic instructions having an indicator mounted inside the vehicle, e.g. giving voice messages
    • G08G1/0968Systems involving transmission of navigation instructions to the vehicle
    • G08G1/096855Systems involving transmission of navigation instructions to the vehicle where the output is provided in a suitable form to the driver
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides an electronic map processing method, a related device and a medium. The method comprises the following steps: acquiring a line to be processed in an electronic map, wherein a part of the line to be processed forms a closed loop, and the line to be processed comprises a plurality of first points and a first edge between every two adjacent first points in the plurality of first points; taking the first edge as a second point in the graph model, and establishing the graph model; constructing second edges between second points in the graph model based on the intersection relation of the first edges in the lines to be processed; determining a second starting point and a second ending point of the plurality of second points; determining a shortest path between the second starting point and the second ending point based on the second point and the second edge in the graph model; based on the shortest path, the processed line is acquired. The embodiment of the disclosure can reduce the closed loops in the electronic map and improve the accuracy of the electronic map. The embodiment of the disclosure can be applied to various scenes such as electronic maps, artificial intelligence, intelligent traffic, auxiliary driving and the like.

Description

Electronic map processing method, related device and medium
Technical Field
The disclosure relates to the field of electronic maps, and in particular relates to an electronic map processing method, a related device and a medium.
Background
Lane-level navigation mainly uses a high-precision electronic map. Due to legal regulations and cost limitations, the coverage area of high-precision electronic maps is relatively limited. In order to obtain an effect similar to a high-precision electronic map where there is no high-precision electronic map, a data compiling stage is required to convert a standard-precision electronic map into a high-precision electronic map. For example, the road in the high-precision electronic map is wide, but the road in the standard-precision electronic map is a line without width. Therefore, when converting a standard-precision electronic map into a high-precision electronic map, it is necessary to widen a single line road of the standard-precision electronic map into a road having a width according to a predetermined width. During the widening process, the edges of the road sometimes create a closed loop. For example, a border of a road that does not intersect in reality may become a closed loop due to the widening algorithm, some of which may become intersecting. But the occurrence of a closed loop on the side line of the road is obviously wrong, and the accuracy of the electronic map is reduced.
Disclosure of Invention
The embodiment of the disclosure provides an electronic map processing method, a related device and a medium, which can reduce closed loops in an electronic map and improve the accuracy of the electronic map.
According to an aspect of the present disclosure, there is provided an electronic map processing method, including:
acquiring a line to be processed in the electronic map, wherein a part of the line to be processed forms a closed loop, and the line to be processed comprises a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
establishing a graph model by taking the first edge as a second point in the graph model;
constructing a second edge between the second points in the graph model based on the intersection relation of the first edges in the lines to be processed;
determining a second starting point and a second ending point of the plurality of second points;
determining a shortest path between the second starting point to the second ending point based on the second point and the second edge in the graph model;
and acquiring a processed line based on the shortest path, wherein the processed line is a line after the closed loop is removed from the line to be processed.
According to an aspect of the present disclosure, there is provided an electronic map processing apparatus including:
a first obtaining unit, configured to obtain a line to be processed in the electronic map, where a portion of the line to be processed forms a closed loop, and the line to be processed includes a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
The building unit is used for taking the first edge as a second point in a graph model and building the graph model;
a construction unit, configured to construct a second edge between the second points in the graph model based on an intersection relationship of the first edges in the line to be processed;
a first determining unit configured to determine a second start point and a second end point among the plurality of second points;
a second determining unit configured to determine a shortest path between the second start point and the second end point based on the second point and the second edge in the graph model;
and a second acquisition unit configured to acquire a processed line, which is a line after the closed loop is removed from the line to be processed, based on the shortest path.
Optionally, the second obtaining unit is specifically configured to:
determining a third point in the line to be processed, the third point corresponding to each of the second edges in the shortest path;
and generating the processed line based on the third point, the first starting point and the first ending point of the line to be processed.
Optionally, the second obtaining unit is further specifically configured to:
connecting the third points corresponding to the second sides by line segments according to the sequence of the second sides in the shortest path;
Acquiring a first point of each first point as the first starting point based on the sequence of each first point in the line to be processed, and acquiring a last point of each first point as the first ending point;
and connecting the first starting point with the first third point in the third points by using a line segment, and connecting the last third point in the third points with the first ending point by using a line segment to obtain the processed line.
Optionally, the construction unit is specifically configured to:
combining the first edges of the lines to be treated in pairs;
for each combination, carrying out simultaneous solution on the functional formulas of the two first sides in the combination;
if so, adding the second edge between the second points corresponding to the two first edges.
Optionally, the construction unit is further specifically configured to:
creating a second order cartesian product between the first edges of the line to be processed, each element of the second order cartesian product representing a pair of first edges, wherein the pair of first edges has a first index that is a sequence number of a first one of the pair of first edges in the line to be processed and a second index that is a sequence number of a second one of the pair of first edges in the line to be processed;
Traversing each of the elements of the second order Cartesian product, and taking a pair of the first edges of the element as a resulting combination if the first index is smaller than the second index.
Optionally, the construction unit is further specifically configured to:
acquiring longitude and latitude coordinates of the first point;
transforming the longitude and latitude coordinates into orthogonal coordinate system coordinates;
determining a functional formula of the first edge between two adjacent first points based on the orthogonal coordinate system coordinates between the two adjacent first points in the line to be processed;
for each combination, the functional formulas of two first sides in the combination are solved simultaneously.
Optionally, before said combining two by two for each of said first edges in said line to be processed, said building unit is further specifically configured to:
setting a second edge set, and setting an adjacent edge set for each second point;
and the construction unit is also specifically for: if so, adding the second edge solved by the simultaneous solution to the second edge set and the adjacent edge sets of the two second points corresponding to the second edge.
Optionally, the second determining unit is specifically configured to:
Starting traversing from the second starting point along the second edge in the graph model, and acquiring an upstream and downstream second point pair until traversing to the second ending point, wherein the upstream and downstream second point pair comprises an upstream second point and a downstream second point, and the downstream second point is an unremoved second point found from the upstream second point along the second edge;
starting from the second ending point, sequentially recursively searching for an upstream second point according to the upstream and downstream second point pairs until the second starting point is found;
determining the shortest path based on the second end point and each of the upstream second points found recursively in turn.
Optionally, the second determining unit is further specifically configured to:
setting an upstream and downstream second point pair set and a first queue, wherein the upstream and downstream second point pair set is initially empty, and a second starting point is put into the tail of the initial first queue;
performing a first process, the first process comprising: if the first queue is not empty, retrieving one of the second points from the head of the first queue; determining an end point of the second edge in the set of adjacent edges of the fetched second point if the fetched second point is not the second end point; if the pair of end points are determined to be non-traversed points, taking the fetched second point and the fetched pair of end points as an upstream and downstream second point pair, and putting the fetched second point and the fetched pair of end points into the upstream and downstream second point pair set; placing the opposite end point into the end of the first queue and repeating the first process until the second point fetched is the second end point.
Optionally, before performing the first procedure, the second determining unit is further specifically configured to: setting a traversed point set, and initially placing the second starting point into the traversed point set;
the determining that the pair of endpoints is non-traversed points includes: if the pair of endpoints is not in the traversed point set, determining that the pair of endpoints is non-traversed points;
after placing the pair of endpoints into the tail of the first queue, the first process further includes: the pair of endpoints is placed into the traversed set of points.
Optionally, the second determining unit is further specifically configured to:
creating a stack;
taking the second ending point as a point to be inspected;
performing a second process, the second process comprising: pushing the point to be examined into the stack; acquiring an upstream second point corresponding to the point to be examined from the upstream and downstream second point pairs; if the upstream second point is not the second starting point, taking the upstream second point as the point to be examined, and repeating the second process until the upstream second point is the second starting point;
pushing the second starting point to the stack.
Optionally, after performing the second process, the second determining unit is further specifically configured to:
Creating a shortest path point set;
and repeatedly taking out one second point from the stack, and placing the second point at the end of the shortest path point set until the stack is taken out, so that the second point contained in the shortest path point set is the second point in the shortest path.
Optionally, after acquiring the line to be processed in the electronic map, the electronic map processing device further includes:
a third determining unit configured to determine a first start point and a first end point among the plurality of first points;
and the removing unit is used for removing the line to be processed if the first starting point and the first ending point are the same.
Optionally, the first determining unit is specifically configured to:
acquiring the sequence of the first edges corresponding to the second points in the line to be processed;
based on the order of the first edge, a first point of a plurality of second points is acquired as a second starting point, and a last point of the plurality of second points is acquired as a second ending point.
Optionally, the first obtaining unit is specifically configured to:
identifying the closed loop in the electronic map;
and acquiring a line passing through the closed loop on the electronic map as the line to be processed.
Optionally, the first obtaining unit is further specifically configured to:
determining a pixel line passing through each pixel point on the electronic map, wherein the pixel line comprises a plurality of pixel points which are communicated and arranged into a line;
if the path from the pixel point to the pixel point can be returned without passing through a repeated route along one pixel line passing through the pixel point, determining the path from the pixel point to the pixel point as the closed loop.
According to an aspect of the present disclosure, there is provided an electronic device including a memory storing a computer program and a processor implementing the electronic map processing method as described above when executing the computer program.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the electronic map processing method as described above.
According to an aspect of the present disclosure, there is provided a computer program product comprising a computer program which is read and executed by a processor of a computer device, causing the computer device to perform the electronic map processing method as described above.
In the embodiment of the disclosure, a first edge between two first points in a line to be processed of an electronic map is taken as a second point in a graph model, so that an intersection point of two adjacent first edges in the line to be processed becomes the second edge between two second points in the graph model. There are two cases of intersection: one is the intersection of two adjacent first edges in the line to be treated, one is the intersection between non-adjacent first edges, such as the intersection in a closed loop. When the latter crossing exists in the lines to be processed, the corresponding two second points of the two crossed first lines of the closed loop in the graph model are adjacent second points, and a second edge is arranged in the middle, which represents that the two first lines are crossed. At this time, traveling along this second side between the start point and the end point of the graph model can shorten the path between the start point and the end point. That is, the shortest path will occur along the second edge. The processed line obtained based on the shortest path eliminates the closed loop and improves the accuracy of the electronic map.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosed embodiments and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain, without limitation, the disclosed embodiments.
FIG. 1 is an architecture diagram of a system to which an electronic map processing method according to an embodiment of the present disclosure is applied;
FIGS. 2A-C are schematic diagrams of an electronic map processing method applied in a road route expansion scenario according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of an electronic map processing method according to an embodiment of the present disclosure;
FIG. 4A shows a schematic diagram of a closed loop of a wire to be processed in an embodiment of the present disclosure;
FIG. 4B is a schematic diagram illustrating the intersection of two non-adjacent first edges in an embodiment of the present disclosure;
FIG. 5A shows a schematic diagram of indexing each first edge in the line to be processed of FIG. 4A according to an embodiment of the present disclosure;
FIG. 5B illustrates a schematic diagram of a graph model generated according to the first side in FIG. 5A in accordance with an embodiment of the present disclosure;
FIG. 5C shows a schematic diagram of the shortest path in FIG. 5B in accordance with an embodiment of the present disclosure;
FIG. 5D shows a schematic diagram of an intersection and a processed line according to the shortest path of FIG. 5C in accordance with an embodiment of the present disclosure;
FIG. 6 is a flow chart of step 310 of FIG. 3 for obtaining a line to be processed by identifying a closed loop in accordance with an embodiment of the present disclosure;
FIG. 7 shows a schematic diagram of a line to be processed with a closed loop in an electronic map according to an embodiment of the disclosure;
FIG. 8A is a schematic diagram illustrating the path formation of a pixel point in an electronic map according to an embodiment of the disclosure;
FIG. 8B is a schematic diagram showing that paths of pixel points in an electronic map do not form a closed loop in an embodiment of the disclosure;
FIG. 9A is a schematic diagram illustrating an intersection relationship of two adjacent first edges in accordance with an embodiment of the present disclosure;
FIG. 9B is a schematic diagram illustrating an intersecting relationship of two non-adjacent first edges in accordance with an embodiment of the present disclosure;
FIG. 10 is a flow chart of step 330 of FIG. 3 for obtaining a second edge by solving the first edge in pairs;
FIG. 11 is a flow chart of step 1010 of FIG. 10 for two-by-two combinations of first edges by creating a second order Cartesian product in accordance with an embodiment of the present disclosure;
FIG. 12A is a schematic diagram illustrating intersection points obtained by solving the combination of the second order Cartesian products of FIG. 11 in accordance with an embodiment of the present disclosure;
FIG. 12B is a schematic diagram of intersection points obtained by solving combinations of permutations and combinations in accordance with an embodiment of the present disclosure;
FIG. 13 is a flow chart of step 1020 of FIG. 10 solving a function formed by latitude and longitude coordinates of a first point in accordance with an embodiment of the present disclosure;
FIG. 14 is a schematic diagram of converting longitude and latitude coordinates to orthogonal coordinates at step 1320 of FIG. 13 according to an embodiment of the present disclosure;
FIG. 15 is a flow chart of an embodiment of the present disclosure adding a second set of edges and an adjacent set of edges to that of FIG. 10;
FIG. 16 illustrates a schematic diagram of a set of adjacent edges for each second point in FIG. 5B in accordance with an embodiment of the present disclosure;
FIG. 17 is a flow chart of constructing a second edge of a graph model in accordance with an embodiment of the present disclosure;
FIG. 18 is a flow chart of step 340 of FIG. 3 in determining a second start point and a second end point by the order of the first edge in an embodiment of the present disclosure;
FIG. 19 is a flow chart of step 350 of FIG. 3 for determining the shortest path by looking up the upstream and downstream second point pairs in an embodiment of the present disclosure;
FIG. 20 is a flow chart of step 1910 of FIG. 19 of the present disclosure for determining upstream and downstream second point pairs by setting up an upstream and downstream second point pair set and a first queue;
FIG. 21 illustrates a schematic diagram of an upstream and downstream second point pair determined from the graph model of FIG. 5B in accordance with an embodiment of the present disclosure;
FIG. 22 is a flow chart of step 1920 of FIG. 19 of an embodiment of the present disclosure, looking up an upstream second point from a second end point by the setup stack;
FIG. 23 illustrates a schematic diagram of a stack determined from the graph model of FIG. 5B in accordance with an embodiment of the present disclosure;
FIG. 24 is a flow chart of setting a set of shortest path points based on FIG. 22 in accordance with an embodiment of the present disclosure;
FIG. 25 illustrates a schematic diagram of a shortest path point set resulting from a second point build taken from the stack of FIG. 23 in accordance with an embodiment of the present disclosure;
FIG. 26 is a flow chart of determining a set of shortest path points in an embodiment of the present disclosure;
FIG. 27 is a flow chart of an embodiment of the present disclosure determining a third point from the shortest path after step 360 in FIG. 3 to generate a processed line;
FIG. 28A illustrates a schematic diagram of an implementation of an embodiment of the present disclosure to determine points in a processed line from a shortest path point set;
FIG. 28B shows a schematic view of the processed line determined from the points in the processed line of FIG. 28A;
FIG. 29 is an overall flowchart of an electronic map processing method of an embodiment of the present disclosure;
FIG. 30 is a block diagram of an electronic map processing device according to an embodiment of the present disclosure;
fig. 31 is a terminal structure diagram of an electronic map processing method according to an embodiment of the present disclosure;
fig. 32 is a server configuration diagram of an electronic map processing method according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present disclosure.
Before proceeding to further detailed description of the disclosed embodiments, the terms and terms involved in the disclosed embodiments are described, which are applicable to the following explanation:
artificial intelligence: the system is a theory, a method, a technology and an application system which simulate, extend and extend human intelligence by using a digital computer or a machine controlled by the digital computer, sense environment, acquire knowledge and acquire a target result by using the knowledge. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision. The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions. With research and advancement of artificial intelligence technology, research and application of artificial intelligence technology is being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, automatic driving, unmanned aerial vehicles, robots, smart medical treatment, smart customer service, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and with increasing importance value.
Electronic map: i.e., digital maps, are maps that are stored and referred to digitally using computer technology.
High-precision electronic map: also called an automatic driving map and a high-resolution map, is a new map data paradigm for automatic driving automobiles. The absolute position precision of the high-precision electronic map is close to 1m, and the relative position precision is in the centimeter level, and can reach 10-20cm. Accurately and comprehensively representing road characteristics (such as accurate road shape, width, gradient, curvature, heading, elevation and roll data) and requiring higher real-time performance, and is the most obvious characteristic of a high-precision electronic map.
Standard precision electronic map: a single line road is provided, but an accurate road shape, for example, a width of the road is not provided. For example, a road segment has only a road center line and lacks two-sided road edges.
Lane-level navigation mainly uses a high-precision electronic map. In order to obtain an effect similar to a high-precision electronic map where there is no high-precision electronic map, a data compiling stage is required to convert a standard-precision electronic map into a high-precision electronic map. For example, when converting a standard-precision electronic map into a high-precision electronic map, it is necessary to widen a single line road of the standard-precision electronic map into a road having a width in accordance with a predetermined width. During the widening process, the edges of the road sometimes create a closed loop. For example, a border of a road that does not intersect in reality may become a closed loop due to the widening algorithm, some of which may become intersecting. But the occurrence of a closed loop on the side line of the road is obviously wrong, and the accuracy of the electronic map is reduced. Therefore, a technology capable of improving the accuracy of an electronic map and having more universality is urgently needed.
System architecture and scenario description applied to embodiments of the present disclosure
Fig. 1 is a system architecture diagram to which an electronic map processing method according to an embodiment of the present disclosure is applied. It includes an electronic map server 110, a mapping vehicle 150, a satellite 160, the internet 130, a gateway 120, an object terminal 140, and the like.
The object terminal 140 includes various forms of a desktop computer, a laptop computer, a PDA (personal digital assistant), a mobile phone, an in-vehicle terminal, a dedicated terminal, and the like. In addition, the device can be a single device or a set of a plurality of devices. The object terminal 140 may communicate with the internet 130 in a wired or wireless manner, exchanging data.
The electronic map server 110 refers to a computer system capable of providing some service to the object terminal 140. The electronic map server 110 is required to be higher in terms of stability, security, performance, etc. than the general object terminal 140. The electronic map server 110 may be one high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of one high-performance computer (e.g., a virtual machine), a combination of portions of multiple high-performance computers (e.g., virtual machines), and so on.
The mapping vehicle 150 is a vehicle capable of mapping a road. The mapping vehicle 150 may include both motor vehicles and non-motor vehicles, and may be capable of transmitting position information to the satellites 160 and receiving positioning information from the satellites 160 determined from the position information. Satellite 160 is a satellite that receives position information transmitted by surveying vehicle 150 to effect positioning. Satellites can be divided into three main categories: scientific satellites, technical test satellites and application satellites. In addition, the mapping vehicle 150 may send the received positioning information to the electronic map server 110, which generates an electronic map from the positioning information.
Gateway 120 is also known as an intersubnetwork connector, protocol converter. The gateway implements network interconnection on the transport layer, and is a computer system or device that acts as a translation. The gateway is a translator between two systems using different communication protocols, data formats or languages, and even architectures that are quite different. At the same time, the gateway may also provide filtering and security functions. The message transmitted from the object terminal 140 to the electronic map server 110 is transmitted to the corresponding server through the gateway 120. The message sent from the electronic map server 110 to the object terminal 140 is also sent to the corresponding object terminal 140 through the gateway 120.
The embodiments of the present disclosure may be applied in a variety of scenarios, such as the road line expansion scenario shown in fig. 2A-C, and the like.
Referring to fig. 2A, fig. 2A shows a road centerline. The road center line is a single line road in the standard precision electronic map, is sequentially connected by a plurality of line segments according to the sequence from the starting point to the ending point, and has no road width.
Referring to fig. 2B, fig. 2B shows the road line obtained after the expansion of the road line. The road line includes a road centerline, a left road edge, and a right road edge. The process of performing the route augmentation generally includes: determining a road center line; and expanding the road center line according to a preset expansion algorithm to obtain a left road edge and a right road edge. Since the predetermined expansion algorithm is set so as to cover all the road centerlines, it is possible to cause the expanded road edge to have a closed loop, for example, a closed loop in the right road edge when the road centerlines are faced with specific road centerlines (for example, the curvature of the road centerlines is large in fig. 2B).
Referring to fig. 2C, fig. 2C shows the resulting road line after removal of the closure ring. Similar to fig. 2B, the roadway line includes a roadway centerline, a left roadway edge, and a right roadway edge. But unlike in fig. 2B, the right road edge in fig. 2C has removed the closed loop.
General description of embodiments of the disclosure
According to one embodiment of the present disclosure, an electronic map processing method is provided.
The electronic map processing method is generally applied to a business scene in which a line in an electronic map exists in a closed loop, for example, a scene of road edge expansion shown in fig. 2A-C. The electronic map is a standard precision electronic map as described above. A portion of the lines in the electronic map form a closed loop. The line in the electronic map may be a road center line or a road side line. The electronic map processing method mainly removes the closed loop existing in the line. Currently, among the several lines of an electronic map, there are often some lines with closed loops. However, these lines with closed loops generally correspond to a road that does not intersect in reality, so the presence of closed loops results in lower accuracy of the electronic map. The embodiment of the disclosure provides a scheme for removing a closed loop in a line, which can improve the accuracy of an electronic map.
As shown in fig. 3, the electronic map processing method according to an embodiment of the present disclosure may include:
step 310, acquiring a line to be processed in an electronic map, wherein a part of the line to be processed forms a closed loop, and the line to be processed comprises a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
Step 320, using the first edge as a second point in the graph model to build the graph model;
step 330, constructing second edges between second points in the graph model based on the intersection relation of the first edges in the lines to be processed;
step 340, determining a second starting point and a second ending point of the plurality of second points;
step 350, determining a shortest path between the second starting point and the second ending point based on the second point and the second edge in the graph model;
step 360, based on the shortest path, acquiring a processed line, wherein the processed line is a line after the closed loop is removed from the line to be processed.
Steps 310-360 are described in detail below.
The electronic map processing method may be performed by the object terminal 140 shown in fig. 1 or by the electronic map server 110 shown in fig. 1.
In step 310, a line to be processed in the electronic map is acquired, a portion of the line to be processed forming a closed loop, the line to be processed including a plurality of first points and a first edge between each two adjacent first points of the plurality of first points.
The electronic map is a standard precision electronic map as described above. The line to be processed is a line with a closed loop, for example, a road center line with a closed loop or a road side line with a closed loop. The line to be processed refers to a complete, uninterrupted line on the electronic map, such as the left line or the right line of a road. Once the line is interrupted, for example, a road is repaired in the middle so that the road is divided into two parts, there will be no longer a line to be treated. There are a plurality of discrete points on the line to be treated. The first point is one of a plurality of discrete points. In the electronic map, the first point corresponds to a sampling point of an acquisition device (e.g., the mapping vehicle 150 of FIG. 1). As shown in fig. 1, a mapping vehicle may acquire positioning information from satellites 160 every cycle (e.g., every second) and report the acquired positioning information to electronic map server 110. The positioning information collected by the mapping vehicle 150 (i.e., the geographic location of the mapping vehicle at each acquisition) becomes the first point on the line to be processed. The first edge is a line between every two adjacent first points, for example between sampling points of two adjacent cycles of the mapping vehicle.
Referring to fig. 4A, fig. 4A shows a line to be processed. The line to be treated has a closed loop (the closed loop is shown as a dashed line in fig. 4A). The line to be processed has 8 discrete points, and there are 8 first points correspondingly. There are a total of 7 first edges between each two adjacent first points of the 8 first points. The characteristics of the closed loop of the wire to be treated are that: there are at least two first edges that are not adjacent edges, but there is an intersection point. For example, referring to fig. 4B, there is an intersection of two first edges that are not adjacent edges (the intersection being represented as the dashed line in fig. 4B).
Referring to fig. 5A, fig. 5A shows a schematic diagram of the index marking each first side in the line to be processed of fig. 4A. After the indexing of the 7 first sides is completed, 7 first sides in the line to be processed are denoted as first side 1, first side 2, first side 3, first side 4, first side 5, first side 6, and first side 7 in this order.
After the first edge is obtained in step 310, a graph model is built based on the first edge. A graph model is a model that describes relationships between things by abstract graphs of vertices and edges. In the disclosed embodiment, the vertex of the graph model is denoted as the second point and the edge of the graph model is denoted as the second edge. Embodiments of the present disclosure will describe the intersection relationship between every two first edges in a line to be processed using the second points and the second edges of the graph model. Wherein step 320 is for determining a second point of the graph model based on the first edges, and step 330 is for determining a second edge of the graph model based on the intersection of the first edges.
Next, in step 320, the first edge is used as a second point in the graph model to build the graph model.
Referring to fig. 5B, the first edge 1 corresponds to the second point 1 in the mapping model, the first edge 2 corresponds to the second point 2 in the mapping model, the first edge 3 corresponds to the second point 3 in the mapping model, the first edge 4 corresponds to the second point 4 in the mapping model, the first edge 5 corresponds to the second point 5 in the mapping model, the first edge 6 corresponds to the second point 6 in the mapping model, and the first edge 7 corresponds to the second point 7 in the mapping model.
Step 320 further specifically includes: taking the first edge as a second point in the graph model, and establishing the graph model; and establishing a mapping relation between the first edge and a second point in the graph model.
This has the advantage that it facilitates the efficient later acquisition of the second point corresponding to a certain first edge according to the mapping relation.
Next, in step 330, second edges between second points in the graph model are constructed based on the intersection relationships of the respective first edges in the line to be processed.
The intersection relationship includes an intersection and a non-intersection. When the intersection relationship is non-intersection, there is no second edge between the two second points. When the correlation is intersection, a second edge exists between the two second points.
With continued reference to FIG. 5B, there is an intersection between first edge 1 and second edge 2, so there is a second edge B between second point 1 and second point 2 12 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 2 and the second edge 3, so there is a second edge B between the second point 2 and the second point 2 23 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 2 and the second edge 6, so there is a second edge B between the second point 2 and the second point 6 26 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 3 and the second edge 4, so there is a second edge B between the second point 3 and the second point 4 34 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 4 and the second edge 5, so there is a second edge B between the second point 4 and the second point 5 45 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 5 and the second edge 6, so there is a second edge B between the second point 5 and the second point 6 56 The method comprises the steps of carrying out a first treatment on the surface of the There is an intersection between the first edge 6 and the second edge 7, so there is a second edge B between the second point 6 and the second point 7 67
After the graph model is obtained in step 330, the second point, the second edge, and the relationship between the second point and the second edge in the graph model are all completed. Then, a shortest path connecting the second points corresponding to the last first edge is found from the second points corresponding to the first edge, and each second edge passing through the shortest path is an abstract representation of the intersection point between each first edge. Finally, the line after the closed loop is removed is obtained based on the shortest path.
In step 340, a second start point and a second end point of the plurality of second points are determined.
The second starting point is a second point of the plurality of second points that orders the first, for example, the second starting point is second point 1 in fig. 5B. The second starting point is the last second point of the plurality of second points, for example, the second ending point is second point 7 in fig. 5B.
In step 350, a shortest path between the second start point and the second end point is determined based on the second point and the second edge in the graph model.
The graph model of the disclosed embodiment is an undirected and unauthorized graph, and various algorithms can calculate the shortest path between two second points in the graph model, such as breadth-first search algorithm, dijkstra algorithm, AStar algorithm and the like.
The second edge through which the shortest path passes is an abstract representation of the intersection between the first edges, and the second point on the shortest path is the first edge. The second edge on the shortest path is thus essentially the rest of the points on the line representing the constituent post-processing line excluding the second start point and the second end point (these points are all the intersections between the first edges, i.e., the two intersections shown in fig. 9A and 9B). And finally, adding a first starting point and a first ending point of the line to be processed, and finally forming a curve with the self-intersecting ring removed.
Referring to fig. 5C, the shortest path between the second start point and the second end point is the shortest path between the second point 1 and the second point 7 (the shortest path is shown as a dotted line in fig. 5C). The second points on the shortest path include a second point 1, a second point 2, a second point 6, and a second point 7. The second edge on the shortest path includes a second edge B 12 Second side B 26 And a second side B 67
In step 360, a processed line is acquired based on the shortest path, the processed line being the line after the closed loop has been removed from the line to be processed.
Referring to fig. 5D, a first edge 1 is determined based on a second point 1 on the shortest path, a first edge 2 is determined based on a second point 2 on the shortest path, a first edge 6 is determined based on a second point 5 on the shortest path, and a first edge 7 is determined based on a second point 7 on the shortest path. With continued reference to FIG. 5D, the second edge B on the shortest path is based on 12 Determining the intersection point i based on the second edge B on the shortest path 26 Determining intersection jBased on the second point edge B on the shortest path 67 An intersection point k is determined. The processed line (the processed line is shown as a dotted line in fig. 5D) is determined from the first side 1, the first side 2, the first side 6, the first side 7, and from the intersection point i, the intersection point k, and the intersection point j.
Through steps 310-360 described above, the embodiment of the present disclosure takes a first edge between two first points in a line to be processed of an electronic map as a second point in a graph model, so that an intersection point of two adjacent first edges in the line to be processed becomes a second edge between two second points in the graph model. There are two cases of intersection: one is the intersection of two adjacent first edges in the line to be treated, one is the intersection between non-adjacent first edges, such as the intersection in a closed loop. When the latter crossing exists in the lines to be processed, the corresponding two second points of the two crossed first lines of the closed loop in the graph model are adjacent second points, and a second edge is arranged in the middle, which represents that the two first lines are crossed. At this time, traveling along this second side between the start point and the end point of the graph model can shorten the path between the start point and the end point. That is, the shortest path will occur along the second edge. The processed line obtained based on the shortest path eliminates the closed loop and improves the accuracy of the electronic map. In addition, from the geometric perspective, the embodiment of the invention has strong robustness, less dependent original data, avoids the extreme case without introducing complex calculation strategies, and can improve the efficiency and accuracy of removing the closed loop.
The foregoing is a general description of steps 310-360, and since step 320 is already detailed in the general description above, a detailed description will be developed below for specific implementations of steps 310, 330-360.
Detailed description of step 310
In step 310, a line to be processed in the electronic map is acquired.
In some embodiments, the determination of the fetch cycle of the line to be processed includes the following:
(1) After the electronic map is obtained, the line to be processed in the electronic map is immediately obtained;
(2) And acquiring a line to be processed in the electronic map after the electronic map is acquired and when the acquisition period is past according to a preset acquisition period. For example, the preset determination period is 10 minutes, and if the time for obtaining the electronic map is eight am on the same day, the time for obtaining the line to be processed is 10 minutes from eight am on the same day.
In some embodiments, the manner in which the image to be processed is acquired includes, but is not limited to, the following:
(1) If the closed loop mark exists on the electronic map, determining a line with the closed loop mark from the electronic map after the electronic map is obtained, and taking the line with the closed loop mark as a line to be processed;
(2) And acquiring the line with the closed loop from the electronic map database, and taking the line with the closed loop as a line to be processed.
The two acquisition modes need to manually mark the closed loop mark in the electronic map in advance or mark the line with the closed loop in advance, and the manual marking workload is large. In order to reduce the workload of manual labeling and further improve the accuracy of the electronic map, in one embodiment, the closed loop may be automatically identified, so as to obtain the line to be processed.
In this embodiment, referring to fig. 6, step 310 specifically includes:
step 610, identifying a closed loop in the electronic map;
and 620, acquiring a line passing through the closed loop on the electronic map as a line to be processed.
Steps 610-620 are described in detail below.
In step 610, the closed loop is one loop in the electronic map. After identifying the closed loop of the electronic map, in step 620, a line passing through the closed loop is acquired as a line to be processed.
Referring to fig. 7, fig. 7 shows two lines (portions circled by dotted lines) in the electronic map, both of which pass through the closed loop, and thus both of which can be used as lines to be processed.
The method has the advantages that manual marking is not needed, and the acquisition efficiency and the accuracy of the electronic map can be improved.
The electronic map comprises pixel points and non-pixel points, wherein pixel lines are formed by the pixel points and used as lines in the electronic map, and blank areas in the electronic map are formed by the non-pixel points. In an embodiment, the closed loop in the electronic map may be determined by a pixel point.
In this embodiment, step 610 specifically includes:
for each pixel point on the electronic map, determining a pixel line passing through the pixel point, wherein the pixel line comprises a plurality of pixel points which are communicated and arranged into a line;
if the return to the pixel point can be made without passing through the repeated route along one pixel line passing through the pixel point from the pixel point, the path from the pixel point to the pixel point is determined as a closed loop.
Referring to fig. 8A, fig. 8A shows an electronic map in which there is one line with closed loops. For the pixel point Q, the pixel line passing through the pixel point Q is determined as the line having the closed loop. The path from the pixel point Q to the pixel point Q (the closed path formed by the broken line arrow in fig. 8A) can be determined as the closed loop by returning to the pixel point Q without going through the repeated route along the line provided with the closed loop.
Referring to fig. 8B, fig. 8B shows an electronic map in which there is one line without a closed loop. For a pixel point P, a pixel line passing through the pixel point P is determined as the line without the closed loop. Since the pixel point P cannot be returned to the line without the closed loop along the line without the repeated route, the closed loop cannot be specified (as shown in fig. 8B, the closed path cannot be obtained by combining the broken arrows).
The above is a detailed description of step 310.
In the above embodiment, a part of the wire to be processed forms the closed loop, and the wire to be processed is processed to remove the closed loop. In some cases, however, all of the lines to be treated form a closed loop, possibly with the line itself corresponding to a closed loop road line, in which case the closed loop need not be removed. Thus, in one embodiment, the line to be treated needs to be removed.
In the implementation of this embodiment, after step 310, the following steps are further included:
determining a first starting point and a first ending point of the plurality of first points;
and if the first starting point and the first ending point are the same, removing the line to be processed.
As described above, the first point may be a geographic location indicated by the positioning information collected per cycle of the mapping vehicle 150. Therefore, each first point on the line to be processed has a corresponding acquisition time for acquiring positioning information. And sequencing a plurality of first points on the same line to be processed according to the acquisition time, wherein the first point with the earliest time is a first starting point, and the first point with the latest time is a first ending point.
If the first starting point is the same as the first ending point, indicating that the mapped vehicle emanates from one point and finally returns to the same point, the mapped vehicle's trajectory itself is a closed loop, which should not be formed, and should be removed. Therefore, the number of the lines to be processed which need to be processed can be reduced by removing the lines to be processed, of which the first starting point and the first ending point are the same, and processing resources are saved.
Detailed description of step 330
In step 330, second edges between second points in the graph model are constructed based on the intersection relationships of the respective first edges in the line to be processed.
The explanation about the first side and the intersecting relation has been described in the above general description, and will not be repeated here.
The intersection relationship is divided into two cases, the first case is the intersection between two adjacent first edges, and the second case is the intersection between two non-adjacent first edges. Referring to fig. 9A, the intersection between the first edge 1 and the first edge 2 belongs to the first case. Referring to fig. 9B, the intersection between the first edge 2 and the first edge 6 belongs to the second case.
Whether first or second, the manner in which the intersection between the two first edges is determined includes, but is not limited to:
(1) Based on the calculation geometry JTS library, it is possible to calculate whether there are intersections of the two first sides, and the coordinates of the intersections.
(2) The ray intersection method based on the optimization method can calculate whether two first sides have intersection points or not and the coordinates of the intersection points.
In order to further improve the efficiency of determining the second edge, in one implementation, it is determined whether there is an intersection point and the coordinates of the intersection point by a functional formula between the two first edges, and further, whether there is a second edge.
In the implementation of this embodiment, referring to fig. 10, step 330 includes:
step 1010, performing pairwise combination on each first edge in the line to be processed;
step 1020, for each combination, performing simultaneous solution on the functions of the two first sides in the combination;
step 1030, if there is a solution, adding a second edge between the second points corresponding to the two first edges.
Steps 1010-1030 are described in detail below.
In step 1010, combining two by two means that any two of the first sides are combined to obtain all possible combinations, where two of the possible combinations may be the same or different.
In step 1020, a first edge in the combination corresponds to a functional formula, a second first edge in the combination also corresponds to a functional formula, the two functional formulas are solved simultaneously, and the result of the solution represents the intersection point between the two first edges.
In step 1030, if a solution exists, it is indicated that there is an intersection between the two first edges, and thus a second edge between the corresponding second points of the two first edges.
The method has the advantages that the intersection points are obtained by combining the first edges in pairs and solving the functions simultaneously, so that the determination of the intersection relation between the first edges is realized, and the determination efficiency and accuracy can be improved.
In some embodiments, the manner in which the pairwise combinations are made includes the following:
(1) Each first edge of the line to be treated is combined in pairs by using permutation and combination;
(2) And combining the first sides of the lines to be processed in pairs by using second-order Cartesian products.
For the first case, permutation and combination is the most basic concept of combinatorial science. The term "arrangement" means that a predetermined number of elements are extracted from a predetermined number of elements and sorted. Combining means that only a specified number of elements is taken out of a given number of elements, regardless of ordering. For example, the first side of the line to be processed includes a first side 1, a first side 2, a first side 3, a first side 4, a first side 5, a first side 6, and a first side 7. Then after arranging the combinations, the resulting combinations include: { (first side 1, first sides 1 to 7), (first side 2, first sides 1 to 7), (first side 3, first sides 1 to 7), (first side 4, first sides 1 to 7), (first side 5, first sides 1 to 7), (first side 6, first sides 1 to 7), (first side 7, first sides 1 to 7). A total of 49 combinations.
More specifically, (first side 1, first sides 1 to 7) are expressed as: { (first side 1 ), (first side 1, first side 2), (first side 1, first side 3), (first side 1, first side 4), (first side 1, first side 5), (first side 1, first side 6), (first side 1, first side 7) }.
(first side 2, first sides 1 to 7) are expressed as: { (first side 2, first side 1), (first side 2 ), (first side 2, first side 3), (first side 2, first side 4), (first side 2, first side 5), (first side 2, first side 6), (first side 2, first side 7) }.
(first side 3, first sides 1 to 7) are expressed as: { (first side 3, first side 1), (first side 3, first side 2), (first side 3 ), (first side 3, first side 4), (first side 3, first side 5), (first side 3, first side 6), (first side 3, first side 7) }.
(first side 4, first sides 1 to 7) are expressed as: { (first side 4, first side 1), (first side 4, first side 2), (first side 4, first side 3), (first side 4 ), (first side 4, first side 5), (first side 4, first side 6), (first side 4, first side 7) }.
(first side 5, first sides 1 to 7) are expressed as: { (first side 5, first side 1), (first side 5, first side 2), (first side 5, first side 3), (first side 5, first side 4), (first side 5, first side 6), (first side 5, first side 7) }.
(first side 6, first sides 1 to 7) are expressed as: { (first side 6, first side 1), (first side 6, first side 2), (first side 6, first side 3), (first side 6, first side 4), (first side 6, first side 5), (first side 6 ), (first side 6, first side 7) }.
(first side 7, first sides 1 to 7) are expressed as: { (first side 7, first side 1), (first side 7, first side 2), (first side 7, first side 3), (first side 7, first side 4), (first side 7, first side 5), (first side 7, first side 6), (first side 7 ) }.
For the second case, the second order Cartesian product refers to the Cartesian product of two sets C and D, also called the direct product, expressed mathematically, the first object being a member of C and the second object being one of all possible ordered pairs of D.
In this second scenario, referring to fig. 11, step 1010 includes:
step 1110, creating a second order cartesian product between respective first edges in the line to be processed, each element of the second order cartesian product representing a pair of first edges;
step 1120, traversing each element of the second order Cartesian product, and if the first index is smaller than the second index, taking a pair of first edges of the element as the resulting combination.
Steps 1110-1120 are described in detail below.
In step 1110, each first edge in the line to be processed is taken as a C set, each first edge in the line to be processed is taken as a D set, and a second order cartesian product between each first edge is constructed according to the C set and the D set. Each element comprises a pair of first edges, wherein the pair of first edges have a first index and a second index, the first index is the sequence number of the first edge in the line to be processed in the first edge of the pair of first edges, and the second index is the sequence number of the second edge in the line to be processed in the second edge of the pair of first edges.
For example, after passing through the second order cartesian product, the resulting elements include { (first side 1, first side 1 to 7), (first side 2, first side 1 to 7), (first side 3, first side 1 to 7), (first side 4, first side 1 to 7), (first side 5, first side 1 to 7), (first side 6, first side 1 to 7), (first side 7, first side 1 to 7). A total of 49 elements. If an element is (first edge 1, first edge 2), the first index is specifically the first index 1, and the second index is specifically the second index 2. For another example, one element is (first side 5, first side 4), then the first index is specifically the first index 5, and the second index is specifically the second index 4.
In step 1120, for each element, when the condition that the first index is less than the second index is satisfied, a pair of first edges in the element is taken as the resulting combination.
For example, a first index in one element is a first index 1, and a second index is specifically a second index 2; at this time, the first index 1 is smaller than the second index 2, and (first side 1, first side 2) in the element is taken as the obtained combination. For another example, the first index in one element is specifically a first index 5, and the second index is specifically a second index 4; at this time, the first index 5 is larger than the second index 4, and (first side 5, first side 4) in the element cannot be used as the obtained combination. The resulting combination includes { (first side 1, first side 2), (first side 1, first side 3), (first side 1, first side 4), (first side 1, first side 5), (first side 1, first side 6), (first side 1, first side 7), (first side 2, first side 3), (first side 2, first side 4), (first side 2, first side 5), (first side 2, first side 6), (first side 2, first side 7), (first side 3, first side 4), (first side 3, first side 5), (first side 3, first side 6), (first side 3, first side 7), (first side 4, first side 5), (first side 4, first side 6), (first side 4, first side 7), (first side 5, first side 6), (first side 5, first side 7), (first side 6, first side 7) }. A total of 21 combinations. Compared with the combination obtained by the arrangement and combination mode, the number of the combinations is greatly reduced.
The benefit of this embodiment is that the number of combinations that need to be solved can be reduced by removing some elements that do not meet the conditions through the traversal of the second order Cartesian product, thereby improving the solving efficiency.
For both combinations of step 1010 described above, the results of the solutions under the different combinations are given with reference to FIGS. 12A-B.
Referring to fig. 12A, in the second order cartesian product, the first index is smaller than the second index, and the index satisfying the existence of the intersection point between the two first sides includes { (first index 1, second index 2), (first index 2, second index 3), (first index 2, second index 6), (first index 3, second index 4), (first index 4, second index 5), (first index 6, second index 7) }. The coordinates of the solved intersections include { (7,4.5), (2,5.5), (3.5,5.2), (1,6.5), (2.5,7), (3, 6), (4.5,3.5) }.
Referring to fig. 12B, under the combination obtained by the combination formula, the combination in which the intersection point exists between the two first sides includes { (first side 1, first side 2), (first side 2, first side 3), (first side 2, first side 6), (first side 3, first side 4), (first side 5, first side 6), (first side 6, first side 7) }. The coordinates of the solved intersections include { (7,4.5), (2,5.5), (3.5,5.2), (1,6.5), (2.5,7), (3, 6), (4.5,3.5) }.
In step 1020, for each combination, a simultaneous solution is performed on the functional formulas of the two first edges in the combination.
Each first edge corresponds to a functional formula, which is specifically a piecewise function. And carrying out simultaneous solving on the functional formulas of the two first sides, namely carrying out simultaneous solving on the two piecewise functions, so as to obtain whether an intersection point exists or not and an intersection point coordinate.
In one embodiment, referring to fig. 13, step 1020 specifically includes:
step 1310, acquiring longitude and latitude coordinates of a first point;
step 1320, transforming longitude and latitude coordinates into orthogonal coordinate system coordinates;
step 1330, determining a functional formula of a first edge between two adjacent first points based on the orthogonal coordinate system coordinates between the two adjacent first points in the line to be processed;
step 1340, for each combination, performing simultaneous solution on the functional formulas of the two first sides in the combination.
Steps 1310-1340 are described in detail below.
In step 1310, longitude and latitude refer to a coordinate system composed of longitude and latitude, which is a spherical coordinate system that uses a sphere of three-dimensional space to define a space on the earth, and can indicate any position on the earth. Longitude and latitude coordinates refer to the location of the first point on the longitude and latitude coordinate system.
In some embodiments, the manner in which latitude and longitude coordinates are obtained includes the following:
(1) Acquiring longitude and latitude coordinates of a first point from a longitude and latitude database;
(2) Positioning information of a first point is obtained from a satellite, and longitude and latitude coordinates are obtained based on the positioning information.
For example, the longitude and latitude coordinates of the first point are (114 °,51 °). For another example, the longitude and latitude coordinates of the first point are (33 °,101 °).
In step 1320, the latitude and longitude coordinates are transformed into orthogonal coordinate system coordinates.
The orthogonal coordinate system, also called rectangular coordinate system, is a plane coordinate system that defines a position on a plane using an orthogonal relationship. The orthogonal coordinate system coordinates refer to the position of the first point on the orthogonal coordinate system.
In some embodiments, the manner in which the coordinates are converted includes the following:
(1) Converting longitude and latitude coordinates into orthogonal coordinate system coordinates by directly utilizing a geographic coordinate conversion tool;
(2) An orthogonal coordinate system is defined in advance, longitude and latitude coordinates are mapped on the orthogonal coordinate system, and the orthogonal coordinate system coordinates are obtained according to the mapped positions.
For example, referring to fig. 14, fig. 14 shows the respective first points, and the coordinates of the respective first points on an orthogonal coordinate system (X, Y). Wherein, a total of 8 first points, including first point A1, first point A2, first point A3, first point A4, first point A5, first point A6, first point A7, and first point A8. The 8 orthogonal coordinate system coordinates of the first point include { (10, 4), (7,4.5), (2,5.5), (1,6.5), (2.5,7), (3, 6), (4.5,3.5), (5, 1.5) }.
In step 1330, a functional of the first edge between two adjacent first points in the line to be processed is determined based on the orthogonal coordinate system coordinates between the two adjacent first points.
For example, the coordinates of one first point are expressed as (x 1, y 1), the coordinates of the other first point are expressed as (x 2, y 2), and a functional formula of the first side between the two first points can be obtained, expressed as formula (1):
y=kx+b, min (x 1, x 2) < x < max (x 1, x 2), min (y 1, y 2) < y < max (y 1, y 2), formula (1).
With continued reference to fig. 14, substituting formula (1), the functional formula of the first side 1 for the first point A1 (10, 4) and the first point A2 (7,4.5) is expressed as: y is A1A2 = -0.17x+5.7, x is 7-10, y is 4-4.5. For the first point A2 (7,4.5) and the first point A3 (2,5.5), the functional formula of the first side 2 is expressed as: y is A2A3 = -0.2x+5.9, x is 2-7,4.5 y is 5.5. For the first point A3 (2,5.5) and the first point A4 (1,6.5), the functional formula of the first side 3 is expressed as: y is A3A4 = -1x+7.5, x is 1-2,5.5 y is 6.5. For the first point A4 (1,6.5) and the first point A5 (2.5,7), the functional formula of the first side 4 is expressed as: y is A4A5 =0.33x+6.17, 1.ltoreq.x.ltoreq. 2.5,6.5.ltoreq.y.ltoreq.7. For the first point A5 (2.5,7) and the first point A6 (3, 6), the functional formula of the first side 5 is expressed as: y is A5A6 = -2x+12, x is 2.5-3, y is 6-7. For the first point A6 (3, 6) and the first point A7 (4.5,3.5), the functional formula of the first side 6 is expressed as: y is A6A7 = -1.67x+11, 3.ltoreq.x.ltoreq. 4.5,3.5.ltoreq.y.ltoreq.6. For the first point A7 (4.5,3.5) and the first point A8 (5, 1.5), the functional formula of the first side 7 is expressed as: y is A7A8 =-4x+21.5,4.5≤x≤5,1.5≤y≤3.5。
In step 1340, for each combination, the functional formulas of the two first edges in the combination are solved concurrently.
For example, if the combination includes first edge 1 and first edge 2, then the function y for first edge 1 is required A1A2 And the function y of the first side 2 A2A3 Simultaneous solution is performed to obtain intersection point coordinates (7,4.5). The combination includes a first side 2 and a first side 3, and the function formula y of the first side 2 is needed A2A3 And the function y of the first side 3 A3A4 Simultaneous solution is performed to obtain intersection point coordinates (2,5.5). The combination includes the first side 2 and the first side 6, and the function formula y of the first side 2 is needed A2A3 And the function y of the first side 3 A6A7 Simultaneous solution is performed to obtain intersection point coordinates (3.5,5.2). The combination includes the first side 3 and the first side 4, the function y of the first side 3 is needed A3A4 And the function y of the first side 4 A4A5 Simultaneous solution is performed to obtain intersection point coordinates (1,6.5). The combination includes a first side 4 and a first side 5, and the function formula y of the first side 4 is needed A4A5 And the function y of the first side 5 A5A6 Simultaneous solution is performed to obtain intersection point coordinates (2.5,7). The combination includes a first side 5 and a first side 6, and then the function formula y of the first side 5 is needed A5A6 And the function y of the first side 6 A6A7 And (3) performing simultaneous solving to obtain the intersection point coordinates (3, 6). The combination includes a first side 6 and a first side 7, and then the function formula y of the first side 6 is needed A6A7 And the first side 7 of the functional formula y A7A8 Simultaneous solution is performed to obtain intersection point coordinates (4.5,3.5).
Through the steps 1310-1340, the intersection point coordinates can be calculated by using the orthogonal coordinates and the function, and the calculation complexity is low, so that the efficiency of determining the second edge is improved.
It will be appreciated that when step 330 is broken down into steps 1010-1030, a first edge between two adjacent first points may be obtained. To facilitate processing of the first edges, in another embodiment, step 330 also provides for a second set of edges, and an adjacent set of edges for each second point.
In this embodiment, referring to fig. 15, step 330 specifically includes:
step 1510, setting a second edge set, and setting an adjacent edge set for each second point;
step 1010, performing pairwise combination on each first edge in the line to be processed;
Step 1020, for each combination, performing simultaneous solution on the functions of the two first sides in the combination;
step 1520, if there is a solution, adding the second edge solved concurrently to the second edge set, and to the set of adjacent edges of the two second points corresponding to the second edge.
Since step 1010 and step 1020 have been described in detail above, step 1510 and step 1520 will be described in detail below.
In step 1510, the second set of edges is a container for holding the second edge and the set of adjacent edges of the second point is a container for the adjacent edges where the second point exists. The second set of edges is initially an empty set and the adjacent set of edges is also initially an empty set.
In step 1520, if there is a solution, it is indicated that there is an intersection between the two first edges, thereby indicating that there is a second edge between the two second points. The second edge is then added to the second set of edges and the second edge is added to the set of adjacent edges of the two second points corresponding to the second edge, respectively.
The benefit of this embodiment is that the second edge is stored with the collection, which enables an efficient management of the second edge and facilitates an improved efficiency of subsequent invocations of the second edge.
Referring to fig. 5B and 16, fig. 5B shows a schematic structural view of a graph model, and fig. 16 shows a set of adjacent edges of each second point. The adjacent edge set of the second point 1 comprises a second edge B 12 . The adjacent edge set of the second point 2 comprises a second edge B 12 Second side B 23 And a second side B 26 . The adjacent edge set of the second point 3 comprises a second edge B 23 And a second side B 34 . The adjacent edge set of the second point 4 comprises a second edge B 34 And a second side B 45 . The set of adjacent edges of the second point 5 includes a second edge B 45 And a second side B 56 . The set of adjacent edges of the second point 6 includes a second edge B 26 Second side B 56 And a second side B 67 . The set of adjacent edges of the second point 7 includes a second edge B 67
Details of the implementation of step 330 of embodiments of the present disclosure are illustrated in detail below with reference to fig. 17.
Step 330 specifically includes the following implementation details:
(1) Starting;
(2) Creating a second order Cartesian product between respective first edges in the line to be processed, each element of the second order Cartesian product representing a pair of first edges;
(3) Setting a second edge set, and setting an adjacent edge set for each second point;
(4) Traversing each element of the second order Cartesian product;
(5) Judging whether the first index is smaller than the second index; if yes, entering a step (6), and if not, entering a step (4);
(6) A pair of first sides in the element are taken as a obtained combination;
(7) For each combination, carrying out simultaneous solution on the functional formulas of the two first sides in the combination;
(8) Judging whether a solution exists; if yes, entering a step (9), and if not, entering a step (4);
(9) The simultaneous solved second edge is added to the second edge set and to the set of adjacent edges of the two second points corresponding to the second edge.
Advantages of this embodiment include, but are not limited to: the elements which do not meet the conditions are removed through the traversal of the second-order Cartesian product, so that the number of combinations to be solved can be reduced, and the solving efficiency is improved; the second edges are stored by the collection, so that the second edges can be effectively managed, and the efficiency of subsequently calling the second edges is improved; the method can realize the determination of the second edge by simultaneous solving of the function of the first edge, and has lower calculation complexity, thereby improving the efficiency of determining the second edge.
The above is a detailed description of step 330.
Detailed description of step 340
In step 340, a second start point and a second end point of the plurality of second points are determined.
The second starting point is a second point of the plurality of second points that orders the first, for example, the second starting point is second point 1 in fig. 5B. The second starting point is the last second point of the plurality of second points, for example, the second ending point is second point 7 in fig. 5B.
In one embodiment, referring to fig. 18, step 340 specifically includes:
step 1810, acquiring the sequence of the first edges corresponding to the second points in the line to be processed;
step 1820, based on the order of the first edge, acquiring a first point of the plurality of second points as a second starting point, and acquiring a last point of the plurality of second points as a second ending point.
Steps 1810 to 1820 are described in detail below.
In step 1810, each second point corresponds to a first edge, for example, second point 1 corresponds to first edge 1, and for example, second point 2 corresponds to first edge 2. The first sides are arranged sequentially in the line to be treated, for example the first side 1 is in sequence 1 and for example the first side 2 is in sequence 2.
In step 1820, a second start point and a second end point may be determined based on the order of the first edges. For example, if the first side is the first side 1 in the order, the second point 1 corresponding to the first side 1 is taken as the second starting point. For another example, if the last first side is the first side 7, the second point 7 corresponding to the first side 7 is set as the second end point.
The embodiment has the advantages that the first edges are in one-to-one correspondence with the second points, and the second starting points and the second ending points in the second points are determined according to the sequence of the first edges, so that the second starting points and the second ending points can be determined quickly, and the corresponding relation between the first edges and the second points is ensured.
The above is a detailed description of step 340.
Detailed description of step 350
In step 350, a shortest path between the second start point and the second end point is determined based on the second point and the second edge in the graph model.
The shortest path is a path having the smallest number of second sides among the second sides passing between the second start point and the second end point.
In one embodiment, referring to fig. 19, step 350 specifically includes:
step 1910, starting traversing along a second edge in the graph model from a second starting point, and acquiring an upstream and downstream second point pair until traversing to a second ending point;
step 1920, starting from the second ending point, recursively searching for the second point at the upstream according to the second point pair at the downstream in turn until a second starting point is found;
step 1930, determining the shortest path based on the second end points, and each upstream second point found recursively in turn.
Steps 1910 to 1930 are described in detail below.
In step 1910, the upstream and downstream second point pairs include an upstream second point and a downstream second point, the downstream second point being an un-traversed second point found from the upstream second point along the second edge. For example, the second points include first points 1-7, and the second start point is second point 1 and the second end point is second point 7. The resulting upstream and downstream second point pairs may be (second point 1, second point 2), (second point 2, second point 3) (second point 2, second point 6), (second point 3, second point 4), (second point 4, second point 5), (second point 6, second point 7).
It should be noted that the above-mentioned upstream and downstream second point pairs do not include (second point 5, second point 6). This is because when the second point 2 is an upstream second point, an upstream-downstream second point pair (second point 2, second point 6) is constructed with the second point 6 that has not been traversed. So when the second point 5 is the upstream second point, the second point 6 that has been traversed will not be the downstream second point, so that there is no upstream-downstream second point pair of the second point 5 and the second point 6, i.e. there is no (second point 5, second point 6).
In step 1920, starting from the second end point, the upstream second point is recursively searched in turn, according to the upstream-downstream second point pair, until a second start point is found.
In combination with the above, the second end point is the second point 7, and from the second point 7, the upstream second point obtained according to the upstream-downstream second point pair includes the second point 6, the second point 2, and the second point 1.
In step 1930, a shortest path is determined based on the second end point and each of the upstream second points found recursively in turn.
Continuing with the above, the shortest path is determined based on the second end point being the second point 7, and the second points 6, second 2, and second 1 included in each upstream second point. In the shortest path, the second side passing between the second point 1 and the second point 7 comprises a second side B 12 Second side B 26 And a second side B 67
The benefit of this embodiment is that the shortest path is calculated using breadth-first search, and route duplication is reduced by the upstream and downstream second points, also improving search efficiency.
The foregoing is a general description of steps 1910-1930, and steps 1910 and 1920 are described in detail below.
In one embodiment, referring to fig. 20, step 1910 specifically includes:
step 2010, setting an upstream and downstream second point pair set and a first queue, wherein the upstream and downstream second point pair set is initially empty, and a second starting point is placed at the tail of the initial first queue;
step 2020, performs a first process.
Steps 2010-2020 are described in detail below.
In step 2010, the set of upstream and downstream second point pairs refers to a container for storing upstream and downstream second point pairs, and the first queue refers to a container for storing traversal points. The upstream and downstream second point pair sets are initially empty. And placing the second starting point into the tail of the initial first queue, which indicates that the first queue is not empty at the moment.
In step 2020, the first process is repeated in order to deposit the resulting pairs of upstream and downstream second points into the pairs of upstream and downstream second points. The first process comprises: if the first queue is not empty, taking a second point from the head of the first queue; if the fetched second point is not the second end point, determining a pair of end points of the second edge in the set of adjacent edges of the fetched second point; if the opposite end point is determined to be an un-traversed point, taking the extracted second point and the opposite end point as an upstream and downstream second point pair, and putting the extracted second point and the opposite end point into an upstream and downstream second point pair set; the end point is placed in the end of the first queue and the first process is repeated until the second point fetched is the second end point.
The benefit of this embodiment is that breadth first search shortest paths can be achieved with the set of upstream and downstream second point pairs and the first queue, and search efficiency can be further improved.
In an embodiment, before performing the first process, step 1910 further includes: setting a traversed point set, and initially placing a second starting point into the traversed point set; correspondingly, the determination in the first process is that the endpoint is an unremoved point, and is replaced by: if the endpoint is not in the traversed point set, determining that the endpoint is an un-traversed point; and correspondingly, after placing the opposite end point into the tail of the first queue in the first process, the first process further includes: the pair endpoint is placed into the traversed set of points.
The benefit of this embodiment is that based on a comparison of the endpoints to the set of traversed points, it can be quickly determined whether the pair of endpoints are non-traversed points, improving the determination efficiency.
Referring to fig. 5B and 21, a schematic diagram of the construction of the graph model is shown in fig. 5B, and a schematic diagram of fig. 21 showing the passing second edge and the corresponding upstream and downstream second point pair. The first queue has a second point 1 stored therein before the first procedure is performed. The repeatedly executing the first process specifically includes:
(1) Fetching a second point from the head of the first queue, the second point being second point 1; if the second point 1 is not the second end point, then determining a second edge B of the set of adjacent edges of the second point 1 12 Is the opposite end point of (a)A second point 2; determining that the second point 2 is not in the traversed point set, and determining that the second point 2 is a non-traversed point; the resulting upstream and downstream second point pair is (second point 1, second point 2); put second point 2 into the end of the first queue and put second point 2 into the traversed set of points. At this point the queue stores the second point 2.
(2) Fetching a second point from the head of the first queue, the second point being second point 2; if the second point 2 is not the second end point, then a second edge B of the set of adjacent edges of the second point 2 is determined 23 And a second side B 26 Is a pair of end points of the second point 3 and the second point 6; determining that the second point 2 and the second point 6 are not in the traversed point set, determining that the second point 2 and the second point 6 are non-traversed points; the resulting upstream and downstream second point pairs are (second point 2, second point 3), and (second point 2, second point 6); put second point 2 and second point 6 into the end of the first queue and put second point 2 and second point 6 into the traversed point set. At this point, the queue stores the second point 3 and the second point 6.
(3) Fetching a second point from the head of the first queue, the second point being second point 3; if the second point 3 is not the second end point, then a second edge B of the set of adjacent edges of the second point 3 is determined 34 Is the second point 4; determining that the second point 4 is not in the traversed point set, and determining that the second point 4 is a non-traversed point; the resulting upstream and downstream second point pair is (second point 3, second point 4); put the second point 4 into the end of the first queue and put the second point 4 into the traversed set of points. At this point the queue stores the second point 6 and the second point 4.
(4) Fetching a second point from the head of the first queue, the second point being second point 6; if the second point 6 is not the second end point, then a second edge B of the set of adjacent edges of the second point 6 is determined 67 Is the second point 7; determining that the second point 7 is not in the traversed point set, determining that the second point 7 is a non-traversed point; the resulting upstream and downstream second point pair is (second point 6, second point 7); put the second point 7 into the end of the first queue and put the second point 7 into the traversed set of points. At this point the queue has second points 4 and 7 stored therein.
(5) Fetching a second point from the head of the first queue, the second point being second point 4; if the second point 4 is not the second end point, then a second edge B of the set of adjacent edges of the second point 4 is determined 45 Is the second point 5; determining that the second point 5 is not in the traversed point set, determining that the second point 5 is a non-traversed point; the resulting upstream and downstream second point pair is (second point 4, second point 5); put the second point 5 into the end of the first queue and put the second point 5 into the traversed set of points. At this point the queue stores the second point 7 and the second point 5.
(6) Fetching a second point from the head of the first queue, the second point being second point 7; the second point 7 is the second end point and the first procedure is exited.
The foregoing is a detailed description of step 1910, and step 1920 is described in detail below.
In one embodiment, referring to fig. 22, step 1920 specifically includes:
step 2210, creating a stack;
step 2220, using the second end point as the point to be inspected;
step 2230, executing a second process;
step 2240, press the second starting point onto the stack.
Steps 2210-2230 are described in detail below.
In step 2210, the stack refers to the container used to store the second point.
In step 2220, the second end point refers to the last second point of the ranking, e.g., second point 7 described above. The second end point is taken as the point to be investigated, i.e. the second point 7 is taken as the point to be investigated.
In step 2230, a second process includes: pushing the point to be inspected into a stack; acquiring an upstream second point corresponding to the point to be inspected from the upstream and downstream second point pairs; if the upstream second point is not the second starting point, the second process is repeated with the upstream second point as the point to be inspected until the upstream second point is the second starting point.
Referring to fig. 5B and 23, fig. 5B shows a schematic structural diagram of the graph model, and fig. 23 shows a schematic diagram of a specific implementation of the second process. The second process specifically comprises the following steps:
(1) Pushing the second point 7 onto the stack;
(2) Acquiring the second point upstream of the second point 7 as a second point 6 from the second point pairs upstream and downstream, and pushing the second point 6 into a stack if the second point 6 is not a second starting point;
(3) Acquiring the second point upstream of the second point 6 as a second point 2 from the second point pairs upstream and downstream, and pushing the second point 2 into a stack if the second point 2 is not a second starting point;
(4) Acquiring the second point upstream of the second point 2 as a second point 1 from the second point pair upstream and downstream; the second point 1 is the second starting point and the second procedure is exited.
In step 2240, with continued reference to fig. 23, the second start point is the second point 1, and the second point 1 is pushed onto the stack.
It will be appreciated that there is a second point 7, a second point 6, a second point 2, and a second point 1 stored in the stack, whereas the second points 3, 4, and 5 are filtered out.
The benefit of this embodiment is that only the second points between the second end point and the second start point are deposited to the stack, whereas the upstream second points of the other upstream and downstream second point pairs are filtered out, further improving the processing efficiency.
In another embodiment, referring to fig. 24, step 1920 specifically includes:
step 2210, creating a stack;
step 2220, using the second end point as the point to be inspected;
step 2230, executing a second process;
step 2240, the second starting point is pushed onto the stack;
step 2410, creating a shortest path point set;
step 2420, repeatedly taking out a second point from the stack, and placing the second point at the end of the shortest path point set until the stack is completely fetched, so that the second point contained in the shortest path point set is the second point in the shortest path.
Since steps 2210-2240 have been described in detail above, steps 2410-2420 are described in detail below.
In step 2410, the set of shortest path points refers to the set of shortest path points initially being empty due to the container being stored as the second point in the shortest path.
In step 2420, referring to fig. 25, the second point 1, the second point 2, the second point 6, and the second point 7 are stored in this order from the top to the bottom of the stack. The second points are sequentially fetched from the stack and stored in a shortest path point set of { second point 7, second point 6, second point 2, second point 1}.
The benefit of this embodiment is that the original removal of the second point from the stack all needs to start from the top of the stack, which is cumbersome. In order to improve the processing efficiency, a shortest path point set is set, which does not limit the reading order. In this way, the reading speed of the second spot can be increased.
Details of the implementation of step 350 of the disclosed embodiments are illustrated in detail below with reference to fig. 26.
Step 350 specifically includes the following implementation details:
(1) Starting;
(2) Setting an upstream and downstream second point pair set and a first queue, wherein the upstream and downstream second point pair set is initially empty, and a second starting point is put into the tail of the initial first queue;
(3) Setting a traversed point set, and initially placing a second starting point into the traversed point set;
(4) Judging whether the first queue is non-empty; if not, entering the step (5), and if so, entering the step (6);
(5) Outputting prompt information: if the ending node cannot be found, prompting abnormality; proceeding to step (18);
(6) Fetching a second point from the head of the first queue;
(7) Judging whether the second point is a second ending point; if not, the step (8) is carried out, and if so, the step (10) is carried out;
(8) Determining a pair endpoint of a second edge in the set of adjacent edges of the fetched second point;
(9) If the opposite end point is not in the traversed point set, determining that the opposite end point is an un-traversed point, taking the extracted second point and the opposite end point as an upstream and downstream second point pair, and putting the extracted second point and the opposite end point into the upstream and downstream second point pair set; placing the opposite end point into the tail of the first queue, and placing the opposite end point into the traversed point set; entering step (4);
(10) Creating a stack;
(11) Taking the second ending point as a point to be inspected;
(12) Pushing the point to be inspected into a stack; acquiring an upstream second point corresponding to the point to be inspected from the upstream and downstream second point pairs;
(13) Judging whether the upstream second point is a second starting point; if not, the step (14) is carried out, and if so, the step (15) is carried out;
(14) Taking the upstream second point as a point to be inspected, and entering a step (12);
(15) Pushing the second starting point to a stack;
(16) Creating a shortest path point set;
(17) Repeatedly taking out a second point from the stack, and putting the second point into the tail of the shortest path point set until the stack is taken out, so that the second point contained in the shortest path point set is the second point in the shortest path;
(18) And (5) ending.
Advantages of this embodiment include, but are not limited to: the breadth-first shortest path searching can be realized by using the upstream and downstream second point pair sets and the first queue, and the searching efficiency can be improved; based on the comparison of the end points and the traversed point set, whether the end points are non-traversed points or not can be rapidly determined, and determination efficiency is improved; only the second points from the second ending point to the second starting point are stored in the stack, and the upstream second points in other upstream and downstream second point pairs are filtered out, so that the processing efficiency is further improved.
The above is a detailed description of step 350.
Detailed description of step 360
In step 360, a processed line is acquired based on the shortest path, the processed line being the line after the closed loop has been removed from the line to be processed.
In one embodiment, referring to fig. 27, step 360 specifically includes:
step 2710, determining a third point in the line to be processed, wherein the third point corresponds to each second edge in the shortest path;
step 2720, generating a processed line based on the third point, the first start point and the first end point of the line to be processed.
Steps 2710-2720 are described in detail below.
In step 2710, the third point is a point on the line to be processed, representing the intersection between the two first points. The first point is also a point on the line to be treated and the third point may or may not be the same as the first point. The shortest path includes a plurality of second edges, and referring to the graph model in fig. 5B, the shortest path specifically includes the second edges B 67 Second side B 26 And a second side B 12 . Second side B 67 The corresponding third point is a third point C1, a second side B 26 The corresponding third point is a third point C2, a second side B 12 The corresponding third point is the third point C3. The third point C1 is the same as the first point A6 in the line to be treated, the third point C3 is the same as the first point A2 in the line to be treated, and the third point C2 is different from any first point in the line to be treated.
It will be appreciated that the third point is the intersection point between the two first points, excluding the first start point and the first end point.
Thus, in step 2720, a processed line will be generated from the third point, the first starting point, and the first ending point. Since the third point represents the intersection point on the shortest path between the first start point and the first end point, the processed line is the line on the shortest path between the first start point and the first end point, and the closed loop is removed.
Referring to fig. 28A, fig. 28A shows a schematic diagram of an implementation process for obtaining a third point based on a shortest path point set. This shortest path point set is denoted { second point 7, second point 6, second point 2, second point 1}. The second edge in the shortest path is denoted as { second edge B ] 67 Second side B 26 Second side B 12 }. Thus, the third point in the line to be treated is denoted as { (4.5,3.5), (3.5,5).2), (7,4.5) }. In addition to the first starting point (10, 4) and the first ending point (5, 1.5), the points on the final processed line include { (10, 4), (7,4.5), (3.5,5.2), (4.5,3.5), (5, 1.5) }.
The advantage of this embodiment is that the third point, i.e. the intersection point, is determined from the second edge in the shortest path, and the processed line can be generated quickly from the respective intersection point plus the first starting point and the first ending point.
In one embodiment, step 2720 specifically includes:
connecting the third points corresponding to the second sides by line segments according to the sequence of the second sides in the shortest path;
based on the sequence of each first point in the line to be processed, acquiring a first point in each first point as a first starting point, and acquiring a last point in each first point as a first ending point;
and connecting the first starting point with the first third point in the third points by using a line segment, and connecting the last third point in the third points with the first ending point by using a line segment to obtain a processed line.
Referring to fig. 28B, fig. 28B shows a processed line obtained after connection based on a line segment between the first start point and the first end point. Specifically, according to the second side B in the shortest path 67 Second side B 26 Second side B 12 The third points (7,4.5), (3.5,5.2), (4.5,3.5) are connected by line segments. Connecting the first starting point (10, 4) with the third point (7,4.5) with a line segment, and connecting the first ending point (5, 1.5) with the third point (4.5,3.5) with a line segment, a treated line is finally obtained, which is a line after the closed loop has been removed from the line to be treated.
The above is a detailed description of step 360.
Implementation details of electronic map processing method of embodiments of the present disclosure
Implementation details of the electronic map processing method according to the embodiment of the present disclosure are described in detail below with reference to fig. 29.
Embodiments of the present disclosure specifically include the following implementation details:
(1) Starting;
(2) Acquiring a line to be processed in an electronic map, wherein a part of the line to be processed forms a closed loop, and the line to be processed comprises a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
(3) Determining a first starting point and a first ending point of the plurality of first points;
(4) Judging whether the first starting point is the same as the first ending point; if yes, entering a step (5), and if not, entering a step (6);
(5) Removing the wire to be treated and entering a step (14);
(6) Taking the first edge as a second point in the graph model, and establishing the graph model;
(7) Constructing second edges between second points in the graph model based on the intersection relation of the first edges in the lines to be processed;
(8) Determining a second starting point and a second ending point of the plurality of second points;
(9) Determining a shortest path between the second starting point and the second ending point based on the second point and the second edge in the graph model;
(10) Determining a third point in the line to be processed, wherein the third point corresponds to each second edge in the shortest path;
(11) Connecting the third points corresponding to the second sides by line segments according to the sequence of the second sides in the shortest path;
(11) Based on the sequence of each first point in the line to be processed, acquiring a first point in each first point as a first starting point, and acquiring a last point in each first point as a first ending point;
(13) Connecting the first starting point with the first third point in the third points by using line segments, and connecting the last third point in the third points with the first ending point by using line segments to obtain a processed line;
(14) And (5) ending.
Advantages of this embodiment include, but are not limited to: the processing of a plurality of lines to be processed without removing the closed loop can be reduced, and the processing resources are saved; describing the intersection relation between every two first edges in the line to be processed by using a second point and a second edge of the graph model, so as to realize detection of a closed loop; and determining a third point according to the second edge in the shortest path, namely determining an intersection point, and adding the first starting point and the first ending point according to each intersection point to quickly generate the processed line.
Apparatus and device descriptions of embodiments of the present disclosure
It will be appreciated that, although the steps in the various flowcharts described above are shown in succession in the order indicated by the arrows, the steps are not necessarily executed in the order indicated by the arrows. The steps are not strictly limited in order unless explicitly stated in the present embodiment, and may be performed in other orders. Moreover, at least some of the steps in the flowcharts described above may include a plurality of steps or stages that are not necessarily performed at the same time but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps.
In the various embodiments of the present application, when related processing is required according to data related to characteristics of an object, such as attribute information or attribute information sets, permission or consent of the object is obtained first, and related laws and regulations and standards are complied with for collection, use, processing, and the like of the data. In addition, when the embodiment of the application needs to acquire the object attribute information, the independent permission or independent consent of the object is acquired through a popup window or a jump to a confirmation page or the like, and after the independent permission or independent consent of the object is explicitly acquired, the necessary object related data for enabling the embodiment of the application to normally operate is acquired.
Fig. 30 is a schematic structural diagram of an electronic map processing apparatus 3000 according to an embodiment of the present disclosure. The electronic map processing device 3000 includes:
a first obtaining unit 3010, configured to obtain a line to be processed in the electronic map, where a portion of the line to be processed forms a closed loop, and the line to be processed includes a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
a building unit 3020, configured to build the graph model by using the first edge as the second point in the graph model;
A construction unit 3030, configured to construct a second edge between second points in the graph model based on the intersection relationship of the first edges in the line to be processed;
a first determining unit 3040 for determining a second start point and a second end point among the plurality of second points;
a second determining unit 3050 for determining a shortest path between the second start point and the second end point based on the second point and the second edge in the graph model;
and a second acquiring unit 3060 for acquiring a processed line, which is a line after the closed loop is removed from the line to be processed, based on the shortest path.
Alternatively, the second acquiring unit 3060 is specifically configured to:
determining a third point in the line to be processed, wherein the third point corresponds to each second edge in the shortest path;
the processed line is generated based on the third point, the first start point and the first end point of the line to be processed.
Optionally, the second acquiring unit 3060 is further specifically configured to:
connecting the third points corresponding to the second sides by line segments according to the sequence of the second sides in the shortest path;
based on the sequence of each first point in the line to be processed, acquiring a first point in each first point as a first starting point, and acquiring a last point in each first point as a first ending point;
And connecting the first starting point with the first third point in the third points by using a line segment, and connecting the last third point in the third points with the first ending point by using a line segment to obtain a processed line.
Optionally, the construction unit 3030 is specifically configured to:
combining the first edges of the lines to be treated in pairs;
for each combination, carrying out simultaneous solution on the functional formulas of the two first sides in the combination;
if there is a solution, a second edge is added between the corresponding second points of the two first edges.
Optionally, the construction unit 3030 is further specifically configured to:
creating a second order Cartesian product between the first sides of the line to be processed, wherein each element of the second order Cartesian product represents a pair of first sides, the pair of first sides having a first index, which is a sequence number of a first one of the pair of first sides in the line to be processed, and a second index, which is a sequence number of a second one of the pair of first sides in the line to be processed;
each element of the second order cartesian product is traversed and if the first index is smaller than the second index, a pair of first edges in the element is taken as the resulting combination.
Optionally, the construction unit 3030 is further specifically configured to:
Acquiring longitude and latitude coordinates of a first point;
transforming longitude and latitude coordinates into orthogonal coordinate system coordinates;
determining a functional formula of a first edge between two adjacent first points based on the orthogonal coordinate system coordinates between the two adjacent first points in the line to be processed;
for each combination, the functional formulas of the two first sides in the combination are solved simultaneously.
Optionally, before combining two by two for each first edge in the line to be processed, the construction unit 3030 is further specifically configured to:
setting a second edge set, and setting an adjacent edge set for each second point;
and the construction unit 3030 is further specifically configured to:
if the solution exists, adding the second edge solved by the simultaneous solution to the second edge set and the adjacent edge sets of the two second points corresponding to the second edge.
Optionally, the second determining unit 3050 is specifically configured to:
starting traversing from a second starting point along a second edge in the graph model, acquiring an upstream and downstream second point pair until traversing to a second ending point, wherein the upstream and downstream second point pair comprises an upstream second point and a downstream second point, and the downstream second point is an unremoved second point found from the upstream second point along the second edge;
starting from a second ending point, sequentially recursively searching for an upstream second point according to an upstream second point pair and a downstream second point pair until a second starting point is found;
The shortest path is determined based on the second end point and the respective upstream second points found recursively in turn.
Optionally, the second determining unit 3050 is further specifically configured to:
setting an upstream and downstream second point pair set and a first queue, wherein the upstream and downstream second point pair set is initially empty, and a second starting point is put into the tail of the initial first queue;
performing a first process, the first process comprising: if the first queue is not empty, taking a second point from the head of the first queue; if the fetched second point is not the second end point, determining a pair of end points of the second edge in the set of adjacent edges of the fetched second point; if the opposite end point is determined to be an un-traversed point, taking the extracted second point and the opposite end point as an upstream and downstream second point pair, and putting the extracted second point and the opposite end point into an upstream and downstream second point pair set; the end point is placed in the end of the first queue and the first process is repeated until the second point fetched is the second end point.
Optionally, before performing the first process, the second determining unit 3050 is further specifically configured to: setting a traversed point set, and initially placing a second starting point into the traversed point set;
determining that the endpoint is a non-traversed point includes: if the endpoint is not in the traversed point set, determining that the endpoint is an un-traversed point;
After placing the endpoint into the end of the first queue, the first process further includes: the pair endpoint is placed into the traversed set of points.
Optionally, the second determining unit 3050 is further specifically configured to:
creating a stack;
taking the second ending point as a point to be inspected;
performing a second process, the second process comprising: pushing the point to be inspected into a stack; acquiring an upstream second point corresponding to the point to be inspected from the upstream and downstream second point pairs; if the upstream second point is not the second starting point, taking the upstream second point as a point to be inspected, and repeating the second process until the upstream second point is the second starting point;
and pushing the second starting point to the stack.
Optionally, after performing the second process, the second determining unit 3050 is further specifically configured to:
creating a shortest path point set;
and repeatedly taking out a second point from the stack, and putting the second point into the tail end of the shortest path point set until the stack is taken out, so that the second point contained in the shortest path point set is the second point in the shortest path.
Optionally, after acquiring the line to be processed in the electronic map, the electronic map processing device further includes:
a third determining unit (not shown) for determining a first start point and a first end point among the plurality of first points;
A removing unit (not shown) for removing the line to be processed if the first start point and the first end point are the same.
Alternatively, the first determining unit 3040 is specifically configured to:
acquiring the sequence of the first edges corresponding to the second points in the line to be processed;
based on the order of the first edge, a first point of the plurality of second points is acquired as a second starting point, and a last point of the plurality of second points is acquired as a second ending point.
Alternatively, the first acquisition unit 3010 is specifically configured to:
identifying a closed loop in the electronic map;
and acquiring a line passing through the closed loop on the electronic map as a line to be processed.
Optionally, the first obtaining unit 3010 is further specifically configured to:
for each pixel point on the electronic map, determining a pixel line passing through the pixel point, wherein the pixel line comprises a plurality of pixel points which are communicated and arranged into a line;
if the return to the pixel point can be made without passing through the repeated route along one pixel line passing through the pixel point from the pixel point, the path from the pixel point to the pixel point is determined as a closed loop.
Referring to fig. 31, fig. 31 is a block diagram showing a structure of a portion of a terminal implementing an electronic map processing method according to an embodiment of the present disclosure, the terminal including: radio Frequency (RF) circuitry 3110, memory 3115, input unit 3130, display unit 3140, sensor 3150, audio circuitry 3160, wireless fidelity (wireless fidelity, wiFi) module 3170, processor 3180, and power supply 3190. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 31 is not limiting of a cell phone or computer and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The RF circuit 3110 may be used for receiving and transmitting signals during a message or a call, and particularly, after receiving downlink information of a base station, the RF circuit may be used for processing by the processor 3180; in addition, the data of the design uplink is sent to the base station.
The memory 3115 may be used to store software programs and modules, and the processor 3180 executes various functional applications and data processing of the object terminal by executing the software programs and modules stored in the memory 3115.
The input unit 3130 may be used to receive input numeric or character information and generate key signal inputs related to setting and function control of the object terminal. Specifically, the input unit 3130 may include a touch panel 3131 and other input devices 3132.
The display unit 3140 may be used to display input information or provided information and various menus of the object terminal. The display unit 3140 may include a display panel 3141.
Audio circuitry 3160, a speaker 3161, and a microphone 3162 may provide an audio interface.
In this embodiment, the processor 3180 included in the terminal may perform the electronic map processing method of the previous embodiment.
Terminals of embodiments of the present disclosure include, but are not limited to, cell phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle terminals, aircraft, and the like. The embodiment of the invention can be applied to various scenes, including but not limited to electronic maps, artificial intelligence, intelligent traffic, auxiliary driving and the like.
Fig. 32 is a block diagram of a portion of a server implementing an electronic map processing method of an embodiment of the present disclosure. The servers may vary widely by configuration or performance, and may include one or more central processing units (Central Processing Units, simply CPU) 3222 (e.g., one or more processors) and memory 3232, one or more storage media 3230 (e.g., one or more mass storage devices) storing applications 3242 or data 3244. Wherein the memory 3232 and storage medium 3230 can be transitory or persistent. The program stored on the storage medium 3230 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 3222 may be configured to communicate with a storage medium 3230 and execute a series of instruction operations in the storage medium 3230 on a server.
The server(s) may also include one or more power supplies 3226, one or more wired or wireless network interfaces 3250, one or more input/output interfaces 3258, and/or one or more operating systems 3241, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
The central processor 3222 in the server may be used to perform the electronic map processing method of the embodiment of the present disclosure.
The embodiments of the present disclosure also provide a computer-readable storage medium storing program code for executing the electronic map processing method of the foregoing embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program. The processor of the computer device reads the computer program and executes the computer program, so that the computer device executes the electronic map processing method.
The terms "first," "second," "third," "fourth," and the like in the description of the present disclosure and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in this disclosure, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It should be understood that in the description of the embodiments of the present disclosure, the meaning of a plurality (or multiple) is two or more, and that greater than, less than, exceeding, etc. is understood to not include the present number, and that greater than, less than, within, etc. is understood to include the present number.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements 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 an indirect coupling or communication connection via some interfaces, devices or units, 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 over 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 disclosure 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 integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including 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 of the various embodiments of the present disclosure. 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.
It should also be appreciated that the various implementations provided by the embodiments of the present disclosure may be arbitrarily combined to achieve different technical effects.
The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present disclosure, and are included in the scope of the present disclosure as defined in the claims.

Claims (20)

1. The electronic map processing method is characterized by comprising the following steps of:
acquiring a line to be processed in the electronic map, wherein a part of the line to be processed forms a closed loop, and the line to be processed comprises a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
establishing a graph model by taking the first edge as a second point in the graph model;
constructing a second edge between the second points in the graph model based on the intersection relation of the first edges in the lines to be processed;
determining a second starting point and a second ending point of the plurality of second points;
determining a shortest path between the second starting point to the second ending point based on the second point and the second edge in the graph model;
And acquiring a processed line based on the shortest path, wherein the processed line is a line after the closed loop is removed from the line to be processed.
2. The method according to claim 1, wherein the acquiring the processed line based on the shortest path includes:
determining a third point in the line to be processed, the third point corresponding to each of the second edges in the shortest path;
and generating the processed line based on the third point, the first starting point and the first ending point of the line to be processed.
3. The method according to claim 2, wherein the generating the processed line based on the third point, the first start point and the first end point of the line to be processed includes:
connecting the third points corresponding to the second sides by line segments according to the sequence of the second sides in the shortest path;
acquiring a first point of each first point as the first starting point based on the sequence of each first point in the line to be processed, and acquiring a last point of each first point as the first ending point;
And connecting the first starting point with the first third point in the third points by using a line segment, and connecting the last third point in the third points with the first ending point by using a line segment to obtain the processed line.
4. The method according to claim 1, wherein the constructing a second edge between the second points in the graph model based on the intersection relationship of the first edges in the lines to be processed includes:
combining the first edges of the lines to be treated in pairs;
for each combination, carrying out simultaneous solution on the functional formulas of the two first sides in the combination;
if so, adding the second edge between the second points corresponding to the two first edges.
5. The method according to claim 4, wherein the combining each of the first sides of the lines to be processed in pairs includes:
creating a second order cartesian product between the first edges of the line to be processed, each element of the second order cartesian product representing a pair of first edges, wherein the pair of first edges has a first index that is a sequence number of a first one of the pair of first edges in the line to be processed and a second index that is a sequence number of a second one of the pair of first edges in the line to be processed;
Traversing each of the elements of the second order Cartesian product, and taking a pair of the first edges of the element as a resulting combination if the first index is smaller than the second index.
6. The method of claim 4, wherein for each combination, the concurrently solving the functional formulas of the two first edges in the combination includes:
acquiring longitude and latitude coordinates of the first point;
transforming the longitude and latitude coordinates into orthogonal coordinate system coordinates;
determining a functional formula of the first edge between two adjacent first points based on the orthogonal coordinate system coordinates between the two adjacent first points in the line to be processed;
for each combination, the functional formulas of two first sides in the combination are solved simultaneously.
7. The electronic map processing method according to claim 4, characterized in that before said combining every two of said first sides in said line to be processed, said electronic map processing method further comprises: setting a second edge set, and setting an adjacent edge set for each second point;
and if the solution exists, adding the second edge between the second points corresponding to the two first edges, wherein the adding comprises the following steps:
If so, adding the second edge solved by the simultaneous solution to the second edge set and the adjacent edge sets of the two second points corresponding to the second edge.
8. The method of electronic map processing of claim 7, wherein said determining a shortest path between said second starting point and said second ending point based on said second point and said second edge in said graph model comprises:
starting traversing from the second starting point along the second edge in the graph model, and acquiring an upstream and downstream second point pair until traversing to the second ending point, wherein the upstream and downstream second point pair comprises an upstream second point and a downstream second point, and the downstream second point is an unremoved second point found from the upstream second point along the second edge;
starting from the second ending point, sequentially recursively searching for an upstream second point according to the upstream and downstream second point pairs until the second starting point is found;
determining the shortest path based on the second end point and each of the upstream second points found recursively in turn.
9. The method of electronic map processing according to claim 8, wherein said traversing from the second start point along the second edge in the map model, obtaining a second point pair upstream and downstream until traversing to the second end point, comprises:
Setting an upstream and downstream second point pair set and a first queue, wherein the upstream and downstream second point pair set is initially empty, and a second starting point is put into the tail of the initial first queue;
performing a first process, the first process comprising: if the first queue is not empty, retrieving one of the second points from the head of the first queue; determining an end point of the second edge in the set of adjacent edges of the fetched second point if the fetched second point is not the second end point; if the pair of end points are determined to be non-traversed points, taking the fetched second point and the fetched pair of end points as an upstream and downstream second point pair, and putting the fetched second point and the fetched pair of end points into the upstream and downstream second point pair set; placing the opposite end point into the end of the first queue and repeating the first process until the second point fetched is the second end point.
10. The electronic map processing method of claim 9, wherein before performing the first process, the electronic map processing method further comprises: setting a traversed point set, and initially placing the second starting point into the traversed point set;
the determining that the pair of endpoints is non-traversed points includes: if the pair of endpoints is not in the traversed point set, determining that the pair of endpoints is non-traversed points;
After placing the pair of endpoints into the tail of the first queue, the first process further includes: the pair of endpoints is placed into the traversed set of points.
11. The method of electronic map processing according to claim 8, wherein starting from the second end point, recursively searching for the upstream second point in turn according to the upstream-downstream second point pair until the second start point is found, comprising:
creating a stack;
taking the second ending point as a point to be inspected;
performing a second process, the second process comprising: pushing the point to be examined into the stack; acquiring an upstream second point corresponding to the point to be examined from the upstream and downstream second point pairs; if the upstream second point is not the second starting point, taking the upstream second point as the point to be examined, and repeating the second process until the upstream second point is the second starting point;
pushing the second starting point to the stack.
12. The electronic map processing method according to claim 11, characterized in that after the second process is performed, the electronic map processing method further comprises:
creating a shortest path point set;
and repeatedly taking out one second point from the stack, and placing the second point at the end of the shortest path point set until the stack is taken out, so that the second point contained in the shortest path point set is the second point in the shortest path.
13. The electronic map processing method according to claim 1, characterized in that after acquiring a line to be processed in the electronic map, the electronic map processing method further comprises:
determining a first start point and a first end point of the plurality of first points;
and if the first starting point and the first ending point are the same, removing the line to be processed.
14. The electronic map processing method according to claim 1, wherein the determining a second start point and a second end point among the plurality of the second points includes:
acquiring the sequence of the first edges corresponding to the second points in the line to be processed;
based on the order of the first edge, a first point of a plurality of second points is acquired as a second starting point, and a last point of the plurality of second points is acquired as a second ending point.
15. The method of claim 1, wherein the obtaining the line to be processed in the electronic map comprises:
identifying the closed loop in the electronic map;
and acquiring a line passing through the closed loop on the electronic map as the line to be processed.
16. The electronic map processing method of claim 15, wherein said identifying said closed loop in said electronic map comprises:
determining a pixel line passing through each pixel point on the electronic map, wherein the pixel line comprises a plurality of pixel points which are communicated and arranged into a line;
if the path from the pixel point to the pixel point can be returned without passing through a repeated route along one pixel line passing through the pixel point, determining the path from the pixel point to the pixel point as the closed loop.
17. An electronic map processing apparatus, comprising:
a first obtaining unit, configured to obtain a line to be processed in the electronic map, where a portion of the line to be processed forms a closed loop, and the line to be processed includes a plurality of first points and a first edge between every two adjacent first points in the plurality of first points;
the building unit is used for taking the first edge as a second point in a graph model and building the graph model;
a construction unit, configured to construct a second edge between the second points in the graph model based on an intersection relationship of the first edges in the line to be processed;
A first determining unit configured to determine a second start point and a second end point among the plurality of second points;
a second determining unit configured to determine a shortest path between the second start point and the second end point based on the second point and the second edge in the graph model;
and a second acquisition unit configured to acquire a processed line, which is a line after the closed loop is removed from the line to be processed, based on the shortest path.
18. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the electronic map processing method in an electronic map according to any one of claims 1 to 16 when executing the computer program.
19. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the electronic map processing method in an electronic map according to any one of claims 1 to 16.
20. A computer program product comprising a computer program which is read and executed by a processor of a computer device, causing the computer device to perform the electronic map processing method in an electronic map according to any one of claims 1 to 16.
CN202310530576.8A 2023-05-11 2023-05-11 Electronic map processing method, related device and medium Pending CN116561240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310530576.8A CN116561240A (en) 2023-05-11 2023-05-11 Electronic map processing method, related device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310530576.8A CN116561240A (en) 2023-05-11 2023-05-11 Electronic map processing method, related device and medium

Publications (1)

Publication Number Publication Date
CN116561240A true CN116561240A (en) 2023-08-08

Family

ID=87501390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310530576.8A Pending CN116561240A (en) 2023-05-11 2023-05-11 Electronic map processing method, related device and medium

Country Status (1)

Country Link
CN (1) CN116561240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117685995A (en) * 2024-02-02 2024-03-12 腾讯科技(深圳)有限公司 Road processing method, apparatus, computer device, and computer-readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117685995A (en) * 2024-02-02 2024-03-12 腾讯科技(深圳)有限公司 Road processing method, apparatus, computer device, and computer-readable storage medium
CN117685995B (en) * 2024-02-02 2024-04-09 腾讯科技(深圳)有限公司 Road processing method, apparatus, computer device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN106767835B (en) Positioning method and device
US11255678B2 (en) Classifying entities in digital maps using discrete non-trace positioning data
CN104881860A (en) Positioning method and apparatus based on photographs
CN110457407B (en) Method and apparatus for processing point cloud data
CN114993328B (en) Vehicle positioning evaluation method, device, equipment and computer readable medium
CN114612616A (en) Mapping method and device, electronic equipment and storage medium
CN116561240A (en) Electronic map processing method, related device and medium
CN115375868B (en) Map display method, remote sensing map display method, computing device and storage medium
CN103712628A (en) Navigation path drawing method and terminal
CN110110696B (en) Method and apparatus for processing information
CN117079148B (en) Urban functional area identification method, device, equipment and medium
CN108268514A (en) High in the clouds map map rejuvenation equipment based on Octree
CN113932796A (en) High-precision map lane line generation method and device and electronic equipment
CN113761618A (en) 3D simulation road network automation construction method and system based on real data
CN115830578B (en) Article inspection method and device and electronic equipment
CN115773744A (en) Model training and road network processing method, device, equipment, medium and product
CN114743395B (en) Signal lamp detection method, device, equipment and medium
CN114674328B (en) Map generation method, map generation device, electronic device, storage medium, and vehicle
CN115100231A (en) Method and device for determining region boundary
CN115002196A (en) Data processing method and device and vehicle-end acquisition equipment
CN115393816A (en) Lane line generation method, lane line generation device, computer device, and storage medium
CN114119973A (en) Spatial distance prediction method and system based on image semantic segmentation network
CN113568997A (en) Point cloud map updating method and device, electronic equipment and computer readable medium
CN108132992B (en) Personnel information basic address coding method and system and electronic equipment
CN111383337A (en) Method and device for identifying objects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40095728

Country of ref document: HK