A method for generating a road intersection surface and a related device

By obtaining and classifying road direction categories in the virtual map to determine the boundary line of the intersection surface, the problem of irregular shape of the intersection surface is solved, and the clarity and user experience of the virtual map are improved.

CN116453070BActive Publication Date: 2024-08-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310301521.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2024-08-16
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

The existing technology cannot directly obtain boundary points when generating intersection surfaces in virtual maps, resulting in irregular shapes of the generated intersection surfaces that are difficult to distinguish from roads, affecting user experience and driving safety.

Method used

By obtaining road information in the intersection area, the road direction is determined, the road direction categories are divided, and the intersection surface boundary line is determined according to the category, so that roads of the same road direction category share a boundary line and a regular intersection surface is generated.

Benefits of technology

It improves the clarity of intersection surfaces in virtual maps, reduces user viewing time, and enhances user experience and driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116453070B
    Figure CN116453070B
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for generating an intersection face and a related device, which can be applied to the field of maps, and can be applied to various scenarios such as vehicle navigation, artificial intelligence, smart transportation, assisted driving, vehicle-mounted terminals, cloud technology, digital humans, virtual humans, games, virtual reality, and extended reality. According to the road information related to the intersection area, the road direction of each road is determined, and the roads whose angle difference between the road directions is greater than a preset threshold are divided into two road direction categories, thereby dividing multiple road directions into multiple road direction categories. Different road direction categories correspond to different intersection face boundary lines, and the intersection face boundary line passes through the roads included in the road set, thereby generating an intersection face corresponding to the intersection area. As a result, roads belonging to the same road direction category can share an intersection face boundary line, and the generated intersection face has a regular shape, which increases the difference between the intersection face and the road, making it easier for users to distinguish.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method for generating a road intersection surface and related devices. Background Art

[0002] The intersection surface is one of the road elements required to generate a virtual map. In the virtual map, it represents the area where the intersection is located. Figure 1 If the virtual map is a high-precision map, the boundary points that constitute the intersection surface can be directly obtained, that is, the intersection points of the intersection surface boundary line and the road boundary line, such as Figure 2 As shown by the black circle, the intersection surface boundary points are then connected to obtain the intersection surface.

[0003] In some cases, due to factors such as information collection costs, it is impossible to directly obtain the boundary points that constitute the intersection surface. Based on this, in related technologies, the intersection surface is generated based on data such as road morphology, road topology data, and path indication information. However, the shape of the intersection surface generated in this way is irregular and easily confused with irregular roads. Users need to constantly adjust the virtual map to view it, which takes a long time to view and has a poor user experience. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a method and related devices for generating an intersection surface. The generated intersection surface has a regular shape, which increases the difference between the intersection surface and the road, makes the intersection surface clearer in the virtual map, facilitates user identification, reduces user viewing time, and improves user experience.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] On the one hand, an embodiment of the present application provides a method for generating a road intersection surface, characterized in that the method includes:

[0007] Acquiring road information for an intersection area, where the road information is information of a plurality of roads associated with the intersection area;

[0008] Determining, according to the road information, road directions corresponding to the plurality of roads respectively;

[0009] Dividing the plurality of road directions to obtain a plurality of road direction categories, wherein the angle difference between road directions belonging to different road direction categories is greater than a preset threshold;

[0010] Taking one of the multiple road direction categories as a target road direction category, and determining an intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, wherein the intersection surface boundary line passes through roads included in the road set, and the road set includes at least one road;

[0011] An intersection surface for the intersection area is generated according to the intersection surface boundary lines corresponding to the plurality of road direction categories.

[0012] On the other hand, an embodiment of the present application provides a device for generating a road intersection surface, characterized in that the device comprises: an acquisition unit, a first determination unit, a division unit, a second determination unit and a generation unit;

[0013] The acquisition unit is used to acquire road information for the intersection area, where the road information is information of multiple roads associated with the intersection area;

[0014] The first determining unit is used to determine the road directions corresponding to the plurality of roads respectively according to the road information;

[0015] The division unit is used to divide the plurality of road directions into a plurality of road direction categories, wherein the angle difference between road directions belonging to different road direction categories is greater than a preset threshold;

[0016] The second determining unit is used to take one of the multiple road direction categories as a target road direction category, and determine an intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, wherein the intersection surface boundary line passes through roads included in the road set, and the road set includes at least one road;

[0017] The generating unit is used to generate an intersection surface for the intersection area according to the intersection surface boundary lines corresponding to the multiple road direction categories.

[0018] On the other hand, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:

[0019] The memory is used to store a computer program and transmit the computer program to the processor;

[0020] The processor is configured to execute the method described in the above aspects according to the instructions in the computer program.

[0021] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.

[0022] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method described in the above aspects.

[0023] It can be seen from the above technical scheme that road information is obtained for the intersection area, and the road information is used to identify multiple roads connected to the intersection area, so that the road direction of each road is determined according to the road information, and multiple road directions corresponding to the intersection area are obtained. The multiple road directions are divided, that is, the roads with an angle difference between the road directions greater than a preset threshold are divided into two road direction categories, so as to obtain multiple road direction categories. One of the multiple road direction categories is used as the target road direction category, and the intersection surface boundary line is determined according to the road set belonging to the target road direction category, and the intersection surface boundary line passes through the roads included in the road set. According to the intersection boundary lines corresponding to the multiple road direction categories, the intersection surface corresponding to the intersection area is generated. Thus, multiple roads in an intersection area are divided according to the road direction, and the intersection surface boundary line corresponding to each road direction category is determined respectively, so that the roads belonging to the same road direction category can share an intersection surface boundary line, and the generated intersection surface shape is regular, which increases the difference between the intersection surface and the road, and the intersection surface is clearer in the virtual map, which is convenient for users to distinguish, reduces the user viewing time, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 A schematic diagram of a road intersection provided in the related art;

[0026] Figure 2 A schematic diagram of boundary points of a road intersection provided in the related art;

[0027] Figure 3 A schematic diagram of an application scenario of the method for generating a road intersection surface provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of a flow chart of a method for generating a road intersection surface provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of a single-node intersection provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of a composite node intersection provided in an embodiment of the present application;

[0031] Figure 7 A schematic diagram of the driving direction of a road intersection area provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of a road direction provided in an embodiment of the present application;

[0033] Fig. 9 A schematic diagram of road direction clustering provided in an embodiment of the present application;

[0034] Fig.10 A schematic diagram of a road direction category provided in an embodiment of the present application;

[0035] Fig.11 A schematic diagram of a road intersection boundary line provided in an embodiment of the present application;

[0036] Fig.12 A schematic diagram of multiple intersection boundary lines provided in an embodiment of the present application;

[0037] Fig.13 A schematic diagram of a road intersection provided in an embodiment of the present application;

[0038] Fig.14 A schematic diagram of a road intersection provided in an embodiment of the present application;

[0039] Fig.15 A schematic diagram of an intersection area provided in an embodiment of the present application;

[0040] Fig.16 A flowchart of a road direction division method provided in an embodiment of the present application;

[0041] Fig.17 A schematic diagram of a comprehensive road direction corresponding to a road direction type provided in an embodiment of the present application;

[0042] Fig.18 A schematic diagram of a road discrete point provided in an embodiment of the present application;

[0043] Fig.19 A schematic diagram of a convex hull boundary point provided in an embodiment of the present application;

[0044] Fig. 20A A flowchart of a method for determining a road direction provided in an embodiment of the present application;

[0045] Fig. 20B A flowchart of a method for determining a road direction provided in an embodiment of the present application;

[0046] Fig.21 A schematic diagram of a comprehensive road direction provided in an embodiment of the present application;

[0047] Fig. 22 A schematic diagram of a road intersection boundary line provided in an embodiment of the present application;

[0048] Fig.23 A schematic diagram of the distance property of a road intersection boundary line provided in an embodiment of the present application;

[0049] Fig.24 A flowchart of a method for determining an offset distance provided in an embodiment of the present application;

[0050] Fig.25 A schematic diagram of a preset straight line provided in an embodiment of the present application;

[0051] Fig.26 A schematic diagram of an intersection point between an intersection surface boundary line and a road boundary line provided in an embodiment of the present application;

[0052] Fig. 27 A schematic diagram of an intersection point between an intersection surface boundary line and a road boundary line provided in an embodiment of the present application;

[0053] Fig.28 A schematic diagram of determining the position of an intersection provided in an embodiment of the present application;

[0054] Fig.29 A schematic diagram of an intersection sorting method provided in an embodiment of the present application;

[0055] Fig.30 A schematic diagram of a road intersection provided in an embodiment of the present application;

[0056] Fig.31 A schematic diagram of the structure of a device for generating a road intersection surface provided in an embodiment of the present application;

[0057] Fig.32 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0058] Fig.33 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0060] At present, lane-level navigation mainly uses high-precision map data. However, due to factors such as information collection costs, the coverage area of ​​high-precision maps is limited. For example, some cities only have high-precision map data outside the Fifth Ring Road, but not inside the Fifth Ring Road. In order to obtain an effect similar to that of a high-precision map in places where there is no high-precision map data, an algorithm is needed to generate some road elements based on the standard precision map (i.e., ordinary navigation map). As one of the road elements, the intersection surface needs to be generated through the original road network data to overcome the problem of not being able to directly obtain the boundary points that constitute the intersection surface.

[0061] In the related art, a boundary line is generated for each road in the intersection area. Figure 1 As shown in the figure, the intersection area includes 7 roads, and a boundary line is generated for each road, so that the intersection surface is obtained by connecting the 7 boundary lines. In the virtual map, the roads are generally randomly distributed, and the boundary lines of the intersection surface generated by the relevant technology are also messy, that is, the shape of the intersection surface is irregular, which makes the intersection surface easily confused with the irregular road. Users need to constantly adjust the virtual map for viewing, such as constantly zooming in and out of the virtual map, which takes a long time to view and the user experience is poor. Moreover, if the user cannot clearly distinguish between the road and the intersection surface during driving, it will increase the probability of accidents at the intersection and reduce driving safety.

[0062] Based on this, an embodiment of the present application provides a method and related device for generating an intersection surface, which divides multiple roads in an intersection area according to road directions, and determines the intersection surface boundary lines corresponding to each road direction category, so that roads belonging to the same road direction category can share an intersection surface boundary line. The generated intersection surface has a regular shape, which increases the difference between the intersection surface and the road. The intersection surface is clearer in the virtual map, which is convenient for users to distinguish, reduces user viewing time, improves user experience, and even improves driving safety.

