CN114067021A - Road connection method and device - Google Patents

Road connection method and device Download PDF

Info

Publication number
CN114067021A
CN114067021A CN202111365915.9A CN202111365915A CN114067021A CN 114067021 A CN114067021 A CN 114067021A CN 202111365915 A CN202111365915 A CN 202111365915A CN 114067021 A CN114067021 A CN 114067021A
Authority
CN
China
Prior art keywords
road
lane
road port
reference line
port
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
CN202111365915.9A
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.)
Beijing Saimu Technology Co ltd
Original Assignee
Beijing Saimu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Saimu Technology Co ltd filed Critical Beijing Saimu Technology Co ltd
Priority to CN202111365915.9A priority Critical patent/CN114067021A/en
Publication of CN114067021A publication Critical patent/CN114067021A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application provides a road connection method and a road connection device, wherein the method comprises the following steps: receiving a target area selected by a user on a target map; acquiring the number of road ports in the target area; if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports, and connecting the two road ports according to the lane attributes; if the number of the road ports in the target area is greater than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports; and connecting the two corresponding road ports according to the lane attribute and the reference line included angle. According to the method and the device, the number of the road ports, the lane attributes and the reference line included angle are identified, the connection modes between the road ports are judged and correspondingly connected, and the technical effects of improving the connection accuracy and efficiency are achieved.

Description

