Method and device for constructing diversion line in diversion area and electronic equipment
By determining the reference line and boundary line in the diversion area and drawing the extension line using extension points, the diversion line in the diversion area is automatically constructed, and the diversion line in the prior art is solved, and a more efficient and accurate diversion line construction is achieved.
Patent Information
- Application Number
- CN202411988135.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the flow line of the flow diversion zone needs to be constructed manually, resulting in high production cost and low efficiency.
By determining the reference line and boundary line of the diversion area, the extension point is determined using the boundary node, and the extension line is drawn to the boundary line with the extension point, thereby automatically building the diversion line of the diversion area.
The construction accuracy and efficiency of the diversion line in the diversion area is improved, and the labor cost is reduced.
Smart Images

Figure CN119904589A_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of map rendering technology, and in particular to a method, device and electronic device for constructing a guide line inside a guide area. Background Art
[0002] With the significant improvement in the rendering accuracy of map data on the vehicle side in recent years, lane-level rendering has become the mainstream. As an important element for guiding vehicles at complex intersections and safely dividing traffic flows, how to accurately construct its guide lines is not only related to the user's visual experience, but also involves driving safety. Its importance is self-evident.
[0003] In the related art, map operators usually manually construct the diversion area according to its unique shape. Although this construction method can draw the details of the diversion line of the diversion area more meticulously, it requires more manpower and time, resulting in excessively high costs for making the diversion lines of the diversion area. Summary of the invention
[0004] In order to overcome the problems existing in the related art, this specification provides a method, a device and an electronic device for constructing a guide line inside a guide area.
[0005] According to a first aspect of an embodiment of this specification, a method for constructing a guide line inside a guide area is provided, the method comprising:
[0006] For a diversion area to be constructed, determining a reference line and a boundary line enclosing the diversion area;
[0007] Determine a plurality of extension points located on the reference line according to a plurality of boundary nodes on the boundary line;
[0008] The extension lines corresponding to the extension points are drawn from the extension points to the boundary line of the guide area; and the guide line of the guide area is determined from the extension lines according to the position distribution of the extension lines and the boundary line.
[0009] According to a second aspect of an embodiment of this specification, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method described in the first aspect are implemented.
[0010] According to a third aspect of the embodiments of this specification, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method described in the first aspect.
[0011] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program and / or instructions, wherein when the computer program and / or instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0012] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0013] In the embodiment of this specification, for the diversion area to be constructed, this solution uses the reference line to draw an extension line to the boundary line of the diversion area according to the geometric relationship between the boundary nodes on the boundary line of the diversion area and the reference line, and determines the diversion line of the diversion area from the extension line according to the position distribution of the extension line and the boundary line. It can be seen that this solution automatically constructs the diversion line inside the diversion area based on the reference line, which not only improves the construction accuracy, but also improves the construction efficiency of the diversion line of the diversion area and reduces the manual production cost.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0016] Figure 1 This is a flow chart of a method for constructing a guide line inside a guide area according to an exemplary embodiment of the present specification.
[0017] Figure 2 It is a schematic diagram of a diversion area to be constructed and its adjacent road lines shown in this specification according to an exemplary embodiment.
[0018] Figure 3 It is a schematic diagram of a reference line smoothing process according to an exemplary embodiment of the present specification.
[0019] Figure 4 It is a schematic diagram of a guide area of an oblique guide line according to an exemplary embodiment of the present specification.
[0020] Figure 5 Schematic diagram of a guide area of a V-shaped guide wire according to an exemplary embodiment of the present specification.
[0021] Figure 6 Schematic diagram of multiple projection points on a reference line according to an exemplary embodiment of the present specification.
[0022] Figure 7It is a schematic diagram of multiple extension points on a reference line and the projection direction of each extension point according to an exemplary embodiment of the present specification.
[0023] Figure 8 Schematic diagram of a direction vector at an extension point on a reference line of a folded line shape according to an exemplary embodiment of the present specification.
[0024] Fig. 9 It is a schematic diagram of determining a reference line based on a pair of road lines according to an exemplary embodiment of the present specification.
[0025] Fig.10 It is a schematic diagram of adjusting the extending direction of an extension line according to an exemplary embodiment of the present specification.
[0026] Fig.11 It is a schematic diagram of processing invalid guide lines according to an exemplary embodiment of the present specification.
[0027] Fig.12 It is a schematic diagram of judging the effectiveness of a guide line according to an exemplary embodiment of the present specification.
[0028] Fig.13 It is a schematic diagram of an unreasonable flow guide line according to an exemplary embodiment of the present specification.
[0029] Fig.14 It is a schematic diagram of processing unreasonable flow guide lines according to an exemplary embodiment of the present specification.
[0030] Fig.15 It is a schematic diagram of eliminating irregular small holes in the guide area according to an exemplary embodiment of this specification.
[0031] Fig.16 Schematic diagram of a buffer zone of a guide line according to an exemplary embodiment of the present specification.
[0032] Fig.17 It is a structural schematic diagram of an electronic device according to an exemplary embodiment of the present specification.
[0033] Fig.18 It is a block diagram of a device for constructing a guide line inside a guide area according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION
[0034] With the significant improvement in the rendering accuracy of map data on the vehicle side in recent years, lane-level rendering has become the mainstream. As an important element for guiding vehicles at complex intersections and safely dividing traffic flows, how to accurately construct its guide lines is not only related to the user's visual experience, but also involves driving safety. Its importance is self-evident.
[0035] In the related art, map operators usually manually construct the diversion area according to its unique shape. Although this construction method can draw the details of the diversion line of the diversion area more meticulously, it requires more manpower and time, resulting in excessively high costs for making the diversion lines of the diversion area.
[0036] In view of the above technical problems, this specification provides a method for constructing a guide line inside a guide area to improve the construction efficiency of the guide line in the guide area and reduce the manual production cost.
[0037] Next, the embodiments of this specification are described in detail.
[0038] like Figure 1 As shown, Figure 1 1 is a flow chart of a method for constructing a guide line inside a guide area according to an exemplary embodiment of the present specification, comprising steps 101-103:
[0039] Step 101: for a diversion area to be constructed, determine a reference line and a boundary line enclosing the diversion area.
[0040] Step 102: Determine a plurality of extension points on the reference line according to a plurality of boundary nodes on the boundary line.
[0041] Step 103: Draw extension lines corresponding to the extension points from the extension points to the boundary line of the guide area; and determine the guide line of the guide area from the extension lines according to the position distribution of the extension lines and the boundary line.
[0042] The diversion area (or diversion belt, diversion area) of the actual road is a diagonal stripe that distinguishes different lanes or directions. It usually appears at intersections, ramps, turns and other places where vehicle traffic converges, and uses visual cues to guide the direction of vehicle travel. The diversion area in this solution refers to a virtual diversion area that simulates the actual road diversion information in the electronic map.
[0043] like Figure 2 As shown, Figure 2 This is a schematic diagram of a diversion area to be constructed and its adjacent road lines shown in accordance with an exemplary embodiment of this specification. In computer graphics, points are connected to form edges, and the edges formed by several points connected end to end can enclose a closed graphic area. Based on this principle, in the electronic map, the diversion area 24 for the diversion line to be constructed is a closed area surrounded by boundary lines 23, and the boundary lines 23 are obtained by connecting boundary nodes 22 in sequence. The function of the diversion area 24 can be to guide the driving direction of the vehicle on the surrounding roads. There is generally at least one road line 21 near the diversion area 24. The diversion area that is finally drawn can be as follows Figure 4 and Figure 5As shown, the type of the guide line of the guide area drawn can be as follows Figure 4 The oblique guide line shown or Figure 5 The V-shaped guide wire shown. Two types of guide wires can be selected according to the actual application scenario.
[0044] Next, the relevant concepts are introduced in the data format of the computer-processed diversion area:
[0045] Specifically, the data structure of the boundary line 23 of the diversion area 24 can be defined as:
[0046] polygon
[0047] ={(x0,y0,z0),(x1,y1,z1),…,(x n1 ,y n1 , z n1 ), (x0, y0, z0)}
[0048] Wherein, polygon represents the boundary line 23; n1+1 is the total number of boundary nodes 22 on the boundary line 23; i is the identifier of the boundary node 22 on the boundary line 23, and the value range of i is 0 to n1;
[0049] (x i ,y i , z i ) is the spatial coordinate information of the boundary node 22 marked as i, such as x i ,y i 、z i They can be the coordinate values of the X-axis, Y-axis, and Z-axis of the three-dimensional coordinate system, respectively. It can be understood that the closed area formed by connecting these boundary nodes in sequence is the diversion area. Therefore, a set of coordinate points can be used to store the data of the diversion area in the computer. The boundary nodes can be connected end to end to form a closed area, and the first boundary node (x0, y0, z0) and the last boundary node (x0, y0, z0) can be the same boundary node (x0, y0, z0), which indicates in the data structure that the diversion area is composed of a closed area.
[0050] The data structure of the road line 21 can be defined as:
[0051] linestring={(x0,y0,z0),(x1,y1,z1),…,(x n ,y n , z n )}
[0052] Wherein, linestring represents the road line 21, n2+1 is the total number of road nodes on the route 21, j is the identifier of the road node, and the value range of j is 0 to n2; (x j,y j , z j ) represents the spatial coordinate information of several road nodes constituting the road line 21, such as x j ,y j 、z j The road nodes may be respectively the coordinate values of the X-axis, Y-axis, and Z-axis of the three-dimensional coordinate system.
[0053] The reference line is a reference for drawing the guide line of the guide area to be constructed, and the reference line can be determined according to at least one road line in the associated area of the guide area to be constructed. The associated area can be an area in the vicinity of the guide area, for example, the associated area can be a radiation area with the guide area as the center and a radius of r. Of course, the associated area may not include the guide area, for example, the associated area can be a certain area around the guide area.
[0054] Regarding how to determine at least one road line in the associated area of the diversion area to be constructed, please refer to the following embodiments:
[0055] In some application environments, the boundary line information of the diversion area and the road line information are stored separately. In this case, the diversion area layer and the road layer can be generated separately:
[0056] The data structure of the diversion area layer can be defined as follows:
[0057] DiversionLayer=(polygon,oid,roads),(...),(polygon,oid,roads)
[0058] The diversion area layer DiversionLayer includes several diversion area indexes (polygon, oid, roads), each of which includes the boundary line information polygon of different diversion areas. For polygon, please refer to the definition of its data structure; the identifier oid of the diversion area, which is used to uniquely identify the identity information of the diversion area; the road line set roads in the associated area of the diversion area, in which the road identification of the road line can be stored. If the road line set stores the road identification of multiple road lines, it means that there are multiple road lines in the associated area of the diversion area. On the contrary, if the road line set is empty, it means that there are no road lines in the associated area of the diversion area.
[0059] The data structure of the road layer is defined as follows:
[0060] RoadLayer = (linestring, ds oid ), (…), (linestring, ds oid)
[0061] The road layer RoadLayer includes several road line indexes (linestring, ds oid ), each road line index includes road line information linestring and the identifier ds of the diversion area associated with it oid .
[0062] In the initialization stage, the road line set roads can be empty. Next, according to the identifier of the diversion area shared by the road line layer and the diversion area layer, the road lines in the associated area of the diversion area are determined, and the associated road line information is updated to the road line set roads. The specific steps are as follows:
[0063] Step 1: Create a hashmap for each polygon in DiversionLayer based on oid.
[0064] Step 2: Traverse ds in RoadLayer oid , if ds oid If it does not exist in the hashmap of the corresponding polygon, then ds oid The linestring in the road line index is inserted into roads.
[0065] Through the above steps, all road lines in the associated area of the diversion area can be stored in roads.
[0066] When road line information is stored in roads, at least one road line in the associated area of the diversion area can be obtained from roads.
[0067] If no road line information is stored in roads, it indicates that there is no road line associated with the diversion area. At this time, several road lines in the vicinity can be determined based on the location of the boundary line of the diversion area, and the road lines whose elevation difference with the elevation of the diversion area is not greater than the difference threshold are selected as the road lines in the associated area of the diversion area. In the case of the lack of association between the diversion area and the road line, this solution can still select the road lines in the associated area of the diversion area based on the elevation difference and spatial position, so that the method can still be executed normally in the face of missing associated data, thereby improving the robustness of the method.
[0068] In an illustrated embodiment, after determining at least one road line in the associated area of the diversion area, a reference line can be determined based on the at least one road line. Exemplarily, in the case where the diversion area corresponds to one road line, the road line can be used as the reference line. In the case where the diversion area corresponds to multiple road lines, at least one basic road line pair consisting of the multiple road lines can be determined; in response to the candidate road line pair existing in at least one basic road line pair, a reference line is determined based on the candidate road line pair; or, in response to the absence of a candidate road line pair in at least one basic road line pair, the longest road line among the multiple road lines is determined as the reference line. Wherein: the candidate road line pair includes two road lines, and the two road lines included in different basic road line pairs are not completely the same; the length ratio between the two road lines in the candidate road line pair is greater than the ratio threshold, and / or, the angle between the two routes in the candidate road line pair is less than the angle threshold.
[0069] Specifically, when the diversion area corresponds to multiple road lines, the length ratio and angle between the two road lines in each pair of basic road lines can be determined for each pair of basic road lines. For example, for n road lines, C 2 n For basic road lines, n is greater than 1. At least one pair of candidate road lines with a length ratio greater than a ratio threshold and / or an angle less than an angle threshold are screened out from these basic road lines. If multiple pairs of candidate road lines are screened out, one pair can be selected from the multiple pairs of candidate road lines to determine the reference road line, or a pair of target road lines with the smallest length ratio and / or the smallest angle can be selected from the at least one pair of candidate road lines to determine the reference line. For example, a pair of target road lines with the smallest length ratio or angle can be selected from at least one pair of candidate road lines. If there are multiple pairs of candidate road lines with the smallest length ratio, a pair of candidate road lines with the smallest angle can be screened out from them; if there are multiple pairs of candidate road lines with the smallest angle, a pair of candidate road lines with the smallest length ratio can be screened out from them; if there are multiple pairs of candidate road lines with the smallest angle and the smallest length ratio at the same time, a pair of candidate road lines can be selected from them as the target road line. If there is no at least one pair of candidate road lines with a length ratio greater than the ratio threshold and / or an angle less than the angle threshold in the basic road line pair, a road line with the longest length is selected from the multiple road lines as the candidate road line.
[0070] Referring to Formula 1, the length ratio may be a length ratio between the shortest basic road line and the longest basic road line in a pair of basic road lines.
[0071]
[0072] In Formula 1, ratio is the length ratio, length0 is the length value of one basic road line in a pair of basic road lines, and length1 is the length value of the other basic road line; min(length0, length1) means taking the smallest length value between length0 and length1, and max(length0, length1) means taking the largest length value between length0 and length1.
[0073] In this embodiment, the length ratio will affect the shape of the reference line finally determined. If the length ratio is too large, it is easy to cause a deformed reference line to be determined based on the pair of road lines. The length ratio can be used to screen out a pair of road lines suitable for determining the reference line. The length ratio threshold can be 0.6.
[0074] The angle may be the vector angle between the direction vectors of the same road direction of two basic road lines in a pair of basic road lines, and the road direction may be the direction from the starting point of the road line to the end point, or the direction from the end point of the road line to the starting point. For example, if the road direction is the direction from the starting point to the end point, the angle may be calculated using Formula 2:
[0075]
[0076] In formula 2, the angle is θ1; A and B represent the start and end points of a road line, respectively. A ,y A ), (x B ,y B ) represent the position coordinates of the starting point and the end point of a road line respectively; C and D represent the identifiers of the starting point and the end point of another road line respectively. C ,y C ), (x D ,y D ) represent the position coordinates of the starting point and the end point of another road line respectively; arccos() is the inverse cosine function.
[0077] In this embodiment, the angle will also affect the shape of the reference line finally determined. If the angle between the road lines is too large, it is also easy to cause a deformed reference line to be determined based on the pair of road lines. Therefore, a pair of road lines suitable for determining the reference line can be selected by calculating the angle between any two road lines. The angle ratio threshold can be 90°.
[0078] In an illustrated embodiment, as described above, a road line is composed of a number of road nodes connected in sequence. For each road line of at least one road line used to determine a reference line, a line segment connecting a starting road node and an ending road node of the road line is determined. When the distance between each road node on the road line and the line segment is less than a distance threshold, the line segment is used as a corrected road line.
[0079] Specifically, Figure 3 As shown, for each road line 33 used to determine the reference line, the road line 33 is composed of a number of road nodes connected in sequence. A line segment 32 connecting the starting road node 31 and the ending road node 35 of the road line 33 is determined. When the distance between each road node on the road line 33 and the line segment 32 is less than a distance threshold, the line segment 32 is used as the corrected road line. For example, for any road node 34 on the road line 33, the distance d between the road node 34 and the line segment 32 is calculated. The distance threshold may be 1 m.
[0080] In the case of determining a reference line based on a road line, if a line segment that meets the distance condition is determined, the reference line is determined based on the line segment. In the case of determining a reference line based on a pair of road lines, for example, road line A and road line B, if a line segment that meets the distance condition is determined for road line A According to the line segment And road line B determine the reference line. If the line segments that meet the distance conditions are determined for road line A and road line B respectively and line segments According to the line segment and Determine the reference line.
[0081] Since the shape of the road network is not necessarily regular, if the guide lines of the diversion area are constructed directly based on the road lines, it is easy for the guide lines to intersect inside the diversion area. Therefore, this solution effectively reduces the irregularity of the road lines by performing the above processing on the road lines, and can reduce the intersection of the guide lines.
[0082] Furthermore, the line segments and / or road lines obtained after the above processing of the road lines can be smoothed using the Douglas-Peucker simplification algorithm and the B-Spline algorithm, and then the reference lines are determined using the processed line segments and / or road lines to further reduce the irregularity of the road lines.
[0083] In actual application scenarios, the types of guide lines in the guide area can be roughly divided into two types: V-shaped guide lines and oblique guide lines. Therefore, the guide area can be roughly divided into V-shaped guide areas and oblique guide areas. Figure 4As shown in FIG. 1 , the multiple oblique guide lines inside the oblique guide area are a series of parallel oblique lines. Figure 5 As shown, each V-shaped guide line inside the V-shaped guide area presents a clear "V" shape, which is composed of two straight line segments extending obliquely. The V-shaped guide area is more suitable for guiding the direction of vehicle travel from a visual point of view, while the oblique guide area is more suitable for isolating traffic. Of course, the function of the guide area is not determined by the shape of the guide line, but the appropriate shape of the guide line can visually enhance the visual guidance. In general, there is often a pair of adjacent road lines that meet the length ratio and / or angle requirements near the guide area where there is a need to draw a V-shaped guide line. On the contrary, there is often no pair of adjacent road lines that meet the length ratio and / or angle requirements near the guide area where there is a need to draw an oblique stripe. Therefore, this scheme can determine whether to construct a V-shaped guide line or an oblique guide line inside the guide area according to the number of road lines in the associated area of the guide area, that is, if the guide line inside the guide area is drawn based on one road line, then the oblique guide line can be drawn inside the guide area; if the guide line inside the guide area is drawn based on a pair of road lines, then the V-shaped guide line can be drawn inside the guide area. Therefore, this specification proposes a drawing strategy that can adaptively meet the drawing requirements of stripe types in different diversion areas. Next, the drawing strategy based on one road line and the drawing strategy based on a pair of road lines are introduced respectively:
[0084] For a drawing strategy based on a road line:
[0085] In an illustrated embodiment, a reference line can be determined based on a road line, and multiple extension points located on the reference line are determined based on multiple boundary nodes on the boundary line of the diversion area, and extension lines corresponding to each extension point are drawn from each extension point to the boundary line of the diversion area; and the diversion line of the diversion area is determined from the extension lines based on the position distribution of each extension line and the boundary line. When determining a reference line based on a road line, the road line can be used as a reference line. The extension points are a set of discrete points located on the reference line, and the position distribution of the extension points on the reference line is used to control the interval between the extension lines drawn from the extension points to the boundary line of the diversion area, and then control the interval of the diversion lines of the diversion area.
[0086] When determining multiple extension points on the reference line based on multiple boundary nodes on the boundary line of the diversion area, it can be specifically determined that multiple projection points of multiple boundary nodes on the boundary line on the reference line, the reference point is determined based on the position distribution between the multiple projection points, and the multiple extension points on the reference line are determined based on the relative position relationship between the reference point and the reference line. Preferably, when determining the reference point based on the position distribution between the multiple projection points, and determining multiple extension points on the reference line based on the relative position relationship between the reference point and the reference line, the projection point of each boundary node on the boundary line of the diversion area on the reference line can be determined in turn, the middle point between the two projection points with the farthest distance is determined, and the middle point is used as the reference point, and multiple extension points with equal spacing are determined towards both ends of the reference line with the middle point as the starting extension point.
[0087] For example, all boundary nodes Q(x q ,y q ) onto the reference line, and the projection point Q is calculated according to Formula 3 proj The spatial position is:
[0088]
[0089] Among them, in Formula 3, the starting point of the reference line is P1, and the end point is P2; (Q-P1) represents the direction vector from the boundary node Q to the starting point P1; (P2-P1) represents the direction vector from P1 to P2.
[0090] Specifically, Figure 6 As shown, each boundary node 22 on the boundary line of the diversion area 24 is projected onto the reference line 61 to obtain a plurality of projection points 63, and a middle point 62 between the two projection points with the longest distance is determined. The middle point 62 may be located at the middle position of the reference line between the two projection points with the longest distance. Figure 7 As shown, a plurality of equally spaced extension points 71 are determined toward both ends of the reference line with the middle point 62 as the starting extension point. Among them, the distance between any two adjacent extension points is equal. The larger the distance between adjacent extension points, the larger the distance between adjacent guide lines formed inside the guide area finally drawn. The reason for controlling the equal distance between adjacent extension points is to achieve the visual effect of equal distance between guide lines inside the guide area. If other visual effects are to be achieved, it is also possible to select, when determining multiple extension points based on the middle point, to determine at least some extension points with unequal intervals.
[0091] In an illustrated embodiment, after determining a plurality of extension points located on the reference line according to the boundary nodes of the boundary line of the diversion area, extension lines can be drawn toward the boundary line of the diversion area with each extension point as a starting point. In order to accurately and automatically complete the process of drawing the extension line, the orientation of each extension point relative to the boundary of the diversion area can be determined first, and then the direction of the drawn boundary can be determined according to the orientation, and finally the extension point can be drawn along the boundary direction to the boundary of the diversion area. For example, if it is determined that the reference line is on the left side of the diversion area, then the orientation of each extension point on the reference line relative to the boundary of the diversion area is the left side of the diversion area, and then the direction to draw the extension line to the side where the diversion area is located can be determined according to the orientation.
[0092] In order to accurately enable the electronic device to automatically perform the drawing process, the boundary direction of each extension point on the reference line can be determined based on the geometric shape of the reference line, and the boundary direction points to the boundary line of the diversion area. The extension line corresponding to each extension point is drawn along the boundary direction of each extension point.
[0093] The reference line is formed by connecting several nodes like the road line. When there are two nodes, the reference line formed by connecting the nodes is obviously a straight line. When there are at least three nodes and at least three nodes are not located on the same straight line, the reference line formed by the nodes connected in sequence is obviously a broken line. Therefore, this solution can divide the geometric shape of the reference line into two cases: a straight line and a broken line. This specification provides a method for drawing an extension line when the geometric shape of the reference line is a straight line and a method for drawing an extension line when the geometric shape of the reference line is a broken line:
[0094] Exemplarily, when the geometric shape of the reference line is a straight line, a first direction vector parallel to the reference line is determined as a target direction vector, and the target direction vector is rotated toward the boundary line of the diversion area to obtain the boundary direction of each extension point on the reference line; and / or, when the geometric shape of the reference line is a broken line, for each extension point on the reference line, a second direction vector corresponding to each extension point is determined as a target direction vector, and the target direction vector is rotated toward the boundary line of the diversion area to obtain the boundary direction of each extension point; the second direction vector is determined based on the tangent direction of the reference line at the corresponding extension point.
[0095] Specifically, when the geometric shape of the reference line is a straight line, assuming that the starting point of the reference line is P1 (x1, y1) and the end point is P2 (x2, y2), the first direction vector parallel to the reference line can be determined by Formula 4:
[0096] d=(P2-P1)=(x2-x1, y2-y1) (Formula 4)
[0097] In Formula 4, d is the first direction vector, and the determined first direction vector is used as the target direction vector. The target direction vector 72 can be Figure 7 As shown, target direction vector 72 is parallel to reference line 61 .
[0098] Optionally, normalize to a unit vector according to Formula 5:
[0099]
[0100] Among them, in formula 5, is the normalized first direction vector, ∥d∥ indicates the magnitude of the vector, It means to normalize the vector so that it becomes a direction vector with a magnitude of 1;
[0101] like Figure 7 As shown, when the reference line is a straight line, in order to achieve the purpose of parallel boundary directions of the drawn extension lines 74a, 74b and 74c, the first direction vector can be used as the target direction vector, and the target direction vector is rotated to draw the extension lines of all extension points according to the boundary direction indicated by the rotated target direction vector. When the reference line is outside the diversion area, the reference line may be on the left side of the diversion area or on the right side of the diversion area, so in order to determine the spatial position relationship between the reference line and the diversion area:
[0102] Randomly select any boundary node C(x c ,y c ), the spatial position of the reference line relative to the diversion area can be determined according to Formula 6:
[0103] t=(P2-P1)×(C-P1) (Formula 6)
[0104] In formula 6, (P2-P1) represents the direction vector from P1 to P2; (C-P1) represents the direction vector from P1 to C; (P2-P1)×(C-P1) can be used to determine the positional relationship between C and the direction vector from P1 to P2. If t>0, it can be determined that the reference line is on the left side of the diversion area; if t<0, it can be determined that the reference line is on the right side of the diversion area;
[0105] If it is on the left side, the rotation angle of the target direction vector can be set to 225 degrees, so that the target direction vector can be rotated toward the boundary line of the diversion area; if it is on the right side, the rotation angle of the target direction vector can be set to 315 degrees, so that the target direction vector can be rotated toward the boundary line of the diversion area. The rotated target direction vector can be expressed by the following formula 7a and formula 7b:
[0106] v x =d x·cos(θ2)-d y sin(θ2) (Formula 7a)
[0107] v y =d x ·sin(θ2)+d y ·cos(θ2) (Formula 7b)
[0108] In Formula 7a and Formula 7b, θ2 is the rotation angle.
[0109] The target direction vector 72 before rotation and the target direction vector 73 after rotation can be expressed as Figure 7 As shown. For each extension point on the reference line, an extension line can be drawn according to the boundary direction indicated by the rotated target direction vector 73. For example, the extension point 71 can extend the extension line 74a according to the boundary direction indicated by the rotated target direction vector 73. For another example, the extension point 62 can extend the extension line 74b according to the boundary direction indicated by the rotated target direction vector 73. The boundary direction is the same as the vector direction of the rotated target direction vector 73.
[0110] Alternatively, when the geometric shape of the reference line is a broken line, for each extension point on the reference line, the second direction vector corresponding to each extension point is determined as the target direction vector, and the target direction vector is rotated toward the boundary line of the guide area to obtain the boundary direction of each extension point; the second direction vector is determined based on the tangent direction of the reference line at the corresponding extension point.
[0111] Specifically, when the geometric shape of the reference line is a broken line, for each extension point on the reference line, a second direction vector of the tangent direction at the extension point can be determined as the target direction vector. Figure 8 As shown in FIG. 8 , for a certain extension point 85 on the reference line, the second direction vector 86 of the tangent direction at the extension point 85 may be a direction vector parallel to the local reference line segment (i.e., the line between the node 83 and the node 87) where the extension point 85 is located. The tangent direction may be along the direction from the starting point 81 to the end point 88 of the reference line. For example, Figure 8 As shown, for a certain extension point 85 on the reference line, the direction of the second direction vector 86 at the extension point 85 can be along the direction from the starting point 81 to the end point 88 of the reference line, rather than the opposite direction. The second direction vectors of other extension points are determined in the same manner and will not be described in detail here. For other extension points on the reference line, the second direction vector in the tangent direction at the extension point can be a direction vector parallel to the local reference line segment where the extension point is located. For example, for other extension points 90, the second direction vector 91 in the tangent direction of the extension point 90 can be a direction vector parallel to the local line segment where the extension point is located (i.e., the line between the reference node 87 and the reference node 88).
[0112] The coordinate information C(x c ,y c ), and the local reference line segment where the projection point 85 of the reference line to which the boundary node 84 is projected is located, that is, the line segment between the reference node 83 and the reference node 87, determine the coordinate information P1 (x1, y1) of the starting reference node 83 and the coordinate information P2 (x2, y2) of the ending reference node 87 of the local reference line segment, and determine the spatial position of the reference line 82 relative to the guide area by formula 5.
[0113] For any extension point, if it is on the left side, the rotation angle of the target direction vector can be set to 225 degrees, so that the target direction vector can be rotated toward the boundary line of the guide area; if it is on the right side, the rotation angle of the target direction vector can be set to 315 degrees, so that the target direction vector can be rotated toward the boundary line of the guide area. For example, for the extension point 85, the target direction vector 86 before rotation and the target direction vector 89 after rotation can be as follows: Figure 8 shown.
[0114] When rotating the target direction vector toward the boundary line of the guide area, if the reference line is not located or at most one endpoint is located in the guide area, the spatial position relationship between the reference line and the boundary line of the guide area can be determined with reference to the above-mentioned embodiment to determine the position of the guide area relative to the reference line, thereby rotating the target direction vector toward the position of the guide area.
[0115] If at least part of the reference line is within the guide area, you can rotate the target direction vector toward one side of the reference line and the target direction vector toward the other side of the reference line. For example, you can rotate the target direction vector 15 degrees toward one side of the reference line and the target direction vector 15 degrees toward the other side of the reference line. Finally, a V-shaped guide line will be drawn. For details, see Figure 5 The size of the rotation angle determines the opening size of the V-shaped guide line, and this manual does not impose any restrictions on the rotation angle.
[0116] For the drawing strategy based on a pair of road lines:
[0117] In an illustrated embodiment, a reference line is determined based on a pair of road lines, and a plurality of extension points located on the reference line are determined based on a plurality of boundary nodes on the boundary line of the diversion area; extension lines corresponding to the respective extension points are drawn toward the boundary line of the diversion area; and based on the position distribution of the respective extension lines and the boundary line, the diversion line of the diversion area is determined from the extension lines.
[0118] In an illustrated embodiment, when determining a reference line based on a pair of road lines, a target road line pair can be determined from the candidate road line pair; a first sampling point sequence on a first road line in the target road line pair is determined, and a second sampling point sequence on a second road line in the target road line pair is determined; a connecting line corresponding to each target sequence position is constructed based on the first sampling point sequence and the second sampling point sequence; the connecting line is a connecting line between a first sampling point and a second sampling point, the first sampling point is a sampling point at a corresponding target sequence position in the first sampling point sequence, and the second sampling point is a sampling point at a corresponding target sequence position in the second sampling point sequence; based on at least one intersection point of each connecting line with a boundary line of the diversion area, a center point corresponding to each connecting line is determined; and the determined center points are connected to obtain the reference line.
[0119] For example, Fig. 9 As shown, the first sampling point sequence P on the first road line 95 in the target road line pair is determined. ref1 and a second sampling point sequence P on the second road line 96 ref2 , for example, the first sampling point sequence P ref1 The sampling point sequence 93 is composed of 4 sampling points arranged at equal intervals. Similarly, the number of sampling points in the second sampling point sequence can be the same as that in the first sampling point sequence. According to the first sampling point sequence and the second sampling point sequence, a connecting line corresponding to the position of each target sequence can be constructed, and the connecting line can be represented as follows:
[0120]
[0121] Among them, L i A connecting line representing a first sampling point at an i-th sequence position in a first sampling sequence and a second sampling point at an i-th sequence position in a second sampling sequence; express arrive The amount of change between It represents the amount of change after adjustment, and the adjustment ratio is controlled by the size of t.
[0122] For each connecting line L i , determine at least one intersection point 91 formed by the intersection of the connecting line and the boundary line 23 of the guide area 24, and determine the center point 92 of the at least one intersection point 91 according to Formula 7:
[0123]
[0124] In formula 8, I i For connecting line L i Any intersection point 91 formed after intersecting with the boundary line 23 of the diversion area 24, there are n intersection points in total, i ranges from 1 to n, I avgIt is I1, I2, ..., I n The center point 92 may be the arithmetic mean of all intersection points. avg .
[0125] All center points 92 are connected in sequence to obtain a reference line 94 .
[0126] According to the multiple boundary nodes on the boundary line of the guide area, multiple extension points located on the reference line are determined; the extension lines corresponding to the extension points are drawn from the extension points to the boundary line of the guide area; and according to the position distribution of the extension lines and the boundary line, the guide line of the guide area is determined from the extension lines. For details, please refer to the above-mentioned embodiment, which will not be repeated here.
[0127] After the guide lines of the guide area are automatically drawn based on the method of the above embodiment, the guide lines may intersect, for example, the guide line A and the guide line B are not parallel to each other, forming a cross relationship. The intersection of the guide lines will affect the overall visual effect of the guide area. Therefore, in the following preferred embodiments, this specification mainly solves the intersection of the guide lines to improve the overall visual effect of the guide area.
[0128] In an illustrated embodiment, when drawing extension lines corresponding to each extension point from each extension point to the boundary line of the guide area, the extension line is drawn from the first extension point to the boundary line of the guide area; for any extension point other than the first extension point, if the first extension line corresponding to the extension point intersects with the second extension line corresponding to the previous extension point of the extension point, the extension direction of the first extension line is adjusted so that the adjusted first extension line does not intersect with the second extension line; the first extension line is an extension line drawn from the extension point to the boundary line of the guide area, and the second extension line is an extension line drawn from the previous extension point to the boundary line of the guide area.
[0129] Specifically, Fig.10As shown, the extension lines corresponding to the extension points can be drawn sequentially from the boundary line of the guide area with each extension point. For example, after the extension line 105 is drawn from the boundary line 23 of the guide area 24 with the first extension point, the extension line 104 is drawn from the boundary line 23 of the guide area 24 with the next extension point, and it can be determined whether the extension line 105 intersects with the extension line 104. Since the extension line 105 does not intersect with the extension line 104, the extension line 103 is drawn from the boundary line 23 of the guide area 24 with the next extension point, and it is determined whether the extension line 104 intersects with the extension line 103. Since the extension line 104 does not intersect with the extension line 103, the extension line 102 is drawn from the boundary line 23 of the guide area 24 with the next extension point, and since the extension line 102 intersects with the extension line 103, the extension direction of the extension line 102 is adjusted so that the adjusted extension line 102 does not intersect with the extension line 103. For the first adjustment, the tangent angle of the direction vector of the tangent direction at the current extension point is adjusted to the average of the tangent angle of the current tangent direction and the tangent angle of the previous tangent direction of the previous extension point; for non-first adjustment, the tangent angle of the direction vector of the tangent direction at the current extension point is adjusted to the average of the tangent angle determined in the last adjustment and the tangent angle of the previous tangent direction of the previous extension point. After each adjustment, verify whether the two extension lines intersect. If they do, proceed to the next adjustment. The final adjustment is as follows Fig.10 The result is shown on the right side of .
[0130] The above method can ensure that when the extension line is drawn for the boundary of the guide area, each guide line does not intersect with the adjacent guide lines.
[0131] In one embodiment, when determining the guide lines of the guide area from the extension lines according to the position distribution of each extension line and the boundary line, the following can be performed for each extension line separately: based on at least one intersection of the extension line and the boundary line, determining the target line segment on the extension line; the target line segment is located inside the guide area, and at least one endpoint of the target line segment is an intersection; and screening the guide lines of the guide area from the determined target line segments.
[0132] Specifically, Fig.11As shown, taking any extension point 111 on the reference line 115 as an example, when the extension line 114 is drawn from the extension point 115 to the boundary line 23 of the diversion area, the intersection points at which the extension line 114 intersects with the boundary line 23 in the extension process are the intersection point 112A, the intersection point 115B, the intersection point 112B and the intersection point 115B. The target line segment on the extension line 114 is the line segment 113A (the line between the intersection point 112A and the intersection point 115A) and the line segment 113B (the line between the intersection point 112B and the intersection point 115B). It can be seen that at least one endpoint of the line segment 113A and the line segment 113B is an intersection point and the line segment 113A and the line segment 113B are located inside the diversion area. Although the endpoint of the line segment between the intersection point 115B and the intersection point 112B is an intersection point, the line segment is not located inside the diversion area, so the line segment is not a target line segment. The guide lines of the guide area can be screened out from the determined target line segments (line segment 113A and line segment 113B). For example, since line segment 113B intersects with the drawn guide lines, it can be removed from the guide area, and line segment 113A is retained as the guide line of the guide area. The so-called "screening" is to eliminate some target line segments that do not meet the requirements, and then use the remaining target line segments that meet the requirements as the guide lines of the guide area. For specific screening methods, please refer to the following embodiments:
[0133] When selecting the guide lines of the guide area from the determined target line segments, the target line segments on the extension lines can be determined as candidate guide lines corresponding to the extension lines, and the guide lines of the guide area can be selected from the candidate guide lines corresponding to the extension lines according to the guide line selection method. This solution provides several exemplary guide line selection methods, and see the following embodiments for details:
[0134] In an illustrated embodiment, each extension line is respectively used as the first extension line to perform the following: when there are at least two candidate guide lines corresponding to the first extension line, a first evaluation value of each of the at least two candidate extension lines is determined, and the candidate guide line whose first evaluation value is not greater than a first threshold is determined as the guide line of the guide area; wherein the first evaluation value is the difference between the point-line distance and the point reference distance of the candidate guide line, the point reference distance is the vertical distance between the first extension point corresponding to the first extension line and the boundary line of the guide area, and the point-line distance is determined based on the distance between the first extension point and each reference point on the candidate guide line.
[0135] Specifically, when the first extended line corresponds to one candidate flow-guiding line, the candidate flow-guiding line may be determined as the flow-guiding line of the flow-guiding area.
[0136] Specifically, Fig.11As mentioned above, the target line segments on the extended line 114 are the line segments 113A and 113B, so the line segments 113A and 113B can be determined as the candidate guide lines corresponding to the extended line 114.
[0137] like Fig.12 As shown, the line segment 113A is taken as an example to exemplarily introduce how to judge whether the line segment 113A is suitable as the guide line of the guide area:
[0138] First, the reference point can be selected as any endpoint on the candidate flow guide line. For example, to determine the point-to-line distance of line segment 113A, the reference point can be selected as any endpoint of line segment 113A. For example, the reference point can be selected as intersection 112A, and point-to-line distance 122 can be the distance between extension point 111 and intersection 112A. For another example, the reference point can also be selected as intersection 115A, and the point-to-line distance can be the distance between extension point 111 and intersection 115A.
[0139] Then, the point-parameter distance of the line segment 113A is determined, and the point-parameter distance 121 is the vertical distance between the extension point 111 and the boundary line 23 of the guide area. For all candidate guide lines on the same extension line, the point-parameter distance is the same, that is, it is the vertical distance between the extension point of the extension line and the boundary line of the guide line.
[0140] Finally, the absolute value of the difference between the point-line distance 122 and the point-parameter distance 121 is determined, and when the absolute value of the difference is not greater than a first threshold, the line segment 113A is determined as the guide line of the guide area.
[0141] The above evaluation process can also be performed for line segment 113B. When line segment 113B does not meet the screening requirements, it can be removed from the diversion area. The candidate diversion lines screened out by the above screening method can preliminarily eliminate the problem of intersection with other drawn diversion lines. Fig.11 The screening logic of the candidate guide lines of the guide area shown on the right side is the same. Assuming that all candidate guide lines meet the requirements, all candidate guide lines can be retained.
[0142] like Fig.13 As shown, in an ideal situation, the length difference between adjacent guide lines is not too large, such as the case of guide line 131 and guide line 132. However, in the actual drawing process using this method, the length of guide line 133 may be too different from the length of the previous guide line 132, which may cause the guide line 133 to intersect with other guide lines as shown in the figure. In response to this problem, this specification proposes the following solution:
[0143] In one embodiment, M adjacent extension points on a reference line are used as a target extension point set, and then the following processing is performed for each target extension point set: the total length of the candidate guide lines of each extension point among the M extension points included in the target extension point set is determined; if the difference in the total length of the candidate guide lines of different extension points among the M extension points meets a preset difference condition, the candidate guide lines corresponding to each extension point among the M extension points are determined as the guide lines of the guide area; wherein M is an integer greater than 1, and the total length of the candidate guide lines of the extension point is the sum of the lengths of all candidate guide lines corresponding to the extension point.
[0144] Or Fig.13 For example, M=3, based on the three adjacent extension points on the reference line as the target extension point set, and then the following processing is performed on the extension point set: determine the total length of the candidate guide line 133, the total length of the candidate guide line 132 and the total length of the candidate guide line 131 corresponding to each extension point in the target extension point set; if the difference between the total length of the candidate guide line 133 and the total length of the candidate guide line 132, and the difference between the total length of the candidate guide line 132 and the total length of the candidate guide line 131 both meet the preset difference conditions, then the candidate guide line 133, the candidate guide line 132 and the candidate guide line 131 corresponding to each of the three extension points are determined as the guide lines of the guide area.
[0145] In one embodiment, M=2, when M adjacent extension points on the reference line are used as the target extension point set, at least one candidate extension point set can be determined based on at least two extension points on the reference line, and each candidate extension point set includes two adjacent extension points on the reference line. The candidate extension point set of at least two candidate guide lines existing on the extension line corresponding to each extension point is determined as the target extension point set. The difference between the total lengths of the candidate guide lines of the two extension points included in the target extension point set is not greater than the second threshold.
[0146] Specifically, Fig.14As shown. On the reference line 144, there are sequentially adjacent extension points 141, extension point 142, extension point 143 and extension point 144, and the adjacent extension points can be determined as a candidate extension point set. For example, the extension point 141 and the extension point 142 are determined as a candidate extension point set; the extension point 142 and the extension point 143 are determined as a candidate extension point set. The candidate extension point set of at least two candidate flow guide lines existing on the extension line corresponding to each extension point is determined as the target extension point set. For example, there is a candidate flow guide line 145 on the extension line 148 corresponding to the extension point 141, and the candidate extension point set including the extension point 141 and the extension point 142 will not be determined as the target extension point set. For example, if there are candidate guide lines 146 and 149 on the extension line 150 corresponding to the extension point 142, and there are candidate guide lines 147 and 152 on the extension line 151 corresponding to the extension point 143, then the candidate extension point set including the extension point 142 and the extension point 143 can be determined as the target extension point set. The total length of the candidate guide lines of the extension point 142 included in the target extension point set is the sum of the first lengths of the candidate guide lines 146 and the candidate guide lines 149, and the total length of the candidate guide lines of the extension point 143 is the sum of the second lengths of the candidate guide lines 147 and the candidate guide lines 152. When the absolute value of the difference between the sum of the first length and the sum of the second length is not greater than the second threshold, all candidate guide lines corresponding to extension point 142 and extension point 143 are determined as guide lines of the guide area, that is, candidate guide line 146, candidate guide line 149, candidate guide line 147 and candidate guide line 152 are determined as guide lines of the guide area.
[0147] like Fig.15 As shown, the closed figure 154 formed by the boundary lines and the guide lines at each vertex of the guide area is irregular in shape and small in area, which is visually different from other regular areas, affecting the visual effect of the texture inside the guide area. Therefore, this specification proposes a solution to this problem, see the following embodiment:
[0148] The candidate flow guiding lines in the flow guiding area are determined as the second flow guiding lines, and for each second flow guiding line, the following operations are performed:
[0149] Based on a closed figure formed by the second guide line and the boundary line of the guide area, a second evaluation value of the second guide line is determined, and according to the second evaluation value, it is determined whether the second guide line is determined as the guide line of the guide area.
[0150] Specifically, Fig.15As shown, taking any extended line 153 as an example, a candidate guide line 155 in the guide area is determined as a second guide line, and a second evaluation value of the second guide line is determined for a closed figure 154 formed by the second guide line and the boundary line of the guide area. The second evaluation value may be the area of the closed figure 154. If the area of the closed figure 154 is not less than a preset area threshold, the second guide line is determined to be the guide line of the guide area. The second evaluation value may be the length of the second guide line. If the length of the second guide line is not less than the length threshold, the second guide line is determined to be the guide line of the guide area.
[0151] Optionally, to enhance the visual effect of the stripes, e.g. Fig.16 As shown, a buffer zone 162 is constructed for each guide line 161 formed inside the guide area after each extension line intersects with the boundary line. The width of the buffer zone is w, which is expressed as follows:
[0152]
[0153] In Formula 9, Buffer is the buffer zone 162, and p is any point of the buffer zone 162. p may be any point inside the buffer zone or any point on the boundary line of the buffer zone. p may be represented by a coordinate value. represents a two-dimensional real space, L is the guide line 161, and dist(p, L) represents the distance from point P in the buffer zone to the guide line 161; It means that in the two-dimensional real space, the distance from any point P in the buffer zone to the guide line 161 is less than w, where w is the distance threshold.
[0154] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of a device and a terminal to which it is applied.
[0155] like Fig.17 As shown, Fig.17 It is a structural diagram of an electronic device shown in this specification according to an exemplary embodiment. At the hardware level, the electronic device 1700 includes a processor 1702, an internal bus 1704, a network interface 1706, a memory 1708 and a non-volatile memory 1710, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 1702 reading the corresponding computer program from the non-volatile memory 1710 into the memory 1708 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic module, but can also be hardware or logic devices.
[0156] like Fig.18 As shown, Fig.18 This is a block diagram of a device for constructing a guide line inside a guide area according to an exemplary embodiment of the present specification. The device can be applied to Fig.17 The electronic device 1700 shown in the figure is used to implement the technical solution of this specification. The device includes:
[0157] A reference line determination module 1802 is used to determine a reference line and a boundary line surrounding the diversion area to be constructed;
[0158] The extension point determination module 1804 is used to determine a plurality of extension points located on the reference line according to a plurality of boundary nodes on the boundary line.
[0159] The guide line construction module 1806 is used to draw extension lines corresponding to each extension point from each extension point to the boundary line of the guide area; and determine the guide line of the guide area from the extension lines according to the position distribution of each extension line and the boundary line.
[0160] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0161] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0162] The present specification also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of any of the aforementioned methods for constructing a guide line inside a guide area provided in the present application are implemented.
[0163] Specifically, computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (such as EPROM, EEPROM and flash memory devices), magnetic disks (such as internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks.
[0164] The present specification also provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements the method for constructing a guide line inside a guide area as described in any of the above embodiments.
Claims
1. A method for constructing a guide line inside a guide area, characterized in that: The method comprises: For a diversion area to be constructed, determining a reference line and a boundary line enclosing the diversion area; Determine a plurality of extension points located on the reference line according to a plurality of boundary nodes on the boundary line; The extension lines corresponding to the extension points are drawn from the extension points to the boundary line of the guide area; and the guide line of the guide area is determined from the extension lines according to the position distribution of the extension lines and the boundary line.
2. The method according to claim 1, characterized in that The step of drawing extension lines corresponding to the extension points from the extension points to the boundary line of the diversion area includes: Draw an extension line from the first extension point to the boundary line of the guide area; for any extension point other than the first extension point, if the first extension line corresponding to the extension point intersects with the second extension line corresponding to the previous extension point of the extension point, adjust the extension direction of the first extension line so that the adjusted first extension line does not intersect with the second extension line; the first extension line is an extension line drawn from the extension point to the boundary line of the guide area, and the second extension line is an extension line drawn from the previous extension point to the boundary line of the guide area; and / or Based on the geometric shape of the reference line, the boundary direction of each extension point on the reference line is determined, and the boundary direction points to the boundary line of the guide area; and the extension line corresponding to each extension point is drawn along the boundary direction of each extension point.
3. The method according to claim 2, characterized in that Determining the boundary direction of each extension point on the reference line based on the direction vector of the geometric shape of the reference line includes: When the geometric shape of the reference line is a straight line, a first direction vector parallel to the reference line is determined as a target direction vector, and the target direction vector is rotated toward the boundary line of the diversion area to obtain the boundary direction of each extension point on the reference line; and / or, When the geometric shape of the reference line is a broken line, for each extension point on the reference line, the second direction vector corresponding to each extension point is determined as the target direction vector, and the target direction vector is rotated toward the boundary line of the guide area to obtain the boundary direction of each extension point; the second direction vector is determined based on the tangent direction of the reference line at the corresponding extension point.
4. The method according to claim 3, characterized in that The step of rotating the target direction vector toward the boundary line of the diversion area includes: If at least part of the reference line is within the diversion area, the target direction vector is rotated toward one side of the reference line, and the target direction vector is rotated toward the other side of the reference line; If the reference line is outside the diversion area, the target direction vector is rotated toward the location of the diversion area.
5. The method according to claim 1, characterized in that The step of determining the guide line of the guide area from the extension lines according to the position distribution of each extension line and the boundary line comprises: For each extension line, respectively: based on at least one intersection point between the extension line and the boundary line, determining a target line segment on the extension line; the target line segment is located inside the diversion area, and at least one endpoint of the target line segment is the intersection point; The guide lines of the guide area are selected from the determined target line segments.
6. The method according to claim 5, characterized in that The step of selecting the guide line of the guide area from the determined target line segments includes: The target line segments on each extended line are determined as candidate guide lines corresponding to each extended line, and the guide lines of the guide area are screened out from the candidate guide lines corresponding to each extended line according to a guide line screening method, wherein the guide line screening method includes at least one of the following: The following contents are performed respectively using each extension line as the first extension line: when the first extension line corresponds to at least two candidate guide lines, a first evaluation value of each candidate guide line in the at least two candidate extension lines is determined, and a candidate guide line whose first evaluation value is not greater than a first threshold is determined as a guide line of the guide area; wherein the first evaluation value is the difference between the point-to-line distance and the point-reference distance of the candidate guide line, the point-reference distance is the vertical distance between the first extension point corresponding to the first extension line and the boundary line of the guide area, and the point-to-line distance is determined based on the distance between the first extension point and each reference point on the candidate guide line; Based on the M adjacent extension points on the reference line as the target extension point set, the following processing is performed for each target extension point set: determining the total length of the candidate guide lines of each extension point in the M extension points included in the target extension point set, and if the difference in the total length of the candidate guide lines of different extension points in the M extension points meets the preset difference condition, determining the candidate guide lines corresponding to each extension point in the M extension points as the guide lines of the guide area; wherein M is an integer greater than 1, and the total length of the candidate guide lines of the extension point is the sum of the lengths of all the candidate guide lines corresponding to the extension point; Determine the candidate guide lines located in the guide area as second guide lines, and execute for each second guide line: determine the second evaluation value of the second guide line based on the closed figure enclosed by the second guide line and the boundary line of the guide area; and judge whether to determine the second guide line as the guide line of the guide area based on the second evaluation value.
7. The method according to claim 6, characterized in that Wherein M is 2, and the M adjacent extension points on the reference line are used as a target extension point set, including: Determine at least one candidate extension point set based on at least two extension points on the reference line, each candidate extension point set including two adjacent extension points on the reference line; Determine a candidate extension point set of at least two candidate flow guide lines existing on the extension line corresponding to each extension point as the target extension point set; The difference in total lengths of candidate guide lines of different extension points among the M extension points satisfies a preset difference condition, including: the difference in total lengths of candidate guide lines of two extension points included in the target extension point set is not greater than a second threshold.
8. The method according to claim 1, characterized in that Also includes: For each of the at least one road line, determining a line segment connecting a starting road node and an ending road node of the road line, and when the distance between each road node on the road line and the line segment is less than a distance threshold, using the line segment as a corrected road line; and / or The reference line is determined as follows: When the diversion area corresponds to a road line, the road line is used as the reference line; In the case where the diversion area corresponds to a plurality of road lines, at least one basic road line pair formed by the plurality of road lines is determined; in response to the existence of a candidate road line pair in at least one basic road line pair, a reference line is determined based on the candidate road line pair; or, in response to the absence of a candidate road line pair in at least one basic road line pair, the longest road line among the plurality of road lines is determined as a reference line; wherein: The candidate road line pair includes two road lines, and the two road lines included in different basic road line pairs are not completely the same; the length ratio between the two road lines in the candidate road line pair is greater than a ratio threshold, and / or the angle between the two routes in the candidate road line pair is less than an angle threshold.
9. The method according to claim 8, characterized in that The determining of the reference line based on the candidate road line pair comprises: Determine a target road line pair from the candidate road line pairs; Determine a first sampling point sequence on a first road line in the target road line pair, and determine a second sampling point sequence on a second road line in the target road line pair; According to the first sampling point sequence and the second sampling point sequence, constructing a connecting line corresponding to each target sequence position; the connecting line is a line between the first sampling point and the second sampling point, the first sampling point is a sampling point of the corresponding target sequence position in the first sampling point sequence, and the second sampling point is a sampling point of the corresponding target sequence position in the second sampling point sequence; Determining a center point corresponding to each connecting line based on at least one intersection point between each connecting line and a boundary line of the diversion area; The determined center points are connected to obtain the reference line.
10. The method according to claim 1, characterized in that The step of determining a plurality of extension points on the reference line according to a plurality of boundary nodes on the boundary line comprises: Determine a plurality of projection points of a plurality of boundary nodes on the boundary line on the reference line; A reference point is determined according to the position distribution between the plurality of projection points, and a plurality of extension points located on the reference line are determined according to the relative position relationship between the reference point and the reference line.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.