[0063] The method for generating the intersection surface provided in the embodiment of the present application can be applied to various virtual map products such as high-precision maps, ordinary precision maps, and urban road models, and can be used to visualize the area of ​​the space where the intersection is located. The method for generating the intersection surface can be understood as the process of compiling the original map data, that is, as a link between the upper and lower parts. The original map data is generally given in the form of a text file, and common formats include GeoJSON (a format for encoding various geographic data structures) and the like. Data compilation is to process and process the original map data to generate more compact and easier-to-use files (such as binary files, etc.) or data. The compiled data can be provided to the upper-level application (such as map navigation, positioning technology, map rendering, etc.) for calling. Exemplarily, the generated intersection surface data can provide the navigation engine with the base map data at the intersection, enhance the visualization effect of the navigation interface, and can also provide data support for the objects such as drivers when making decisions at the intersection or using electronic maps for driving decisions, so as to prevent vehicles from traveling beyond the intersection range, thereby reducing the probability of accidents at the intersection and improving the safety of autonomous driving.

[0064] The method for generating intersection surfaces provided in the present application at least involves the following technologies such as intelligent transportation systems, cloud computing, and computer vision technologies, and can be applied to various scenarios, including but not limited to vehicle navigation, artificial intelligence, smart transportation, assisted driving, vehicle-mounted terminals, cloud technology, digital humans, virtual humans, games, virtual reality, and extended reality. For example, the intersection surface can be generated by the road network data in the electronic map. In some examples, the intelligent transportation system can also be used to provide intelligent navigation route services for drivers and other driving objects based on the location information and contours of the intersection surface. Alternatively, the terminal device can also use computer vision technology, etc. to more realistically and clearly display the high-precision three-dimensional image corresponding to the intersection surface in the navigation application page or the map page.

[0065] Among them, intelligent traffic system (ITS), also known as intelligent transportation system (Intelligent Transportation System), effectively and comprehensively applies advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthens the connection between vehicles, roads and users, and thus forms a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy.

[0066] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, Internet of Vehicles, automatic driving, smart transportation, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role. Among them, technologies such as smart transportation, Internet of Vehicles, automatic driving, and unmanned driving usually include high-precision maps, environmental perception, behavioral decision-making, path planning, motion control, etc., and currently have broad application prospects.

[0067] Computer vision technology (CV) Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to the use of cameras and computers to replace human eyes to identify targets, trace and measure targets, and further perform graphic processing so that the computer processing becomes an image that is more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and mapping, automatic driving, smart transportation and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0068] The method for generating intersection surfaces provided in the present application can be applied to computer devices with the ability to generate intersection surfaces, such as terminal devices and servers. Specifically, the terminal devices can be desktop computers, laptop computers, mobile phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. Smart vehicle-mounted devices can be vehicle-mounted navigation terminals and vehicle-mounted computers, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc., but are not limited to these; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. Terminal devices and servers can be directly or indirectly connected via wired or wireless communications, and this application does not limit this.

[0069] In order to facilitate understanding of the method for generating an intersection surface provided in an embodiment of the present application, the following uses a server as an example in which the execution subject of the method for generating an intersection surface is used to exemplify the application scenario of the method for generating an intersection surface.

[0070] See also Figure 3 , which is a schematic diagram of an application scenario of the method for generating a road intersection surface provided in an embodiment of the present application. Figure 3 As shown, the application scenario includes a terminal device 310 and a server 320, and the terminal device 310 and the server 320 communicate with each other through a network.

[0071] An application supporting map services may be installed and run on the terminal device 310, and the server 320 may be a server that provides services for the application, and the terminal device 310 interacts with the server 320 based on the application. The application may be a map application, a navigation application, a positioning application, or any application that supports displaying intersections, such as a traffic application, a game application that needs to call and display road intersections, etc.

[0072] The server 320 obtains road information for the intersection area, and the road information is used to identify multiple roads connected to the intersection area, such as Figure 3 The intersection area shown is connected to seven roads. The server 320 determines the road direction of each road based on the road information, and obtains multiple road directions corresponding to the intersection area. The server 320 divides the multiple road directions, that is, divides the roads whose angle difference between the road directions is greater than a preset threshold into two road direction categories, thereby obtaining multiple road direction categories. Figure 3 As shown, the roads belonging to one road direction category are within an ellipse. The server 320 takes one of the multiple road direction categories as a target road direction category, and determines a road intersection boundary line according to the road set belonging to the target road direction category. The road intersection boundary line passes through the roads included in the road set, such as Figure 3 The server 320 generates the intersection surface corresponding to the intersection area according to the intersection boundary lines corresponding to the multiple road direction categories, such as Figure 3 Medium twill area.

[0073] Therefore, multiple roads in an intersection area are divided according to road directions, and the intersection surface boundary lines corresponding to each road direction category are determined respectively, so that roads belonging to the same road direction category can share an intersection surface boundary line. The generated intersection surface has a regular shape, which increases the difference between the intersection surface and the road. The intersection surface is clearer in the virtual map, which is convenient for users to distinguish, reduces user viewing time, and improves user experience.

[0074] The method for generating the intersection surface provided in the embodiment of the present application can be executed by the server. However, in other embodiments of the present application, the terminal device can also have similar functions as the server, so as to execute the method for generating the intersection surface provided in the embodiment of the present application, or the terminal device and the server can jointly execute the method for generating the intersection surface provided in the embodiment of the present application, and this embodiment does not limit this.

[0075] The following is a detailed introduction to the method for generating the intersection surface provided by the present application through a method embodiment.

[0076] See also Figure 4 , which is a schematic diagram of the flow of the method for generating a road intersection provided by the embodiment of the present application. For the sake of convenience, the following embodiment is still introduced by taking the execution subject of the method for generating a road intersection as a server as an example. Figure 4 As shown, the method for generating the intersection surface includes the following steps:

[0077] S401: Obtain road information for the intersection area.

[0078] At least two roads intersect to form an intersection, and the intersection can be represented by a node. In ordinary map data, a line segment without width (link in English) is generally used to represent a road. It should be noted that the line segment is composed of discrete points in the original road network data. At least two line segments intersect to form a node, that is, the endpoints of at least two line segments are recorded as a node, and the node represents the intersection formed by the intersection of the roads indicated by the at least two line segments. The intersection area refers to the area that includes the intersection. According to the number of nodes included, the types of intersection areas can be divided into single-node intersections and compound-node intersections. A single-node intersection refers to an intersection represented by a single node, and a compound-node intersection refers to a "large intersection" represented by multiple nodes. The following is combined with Figure 5 and Figure 6 Explain them separately.

[0079] See also Figure 5 , which is a schematic diagram of a single-node intersection provided in an embodiment of the present application. Figure 5 As shown, in this single-node intersection, four roads, Road 1 to Road 4, merge together to form a single-node intersection.

[0080] See also Figure 6 , which is a schematic diagram of a composite node intersection provided by an embodiment of the present application. Figure 6 As shown, in the compound node intersection, there are 4 single-node intersections, and each single-node intersection is also formed by the confluence of 4 roads, each forming a single-node intersection. It can be seen that the compound node intersection includes a total of 12 roads.

[0081] It is understandable that the number of roads that converge at each single-node intersection is at least two, and can be 3, 4, 6, 10 roads, etc., and the present embodiment of the application does not specifically limit this. The number of single-node intersections included in each composite node intersection is at least two, and can be 3, 4, 5, etc., and the present embodiment of the application does not specifically limit this. In addition, Figure 5 and Figure 6 In the single-node intersection and compound-node intersection shown in the figure, the roads are not necessarily perpendicular to each other. In practical applications, they may not be perpendicular to each other. The embodiments of the present application do not make specific limitations on this.

[0082] The road information is the information of multiple roads associated with the intersection area, or the information of multiple roads that have a connection relationship with the nodes included in the intersection area, and may include data such as road grade, number of lanes, road discrete point set, etc. Among them, the lane grade can be a main road, a secondary road, a branch road, etc., and the lane grade can also be a first-class highway, a second-class highway, a third-class highway, a fourth-class highway, etc. The road discrete point set includes multiple discrete points. By connecting a road discrete point set including multiple discrete points, a line segment without width can be formed. In order to make the visualization effect of the virtual map better, the line segment without width can be widened to form a road. It should be noted that roads with different road information correspond to different widening widths, and the server widens each line segment without width into a corresponding road according to the road width.

[0083] As can be seen from the above, the shape of the intersection surface generated based on the relevant technology is irregular. The irregularity is mainly reflected in the fact that a boundary line is generated for each road in the intersection area, that is, in an intersection area, multiple roads with similar road directions are clipped using multiple intersection surface boundary lines, and these intersection surface boundary lines are not aligned. Figure 1 For example, Figure 1 The two roads extending downward in the figure have similar directions, but the two intersection surface boundary lines are not aligned, resulting in an irregular intersection surface and an unsightly visual effect. This makes the intersection surface easily confused with the irregular road, and users need to constantly adjust the virtual map to view it, such as constantly zooming in and out of the virtual map, which takes a long time to view and provides a poor user experience. Moreover, if users cannot clearly distinguish between roads and intersection surfaces during driving, the probability of accidents at the intersection will increase, reducing driving safety.

[0084] Based on this, the embodiment of the present application uses one boundary line to cut multiple roads with similar road directions in an intersection area, which is explained in detail below.

[0085] S402: Determine the road directions corresponding to the plurality of roads respectively according to the road information.

[0086] The road direction is used to identify the route of the road extension, such as the road extending to the north. It should be noted that although south to north and north to south are two driving directions, these two driving directions may actually be a "big road" including two-way driving directions, and then may be rendered as a "big road" in the virtual map for users to view. However, in the embodiment of the present application, the road direction refers to the extension direction of the road, or the direction in which the road extends outward from the node, which is different from the driving direction of the vehicle.

[0087] See also Figure 7 , which is a schematic diagram of the driving direction of a road intersection area provided in an embodiment of the present application. Figure 7 If the north direction is above, Figure 7 The driving directions of the two roads above are from north to south and from south to north respectively, but the road directions of these two roads both extend to the north.

[0088] The road information includes the information of each road in the intersection area, so the road direction of each road can be determined based on the information of each road. If the road information directly includes the road direction, the road direction of each road can be directly obtained from the road information. However, due to the high cost of collecting the road direction and the limited coverage, some roads cannot even collect the corresponding road direction, that is, the road information does not include the road direction, but the road discrete point set must be included in the road information, so the road direction can be determined based on the road discrete point set. The following will be explained based on the embodiment corresponding to Figure 20, and will not be repeated here.