Road connection method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for connecting roads.
Background
In the prior art, when a plurality of roads are connected to draw intersections, technicians are required to manually connect the roads and manually connect a plurality of lanes in the roads, the workload of drawing a map is large, the accuracy cannot be guaranteed, and the efficiency is low.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method and an apparatus for connecting roads, where the method and the apparatus determine a connection manner between road ports by identifying the number of road ports, lane attributes, and reference line included angles, and perform corresponding connection, so as to solve the technical problems of low accuracy and efficiency of road connection in the prior art, and achieve the technical effect of improving the accuracy and efficiency of road connection.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for connecting roads, where the method includes: receiving a target area selected by a user on a target map; the target area comprises a plurality of road ports; acquiring the number of road ports in a target area; if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports, and connecting the two road ports according to the lane attributes; if the number of the road ports in the target area is larger than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports; and connecting the corresponding two road ports according to the lane attribute and the reference line included angle.
Optionally, the lane attributes include: lane labels and lane types; connecting two road ports according to lane properties, comprising: a reference line connecting the two road ports; dividing a road port into a left area and a right area by taking a reference line as a reference; and respectively connecting lanes with the same lane types and lane labels in the two road ports aiming at the left area and the right area.
Optionally, the lane attributes include: lane labels and lane types; connecting two corresponding road ports according to lane attributes and a datum line included angle, comprising: judging whether the included angle of the datum line meets the threshold range of the straight included angle or not; if the included angle of the datum line meets the threshold range of the straight included angle, connecting the datum lines of the two road ports; dividing a road port into a left area and a right area by taking a reference line as a reference; and respectively connecting lanes with the same lane types and lane labels in the two road ports aiming at the left area and the right area.
Optionally, after determining whether the reference line included angle satisfies the threshold range of the straight included angle, the method further includes: if the reference line included angle does not meet the range of the straight included angle threshold value, determining one road port of any two road ports as a first road port, and determining the other road port as a second road port; acquiring a datum line endpoint coordinate and a datum line endpoint attribute which respectively correspond to the first road port and the second road port, and acquiring a datum line angle of the first road port; determining a connection mode of the first road port to the second road port according to the coordinates of the end points of the two datum lines and the datum line angle, wherein the connection mode is a left-turn connection or a right-turn connection; and connecting the first road port and the second road port according to the connection mode and the attributes of the two reference line end points.
Optionally, determining a connection manner of the first road port to the second road port according to the coordinates of the two reference line end points and the reference line angle includes: calculating a difference value between an abscissa value of a reference line end point of the second road port and an abscissa value of a reference line end point of the first road port, and determining the difference value as a first difference value; calculating a difference value between the longitudinal coordinate value of the datum line endpoint of the second road port and the longitudinal coordinate value of the datum line endpoint of the first road port, and determining the difference value as a second difference value; calculating a cosine value product of an abscissa value of a reference line endpoint of the first road port and a reference line angle included angle of the first road port, and determining the product as a first product; calculating a product of a longitudinal coordinate value of a reference line end point of the first road port and a sine value of a reference line angle of the first road port, and determining the product as a second product; calculating a difference value between the product of the first product and the second difference value and the product of the second product and the first difference value, and determining the difference value as a third difference value; if the third difference is greater than 0, determining that the connection mode of the first road port to the second road port is left-turn connection; and if the third difference is smaller than 0, determining that the connection mode of the first road port connected to the second road port is right-turn connection.
Optionally, the end point attribute of the reference line includes a starting end and an ending end, the direction of the reference line is from the starting end to the ending end, a lane located on the right side of the reference line is a negative-numbered lane, and a lane located on the left side of the reference line is a positive-numbered lane; if the connection mode is left-turn connection, connecting the first road port and the second road port according to the connection mode and the attributes of the two datum line end points, and the method comprises the following steps: if the end point attribute of the reference line of the first road port is an initial end and the end point attribute of the reference line of the second road port is an end, connecting positively-labeled lanes which are the same in lane type and closest to the reference line in the first road port and the second road port; if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-numbered lane closest to the reference line in the first road port with a negative-numbered lane closest to the reference line in the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same; if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes with the negative marks which have the same lane type and are closest to the reference line in the first road port and the second road port; if the end point attributes of the reference lines of the first road port and the second road port are both end points, selecting a negative-numbered lane closest to the reference line from the first road port, and connecting the negative-numbered lane with a positive-numbered lane closest to the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
Optionally, the end point attribute of the reference line includes a starting end and an ending end, the direction of the reference line is from the starting end to the ending end, a lane located on the right side of the reference line is a negative-numbered lane, and a lane located on the left side of the reference line is a positive-numbered lane; if the connection mode is right-turn connection, connecting the first road port and the second road port according to the connection mode and the attributes of the two datum line end points, and the method comprises the following steps: if the end point attribute of the reference line of the first road port is an initial end and the end point attribute of the reference line of the second road port is an end, connecting positively-labeled lanes which are the same in lane type and farthest from the reference line in the first road port and the second road port; if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-numbered lane which is farthest away from the reference line in the first road port with a negative-numbered lane which is farthest away from the reference line in the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same; if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes with the negative marks, which have the same lane type and are farthest from the reference line, in the first road port and the second road port; if the end point attributes of the reference lines of the first road port and the second road port are both end ends, selecting a negative-numbered lane which is farthest away from the reference line from the first road port, and connecting the negative-numbered lane with a positive-numbered lane which is farthest away from the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
In a second aspect, an embodiment of the present application further provides a connection device for a road, where the device includes: the receiving module is used for receiving a target area selected by a user on a target map; the target area comprises a plurality of road ports; the acquisition module is used for acquiring the number of the road ports in the target area; the first connection module is used for acquiring lane attributes of each lane in the road ports if the number of the road ports in the target area is equal to two, and connecting the two road ports according to the lane attributes; the second connection module is used for determining reference lines corresponding to the road ports respectively if the number of the road ports in the target area is greater than two, and acquiring lane attributes of each lane in the road ports and a reference line included angle between any two road ports; and connecting the corresponding two road ports according to the lane attribute and the reference line included angle.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions being executed by the processor to perform the steps of the method for connecting roads in the first aspect or any one of the possible embodiments of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method for connecting roads in the first aspect or any one of the possible implementations of the first aspect.
The embodiment of the application provides a road connection method and device, which receives a target area selected by a user on a target map; the target area comprises a plurality of road ports; acquiring the number of road ports in a target area; if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports, and connecting the two road ports according to the lane attributes; if the number of the road ports in the target area is larger than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports; and connecting the corresponding two road ports according to the lane attribute and the reference line included angle. According to the method and the device, the number of the road ports, the lane attributes and the reference line included angle are identified, the connection modes between the road ports are judged and correspondingly connected, the technical problems that the accuracy rate and the efficiency of road connection are low in the prior art are solved, and the technical effect of improving the accuracy rate and the efficiency of road connection is achieved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows a flowchart of a road connection method provided in an embodiment of the present application.
Fig. 2 is a flowchart illustrating another road connection method according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating a road connection method according to an embodiment of the present disclosure.
Fig. 4 is a functional block diagram of a road connection device according to an embodiment of the present disclosure.
Fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and that steps without logical context may be performed in reverse order or concurrently. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, when a road map is drawn, the road map can only be drawn in a mode of manually connecting roads, and the accuracy and efficiency of road connection cannot be guaranteed.
Based on this, the embodiment of the application provides a method and a device for connecting roads, which judge the connection mode between road ports and correspondingly connect the road ports by identifying the number of the road ports, the lane attribute and the reference line included angle, thereby solving the technical problems of low accuracy and efficiency of road connection in the prior art, and achieving the technical effect of improving the accuracy and efficiency of road connection, specifically as follows:
referring to fig. 1, fig. 1 is a flowchart illustrating a road connection method according to an embodiment of the present disclosure. As shown in fig. 1, a method for connecting roads provided by an embodiment of the present application includes the following steps:
s101, receiving a target area selected by a user on a target map.
Specifically, the target area includes a plurality of road ports, and if only one road port exists in the target area, the target area selected by the user on the target map is received again. A complete road cannot exist in the target area, i.e. the start and end of the road end cannot both be in the target area.
And S102, acquiring the number of the road ports in the target area.
In particular, a road port is an end of a road. In the embodiment of the application, the road corresponding to the road port must be a bidirectional road, and if the road corresponding to the selected road port is a unidirectional lane, the connection is not performed.
Specifically, the abscissa minimum value and the ordinate minimum value, and the abscissa maximum value and the ordinate maximum value of the target area are obtained, and if the abscissa of the reference line end point of the road port is greater than the abscissa minimum value and less than the abscissa maximum value, and the ordinate of the reference line end point is greater than the ordinate minimum value and less than the ordinate maximum value, the road port is considered to be located in the target area.
S103, if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports, and connecting the two road ports according to the lane attributes.
Specifically, if the number of the road ports in the target area is equal to two, it is considered that the two road ports in the target area are in straight connection, lane attributes of each lane in the road ports are obtained, and each lane with the same lane attribute in the two road ports is connected.
S104, if the number of the road ports in the target area is larger than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports; and connecting the corresponding two road ports according to the lane attribute and the reference line included angle.
Specifically, the reference line angle between any two road ports is determined by the difference between the reference line angles of the road ports, and the reference line angle of the road port is the angle between the reference line and the X axis of the coordinate system of the target map.
Referring to fig. 2, fig. 2 is a flowchart illustrating another road connection method according to an embodiment of the present disclosure. As shown in fig. 2, another road connection method provided in the embodiment of the present application includes the following steps:
the specific implementation of steps S201 and S202 is the same as that of steps S101 and S102, and is not described herein again.
S201, receiving a target area selected by a user on a target map.
S202, acquiring the number of the road ports in the target area.
The following two situations are included when the number of the road ports in the target area is obtained:
the first condition is as follows: s203, if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports.
Specifically, if the number of the road ports in the target area is equal to two, it is considered that the two road ports in the target area are in straight connection, lane attributes of each lane in the road ports are obtained, and the lanes with the same lane attributes in the two road ports are connected. Wherein the lane attributes include: lane labels and lane types. The lane marks are determined in such a manner that the lane marks of the same lane type are sequentially increased outward with the reference line as the center. The lane type is used to describe the type of vehicle passing through the lane.
And S204, connecting the reference lines of the two road ports.
Specifically, the reference lines of the two road ports are first connected.
And S205, dividing the road port into a left area and a right area by taking the reference line as a reference.
S206, connecting lanes corresponding to the same lane type and the same lane label in the two road ports respectively for the left area and the right area.
Specifically, after the reference lines are connected, lanes of the two road ports, which have the same lane type and the same lane number, are respectively connected in the left area and the right area on both sides of the reference lines. Therein, lane labels.
For example, please refer to fig. 3, fig. 3 is a schematic diagram 1 of a road connection method according to an embodiment of the present application. If the lane on one side of the reference line of the first road port is a motor lane 1, a motor lane 2 and a riding lane 1, and the lane on the other side of the reference line of the first road port is a motor lane 1 and a riding lane 1; the lanes on one side of the reference line of the second road port are a motor lane 1, a motor lane 2 and a riding lane 1, and the lanes on the other side of the reference line of the second road port are a motor lane 1 and a riding lane 1; after the datum line of the first road port is connected with the datum line of the second road port, one side of the datum line of the first road port and one side of the datum line of the second road port are in the same region, the motor vehicle lane 1 of the first road port and the motor vehicle lane 1 of the second road port which are on the same side are connected, the motor vehicle lane 2 of the first road port is connected with the motor vehicle lane 2 of the second road port, and the riding vehicle lane 1 of the first road port is connected with the riding vehicle lane 1 of the second road port; the other side of the reference line of the first road port and the other side of the reference line of the second road port are in the same region, the motor vehicle lane 1 of the first road port and the motor vehicle lane 1 of the second road port which are on the same side are connected, and the riding vehicle lane 1 of the first road port and the riding vehicle lane 1 of the second road port are connected.
Case two: and S207, if the number of the road ports in the target area is greater than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports.
Specifically, when the number of the road ports in the target area is greater than two, it may be determined whether the road ports in the target area are on the same side and parallel to each other, and if the two road ports are on the same side and parallel to each other, the two road ports are not connected to each other. Wherein the lane attributes include: lane labels and lane types.
And S208, judging whether the included angle of the datum line meets the threshold range of the straight included angle.
The straight-going included angle threshold range is 0 degree or 180 degrees, and if the road is slightly inclined, the value of the straight-going included angle threshold range can be adjusted according to actual conditions.
If the reference line included angle meets the range of the straight-going included angle threshold value, the two road ports are considered to be in straight-going connection, and steps S204 to S206 are executed to connect the reference lines of the two road ports; dividing a road port into a left area and a right area by taking a reference line as a reference; and respectively connecting lanes with the same lane types and lane labels in the two road ports aiming at the left area and the right area.
S209, one road port of any two road ports is determined as a first road port, and the other road port is determined as a second road port.
And if the reference line included angle does not meet the range of the straight included angle threshold value, determining one road port of any two road ports as a first road port, and determining the other road port as a second road port.
S210, acquiring the reference line endpoint coordinates and the reference line endpoint attributes corresponding to the first road port and the second road port respectively, and acquiring the reference line angle of the first road port.
Specifically, the coordinate of the end point of the reference line refers to the coordinate of the end point of the reference line located in the target area in the coordinate system of the target map. The end point attribute of the datum line comprises a starting end and an ending end, the direction of the datum line is from the starting end to the ending end, the lane on the right side of the datum line is a negative-numbered lane, and the lane on the left side of the datum line is a positive-numbered lane. The reference line angle is the angle between the reference line and the X axis of the coordinate system of the target map.
S211, determining a connection mode of the first road port to the second road port according to the coordinates of the end points of the two reference lines and the angles of the reference lines.
Wherein, the connection mode is left-turn connection or right-turn connection.
Specifically, the connection mode is determined by the following formula:
Z=xa×cosθ×(xb-xa)-ya×sinθ×(yb-ya) (1)
in the formula (1), xaThe abscissa, y, of the end point of the reference line representing the port of the first roadaLongitudinal coordinate, x, of reference line end point representing first road portbThe abscissa, y, of the end point of the reference line representing the second road portbAnd represents the ordinate of the end point of the datum line of the second road port, theta represents the angle of the datum line of the first road port, and Z represents a third difference value.
The specific calculation mode is that the difference value between the abscissa value of the datum line end point of the second road port and the abscissa value of the datum line end point of the first road port is calculated and determined as a first difference value; calculating a difference value between the longitudinal coordinate value of the datum line endpoint of the second road port and the longitudinal coordinate value of the datum line endpoint of the first road port, and determining the difference value as a second difference value; calculating a cosine value product of an abscissa value of a reference line endpoint of the first road port and a reference line angle included angle of the first road port, and determining the product as a first product; calculating a product of a longitudinal coordinate value of a reference line end point of the first road port and a sine value of a reference line angle of the first road port, and determining the product as a second product; a difference between the product of the first product and the second difference and the product of the second product and the first difference is calculated, and a third difference is determined.
Specifically, if the third difference is greater than 0, it is determined that the connection mode in which the first road port is connected to the second road port is left-turn connection. And if the third difference is smaller than 0, determining that the connection mode of the first road port connected to the second road port is right-turn connection.
And S212, connecting the first road port and the second road port according to the connection mode and the attributes of the two datum line end points.
Since a complete road does not exist in the target area, only the reference line end point attribute of one road port of one road can be identified in the target area. That is, the first road port and the second road port are road ports of two different roads.
If the connection mode is left-turn connection, connecting the first road port and the second road port according to the connection mode and the attributes of the two datum line end points, and the method comprises the following steps:
if the end point attribute of the reference line of the first road port is an initial end and the end point attribute of the reference line of the second road port is an end, connecting positively-labeled lanes which are the same in lane type and closest to the reference line in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-numbered lane closest to the reference line in the first road port with a negative-numbered lane closest to the reference line in the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same;
if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes with the negative marks which have the same lane type and are closest to the reference line in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both end points, selecting a negative-numbered lane closest to the reference line from the first road port, and connecting the negative-numbered lane with a positive-numbered lane closest to the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
If the connection mode that the first road port is connected to the second road port is left-turn connection, the lane of the first road port can also be considered to be connected in a turning manner. If the lanes of the first road port can be connected in a turning manner, selecting a positive-label lane and a negative-label lane with the same lane attributes closest to the lane line to be connected in two areas on the left and right of the reference line of the first road port, or selecting a positive-label lane and a negative-label lane with the same lane attributes with the smallest lane labels to be connected.
If the connection mode is right-turn connection, connecting the first road port and the second road port according to the connection mode and the attributes of the two datum line end points, and the method comprises the following steps:
if the end point attribute of the reference line of the first road port is an initial end and the end point attribute of the reference line of the second road port is an end, connecting positively-labeled lanes which are the same in lane type and farthest from the reference line in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-numbered lane which is farthest away from the reference line in the first road port with a negative-numbered lane which is farthest away from the reference line in the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same;
if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes with the negative marks, which have the same lane type and are farthest from the reference line, in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both end ends, selecting a negative-numbered lane which is farthest away from the reference line from the first road port, and connecting the negative-numbered lane with a positive-numbered lane which is farthest away from the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
The positive-numbered lane or the negative-numbered lane closest to the reference line may be the positive-numbered lane or the negative-numbered lane with the smallest lane number; the positive-numbered lane or the negative-numbered lane farthest from the reference line may be the positive-numbered lane or the negative-numbered lane having the largest lane number.
S213, judging whether the lanes connected with the two road ports intersect.
Specifically, after step S206 or step S213 is executed, it is determined whether the lanes connected to the two road ports intersect, and if the lanes connected to the two road ports do not intersect, the two road ports are connected to each other.
And S214, deleting the connected lanes.
Specifically, if the connected lanes of the two road ports intersect, the connected lanes are deleted, and the two road ports cannot be connected.
Specifically, whether all the road ports in the target area are completely executed is identified, and if all the road ports are completely executed, the roads in the target area are connected.
Based on the same application concept, the embodiment of the present application further provides a road connection device corresponding to the road connection method provided in the above embodiment, and as the principle of solving the problem of the device in the embodiment of the present application is similar to the road connection method in the above embodiment of the present application, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 3, fig. 4 is a functional block diagram of a road connection device according to an embodiment of the present application, where the road connection device 10 includes: the device comprises a receiving module 101, an obtaining module 102, a first connecting module 103 and a second connecting module 104. The receiving module 101 is configured to receive a target area selected by a user on a target map; the target area comprises a plurality of road ports; an obtaining module 102, configured to obtain the number of road ports in a target area; the first connection module 103 is configured to, if the number of the road ports in the target area is equal to two, obtain lane attributes of each lane in the road ports, and connect the two road ports according to the lane attributes; the second connection module 104 is configured to, if the number of the road ports in the target area is greater than two, determine reference lines corresponding to the road ports, respectively, and acquire lane attributes of each lane in the road ports and a reference line included angle between any two road ports; and connecting the corresponding two road ports according to the lane attribute and the reference line included angle.
Based on the same application concept, referring to fig. 5, a schematic structural diagram of an electronic device 20 provided in the embodiment of the present application includes: a processor 201, a memory 202 and a bus 203, wherein the memory 202 stores machine-readable instructions executable by the processor 201, when the electronic device 20 is operated, the processor 201 communicates with the memory 202 through the bus 203, and the machine-readable instructions are executed by the processor 201 to perform the steps of the method for connecting roads as in the above-mentioned embodiments.
Based on the same application concept, embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the road connection method provided by the above embodiments are performed.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, when a computer program on the storage medium is executed, the connection method of the road can be executed, the connection mode between the road ports is judged and the connection is correspondingly performed by identifying the number of the road ports, the lane attribute, and the reference line included angle, so that the technical problems of low accuracy and efficiency of road connection in the prior art are solved, and the technical effect of improving the accuracy and efficiency of road connection is achieved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application may be essentially implemented or are part of the technical solutions or parts of the technical solutions contributing to the prior art, and the computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of connecting roads, the method comprising:
receiving a target area selected by a user on a target map; the target area comprises a plurality of road ports;
acquiring the number of road ports in the target area;
if the number of the road ports in the target area is equal to two, acquiring lane attributes of each lane in the road ports, and connecting the two road ports according to the lane attributes;
if the number of the road ports in the target area is greater than two, determining reference lines corresponding to the road ports respectively, and acquiring lane attributes of each lane in the road ports and reference line included angles between any two road ports; and connecting the two corresponding road ports according to the lane attribute and the reference line included angle.
2. The method of claim 1, wherein the lane attributes comprise: lane labels and lane types; the connecting two road ports according to the lane attribute includes:
a reference line connecting the two road ports;
dividing the road port into a left area and a right area by taking the reference line as a reference;
and respectively connecting the lanes with the same lane types and lane labels in the two road ports aiming at the left area and the right area.
3. The method of claim 1, wherein the lane attributes comprise: lane labels and lane types; the step of connecting the two corresponding road ports according to the lane attribute and the reference line included angle comprises the following steps:
judging whether the included angle of the datum line meets the threshold range of the straight included angle or not;
if the reference line included angle meets the threshold range of the straight included angle, connecting the reference lines of the two road ports; dividing the road port into a left area and a right area by taking the reference line as a reference;
and respectively connecting the lanes with the same lane types and lane labels in the two road ports aiming at the left area and the right area.
4. The method of claim 3, wherein after determining whether the reference line angle satisfies the straight-line angle threshold range, the method further comprises:
if the datum line included angle does not meet the range of the straight included angle threshold value, determining one road port of any two road ports as a first road port, and determining the other road port as a second road port;
acquiring the datum line endpoint coordinates and datum line endpoint attributes respectively corresponding to the first road port and the second road port, and acquiring a datum line angle of the first road port;
determining a connection mode of the first road port to the second road port according to the coordinates of the end points of the two reference lines and the angle of the reference lines, wherein the connection mode is left-turn connection or right-turn connection;
and connecting the first road port and the second road port according to the connection mode and the two datum line end point attributes.
5. The method of claim 4, wherein said determining a connection of said first road port to a second road port based on said two reference line endpoint coordinates and said reference line angle comprises:
calculating a difference value between an abscissa value of the reference line endpoint of the second road port and an abscissa value of the reference line endpoint of the first road port, and determining the difference value as a first difference value;
calculating a difference value between the longitudinal coordinate value of the datum line endpoint of the second road port and the longitudinal coordinate value of the datum line endpoint of the first road port, and determining the difference value as a second difference value;
calculating a cosine value product of an abscissa value of a reference line end point of the first road port and a reference line angle included angle of the first road port, and determining the product as a first product;
calculating a product of a longitudinal coordinate value of the datum line endpoint of the first road port and a sine value of a datum line angle of the first road port, and determining the product as a second product;
calculating a difference value between a product of the first product and a second difference value and a product of the second product and the first difference value, and determining the difference value as a third difference value;
if the third difference is greater than 0, determining that the connection mode of the first road port to the second road port is left-turn connection;
and if the third difference is smaller than 0, determining that the connection mode of the first road port connected to the second road port is right-turn connection.
6. The method of claim 4, wherein the baseline end point attributes include a starting end and an ending end, the baseline being oriented from the starting end to the ending end, the lane to the right of the baseline being a negative-numbered lane, the lane to the left of the baseline being a positive-numbered lane;
if the connection mode is left-turn connection, the connecting the first road port and the second road port according to the connection mode and the two datum line end point attributes includes:
if the end point attribute of the reference line of the first road port is a starting end and the end point attribute of the reference line of the second road port is an ending end, connecting positively-labeled lanes which are the same in lane type and closest to the reference line in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-label lane closest to the reference line in the first road port with a negative-label lane closest to the reference line in the second road port, wherein the lane types of the positive-label lane and the negative-label lane are the same;
if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes in the first road port and the second road port, which have the same lane type and are closest to the reference line, with the negatively-labeled lanes;
if the end point attributes of the reference lines of the first road port and the second road port are both end ends, selecting a negative-numbered lane closest to the reference line from the first road port, and connecting the negative-numbered lane closest to the reference line with a positive-numbered lane closest to the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
7. The method of claim 4, wherein the baseline end point attributes include a starting end and an ending end, the baseline being oriented from the starting end to the ending end, the lane to the right of the baseline being a negative-numbered lane, the lane to the left of the baseline being a positive-numbered lane;
if the connection mode is a right-turn connection, the connecting the first road port and the second road port according to the connection mode and the two datum line end point attributes includes:
if the end point attribute of the reference line of the first road port is a starting end and the end point attribute of the reference line of the second road port is an ending end, connecting positively-labeled lanes which are the same in lane type and farthest from the reference line in the first road port and the second road port;
if the end point attributes of the reference lines of the first road port and the second road port are both starting ends, connecting a positive-label lane farthest from the reference line in the first road port with a negative-label lane farthest from the reference line in the second road port, wherein the lane types of the positive-label lane and the negative-label lane are the same;
if the end point attribute of the reference line of the first road port is an ending end and the end point attribute of the reference line of the second road port is a starting end, connecting the lanes of the first road port and the second road port, which have the same lane type and are farthest from the reference line, with the negatively-labeled lane;
if the end point attributes of the reference lines of the first road port and the second road port are both end ends, selecting a negative-numbered lane which is farthest from the reference line from the first road port, and connecting the negative-numbered lane with a positive-numbered lane which is farthest from the reference line from the second road port, wherein the lane types of the positive-numbered lane and the negative-numbered lane are the same.
8. A road junction device, characterized in that it comprises:
the receiving module is used for receiving a target area selected by a user on a target map; the target area comprises a plurality of road ports;
the acquisition module is used for acquiring the number of the road ports in the target area;
the first connection module is used for acquiring lane attributes of each lane in the road ports if the number of the road ports in the target area is equal to two, and connecting the two road ports according to the lane attributes;
the second connection module is used for determining reference lines corresponding to the road ports respectively if the number of the road ports in the target area is greater than two, and acquiring lane attributes of each lane in the road ports and a reference line included angle between any two road ports; and connecting the two corresponding road ports according to the lane attribute and the reference line included angle.
9. An electronic device, comprising: processor, memory and bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operated, the machine-readable instructions being executed by the processor to perform the steps of the method of connecting a road according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method for connecting roads according to any one of claims 1 to 7.
CN202111365915.9A 2021-11-18 2021-11-18 Road connection method and device Pending CN114067021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111365915.9A CN114067021A (en) 2021-11-18 2021-11-18 Road connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111365915.9A CN114067021A (en) 2021-11-18 2021-11-18 Road connection method and device