[0089] It should be noted that in the road information, the collected discrete point set includes multiple discrete points in a sequence, so the driving direction of the road can be determined based on the sequence. In order to determine the road direction based on the driving direction, the road direction of the road can be identified based on the angle between the driving direction and the preset direction. For example, the angle between the driving direction and the north direction is 15 degrees. Figure 7 For example, we can determine Figure 7 The angle between the driving direction of the two roads above and the due north direction is determined as the road direction. The preset direction is a pre-set direction, such as the due north direction. Based on this, Figure 7 The road directions corresponding to the roads included in the intersection area shown are as follows Figure 8 shown.

[0090] Thus, the angle between each road and the preset direction is determined respectively, and multiple angles are obtained as road directions. Not only will it not be affected by the driving direction, but it can also compare multiple roads based on the same standard, and the road direction categories obtained by subsequent classification are more accurate. In addition, the acquisition cost of discrete road points is low, and the coverage range is wide. The road direction determined based on the set of discrete road points is based on a purely geometric perspective, without the need for path indication information, etc., and relies on less raw data, is less affected by problematic data, and does not require the introduction of complex calculation strategies to avoid extreme situations, and has strong robustness.

[0091] S403: Divide the multiple road directions to obtain multiple road direction categories.

[0092] By dividing the road directions, the angle difference between road directions belonging to different road direction categories is greater than a preset threshold. In other words, if the road directions of multiple roads belong to the same road direction category, the angle difference between these road directions is less than or equal to the preset threshold (or within the allowable error range), thereby achieving the goal of clustering roads with similar road directions into one category.

[0093] See also Fig. 9 , which is a schematic diagram of a road direction clustering provided by an embodiment of the present application. Fig. 9 In the figure, the road directions of the two roads below are almost the same, such as Fig. 9 As shown by the two arrows in the figure. Therefore, the two roads can be divided into one road direction category, or clustered into one category. Thus, by dividing multiple roads, the multiple road direction categories obtained can be as follows Fig.10 As shown, each road direction within the ellipse belongs to a road direction category, and a total of 4 road direction categories are obtained.

[0094] Therefore, by dividing the road directions, roads with similar road directions can be divided into one road direction category, so that the intersection surface boundary lines can be determined separately based on the road direction categories, so that multiple roads belonging to one road direction category can use one intersection surface boundary line, avoiding the situation where the multiple intersection surface boundary lines used are not aligned, and the generated intersection surface is regular and visually beautiful.

[0095] S404: taking one of the multiple road direction categories as a target road direction category, and determining a road intersection surface boundary line corresponding to the target road direction according to a set of roads belonging to the target road direction category.

[0096] A road direction category in the road direction category is respectively used as a target road direction category, a road set belonging to the target road direction category is obtained, the road set includes at least one road belonging to the target road direction category, and an intersection surface boundary line passing through the roads included in the road set is determined, that is, the intersection surface boundary line corresponding to the target road direction.

[0097] See also Fig.11 , which is a schematic diagram of an intersection surface boundary line provided in an embodiment of the present application. Fig.11 The two roads below belong to one road direction category. When the road direction category is used as the target road direction category, the determined road set includes the two roads, and the determined intersection surface boundary line passes through the two roads.

[0098] S405: Generate an intersection surface for the intersection area according to the intersection surface boundary lines corresponding to the plurality of road direction categories.

[0099] Each of the multiple road direction categories is used as the target road direction category, so as to obtain the intersection surface boundary lines corresponding to the multiple road direction categories, such as Fig.12 As shown, based on multiple intersection surface boundary lines, an intersection surface for the intersection area is generated.

[0100] The embodiment of the present application does not specifically limit the method of generating the intersection surface based on multiple intersection surface boundary lines. For example, based on the road, multiple intersection surface boundary lines are cut to obtain the intersection surface, such as Fig.13 As another example, curves are used to connect roads belonging to different road direction categories instead of cutting along the roads, such as Fig.14 shown.

[0101] It can be seen from the above technical scheme that road information is obtained for the intersection area, and the road information is used to identify multiple roads connected to the intersection area, so that the road direction of each road is determined according to the road information, and multiple road directions corresponding to the intersection area are obtained. The multiple road directions are divided, that is, the roads with an angle difference between the road directions greater than a preset threshold are divided into two road direction categories, so as to obtain multiple road direction categories. One of the multiple road direction categories is used as the target road direction category, and the intersection surface boundary line is determined according to the road set belonging to the target road direction category, and the intersection surface boundary line passes through the roads included in the road set. According to the intersection boundary lines corresponding to the multiple road direction categories, the intersection surface corresponding to the intersection area is generated. Thus, multiple roads in an intersection area are divided according to the road direction, and the intersection surface boundary line corresponding to each road direction category is determined respectively, so that the roads belonging to the same road direction category can share an intersection surface boundary line, and the generated intersection surface shape is regular, which increases the difference between the intersection surface and the road, and the intersection surface is clearer in the virtual map, which is convenient for users to distinguish, reduces the user viewing time, and improves the user experience.

[0102] As a possible implementation method, due to the complexity of roads on the virtual map, it is possible that the roads included in an intersection face do not pass through the intersection face, or the starting and ending points of these roads are both within the intersection face. Among them, for a single-node intersection, all roads associated with the single-node intersection face corresponding to the single-node intersection pass through the single-node intersection face. For a compound-node intersection, there may be roads that do not pass through the intersection face. Fig.15 Provide explanation.

[0103] See also Fig.15 , which is a schematic diagram of an intersection area provided in an embodiment of the present application. Fig.15 In the figure, for the convenience of explanation, the intersection area is represented by a diagonal area. The intersection area includes 3 single-node intersections and a total of 10 roads. Moreover, in the intersection area, the 3 roads connected end to end to form a triangle are within the intersection area, or in other words, these 3 roads will not pass through the intersection surface to be generated, and the starting and ending points of these 3 roads are all within the intersection area. Based on this, the road types of multiple roads associated with the intersection area can be determined according to the road information. There are two types of roads. One is the road within the intersection, that is, it is connected to multiple nodes included in the intersection area, such as Fig.15 The other is the road that crosses the boundary of the intersection, that is, it is only connected to one node included in the intersection area.

[0104] Since the roads in the intersection will be included in the intersection surface, there is no need to generate the corresponding intersection surface boundary based on the roads in the intersection, and thus there is no need to determine the road direction of the roads in the intersection. According to the road type, the road directions corresponding to the roads crossing the intersection surface boundary are obtained to obtain multiple road directions, and the angles between the multiple road directions whose angle differences are greater than a preset threshold are divided into different road direction categories to obtain multiple road direction categories. Figure 8 In , each road is a road crossing the boundary of the intersection surface, so the road direction of each road is the road direction of the road crossing the boundary of the intersection surface.

[0105] The embodiment of the present application does not specifically limit the method of classifying the angles greater than the preset threshold into different angle categories. Fig.16 See Fig.16 , which is a flow chart of a road direction division method provided in an embodiment of the present application.

[0106] S1601: Start.

[0107] S1602: Obtain the angle list angleList.

[0108] There is only one angle list angleList, and initially the angle list angleList includes the angles between the road directions of all roads crossing the intersection boundary surface and the preset direction, and each angle can be called an angle angle.

[0109] S1603: Obtain the angle category list clusterList.

[0110] There is only one angle category list clusterList, and the angle category list clusterList is initially empty. The angle category list clusterList includes at least one element set element, one element set element corresponds to one angle category, and the element set element includes at least one element, and one element corresponds to one road. As the number of angle categories corresponding to the roads included in the intersections of the area continues to increase, new element sets element will be continuously created in the angle category list clusterList, so that each angle category corresponds to an element set element, and the angle category list clusterList includes multiple element sets element.

[0111] S1604: Determine whether each angle in the angle list angleList can be inserted into the element set element included in the angle category list clusterList. If so, execute S1605; if not, execute S1606.

[0112] The element set element included in the angle category list clusterList can be 0 or more than 1. If the element set element included is 0, directly execute S1606. If the element set element included is 1, traverse each angle in the angle list angleList to see if it can be inserted into the element set element. If so, execute S1605. If not, execute S1606. If there are multiple element sets element included, determine whether each angle in the angle list angleList can be inserted into each element set element. If so, execute S1605. If not, execute S1606.

[0113] Each element set element corresponds to a comprehensive road direction, which is used to identify the total direction corresponding to the multiple road directions included in the element set element. For example, the average value of the angles between the multiple road directions included in each element set element and the preset direction can be calculated, and the average value can be used as the comprehensive road direction corresponding to the element set element. Get an angle from the angle list angleList, and determine which element set element's comprehensive road direction meets the preset condition. For example, the preset condition is that the difference between angle and the comprehensive road direction corresponding to the element set element is less than the preset difference (such as 15 degrees).

[0114] S1605: Put angle into the corresponding element set element.

[0115] S1606: Create a new element set element, and put the angle into the new element set element.

[0116] S1607: Add the newly created element set element to the angle category list clusterList, and execute S1603.

[0117] S1608: After the traversal is completed, the element set element in the angle category list clusterList is returned.

[0118] Each element set element corresponds to a road direction category. If the comprehensive road direction corresponding to the road direction category is the average of the angles between the multiple road directions included in the element set element and the preset direction, the obtained comprehensive road direction is as follows: Fig.17 As shown, the diagonal area can represent the intersection area.

[0119] S1609: End.

[0120] It can be seen from the above technical solution that before determining the road direction category, the road types corresponding to the multiple roads included in the intersection area can be determined first, and only the road directions of the roads that cross the intersection surface boundary road are determined, and then the road directions that cross the intersection surface boundary road are divided to obtain multiple road direction types. Therefore, removing the roads in the intersection can not only improve the accuracy of the subsequent intersection surface boundary line, but also reduce the amount of calculation for determining the road direction, determining the intersection surface boundary line, etc.

[0121] As a possible implementation method, it can be seen from the above that due to the high cost of collecting road directions and the limited coverage, some roads cannot even collect the corresponding road directions, that is, the road information does not include the road direction, but the road discrete point set must be included in the road information, so the road direction can be determined based on the road discrete point set. The present application embodiment provides two implementation methods, which are described below.

[0122] Method 1:

[0123] According to the road information, multiple road discrete point sets are obtained, each road discrete point set includes multiple discrete points, and each road discrete point set corresponds to a road. For example, a line segment without width can be obtained by connecting multiple discrete points included in the road discrete point set, which is used to represent the road, such as Fig.18 As shown in , the hollow circles representing discrete points can be connected to obtain roads. According to the road information, the convex hull boundary point set is obtained. The convex hull boundary point set includes multiple boundary points. By connecting the multiple boundary points included in the convex hull boundary point set, an intersection area can be obtained, such as Fig.19 As shown, the hollow circles representing the boundary points are connected to obtain the intersection area. Among them, the intersection area is not aesthetically pleasing, that is, multiple roads with similar road directions may be clipped using multiple intersection area boundary lines, and these intersection area boundary lines are not aligned. The embodiment of the present application does not specifically limit the method for generating the intersection area. For example, the single-node intersection surface corresponding to each single-node intersection in the intersection area is first determined, and then the area covering multiple single-node intersection surfaces is used as the intersection area.

[0124] The following description is made by taking a target road among multiple roads as an example, wherein the road discrete point set corresponding to the target road is the target road discrete point set.

[0125] If the target road discrete point set and the convex hull boundary point set have an overlapped point, that is, the overlapped point is both a discrete point included in the target road discrete point set and a boundary point included in the convex hull boundary set, then a first discrete point and a second discrete point are determined from the road discrete point set according to the overlapped point, and the road direction of the target road is determined according to the first discrete point and the second discrete point. The distance between the first discrete point and the overlapped point is less than a first preset distance, and the distance between the second discrete point and the overlapped point is less than a second preset distance.

[0126] The embodiment of the present application does not specifically limit the first preset distance and the second preset distance, and those skilled in the art may set them according to actual needs. For example, the first discrete point and the second discrete point determined by the first preset distance and the second preset distance are two discrete points adjacent to the coincident point.

[0127] The embodiment of the present application does not specifically limit the method of determining the road direction of the target road based on the first discrete point and the second discrete point. For example, the first discrete point is used as the starting point and the second discrete point is used as the end point, a vector formed by the first discrete point and the second discrete point is obtained, and the angle between the direction of the vector and the preset direction is determined as the road direction of the target road. Alternatively, the first discrete point is used as the end point and the second discrete point is used as the starting point, etc.

[0128] If the target road discrete point set and the convex hull boundary set do not have overlapping points, and the driving direction of the target road is the road entering the intersection area. As can be seen from the above, the discrete points included in the road discrete point set have an order and can identify the driving direction of the road. The driving direction of the target road is the road entering the intersection area, that is, if you drive based on this driving direction, you can drive the vehicle into the intersection area. At this time, the third discrete point and the fourth discrete point are obtained from the road discrete point set, and the road direction of the target road is determined based on the third discrete point and the fourth discrete point. Among them, the third discrete point is a discrete point that satisfies the first preset order, and the fourth discrete point is a discrete point that satisfies the second preset order.

[0129] The embodiment of the present application does not specifically limit the first preset order and the second preset order. For example, the third discrete point and the fourth discrete point determined based on the first preset order and the second preset order are the last two discrete points collected in the target road discrete point set, or the two discrete points closest to the node connected to the target road.

[0130] The embodiment of the present application does not specifically limit the method of determining the target road direction based on the third discrete point and the fourth discrete point. For example, the third discrete point is used as the starting point and the fourth discrete point is used as the end point, a vector formed by the third discrete point and the fourth discrete point is obtained, and the angle between the direction of the vector and the preset direction is determined as the road direction of the target road, etc.

[0131] If the target road discrete point set and the convex hull boundary set do not have overlapping points, and the driving direction of the target road is a road leaving the intersection area, or in other words, the vehicle can be driven away from the intersection area based on the driving direction. At this time, the fifth discrete point and the sixth discrete point are obtained from the road discrete point set, and the road direction of the target road is determined based on the fifth discrete point and the sixth discrete point. Among them, the fifth discrete point is a discrete point that satisfies the third preset order, and the sixth discrete point is a discrete point that satisfies the fourth preset order.

[0132] The embodiment of the present application does not specifically limit the third preset order and the fourth preset order. For example, the fifth discrete point and the sixth discrete point determined based on the third preset order and the fourth preset order are the first two discrete points collected in the target road discrete point set, or in other words, the two discrete points closest to the node connected to the target road.

[0133] The embodiment of the present application does not specifically limit the method of determining the target road based on the fifth discrete point and the sixth discrete point. For example, the fifth discrete point is taken as the starting point, the sixth discrete point is taken as the end point, and the vector formed by the fifth discrete point and the sixth discrete point of Huqiu is used. The angle between the direction of the vector and the preset direction is determined as the road direction of the target road, etc.

[0134] It should be noted that the vectors constructed in the above three ways should all point to the inside of the intersection area at the same time, or to the outside of the intersection area at the same time, so as to ensure that the road directions determined in different situations have a unified standard.

[0135] See also Fig. 20A and Fig. 20B , are all flowcharts of a method for determining a road direction provided in an embodiment of the present application. Among them, Fig. 20A Breakpoint a in the connection Fig. 20B Breakpoint a in , so that the two figures constitute a complete flow chart.

[0136] S2001: Start.

[0137] S2002: Acquire multiple road discrete point sets and convex hull boundary point sets according to road information.

[0138] The multiple road discrete point sets are road discrete point sets corresponding to multiple roads respectively. As a possible implementation method, the multiple road discrete point sets are road discrete point sets corresponding to multiple roads crossing the intersection surface boundary included in the intersection area.

[0139] S2003: Determine whether the target road discrete point set and the convex hull boundary point set have overlapping points. If not, execute S2004; if yes, execute S2009.

[0140] The target road discrete point set is a road discrete point set corresponding to the target road, and the target road is one of the multiple roads.

[0141] S2004: Determine whether the target road enters the intersection area, if so, execute S2005, if not, execute S2007.

[0142] S2005: Obtain the last collected discrete point and the second last collected discrete point from the target road discrete point set.

[0143] S2006: The penultimate discrete point collected is taken as the starting point, and the penultimate discrete point collected is taken as the end point. The angle between the obtained vector and the true north direction is the road direction of the target road, and S2025 is executed.

[0144] S2007: Obtain the first collected discrete point and the second collected discrete point from the target road discrete point set.

[0145] S2008: Take the first collected discrete point as the starting point and the second collected discrete point as the end point. The angle between the obtained vector and the true north direction is the road direction of the target road. Execute S2025.

[0146] S2009: Determine whether the coincident point is the first collected point in the target road discrete point set. If so, execute S2010; if not, execute S2015.

[0147] S2010: Determine whether the target road enters the intersection area, if so, go to S2011; if not, execute S2013.

[0148] S2011: Obtain a second collected discrete point from the target road discrete point set.

[0149] S2012: The coincident point is taken as the end point, and the second collected discrete point is taken as the starting point. The angle between the obtained vector and the true north direction is the road direction of the target road, and S2025 is executed.

[0150] S2013: Obtain a second collected discrete point from the target road discrete point set.

[0151] S2014: Take the coincident point as the starting point and the second collected discrete point as the end point. The angle between the obtained vector and the true north direction is the road direction of the target road, and execute S2025.

[0152] S2015: Determine whether the coincident point is the last point collected in the target road discrete point set. If so, execute S2016; if not, execute S2021.

[0153] S2016: Determine whether the target road enters the intersection area, if so, execute S2017; if not, execute S2019.

[0154] S2017: Get the second to last collected point from the target road discrete set.

[0155] S2018: Take the coincident point as the starting point and the second to last collected point as the end point. The angle between the obtained vector and the true north direction is the road direction of the target road, and execute S2025.

[0156] S2019: Get the second to last collected point from the target road discrete point set.

[0157] S2020: Take the coincident point as the end point and the second to last collected point as the starting point. The angle between the obtained vector and the true north direction is the road direction of the target road. Execute S2025.

[0158] S2021: Determine discrete points adjacent to the coincident points from the target road set.

[0159] S2022: Determine whether the target road enters the intersection area, if so, execute S2023; if not, execute S2024.

[0160] S2023: If the adjacent discrete points are points collected after the coincidence point, the coincidence point is taken as the end point, and the adjacent discrete points are taken as the starting point. The angle between the obtained vector and the true north direction is the road direction of the target road, and S2025 is executed.

[0161] S2024: If the adjacent discrete points are points collected after the coincidence point, the coincidence point is taken as the starting point and the adjacent discrete point is taken as the end point. The angle between the obtained vector and the true north direction is the road direction of the target road, and S2025 is executed.

[0162] S2025: End.

[0163] Therefore, the road direction is determined only based on multiple discrete point sets included in the road discrete point set, without the need for path indication information, etc., relying on less original data, and without the need to introduce complex calculation strategies to avoid extreme situations, and the robustness is high.

[0164] Method 2:

[0165] A plurality of road discrete point sets are obtained according to the road information, each road discrete point set includes a plurality of discrete points, and each road discrete point set corresponds to a road. A convex hull boundary point set is obtained according to the road information, the convex hull boundary point set includes a plurality of boundary points, and a road intersection area can be obtained by connecting the plurality of boundary points included in the convex hull boundary point set.

[0166] The following description is made by taking a target road among multiple roads as an example, wherein the road discrete point set corresponding to the target road is the target road discrete point set.

[0167] Determine multiple boundary points located on the target road, i.e., target boundary points, from the convex hull boundary point set. Determine the centroid of the multiple target boundary points. The abscissa of the centroid is the average of the abscissas of the multiple target boundary points, and the ordinate of the centroid is the average of the ordinates of the multiple target boundary points. Determine the seventh discrete point and the eighth discrete point from the target road discrete point set according to the centroid, and determine the road direction of the target road according to the seventh discrete point and the eighth discrete point. Then, multiple roads associated with the intersection area are respectively used as target roads, and the road directions corresponding to the multiple roads are obtained. The distance between the seventh discrete point and the centroid is less than the third preset distance, and the distance between the eighth discrete point and the centroid is less than the fourth preset distance.

[0168] The embodiment of the present application does not specifically limit the third preset distance and the fourth preset distance, and those skilled in the art may set them according to actual needs. For example, the seventh discrete point and the eighth discrete point determined by the third preset distance and the fourth preset distance are two discrete points adjacent to the centroid.