Publications (1)

Publication Number Publication Date
CN114067021A true CN114067021A (en) 2022-02-18

Family

ID=80278001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111365915.9A Pending CN114067021A (en) 2021-11-18 2021-11-18 Road connection method and device

Country Status (1)

Country Link
CN (1) CN114067021A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109920031A (en) * 2019-04-12 2019-06-21 中电海康集团有限公司 A kind of method and system of Fast Drawing intersection
CN111652061A (en) * 2020-04-28 2020-09-11 浙江吉利汽车研究院有限公司 Method and device for determining lane sideline and storage medium
US20200311991A1 (en) * 2019-03-27 2020-10-01 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for drawing intersection, server and storage medium
CN111782751A (en) * 2020-06-28 2020-10-16 北京四维图新科技股份有限公司 Method and device for generating road of intersection in map and electronic equipment
CN111797722A (en) * 2020-06-18 2020-10-20 北京三快在线科技有限公司 Method and device for drawing lane line
WO2021104180A1 (en) * 2019-11-29 2021-06-03 上海商汤临港智能科技有限公司 Map generation method, positioning method, apparatus, device, storage medium, and computer program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200311991A1 (en) * 2019-03-27 2020-10-01 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for drawing intersection, server and storage medium
CN109920031A (en) * 2019-04-12 2019-06-21 中电海康集团有限公司 A kind of method and system of Fast Drawing intersection
WO2021104180A1 (en) * 2019-11-29 2021-06-03 上海商汤临港智能科技有限公司 Map generation method, positioning method, apparatus, device, storage medium, and computer program
CN111652061A (en) * 2020-04-28 2020-09-11 浙江吉利汽车研究院有限公司 Method and device for determining lane sideline and storage medium
CN111797722A (en) * 2020-06-18 2020-10-20 北京三快在线科技有限公司 Method and device for drawing lane line
CN111782751A (en) * 2020-06-28 2020-10-16 北京四维图新科技股份有限公司 Method and device for generating road of intersection in map and electronic equipment