[0169] The embodiment of the present application does not specifically limit the method of determining the road direction of the target road based on the seventh discrete point and the eighth discrete point. For example, the seventh discrete point is used as the starting point and the eighth discrete point is used as the end point, a vector formed by the seventh discrete point and the eighth discrete point is obtained, and the angle between the direction of the vector and the preset direction is determined as the road direction of the target road, etc.

[0170] Thus, the road direction is determined only based on the multiple discrete point sets included in the road discrete point set, without the need for path indication information, etc., relying on less raw data, and without the need to introduce complex calculation strategies to avoid extreme situations, and the robustness is high. Moreover, in the road direction obtained by method 1, when the target road discrete point set and the convex hull boundary set do not have overlapping points, the two discrete points determined may not be the two discrete points closest to the boundary line of the intersection area, so if the road is curved, etc., the road direction determined based on the two discrete points that are not closest to the boundary line of the intersection area may be inaccurate, but the distance between the two discrete points determined by method 2 and the centroid is less than the preset distance, and the centroid is closer to the boundary line of the intersection area, so that the two discrete points determined are closer to the boundary line of the intersection area, and the road direction determined is more accurate.

[0171] As a possible implementation method, in order to make the intersection surface boundary line more beautiful, the intersection surface boundary line can be aligned so that the intersection surface boundary line is as perpendicular as possible to the comprehensive road direction corresponding to the current road direction category. Due to the different number of roads included in the road set, the corresponding comprehensive road direction determination method is different, which is explained in two cases below.

[0172] If the road set belonging to the target road direction category includes multiple roads, the road directions corresponding to the multiple roads are obtained, and a comprehensive road direction is determined based on the multiple road directions. The comprehensive road direction is used to indicate the road direction of the road set belonging to the target road direction category. For example, the average value of the multiple road directions is used as the comprehensive road direction. Fig.10 As shown, Fig.10 The two roads shown above belong to the same road direction category, so they can determine a comprehensive road direction, such as Fig.21 Shown above.

[0173] If the road set belonging to the target road direction category includes one road, the road direction corresponding to the road included in the road set is determined as the comprehensive road direction. Fig.10 As shown, Fig.10 A road shown on the left belongs to a road direction category, and the road direction of the road is a comprehensive road direction, such as Fig.21 Shown on the left.

[0174] Therefore, the straight line perpendicular to the comprehensive road direction can be determined as the intersection surface boundary line corresponding to the target road direction, such as Fig. 22 As shown, the four intersection surface boundary lines are perpendicular to the comprehensive road direction. Therefore, the intersection surface is generated based on the intersection surface boundary lines corresponding to each road direction, which not only improves the visual beauty, but also increases the distinction between the intersection surface and the road, making it easier for users to view and improving the user experience.

[0175] As a possible implementation method, the generated intersection surface should not be too small or too large. If the intersection surface is too small, the intersection surface may not cover the current intersection area, that is, the overlapping area of ​​two roads at the current intersection is not covered. If the intersection surface is too large, it may cover too many roads that are not in the intersection area, affecting the visual effect.

[0176] See also Fig.23 , which is a schematic diagram of the distance property of the boundary line of an intersection provided by an embodiment of the present application. Fig.23In the figure, the diagonal area is the intersection area. Imagine a straight line moving along the road direction corresponding to the target road direction category (or the comprehensive road direction). As a possible implementation method, it can move perpendicular to the road direction. For the convenience of explanation, take a point in the intersection area (such as Fig.23 The following three situations are described as comparison standards.

[0177] If the straight line is far enough from the point, Fig.23 The intersection boundary line c in the middle must have no intersection with the intersection area. If the intersection surface is generated based on the intersection boundary line c, it may cover too many roads that are not in the intersection area. Fig.23 The boundary line a of the middle intersection must have two intersection points with the intersection area and may not cover the current intersection area. In the process of moving, there may be a situation where this straight line has an intersection point, such as Fig.23 At this time, neither too many roads are covered nor the current intersection area is completely covered. Therefore, a straight line having an intersection with the intersection area can be determined as the intersection surface boundary line corresponding to the current road direction, so that the current intersection area is just covered and the visual effect is more beautiful.

[0178] Furthermore, in order to quickly find a straight line that has an intersection with the intersection area, the intersection surface boundary line can be determined from far to near. Specifically, a standard point can be determined from the intersection area, and a preset straight line can be determined at a preset distance from the standard point. For example, the preset distance is set large enough so that the preset straight line at the preset distance not only passes through all roads included in the road set, but also has no intersection with the intersection area. Along the road direction corresponding to the target road direction category (or the comprehensive road direction), the distance between the preset straight line and the standard point is continuously reduced, that is, the preset straight line is adjusted from far to near until the preset straight line has an intersection with the intersection area, and the current preset straight line is determined as the intersection surface boundary line.

[0179] Therefore, from a purely geometric perspective, there is no need for complex functional relationships, the calculation is relatively simple, and no path indication information is required. It relies on less raw data and does not need to introduce complex calculation strategies to avoid extreme situations, so it has higher robustness.

[0180] Furthermore, it can be seen from the above that the intersection surface boundary line has monotonicity in the process of moving along the road direction corresponding to the target road direction category, that is, as it moves continuously, the intersection surface boundary line and the intersection area change from 0 intersection points to one intersection point, and finally to two intersection points. At this time, the adjustment speed of the preset straight line can be accelerated by the dichotomy method. Fig.24 Provide explanation.

[0181] See also Fig.24 , which is a flow chart of a method for determining an offset distance provided in an embodiment of the present application.

[0182] S2401: Start.

[0183] S2402: Calculate the difference between the maximum value and the minimum value.

[0184] Set the preset distance to the initial maximum value and the initial minimum value to 0.

[0185] S2403: Determine whether the difference is less than the error threshold, if not, execute S2404; if yes, execute S2408.

[0186] S2404: Calculate the average of the maximum value and the minimum value, and adjust the preset straight line based on the average value.

[0187] S2405: Determine whether the adjusted preset straight line and the intersection area have an intersection, if so, execute S2406; if not, execute S2407.

[0188] The preset straight line is adjusted based on the average value so that the distance between the adjusted preset straight line and the standard point is the average value, and the number of intersections between the adjusted preset straight line and the intersection area is determined.

[0189] S2406: Take the average value as the maximum value and execute S2402.

[0190] If the number of intersections is 0, it means that there is no intersection between the adjusted preset straight line and the intersection area. The average value is taken as the maximum value, the difference between the updated maximum and minimum values ​​is calculated, and the relationship between the difference and the error threshold is determined until the difference is less than the error threshold.

[0191] S2407: Take the average value as the minimum value and execute S2402.

[0192] If the number of intersections is not 0, it means that there is an intersection between the adjusted preset straight line and the intersection area. The average value is taken as the minimum value, the difference between the updated minimum and maximum values ​​is calculated, and the relationship between the difference and the error threshold is determined until the difference is less than the error threshold.

[0193] S2408: Determine a preset straight line based on the maximum value.

[0194] If the difference is less than the error threshold, it means that it is within the allowable error. The current maximum value is used as the distance between the preset straight line and the standard point, that is, the offset distance.

[0195] S2409: End.

[0196] Therefore, by means of dichotomy, the distance between the preset straight line and the standard point is continuously reduced, so that the preset straight line is quickly adjusted to obtain a preset straight line having an intersection with the intersection area.

[0197] The embodiment of the present application does not specifically limit the method of adjusting the preset straight line based on the average value. One possible implementation method is as follows.

[0198] The standard point of the intersection area can be expressed as (x c ,y c ), a comprehensive road direction or a unit vector corresponding to a road direction is set to v0 = (v 0x ,v 0y ), so the following formula can be used to calculate a point (x0, y0) on the preset line:

[0199] x0=x c +d·v 0x

[0200] y0=y c +d·v 0y

[0201] Then rotate v0 90 degrees to the left and right respectively to obtain two unit vectors v perpendicular to v0 l =(-v 0y ,v 0x ) and v r =(v 0y ,-v 0x ).

[0202] Take a sufficiently large distance d0 as the initial maximum value and calculate two points (x1, y1) and (x2, y2) on the preset straight line, such as Fig.25 shown.

[0203] x1=x0-d0·v 0y

[0204] y1=y0+d0·v 0x

[0205] x2=x0+d0·v 0y

[0206] y2=y0-d0·v 0x

[0207] The line between (x1, y1) and (x2, y2) is the offset line (line segment).

[0208] To determine whether the preset straight line has an intersection with the intersection area, that is, to determine whether the line segment has an intersection with the polygon, a mature computational geometry library, such as the JTS Topology Suite, can be used to determine. Specifically, in the JTS Topology Suite library, create a linestrine object (an object created for a line segment) and a polyton object (an object created for a polygon), and use the intersect function to determine whether the two objects intersect. If they do intersect, a true result will be returned.

[0209] Therefore, if the preset straight line is adjusted based on the vertical integrated road direction, the obtained intersection surface boundary line can be as follows: Fig. 22 As shown, Fig. 22 The arrows shown are the comprehensive road directions corresponding to each type of road direction category, and the bold straight lines perpendicular to the comprehensive road directions are the intersection surface boundaries corresponding to this type of road direction.

[0210] The embodiment of the present application does not specifically limit the method for determining the standard point, and two methods are used as examples for illustration below.

[0211] Method 1: Obtain a set of convex hull boundary points used to characterize the intersection area, determine the horizontal coordinate of the standard point based on the horizontal coordinate of each boundary point in the convex hull boundary point set, and determine the vertical coordinate of the standard point based on the vertical coordinate of each boundary point in the convex hull boundary point set. Thus, the centroid of the intersection area is used as the standard point.

[0212] Assume that each boundary point in the convex hull boundary point set can be represented as p i (x i ,x i ), i = 1, ... N, where N is the number of boundary points, then the centroids corresponding to these boundary points can be calculated using the following formula:

[0213]

[0214]

[0215] Among them, x c is the abscissa of the centroid, y c is the vertical coordinate of the centroid.

[0216] Method 2: According to the road information, at least one node included in the intersection area is determined, and a node is randomly selected from the at least one node to be determined as the standard point. Thus, any node included in the intersection area is used as the standard point, which is simpler and more convenient than method 1.

[0217] As a possible implementation method, an embodiment of the present application provides a method for generating an intersection surface based on an intersection surface boundary line.

[0218] First, the intersections of each intersection surface boundary line and each road boundary line are determined to obtain a plurality of intersection point sets, each of which includes a plurality of intersection points. The plurality of intersection points included in an intersection point set refers to the intersections of the road boundary lines of the roads included in the road set belonging to a road direction category and their corresponding intersection surface boundary lines. Fig.26 , which is a schematic diagram of the intersection of a road boundary line and a road boundary line provided in an embodiment of the present application. Fig.26 In the figure, the intersection of each intersection face boundary line and each road boundary line is represented by a black solid circle, where the four intersection points included in the ellipse belong to an intersection set. As a possible implementation, each intersection point is essentially the intersection point of two line segments, namely the intersection point of the intersection face boundary line and the road boundary line, so it can also be calculated using the JTS topology suite library.

[0219] like Fig. 27 As shown, the multiple intersection points in each ellipse correspond to an intersection point set, and the four ellipses correspond to four intersection point sets. After obtaining the multiple intersection point sets, it is necessary to sort the multiple intersection points included in the intersection point set, and to sort the multiple intersection point sets, that is, sort the multiple intersection point sets based on the preset rotation direction (sorting between intersection point sets), and sort the multiple intersection points included in each intersection point set based on the preset sorting direction (sorting the multiple intersection points included in the intersection point set), so as to obtain the connection order of the multiple intersection points included in the multiple intersection point sets.

[0220] The embodiments of the present application do not specifically limit the preset rotation direction and the preset sorting direction, the preset rotation direction may be a clockwise direction, the preset sorting direction may be a direction from left to right, etc. The following is a detailed description.

[0221] ①First calculate the centroid of each intersection set.

[0222] ②Then the multiple intersection points in an intersection point set are further divided into two categories, namely the intersection points on the left side of the centroid and the intersection points on the right side of the centroid.

[0223] ③ For the intersection points on the left side of the centroid, sort them in descending order of the distance from the centroid; for the intersection points on the right side of the centroid, sort them in ascending order of the distance from the centroid; first sort the intersection points on the left side of the centroid, then sort the intersection points on the right side of the centroid, and finally splice the left and right sides together, thus realizing the sorting of the intersection points in the intersection set based on left to right (preset sorting direction).

[0224] The method to determine whether the intersection point is on the left or right side of the centroid is as follows.

[0225] See also Fig.28 , which is a schematic diagram of determining the intersection position provided by an embodiment of the present application. Assume that C(x C,y C ) is the centroid of the intersection set, A(x A ,y A ) and B(x B ,y B ) are the two intersection points included in the intersection set, and v0 is the unit vector corresponding to the comprehensive direction of the road corresponding to the intersection set. Calculate the direction from the centroid to A(x A ,y A ) and B(x B ,y B ) A and v B , as shown below:

[0226] v A =(x A -x C ,y A -y C )

[0227] v B =(x B -x C ,y B -y C )

[0228] Then calculate v0 and v separately A and v B The vector product v0×v A and v0×v B .

[0229] For point A, v0×v A The Z-axis component is a positive number. For point B, v0×v B The Z-axis component of is negative, so the positive or negative Z-axis component of the vector product (i.e., the vertical coordinate) can be used to determine whether the intersection point is on the left or right side of the centroid. That is, the intersection point with a positive Z-axis component is on the left side of the centroid, and the intersection point with a negative Z-axis component is on the right side of the centroid. Therefore, the order of the multiple intersection points included in each intersection point set is as follows: Fig.29 Indicated by hollow arrows.

[0230] ④ After the intersections included in each intersection set are sorted internally, they are sorted in ascending order based on the road direction. For example, each road direction is the angle with the true north direction, and clockwise is positive. In this way, the order between multiple intersection sets can be determined.

[0231] ⑤ After the internal sorting of the intersection point sets and the external sorting between the intersection point sets are determined, the connection order of all the intersection points included in the multiple intersection point sets is obtained.

[0232] Finally, multiple intersection points included in multiple intersection point sets are connected based on the connection order to generate an intersection surface for the intersection area, such as Fig.30 As a possible implementation, if adjacent intersections are located on the same road, they are connected by straight lines, and if adjacent intersections are located on different roads, they are connected by curves. The curve may be a Bezier curve or the like.

[0233] Thus, by obtaining the intersection points of the intersection surface boundary line and the road boundary line, sorting the multiple intersection points based on the preset rotation direction and the preset sorting direction, obtaining the connection order of the multiple intersection points, and then connecting the multiple intersection points based on the connection order to generate the intersection surface for the intersection area. Connecting the intersection points based on the correct order avoids connection errors and improves the accuracy of intersection surface generation.

[0234] With respect to the above-described method for generating an intersection surface, the present application also provides a corresponding device for generating an intersection surface, so that the above-described method for generating an intersection surface can be applied and implemented in practice.

[0235] See also Fig.31 , which is a schematic diagram of the structure of a device for generating a road intersection surface provided in an embodiment of the present application. Fig.31 As shown, the generation device 3100 of the intersection surface includes: an acquisition unit 3101, a first determination unit 3102, a division unit 3103, a second determination unit 3104 and a generation unit 3105;

[0236] The acquisition unit 3101 is used to acquire road information for the intersection area, where the road information is information of multiple roads associated with the intersection area;

[0237] The first determining unit 3102 is used to determine the road directions corresponding to the plurality of roads respectively according to the road information;

[0238] The division unit 3103 is used to divide the multiple road directions into multiple road direction categories, and the angle difference between the road directions belonging to different road direction categories is greater than a preset threshold;

[0239] The second determining unit 3104 is configured to take a road direction category among the multiple road direction categories as a target road direction category, and determine an intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, wherein the intersection surface boundary line passes through roads included in the road set, and the road set includes at least one road;

[0240] The generating unit 3105 is used to generate an intersection surface for the intersection area according to the intersection surface boundary lines corresponding to the multiple road direction categories.

[0241] It can be seen from the above technical scheme that road information is obtained for the intersection area, and the road information is used to identify multiple roads connected to the intersection area, so that the road direction of each road is determined according to the road information, and multiple road directions corresponding to the intersection area are obtained. The multiple road directions are divided, that is, the roads with an angle difference between the road directions greater than a preset threshold are divided into two road direction categories, so as to obtain multiple road direction categories. One of the multiple road direction categories is used as the target road direction category, and the intersection surface boundary line is determined according to the road set belonging to the target road direction category, and the intersection surface boundary line passes through the roads included in the road set. According to the intersection boundary lines corresponding to the multiple road direction categories, the intersection surface corresponding to the intersection area is generated. Thus, multiple roads in an intersection area are divided according to the road direction, and the intersection surface boundary line corresponding to each road direction category is determined respectively, so that the roads belonging to the same road direction category can share an intersection surface boundary line, and the generated intersection surface shape is regular, which increases the difference between the intersection surface and the road, and the intersection surface is clearer in the virtual map, which is convenient for users to distinguish, reduces the user viewing time, and improves the user experience.

[0242] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0243] If the road set belonging to the target road direction category includes multiple roads, then obtaining the road directions respectively corresponding to the multiple roads, and determining a comprehensive road direction based on the multiple road directions, wherein the comprehensive road direction is used to indicate the road direction of the road set belonging to the target road direction category;

[0244] If the road set belonging to the target road direction category includes one road, determining the road direction corresponding to the road included in the road set as the comprehensive road direction;

[0245] A straight line perpendicular to the integrated road direction is determined as the intersection surface boundary line corresponding to the target road direction.

[0246] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0247] Based on the road direction corresponding to the target road direction category, a straight line having an intersection point with the intersection area is determined as an intersection surface boundary line corresponding to the target road direction.

[0248] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0249] Determining a standard point from the intersection area;

[0250] Determine a preset straight line at a preset distance from the standard point, the preset straight line passes through the roads included in the road set, and the preset straight line at the preset distance has no intersection with the intersection area;

[0251] Along the road direction corresponding to the target road direction category, the distance between the preset straight line and the standard point is continuously reduced until the preset straight line has an intersection with the intersection area, and the preset straight line is determined as the intersection surface boundary line corresponding to the target road direction.

[0252] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0253] Setting the preset distance to a maximum value and zero to a minimum value;

[0254] determining a difference between the maximum value and the minimum value;

[0255] If the difference is less than the error threshold, a preset straight line whose distance from the standard point is the maximum value is determined as the intersection surface boundary line corresponding to the target road direction;

[0256] If the difference is greater than or equal to the error threshold, determining the average value of the maximum value and the minimum value; determining the number of intersections between a preset straight line whose distance from the standard point is the average value and the intersection area;

[0257] If the number of intersections is zero, adjusting the maximum value to the average value, and performing the step of determining the difference between the maximum value and the minimum value;

[0258] If the number of intersection points is not zero, the minimum value is adjusted to the average value, and the step of determining the difference between the maximum value and the minimum value is performed.

[0259] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0260] Acquire a convex hull boundary point set, wherein the convex hull boundary point set includes a plurality of boundary points representing the intersection area;

[0261] Determine the horizontal coordinate of the standard point according to the horizontal coordinate of each boundary point in the convex hull boundary point set;

[0262] The ordinate of the standard point is determined according to the ordinate of each boundary point in the convex hull boundary point set.

[0263] As a possible implementation manner, the second determining unit 3104 is specifically configured to:

[0264] Determine the nodes included in the intersection area according to the road information;

[0265] The node is determined as the standard point.

[0266] As a possible implementation manner, the division unit 3103 is specifically configured to:

[0267] Determine the road types of the plurality of roads according to the road information, the road types including roads within an intersection and roads crossing a boundary of an intersection surface, the roads within an intersection being connected to a plurality of nodes included in the intersection area, the roads crossing a boundary of an intersection surface being connected to a node included in the intersection area, and the node being an intersection of at least two roads;

[0268] According to the road type, the road directions corresponding to the respective roads crossing the boundary of the intersection surface are acquired to obtain a plurality of road directions;

[0269] The angles between the multiple road directions whose angle differences are greater than the preset threshold are divided into different road direction categories to obtain multiple road direction categories.

[0270] As a possible implementation manner, the first determining unit 3102 is specifically configured to:

[0271] According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area;

[0272] If the target road discrete point set and the convex hull boundary point set have overlapping points, a first discrete point and a second discrete point are determined from the road discrete point set according to the overlapping points, and a road direction of the target road is determined according to the first discrete point and the second discrete point, the target road discrete point set is a road discrete point set corresponding to the target road, the target road is one of the multiple roads, the distance between the first discrete point and the overlapping point is less than a first preset distance, and the distance between the second discrete point and the overlapping point is less than a second preset distance;