Similar Documents

Publication Publication Date Title
US10288434B2 (en) Map-centric map matching method and apparatus
JP7314213B2 (en) Vehicle positioning method, apparatus, electronic device, storage medium and program
US10209082B2 (en) Method and apparatus for matching probe points to road segments utilizing a trajectory identifier
WO2022205616A1 (en) Method and apparatus for constructing navigation elements in map
CN109726489B (en) Method and system for establishing driving assistance database
CN111220163A (en) Curve judgment method based on curvature radius calculation, terminal device and storage medium
CN111311710A (en) High-precision map manufacturing method and device, electronic equipment and storage medium
CN112885099B (en) Method, device and equipment for determining key points of vehicle track
CN109064877B (en) Abrupt center line smoothing method and device based on high-precision map and storage medium
CN111323035A (en) Detection method and detection device for driving yaw and readable storage medium
CN113806457B (en) Longitude and latitude point region attribution judging method and system
CN112798004A (en) Vehicle positioning method, device, equipment and storage medium
CN115619871A (en) Vehicle positioning method, device, equipment and storage medium
CN114777799A (en) Intersection high-precision map generation method and device, electronic equipment and storage medium
US10371535B1 (en) Automatic map generation
CN114067021A (en) Road connection method and device
WO2023231459A1 (en) Method for generating intersection surface and related apparatus
CN111104410A (en) Local road information extraction method and device
CN114578401B (en) Method and device for generating lane track points, electronic equipment and storage medium
CN112735130B (en) Traffic data processing method and device, electronic equipment and medium
CN113362421B (en) Drawing method and device of diversion area in map and electronic equipment
CN114743395A (en) Signal lamp detection method, device, equipment and medium
CN109583511B (en) Speed fusion method and device
CN113296100A (en) Single millimeter wave radar target output method, device, equipment and storage medium
CN115061479B (en) Lane relation determination method and device, electronic equipment and storage medium

Legal Events

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