[0273] If the target road discrete point set and the convex hull boundary set do not have overlapping points, and the driving direction of the target road is a road entering the intersection area, obtaining a third discrete point and a fourth discrete point from the road discrete point set, and determining the road direction of the target road based on the third discrete point and the fourth discrete point, the third discrete point is a discrete point that satisfies a first preset order, and the fourth discrete point is a discrete point that satisfies a second preset order;

[0274] If the target road discrete point set and the convex hull boundary set have no overlapping points, and the driving direction of the target road is a road leaving the intersection area, a fifth discrete point and a sixth discrete point are obtained from the road discrete point set, and the road direction of the target road is determined based on the fifth discrete point and the sixth discrete point, the fifth discrete point is a discrete point that satisfies a third preset order, and the sixth discrete point is a discrete point that satisfies a fourth preset order.

[0275] As a possible implementation manner, the first determining unit 3102 is specifically configured to:

[0276] According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area;

[0277] Determine a plurality of target boundary points located on a target road from the convex hull boundary point set, wherein the target road discrete point set is a road discrete point set corresponding to the target road, and the target road is one of the plurality of roads;

[0278] Determine the centroids of the multiple target boundary points, determine a seventh discrete point and an eighth discrete point from the target road discrete point set according to the centroid, and determine the road direction of the target road according to the seventh discrete point and the eighth discrete point, wherein a distance between the seventh discrete point and the centroid is less than a third preset distance, and a distance between the eighth discrete point and the centroid is less than a fourth preset distance;

[0279] The plurality of roads are respectively used as the target roads, and the road directions respectively corresponding to the plurality of roads are obtained.

[0280] As a possible implementation, the generating unit 3105 is specifically configured to:

[0281] Determine a plurality of intersection point sets, the intersection point sets including intersection points of the intersection surface boundary line and the road boundary line;

[0282] Sorting the plurality of intersection point sets based on a preset rotation direction, and respectively sorting the plurality of intersection points included in each of the plurality of intersection point sets based on a preset sorting direction, to obtain a connection order of the plurality of intersection points included in the plurality of intersection point sets;

[0283] The plurality of intersection points included in the plurality of intersection point sets are connected based on the connection order to generate an intersection surface for the intersection area.

[0284] The embodiment of the present application also provides a computer device, which is the computer device described above. The computer device can be a server or a terminal device. The aforementioned intersection surface generation device can be built into the server or the terminal device. The computer device provided by the embodiment of the present application will be introduced from the perspective of hardware entity. Fig.32 The following is a schematic diagram of the server structure. Fig.33 Shown is a schematic diagram of the structure of the terminal equipment.

[0285] See also Fig.32 , which is a schematic diagram of a server structure provided in an embodiment of the present application. The server 1400 may have relatively large differences due to different configurations or performances, and may include one or more processors 1422, such as central processing units (CPU), memory 1432, one or more application programs 1442 or storage media 1430 (such as one or more massive storage devices) for data 1444. Among them, the memory 1432 and the storage medium 1430 may be temporary storage or permanent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the processor 1422 may be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the server 1400.

[0286] The server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0287] The steps performed by the server in the above embodiment can be based on the Fig.32 The server structure shown.

[0288] The CPU 1422 is used to perform the following steps:

[0289] Acquiring road information for an intersection area, where the road information is information of a plurality of roads associated with the intersection area;

[0290] Determining, according to the road information, road directions corresponding to the plurality of roads respectively;

[0291] Dividing the plurality of road directions to obtain a plurality of road direction categories, wherein the angle difference between road directions belonging to different road direction categories is greater than a preset threshold;

[0292] Taking one of the multiple road direction categories as a target road direction category, and determining an intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, wherein the intersection surface boundary line passes through roads included in the road set, and the road set includes at least one road;

[0293] An intersection surface for the intersection area is generated according to the intersection surface boundary lines corresponding to the plurality of road direction categories.

[0294] Optionally, CPU 1422 may also execute method steps of any specific implementation of the method for generating an intersection surface in the embodiments of the present application.

[0295] See also Fig.33 , which is a structural diagram of a terminal device provided in an embodiment of the present application. Fig.33 The block diagram shows a partial structure of a smart phone related to a terminal device provided in an embodiment of the present application, and the smart phone includes: a radio frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (WiFi) module 1570, a processor 1580, and a power supply 1590. Those skilled in the art can understand that Fig.33 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0296] Combine the following Fig.33 A detailed introduction to the various components of a smartphone:

[0297] The RF circuit 1510 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 1580 for processing; in addition, the designed uplink data is sent to the base station.

[0298] The memory 1520 may be used to store software programs and modules. The processor 1580 implements various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 1520 .

[0299] The input unit 1530 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the smartphone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also known as a touch screen, can collect user touch operations on or near it and drive the corresponding connection device according to a pre-set program. In addition to the touch panel 1531, the input unit 1530 may also include other input devices 1532. Specifically, other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0300] The display unit 1540 may be used to display information input by the user or information provided to the user and various menus of the smartphone. The display unit 1540 may include a display panel 1541, and the display panel 1541 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0301] The smartphone may also include at least one sensor 1550, such as a light sensor, a motion sensor, and other sensors. As for other sensors that may be configured in the smartphone, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.

[0302] The audio circuit 1560, the speaker 1561, and the microphone 1562 can provide an audio interface between the user and the smartphone. The audio circuit 1560 can transmit the received audio data to the speaker 1561 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1560 and converted into audio data, and then the audio data is output to the processor 1580 for processing, and then sent to another smartphone through the RF circuit 1510, or the audio data is output to the memory 1520 for further processing.

[0303] The processor 1580 is the control center of the smartphone, and uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in the memory 1520, and calling data stored in the memory 1520. Optionally, the processor 1580 may include one or more processing units.

[0304] The smart phone also includes a power supply 1590 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption management.

[0305] Although not shown, the smartphone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0306] In the embodiment of the present application, the memory 1520 included in the smart phone can store program codes and transmit the program codes to the processor.

[0307] The processor 1580 included in the smart phone can execute the method for generating the intersection surface provided in the above embodiment according to the instructions in the program code.

[0308] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program, wherein the computer program is used to execute the method for generating an intersection surface provided in the above embodiment.

[0309] The embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating the intersection surface provided in various optional implementations of the above aspects.

[0310] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium can be at least one of the following media: read-only memory (English: Read-Only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0311] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0312] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a technician familiar with the technical field within the technical scope disclosed in the present application should be included in the protection scope of the present application. Based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a road intersection surface, characterized in that: The method comprises: Acquiring road information for an intersection area, where the road information is information of a plurality of roads associated with the intersection area; Determine the road directions corresponding to the plurality of roads respectively according to the road information; the road types of the plurality of roads include roads crossing an intersection surface boundary; the road crossing an intersection surface boundary road is connected to a node included in the intersection area, and the node is an intersection point of at least two roads; Dividing the road directions respectively corresponding to the plurality of roads crossing the intersection boundary surface to obtain a plurality of road direction categories, wherein the angle difference between the road directions belonging to different road direction categories is greater than a preset threshold; Taking a road direction category from the plurality of road direction categories as a target road direction category, and determining an intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, comprising: based on the road direction corresponding to the target road direction category, determining a straight line having an intersection point with the intersection area as an intersection surface boundary line corresponding to the target road direction; the intersection surface boundary line passes through roads included in the road set, and the road set includes at least one road; An intersection surface for the intersection area is generated according to the intersection surface boundary lines corresponding to the plurality of road direction categories.

2. The method according to claim 1, characterized in that: The step of determining the intersection surface boundary line corresponding to the target road direction according to the road set belonging to the target road direction category includes: If the road set belonging to the target road direction category includes multiple roads, then obtaining the road directions respectively corresponding to the multiple roads, and determining a comprehensive road direction based on the multiple road directions, wherein the comprehensive road direction is used to indicate the road direction of the road set belonging to the target road direction category; If the road set belonging to the target road direction category includes one road, determining the road direction corresponding to the road included in the road set as the comprehensive road direction; A straight line perpendicular to the integrated road direction is determined as the intersection surface boundary line corresponding to the target road direction.

3. The method according to claim 1, characterized in that The step of determining, based on the road direction corresponding to the target road direction category, a straight line having an intersection with the intersection area as an intersection surface boundary line corresponding to the target road direction includes: Determining a standard point from the intersection area; Determine a preset straight line at a preset distance from the standard point, the preset straight line passes through the roads included in the road set, and the preset straight line at the preset distance has no intersection with the intersection area; Along the road direction corresponding to the target road direction category, the distance between the preset straight line and the standard point is continuously reduced until the preset straight line has an intersection with the intersection area, and the preset straight line is determined as the intersection surface boundary line corresponding to the target road direction.

4. The method according to claim 3, characterized in that The method of continuously reducing the distance between the preset straight line and the standard point along the road direction corresponding to the target road direction category until the preset straight line and the intersection area have an intersection point includes: Setting the preset distance to a maximum value and zero to a minimum value; determining a difference between the maximum value and the minimum value; If the difference is less than the error threshold, a preset straight line whose distance from the standard point is the maximum value is determined as the intersection surface boundary line corresponding to the target road direction; If the difference is greater than or equal to the error threshold, determining the average value of the maximum value and the minimum value; determining the number of intersections between a preset straight line whose distance from the standard point is the average value and the intersection area; If the number of intersections is zero, adjusting the maximum value to the average value, and performing the step of determining the difference between the maximum value and the minimum value; If the number of intersection points is not zero, the minimum value is adjusted to the average value, and the step of determining the difference between the maximum value and the minimum value is performed.

5. The method according to claim 3, characterized in that: The step of determining a standard point from the intersection area comprises: Acquire a convex hull boundary point set, wherein the convex hull boundary point set includes a plurality of boundary points representing the intersection area; Determine the horizontal coordinate of the standard point according to the horizontal coordinate of each boundary point in the convex hull boundary point set; The ordinate of the standard point is determined according to the ordinate of each boundary point in the convex hull boundary point set.

6. The method according to claim 3, characterized in that The step of determining a standard point from the intersection area comprises: Determine the nodes included in the intersection area according to the road information; The node is determined as the standard point.

7. The method according to claim 1, characterized in that The road directions corresponding to the plurality of roads crossing the intersection boundary are divided to obtain a plurality of road direction categories, including: Determine the road types of the plurality of roads according to the road information, the road types including roads within the intersection and roads crossing the boundary of the intersection surface, the roads within the intersection being connected to the plurality of nodes included in the intersection area; According to the road type, the road directions corresponding to the respective roads crossing the boundary of the intersection surface are acquired to obtain a plurality of road directions; The angles between the multiple road directions whose angle differences are greater than the preset threshold are divided into different road direction categories to obtain multiple road direction categories.

8. The method according to claim 1, characterized in that The determining, according to the road information, the road directions respectively corresponding to the plurality of roads comprises: According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area; If the target road discrete point set and the convex hull boundary point set have overlapping points, a first discrete point and a second discrete point are determined from the road discrete point set according to the overlapping points, and a road direction of the target road is determined according to the first discrete point and the second discrete point, the target road discrete point set is a road discrete point set corresponding to the target road, the target road is one of the multiple roads, the distance between the first discrete point and the overlapping point is less than a first preset distance, and the distance between the second discrete point and the overlapping point is less than a second preset distance; If the target road discrete point set and the convex hull boundary set do not have overlapping points, and the driving direction of the target road is a road entering the intersection area, obtaining a third discrete point and a fourth discrete point from the road discrete point set, and determining the road direction of the target road based on the third discrete point and the fourth discrete point, the third discrete point is a discrete point that satisfies a first preset order, and the fourth discrete point is a discrete point that satisfies a second preset order; If the target road discrete point set and the convex hull boundary set have no overlapping points, and the driving direction of the target road is a road leaving the intersection area, a fifth discrete point and a sixth discrete point are obtained from the road discrete point set, and the road direction of the target road is determined based on the fifth discrete point and the sixth discrete point, the fifth discrete point is a discrete point that satisfies a third preset order, and the sixth discrete point is a discrete point that satisfies a fourth preset order.

9. The method according to claim 1, characterized in that: The determining, according to the road information, the road directions respectively corresponding to the plurality of roads comprises: According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area; Determine a plurality of target boundary points located on a target road from the convex hull boundary point set, wherein the target road discrete point set is a road discrete point set corresponding to the target road, and the target road is one of the plurality of roads; Determine the centroids of the multiple target boundary points, determine a seventh discrete point and an eighth discrete point from the target road discrete point set according to the centroid, and determine the road direction of the target road according to the seventh discrete point and the eighth discrete point, wherein a distance between the seventh discrete point and the centroid is less than a third preset distance, and a distance between the eighth discrete point and the centroid is less than a fourth preset distance; The plurality of roads are respectively used as the target roads, and the road directions respectively corresponding to the plurality of roads are obtained.

10. The method according to any one of claims 1 to 9, characterized in that: The step of generating an intersection surface for the intersection area according to the intersection surface boundary lines respectively corresponding to the plurality of road direction categories comprises: Determine a plurality of intersection point sets, the intersection point sets including intersection points of the intersection surface boundary line and the road boundary line; Sorting the plurality of intersection point sets based on a preset rotation direction, and respectively sorting the plurality of intersection points included in each of the plurality of intersection point sets based on a preset sorting direction, to obtain a connection order of the plurality of intersection points included in the plurality of intersection point sets; The plurality of intersection points included in the plurality of intersection point sets are connected based on the connection order to generate an intersection surface for the intersection area.

11. A device for generating a road intersection surface, characterized in that: The device comprises: an acquisition unit, a first determination unit, a division unit, a second determination unit and a generation unit; The acquisition unit is used to acquire road information for the intersection area, where the road information is information of multiple roads associated with the intersection area; The first determination unit is used to determine the road directions corresponding to the plurality of roads respectively according to the road information; the road types of the plurality of roads include roads crossing an intersection surface boundary; the road crossing an intersection surface boundary road is connected to a node included in the intersection area, and the node is an intersection point of at least two roads; The division unit is used to divide the road directions corresponding to the plurality of roads crossing the intersection boundary surface respectively, to obtain a plurality of road direction categories, wherein the angle difference between the road directions belonging to different road direction categories is greater than a preset threshold; The second determination unit is used to determine a road direction category among the multiple road direction categories as a target road direction category, and determine the intersection surface boundary line corresponding to the target road direction according to a road set belonging to the target road direction category, including: based on the road direction corresponding to the target road direction category, a straight line having an intersection point with the intersection area is determined as the intersection surface boundary line corresponding to the target road direction; the intersection surface boundary line passes through the roads included in the road set, and the road set includes at least one road; The generating unit is used to generate an intersection surface for the intersection area according to the intersection surface boundary lines corresponding to the multiple road direction categories.

12. The device according to claim 11, characterized in that The second determining unit is specifically configured to: If the road set belonging to the target road direction category includes multiple roads, then obtaining the road directions respectively corresponding to the multiple roads, and determining a comprehensive road direction based on the multiple road directions, wherein the comprehensive road direction is used to indicate the road direction of the road set belonging to the target road direction category; If the road set belonging to the target road direction category includes one road, determining the road direction corresponding to the road included in the road set as the comprehensive road direction; A straight line perpendicular to the integrated road direction is determined as the intersection surface boundary line corresponding to the target road direction.

13. The device according to claim 11, characterized in that The second determining unit is specifically configured to: Determining a standard point from the intersection area; Determine a preset straight line at a preset distance from the standard point, the preset straight line passes through the roads included in the road set, and the preset straight line at the preset distance has no intersection with the intersection area; Along the road direction corresponding to the target road direction category, the distance between the preset straight line and the standard point is continuously reduced until the preset straight line has an intersection with the intersection area, and the preset straight line is determined as the intersection surface boundary line corresponding to the target road direction.

14. The device according to claim 13, characterized in that The second determining unit is specifically configured to: Setting the preset distance to a maximum value and zero to a minimum value; determining a difference between the maximum value and the minimum value; If the difference is less than the error threshold, a preset straight line whose distance from the standard point is the maximum value is determined as the intersection surface boundary line corresponding to the target road direction; If the difference is greater than or equal to the error threshold, determining an average of the maximum value and the minimum value; Determine the number of intersections between a preset straight line whose distance from the standard point is the average value and the intersection area; If the number of intersections is zero, adjusting the maximum value to the average value, and performing the step of determining the difference between the maximum value and the minimum value; If the number of intersection points is not zero, the minimum value is adjusted to the average value, and the step of determining the difference between the maximum value and the minimum value is performed.

15. The device according to claim 13, characterized in that The second determining unit is specifically configured to: Acquire a convex hull boundary point set, wherein the convex hull boundary point set includes a plurality of boundary points representing the intersection area; Determine the horizontal coordinate of the standard point according to the horizontal coordinate of each boundary point in the convex hull boundary point set; The ordinate of the standard point is determined according to the ordinate of each boundary point in the convex hull boundary point set.

16. The device according to claim 13, characterized in that The second determining unit is specifically configured to: Determine the nodes included in the intersection area according to the road information; The node is determined as the standard point.

17. The device according to claim 11, characterized in that The division unit is specifically used for: Determine the road types of the plurality of roads according to the road information, the road types including roads within the intersection and roads crossing the boundary of the intersection surface, the roads within the intersection being connected to the plurality of nodes included in the intersection area; According to the road type, the road directions corresponding to the respective roads crossing the boundary of the intersection surface are acquired to obtain a plurality of road directions; The angles between the multiple road directions whose angle differences are greater than the preset threshold are divided into different road direction categories to obtain multiple road direction categories.

18. The device according to claim 11, characterized in that The first determining unit is specifically configured to: According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area; If the target road discrete point set and the convex hull boundary point set have overlapping points, a first discrete point and a second discrete point are determined from the road discrete point set according to the overlapping points, and a road direction of the target road is determined according to the first discrete point and the second discrete point, the target road discrete point set is a road discrete point set corresponding to the target road, the target road is one of the multiple roads, the distance between the first discrete point and the overlapping point is less than a first preset distance, and the distance between the second discrete point and the overlapping point is less than a second preset distance; If the target road discrete point set and the convex hull boundary set do not have overlapping points, and the driving direction of the target road is a road entering the intersection area, obtaining a third discrete point and a fourth discrete point from the road discrete point set, and determining the road direction of the target road based on the third discrete point and the fourth discrete point, the third discrete point is a discrete point that satisfies a first preset order, and the fourth discrete point is a discrete point that satisfies a second preset order; If the target road discrete point set and the convex hull boundary set have no overlapping points, and the driving direction of the target road is a road leaving the intersection area, a fifth discrete point and a sixth discrete point are obtained from the road discrete point set, and the road direction of the target road is determined based on the fifth discrete point and the sixth discrete point, the fifth discrete point is a discrete point that satisfies a third preset order, and the sixth discrete point is a discrete point that satisfies a fourth preset order.

19. The device according to claim 11, characterized in that The first determining unit is specifically configured to: According to the road information, a road discrete point set corresponding to the plurality of roads and a convex hull boundary point set of an intersection area are obtained, wherein the plurality of discrete points included in the road discrete point set are used to characterize the roads, and the plurality of boundary points included in the convex hull boundary point set are used to characterize the intersection area; Determine a plurality of target boundary points located on a target road from the convex hull boundary point set, wherein the target road discrete point set is a road discrete point set corresponding to the target road, and the target road is one of the plurality of roads; Determine the centroids of the multiple target boundary points, determine a seventh discrete point and an eighth discrete point from the target road discrete point set according to the centroid, and determine the road direction of the target road according to the seventh discrete point and the eighth discrete point, wherein a distance between the seventh discrete point and the centroid is less than a third preset distance, and a distance between the eighth discrete point and the centroid is less than a fourth preset distance; The plurality of roads are respectively used as the target roads, and the road directions respectively corresponding to the plurality of roads are obtained.

20. The device according to any one of claims 11 to 19, characterized in that: The generating unit is specifically used for: Determine a plurality of intersection point sets, the intersection point sets including intersection points of the intersection surface boundary line and the road boundary line; Sorting the plurality of intersection point sets based on a preset rotation direction, and respectively sorting the plurality of intersection points included in each of the plurality of intersection point sets based on a preset sorting direction, to obtain a connection order of the plurality of intersection points included in the plurality of intersection point sets; The plurality of intersection points included in the plurality of intersection point sets are connected based on the connection order to generate an intersection surface for the intersection area.

21. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 10 according to the computer program.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 10.

23. A computer program product comprising a computer program, characterized in that When the method is executed on a computer device, the computer device is enabled to execute the method according to any one of claims 1 to 10.