Simulation road network generation method and device and storage medium
By generating a directed graph of the target road network and building relevant attribute data, the simulation road network is directly generated, which solves the problems of high cost and low efficiency of acquisition of GIS attribute data in the existing technology, and achieves low-cost and high-efficiency simulation road network generation.
Patent Information
- Application Number
- CN202411492999.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-23
AI Technical Summary
When building a simulated road network, the prior art requires manual acquisition and processing of large amounts of GIS attribute data, resulting in high cost and low efficiency.
By acquiring the road network data, a directed graph of the target road network is generated, and a road network node attribute data, road network edge attribute data and lane connection relationship are constructed based on the graph, and a simulated road network is directly generated, avoiding the step of directly collecting GIS attribute data.
It reduces the cost of obtaining GIS attribute data, improves the construction efficiency of the simulation road network, and realizes low-cost and high-efficiency simulation road network generation.
Smart Images

Figure CN119514145A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to but are not limited to the field of data processing technology, and in particular to a method, device and storage medium for generating a simulated road network. Background Art
[0002] Traffic simulation refers to the use of system simulation technology to generate simulated road networks, reproduce the characteristics of actual traffic systems based on simulated road networks, analyze the possible behaviors of traffic systems under various set conditions, and seek the optimal solution to real traffic problems through simulation experiments, evaluate the effects of traffic design plans, etc., in order to improve the efficiency of traffic strategy generation. The construction of simulated road networks depends on GIS attribute data such as the number of lanes, lane line types, and lane turn landmark types. These attribute data can be collected based on manual surveys, high-precision maps, and floating vehicle vision. However, there is still a lack of lane connection relationships and intersection element attribute data required for the construction of simulated road networks. Further manual processing based on GIS attribute data is required to obtain intersection attribute elements, lane-level connection relationships, and other data. There are problems such as high cost and low efficiency in the construction of simulated road networks. Therefore, a method for generating simulated road networks based on GIS data with lower costs and higher efficiency is urgently needed. Summary of the invention
[0003] The embodiments of the present application provide a method, device and storage medium for generating a simulated road network, aiming to reduce the generation cost of a simulated road network and improve the efficiency of road network construction.
[0004] In a first aspect, an embodiment of the present application provides a method for generating a simulated road network, the method comprising:
[0005] Acquire road network data, and generate a target road network directed graph according to each road attribute contained in the road network data, wherein the target road network directed graph includes a plurality of road nodes and edges connecting two adjacent road nodes;
[0006] Determine the node position information and node identification of each road node in the target road network directed graph, and construct road network node attribute data according to the node position information and node identification of each road node;
[0007] Determine the road sign and lane attribute corresponding to each edge in the target road network directed graph, and construct road network edge attribute data according to the road sign and lane attribute corresponding to each edge;
[0008] Determine a lane connection relationship between any two adjacent edges based on a lane turning attribute corresponding to each edge in the directed graph of the target road network;
[0009] A target simulation road network is constructed according to the road network node attribute data, the road network edge attribute data and the lane connection relationship between any two adjacent edges.
[0010] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the simulation road network generation method as described in the first aspect is implemented.
[0011] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising computer-executable instructions stored therein, wherein the computer-executable instructions are used by a processor to execute the simulation road network generation method as described in the first aspect.
[0012] The above-mentioned embodiments of the present application have at least the following beneficial effects: through road network data, a target road network directed graph can be directly constructed based on the road segment attributes in the road network data, and GIS attribute data including road network node attribute data, road network edge attribute data and lane connection relationship can be generated based on the target road network directed graph, so as to construct a simulated road network based on GIS attribute data. Compared with the related technology, the embodiments of the present application do not need to directly collect GIS attribute data, and the acquisition cost of GIS attribute data is lower and the acquisition efficiency is higher. Therefore, the embodiments of the present application can reduce the cost of acquiring GIS attribute data and improve the efficiency of building a simulated road network. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a corresponding device module of a simulated road network generation method according to an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a flow chart of a method for generating a simulated road network according to an embodiment of the present application;
[0015] Figure 3a A schematic diagram of the connection relationship of left-turn lanes at an intersection in one embodiment of a method for generating a simulated road network according to an embodiment of the present application;
[0016] Figure 3b A schematic diagram of the connection relationship of left-turn lanes at an intersection in another embodiment of the method for generating a simulated road network according to an embodiment of the present application;
[0017] Figure 4a A schematic diagram of the connection relationship of the straight-through turn lanes at an intersection in one embodiment of the simulation road network generation method of the embodiment of the present application;
[0018] Figure 4b A schematic diagram of the connection relationship of through lanes at an intersection in another embodiment of the method for generating a simulated road network according to an embodiment of the present application;
[0019] Figure 5a A schematic diagram of the connection relationship of right-turn lanes at an intersection in one embodiment of a method for generating a simulated road network according to an embodiment of the present application;
[0020] Figure 5b A schematic diagram of the connection relationship of right-turn lanes at an intersection in another embodiment of the method for generating a simulated road network according to an embodiment of the present application;
[0021] Figure 6a A schematic diagram of the connection relationship between straight-through turn lanes between road sections in an embodiment of a method for generating a simulated road network according to an embodiment of the present application;
[0022] Figure 6b A schematic diagram of the connection relationship between straight-through turn lanes between road sections in another embodiment of the method for generating a simulated road network according to an embodiment of the present application;
[0023] Figure 7 A schematic diagram of an embodiment of a method for generating a simulated road network in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of a target simulation network in a simulation road network generation method according to an embodiment of the present application;
[0025] Fig. 9 for Figure 8 An enlarged schematic diagram of the local A shown;
[0026] Fig.10 A schematic diagram of the hardware structure corresponding to the simulation road network generation method of the application embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art belonging to the technical field of the present application. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. The terms "first", "second", "third", "fourth", etc. (if present) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order.
[0029] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0030] Traffic simulation refers to the use of system simulation technology to study traffic behavior. It is a technology that tracks and describes the changes in traffic operation over time and space. Through traffic simulation, the characteristics of the actual traffic system can be reproduced, and the possible behaviors of the traffic system under various set conditions can be analyzed. Then, the optimal solution to real traffic problems can be sought through simulation experiments, and the effect of traffic design schemes can be evaluated. The basis of traffic simulation is to build a simulated road network. The production of a simulated road network mainly requires GIS attribute data such as road segment attribute elements (such as the number of lanes, lane line type, lane turn landmark type, etc.), intersection attribute elements, and lane-level connection relationships. Based on GIS attribute data, a mapping relationship with the simulated road network can be constructed to achieve automatic generation of a simulated road network. At present, there are three main ways to obtain GIS attribute data required for building a simulated road network: 1) Manual survey method, through manual collection of road network topology, survey obtains road section attribute elements, intersection attribute elements, and lane-level connection relationship data; 2) Based on high-precision map collection method, the map collection device for collecting high-precision map data is mounted on the collection vehicle, and the collection vehicle completes the high-precision map data collection while driving on the road. After processing and verification of the collected data, high-precision map data containing attribute elements such as road network topology, road section attribute elements, intersection attribute elements, and lane-level connection relationships are obtained; Although the GIS attribute data required for the simulated road network can be fully obtained based on manual or high-precision map collection methods, the cost of obtaining GIS attribute data is high, the modeling efficiency of the simulated road network is low, and the practicality is not strong, it is difficult to support the low-cost and rapid generation of simulated road networks within a regional range.
[0031] In summary, in the prior art, how to provide a method for producing a simulated road network with lower cost and higher construction efficiency is a technical problem that needs to be solved urgently. Based on this, the embodiment of the present application provides a simulated road network generation method, a traffic strategy generation method, a device and a storage medium, aiming to reduce the cost of data acquisition and improve the construction efficiency of the simulated road network.
[0032] Reference Figure 1 As shown, the embodiment of the present application provides a simulated road network generation device, comprising:
[0033] A road network data acquisition module 100 is used to acquire road network data and generate a target road network directed graph according to each road attribute contained in the road network data. The target road network directed graph includes a plurality of road nodes and edges connecting two adjacent road nodes.
[0034] The node attribute construction module 200 is used to determine the node position information and node identification of each road node in the target road network directed graph, and to construct the road network node attribute data according to the node position information and node identification of each road node;
[0035] The edge attribute construction module 300 is used to determine the road sign and lane attribute corresponding to each edge in the target road network directed graph, and construct the road network edge attribute data according to the road sign and lane attribute corresponding to each edge;
[0036] A connection relationship building module 400 is used to determine the lane connection relationship between any two adjacent edges based on the lane turning attribute corresponding to each edge in the target road network directed graph;
[0037] The road network construction module 500 constructs a target simulation road network according to the road network node attribute data, the road network edge attribute data and the lane connection relationship between any two adjacent edges.
[0038] Understandably, referring to Figure 2 As shown, the embodiment of the present application provides a method for generating a simulated road network, and the method for generating a simulated road network includes:
[0039] Step S100, obtaining road network data, and generating a target road network directed graph according to each road attribute contained in the road network data, wherein the target road network directed graph includes a plurality of road nodes and edges connecting two adjacent road nodes;
[0040] Step S200: determining the node position information and node identification of each road node in the target road network directed graph, and constructing road network node attribute data according to the node position information and node identification of each road node;
[0041] Step S300: determine the road sign and lane attribute corresponding to each edge in the target road network directed graph, and construct road network edge attribute data according to the road sign and lane attribute corresponding to each edge;
[0042] Step S400: determining a lane connection relationship between any two adjacent edges based on a lane turning attribute corresponding to each edge in the target road network directed graph;
[0043] Step S500: construct a target simulation road network according to the road network node attribute data, the road network edge attribute data and the lane connection relationship between any two adjacent edges.
[0044] Therefore, through the road network data, the target road network directed graph can be directly constructed based on the road section attributes in the road network data, and GIS attribute data including road network node attribute data, road network edge attribute data and lane connection relationships can be generated based on the target road network directed graph to construct a simulated road network based on the GIS attribute data. Compared with the related technology, the embodiment of the present application does not need to directly collect GIS attribute data, and the acquisition cost of GIS attribute data is lower and the acquisition efficiency is higher. Therefore, the embodiment of the present application can reduce the cost of acquiring GIS attribute data and improve the efficiency of building a simulated road network.
[0045] The road network data represents the driving rules of vehicles on multiple different sections of roads. The road network data includes the segment attributes of multiple road sides. Each segment attribute includes at least the number of lanes, lane line type, and lane turn landmark type of the corresponding road side. The present application embodiment does not limit the format of each data type in the segment attribute. Those skilled in the art can customize the format. For example, the segment attributes can refer to the following Table 1:
[0046]
[0047] Table 1
[0048] The target road network directed graph is used to establish the association between each road edge based on the road attributes of each road edge in the form of a graph, so as to facilitate the analysis of the lane connection relationship between two adjacent road edges. The relative position information of each road node and the road network edge attribute data can also be determined.
[0049] The road network node attribute data is a collection of location information of a plurality of road nodes in a preset format; the location information of the road node includes an x-coordinate value and a y-coordinate value, and the road node identifier is used to improve the efficiency of the road node search. Among them, the x-coordinate value and the y-coordinate value can both be a type of data in the road attribute, or some road nodes can be a type of data in the road attribute, such as each road attribute data includes the starting point coordinates of the corresponding road side (i.e., the x-coordinate value and the y-coordinate value of the starting point), the end point coordinates of the corresponding road side (i.e., the x-coordinate value and the y-coordinate value of the end point), the number of lanes, the lane line type, and the lane turning landmark type. For another example, in some embodiments, each road attribute data includes the starting point coordinates of the corresponding road side (i.e., the x-coordinate value and the y-coordinate value of the starting point), the length of the corresponding road side, the number of lanes, the lane line type, and the lane turning landmark type, so that the end point coordinates can be determined based on the starting point coordinates and the length of the road. For another example, in some other embodiments, each road attribute data includes the end point coordinates of the corresponding road side (i.e., the x-coordinate value and the y-coordinate value of the end point), the length of the corresponding road side, the number of lanes, the lane line type, and the lane turning landmark type, so that the starting point coordinates can be determined based on the end point coordinates and the length of the road. In this regard, the embodiment of the present application does not limit the method for obtaining the node coordinates of each road node, and those skilled in the art can selectively set it according to actual needs.
[0050] The road network edge attribute data is a set of lane attributes in a preset format for each road edge, wherein the lane attributes represent the lane line type of each road edge. In some embodiments, the lane attributes include the starting road node identifier, the terminal node road identifier, and the lane line type. In other embodiments, the lane attributes include the starting road node identifier, the terminal node road identifier, the number of lanes, and the lane line type.
[0051] The embodiments of the present application do not limit the recording format of road network edge attribute data or the recording format of road network node attribute data.
[0052] Exemplarily, the road network node attribute data is constructed as follows:
[0053] Traverse each road node in the target road network directed graph in turn, extract the node identifier i and the node location information (i.e., x-coordinate value, y-coordinate value) of the road node, define each node according to the format, and combine them to form the road network node attribute data. For example, if the node identifier = 373, the x-coordinate value = 0, and the y-coordinate value = 0, then the road node is defined according to the format as<node id="373"x="0"y="0" / > .
[0054] Exemplarily, the road network edge attribute data is constructed as follows:
[0055] Traverse each road edge in the target road network directed graph in turn, extract the road edge's road ID j, starting road node ID, end road node ID, number of lanes, lane line type and other attribute values, define each road edge according to the format, and combine to obtain the road network edge attribute data. Among them, taking the road edge's road ID = 2, starting road node ID = 40, end road node ID = 39, number of lanes = 3, lane line type = {1: [0,0], 2: [0,0], 3: [0,1]} as an example, the road edge can be defined in the format to obtain the following data:
[0056] <edge id="2"from="40"to="39"numLanes="3">
[0057] <l ane index="0"changeLeft="no"changeRight="no" / >
[0058] <l ane index="1"changeLeft="no"changeRight="no" / >
[0059] <l ane index="2"changeLeft="no"changeRight="a l l" / >
[0060]
[0061] Where id indicates the road sign on the side of the road; from indicates the starting road node sign on the side of the road; to indicates the ending road node sign on the side of the road; numLanes indicates the number of lanes on the side of the road; index indicates the lane number. Note that the lane number starts from 0, that is, index = "0" indicates the first lane; changeLeft indicates whether the vehicles in the lane can change lanes to the left, and the value is "no" or "all". "no" means that all vehicles cannot change lanes to the left, and "all" means that all vehicles can change lanes to the left; changeRight indicates whether the vehicles in the lane can turn right, and the value is "no" or "all". "no" means that all vehicles cannot change lanes to the right, and "all" means that all vehicles can change lanes to the right.
[0062] The lane connection relationship indicates the corresponding relationship between the lanes of two adjacent road sides that the vehicle passes through. This can predict the direction in which the vehicle can travel and determine the traffic congestion situation.
[0063] It is understandable that the target road network directed graph is generated according to each road attribute contained in the road network data, including:
[0064] Extracting node attributes and edge attributes from the road network data respectively to determine a candidate road network directed graph; the candidate road network directed graph includes a plurality of candidate road nodes and a first candidate edge connecting two adjacent candidate road nodes;
[0065] Determine the node in-and-out degrees of each first candidate edge according to the node attributes of the candidate road nodes and the edge attributes of the first candidate edges;
[0066] Determine the first candidate edge whose node in-degree is greater than a preset in-degree threshold as a candidate cross edge;
[0067] According to each candidate intersection edge, multiple candidate intersection edges that can form an intersection are determined, and corresponding directed closed-loop subgraphs are generated according to multiple candidate intersection edges of the same intersection;
[0068] According to the directed closed-loop subgraph, the candidate road network directed graph is updated to obtain the target road network directed graph, wherein the target road network directed graph is a directed graph obtained by removing the candidate cross edges of the directed closed-loop subgraph from the candidate road network directed graph.
[0069] Compared with the deep learning-based method of identifying the number of lanes, lane turn landmark types, lane line types and other road attribute element data, by constructing a directed closed-loop subgraph and a candidate road network directed graph, it is possible to rely on the road network topology without human intervention and focus on solving the problem of automatically obtaining intersection attribute elements and lane-level connection relationships, thereby automatically generating a .net.xml simulation road network that meets the format requirements of the SUMO traffic simulation software at low cost and high efficiency.
[0070] The node in-degree indicates the total number of lane edges entering and exiting the road edge. For example, at an intersection, as shown in FIG3 , the boundary of the intersection can be regarded as a road edge. In some embodiments, a road edge with an edge length less than or equal to a set threshold (such as 50 meters) can be regarded as a potential intersection edge. When the node in-degree of the intersection edge is greater than the preset in-degree threshold, it indicates that it is more likely to be at the intersection.
[0071] The in-degree threshold can be set based on human experience. Generally, the in-degree of an intersection node is at least 3, so the in-degree threshold can be set to 3.
[0072] Whether an intersection can be formed can be determined by whether a loop can be formed between each candidate intersection edge. Therefore, by first screening out the candidate intersection edges and then determining whether a loop is formed between the candidate intersection edges, the intersection edges that are not intersections can be further eliminated to reduce the efficiency of intersection determination.
[0073] By deleting each candidate cross edge of the directed closed-loop subgraph in the candidate road network directed graph, the efficiency of lane connection relationship analysis can be improved, and the difficulty of traffic strategy analysis of the target simulation road network can be reduced.
[0074] Exemplarily, the target road network directed graph is generated as follows:
[0075] Obtain road network data, which includes the attributes of multiple road segments. Each road segment attribute includes at least the number of lanes, lane type, lane turn landmark type, and road node coordinates. Then, based on the road segment attributes of each road, construct a candidate road network directed graph G (V, E, P) of the GIS road network. V ,P E ), specifically including the following steps:
[0076] 1) Convert the attributes of n road sections in the road network data into a candidate road network directed graph G(V, E, P V ,P E ).
[0077] Where V is a node set {v1,v2,v3,v4,...v n}; E is the edge set {e1,e2,e3,e4,...e n};P V is the attribute value set of the node, including three attribute values: node identifier i, x coordinate value, y coordinate value, etc.; P E is the attribute value set of the edge, including the road identifier j and the starting node identifier v i , terminal node identifier v j , number of lanes, lane line type, lane turn landmark type, and edge length.
[0078] 2) Statistical directed graph G(V,E,P V ,P E ) is the in-degree size of each road node.
[0079] 3) Initial screening to obtain the edge set E of potential intersections 1 .
[0080] The edge of the potential intersection is defined as the edge length less than or equal to the set threshold (such as 50 meters) and the node in-and-out degree of the starting and ending points of the edge is greater than or equal to 3. V ,P E ) to initially screen out the edges of potential intersections and construct a new edge set E 1 ;
[0081] 4) Construct a directed graph of potential intersections
[0082] Based on the new edge set E 1 , forming a new directed graph Since the directed graph can more efficiently determine the set of road edges, the edge set E can be 1 Convert to directed graph G 1 Identify intersections.
[0083] 5) Extract the directed closed-loop subgraph of each intersection
[0084] In the new directed graph Extract all directed closed-loop subgraphs from Each directed closed subgraph Represents an intersection.
[0085] 6) Based on directed closed-loop subgraph Update the candidate network directed graph G(V,E,P V ,P E ), and get the updated G(V,E,P V ,P E ) as the target road network directed graph.
[0086] It can be understood that according to the directed closed-loop subgraph, the candidate road network directed graph is updated to obtain the target road network directed graph, including:
[0087] Traverse each directed closed-loop subgraph, and delete each candidate cross edge in the traversed directed closed-loop subgraph in the candidate road network directed graph;
[0088] The coordinates of each road node in the same directed closed-loop subgraph are averaged and the Figure 1 A corresponding mean coordinate point;
[0089] Update the starting point of the road edge in the downstream direction directly connected to the endpoint of each deleted candidate intersection edge to the corresponding mean coordinate point;
[0090] Update the starting point of the road edge in the upstream direction directly connected to the endpoint of each deleted candidate intersection edge to the corresponding mean coordinate point;
[0091] In the candidate road network directed graph, the information of each road node in the directed closed-loop subgraph is deleted and the mean coordinate point is added.
[0092] The upstream direction and the downstream direction are both defined for the direction in which the vehicle is traveling. The downstream edge is the destination edge in the upstream direction, and the upstream edge is the starting edge in the downstream direction. When a vehicle travels from road 1 to road 2, road 1 is the upstream direction of road 2, and road 2 is the downstream direction of road 1. For example, road 2 is the downstream edge of road 1, and road 1 is the upstream edge of road 2.
[0093] By updating the connection coordinates of the road nodes after deleting the edges, the road nodes can be retained while facilitating the analysis of subsequent turning connection relationships.
[0094] Exemplarily, assuming there are k directed closed-loop subgraphs, the following processing steps are performed for each directed closed-loop subgraph:
[0095] 1) In the candidate network directed graph G(V,E,P V ,P E ) is a directed closed subgraph The edge set of the cross edges of ; is a directed closed subgraph The attribute set of the cross edges;
[0096] 2) In the candidate network directed graph G(V,E,P V ,P E ), update and The starting points of other directly connected downstream edges are That is, for the i-th directed closed loop subgraph of The intersection ratio edge and the starting point of other downstream edges are set to
[0097]
[0098] 3) In the candidate network directed graph G(V,E,P V ,P E ), update and The endpoints of other directly connected upstream edges are That is, for the i-th directed closed loop subgraph of The intersection ratio edge and the starting point of other downstream edges are set to
[0099]
[0100] 4) In the candidate network directed graph G(V,E,P V ,P E ), update the node The coordinates of The average value of all node coordinates. By setting the average value, each downstream edge and the upper right edge that are directly connected are connected to the center of the shape formed by the intersection. That is, assuming that the i-th directed closed loop subgraph The coordinates of each road node are L1~Lm; then Represents ((L1.x+...Lm.x) / m, (L1.y+...Lm.y) / m).
[0101] 5) In the candidate network directed graph G(V,E,P V ,P E ), delete The nodes contained in outside.
[0102] It can be understood that based on the lane turning attribute corresponding to each edge in the target road network directed graph, the lane connection relationship between any two adjacent edges is determined, including:
[0103] Each road edge in the directed graph of the target road network is traversed in sequence as a second candidate edge, and a downstream edge set corresponding to each second candidate edge is determined according to the lane turning attribute of each second candidate edge;
[0104] Determine, according to the turning attributes of each lane and the corresponding downstream edge set, a turning relationship between each second candidate edge and each corresponding downstream edge;
[0105] A lane connection relationship between any two adjacent edges is generated according to the turning relationship between each second candidate edge and each corresponding downstream edge, and the lane turning attributes of the second candidate edge and the corresponding downstream edge.
[0106] The lane turning attributes record lane turning related data, including the lane turning landmark type.
[0107] For example, if the first lane with edge number 9 is connected to the second lane with edge number 65, the lane connection relationship is as follows:<connect ion from="9"to="65"fromLane="1"toLane="2" / > .
[0108] The downstream edge set is set in one-to-one correspondence with the second candidate edge. The downstream edge set is a set of road edges on which each lane in the corresponding second candidate edge can travel in the downstream direction.
[0109] It can be understood that, according to the turning attributes of each lane and the corresponding set of downstream edges, the turning relationship between each second candidate edge and each corresponding downstream edge is determined, including:
[0110] Each edge in the downstream edge set is taken as a candidate turning edge;
[0111] According to the turning attributes of each lane, the counterclockwise angle between each second candidate edge and each corresponding candidate turning edge is calculated;
[0112] According to the counterclockwise angle, a turning relationship between the second candidate edge and each corresponding candidate turning edge is determined, wherein each turning relationship is one of a U-turn turning relationship, a left turn turning relationship, a straight turn turning relationship, and a right turn turning relationship.
[0113] It is understandable that the counterclockwise angle may be determined based on the starting point coordinates and the ending point coordinates of the second candidate edge and the coordinates of the connection point with each corresponding candidate turning edge.
[0114] The embodiment of the present application does not limit the relationship between the U-turn steering relationship, the left turn steering relationship, the straight turn steering relationship, and the right turn steering relationship and the counterclockwise angle, and those skilled in the art can selectively set it according to the actual road conditions. i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 150° and 210°. i To the candidate turning edge The turning relationship is a U-turn turning relationship; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 30° and 150°. i To the candidate turning edge The turning relationship is a left turning relationship; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 0°-30° and 330°-360°. i To the candidate turning edge The turning relationship is a straight turning relationship; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 210° and 330°. i To the candidate turning edge The turning relationship is a right turn.
[0115] The second candidate edge e i And the corresponding candidate turning edges The calculation method of the counterclockwise angle θ is as follows:
[0116]
[0117] The calculation formulas for k and n are as follows:
[0118]
[0119] n=(x2-x1)·(y4-y3)-(x4-x3)·(y2-y1)
[0120] Among them, x1, y1 are the second candidate edge e i The starting point x, y coordinates; x2, y2 are the second candidate edge e i The x and y coordinates of the end point; x3 and y3 are the downstream edges The starting point x, y coordinates; x4, y4 are candidate turning edges The x,y coordinates of the end point; π is radians, expressed as 180°.
[0121] It can be understood that, according to the turning relationship between each second candidate edge and each corresponding downstream edge, and the lane turning attributes of the second candidate edge and the corresponding downstream edge, a lane connection relationship between any two adjacent edges is generated, including:
[0122] Determine the number of turning lanes of the second candidate edge at different turning relationships according to the lane turning attribute of the second candidate edge, and determine the number of exit lanes of the downstream edge at the turning relationship according to the lane attribute of the downstream edge;
[0123] The downstream edge whose turning relationship with the second candidate edge is a non-straight turning relationship is used as the corresponding first target downstream edge;
[0124] When the number of turning lanes of the second candidate edge turning toward the first target downstream edge is less than or equal to the number of exit lanes of the corresponding first target downstream edge and the second candidate edge has multiple turning relationships, each turning lane in the second candidate edge turning toward the first target downstream edge is sequentially connected with each corresponding lane in the first target downstream edge one by one to obtain a lane connection relationship between the second candidate edge and the first target downstream edge;
[0125] When the number of turning lanes of the second candidate edge turning toward the first target downstream edge is greater than the number of corresponding exit lanes of the first target downstream edge and there are multiple turning relationships of the second candidate edge, each lane in the first target downstream edge that supports the turning of the second candidate edge is sequentially connected to a corresponding turning lane in the second candidate edge, and the remaining turning lanes in the second candidate edge turning toward the first target downstream edge are all connected to the corresponding outermost lanes in the first target downstream edge, so as to obtain the lane connection relationship between the second candidate edge and the first target downstream edge.
[0126] The second candidate edge has a plurality of turn relations indicating that it is a road edge at an intersection. The outermost lane is the last lane connected when the road edges are connected sequentially.
[0127] When the turning relationship with the second candidate edge is a non-straight turning relationship, the lane connection rules of the intersection entrance and exit lanes need to be considered: among which, the non-straight relationship includes three types: left turn turning relationship, U-turn turning relationship and right turn turning relationship.
[0128] Take the first target downstream edge as the downstream edge For example, when the second candidate edge e i To the downstream side The turning relationship is left turn / U-turn, and the e i The left turn / U-turn lane in the The lanes in the diagram are connected accordingly. There are two situations, as follows:
[0129] Case 1: e i The number of U-turn / left-turn lanes is less than or equal to Number of exit lanes, see Figure 3a As shown, e i The second lane is the left-turn lane (i.e. the turning lane corresponding to the left-turn relationship), and the number of left-turn lanes is 1. There are 3 lanes, that is, the number of exit lanes is 3. When the lanes are connected in sequence, e i The second lane of The third lane of the connection, that is, e i The second lane of Connect to the first exit lane in the upstream direction.
[0130] Case 2: e i The number of U-turn / left-turn lanes is greater than The number of exit lanes, such as Figure 3b As shown, e i Lanes 1, 2, and 3 are all left-turn lanes, and there are 3 left-turn lanes in total. There are 2 lanes, and when the lanes are connected sequentially, e i Lane 3 and The second lane connection (i.e. e i The first left turn lane The first exit lane is connected to the i The second lane of The first lane of the connection, e i Lane 1 and The 1st lane connection; The first lane is The outermost lane.
[0131] Similarly, for a scenario where the steering system is a U-turn, the lane connection relationship can be determined by referring to the above method.
[0132] Lane connection rules for intersection entrance and exit lanes: When the second candidate edge e i To the first target downstream edge The turning relationship is right turn; the forward direction is from right to left, and the second candidate edge e i The right turn lane in the first target lane The lanes in the corresponding connection. There are two situations at this time.
[0133] Case 1: e i The number of right-turn lanes is less than or equal to The number of exit lanes, such as Figure 5a As shown, e i The first lane is the right-turn lane (that is, the turning lane corresponding to the right-turn direction). There are 3 lanes, connected sequentially, e i Lane 1 and The 1st lane connection; The first lane is the upstream lane when turning right. The first lane.
[0134] Case 2: e i The number of right turn lanes is greater than The number of exit lanes, such as Figure 5b As shown, e i Lanes 1, 2, and 3 are all right-turn lanes. If there are 2 lanes, then when connected sequentially, e i Lane 1 and The first lane of the connection, e i The second lane of The second lane connects to i The third lane on the upstream side and The 2nd lane connects.
[0135] Therefore, by analyzing the relationship between the number of lanes in the turning relationship and the number of exit lanes of the downstream edge for each non-straight turning relationship, the lane connection relationship between each second candidate edge and the corresponding downstream edge can be constructed. Figure 3a , Figure 3b You can get the left turn lane connection relationship, refer to Figure 5a and Figure 5b The right turn lane connection relationship can be obtained.
[0136] It can be understood that, according to the turning relationship between each second candidate edge and each corresponding downstream edge, and the lane turning attributes of the second candidate edge and the corresponding downstream edge, generating the lane connection relationship between any two adjacent edges also includes at least one of the following:
[0137] The downstream edge whose turning relationship with the second candidate edge is a straight-turning relationship is used as the corresponding second target downstream edge;
[0138] When there are multiple turning relations of the second candidate edge, a turning reserved lane of the second target downstream edge is obtained, and the remaining lanes of the second target downstream edge except the turning reserved lane are sequentially connected to the straight lane of the second candidate edge to obtain a lane connection relationship between the second candidate edge and the second target downstream edge;
[0139] When the number of lanes of the second candidate edge is greater than the number of exit lanes of the second target downstream edge and the turning relationships of the second candidate edge are all straight-line turning relationships, each through lane in the second target downstream edge is sequentially connected to a through lane in the second candidate edge and the remaining through lanes in the second candidate edge are connected to the outermost through lane in the second target downstream edge to obtain a lane connection relationship between the second candidate edge and the second target downstream edge;
[0140] When the number of lanes of the second candidate edge is less than or equal to the number of exit lanes of the second target downstream edge and the turning relationships of the second candidate edge are all straight turning relationships, each through lane of the second candidate edge is sequentially connected to each through lane of the second target downstream edge one by one to obtain the lane connection relationship between the second candidate edge and the second target downstream edge.
[0141] When there are multiple turning relationships for the second candidate edge, the lane connection rules of the intersection entrance and exit lanes should be followed: that is, when the edge e i To the downstream side The turning relationship is a straight turning relationship. In order to eliminate the lateral left turn to the corresponding downstream edge Traffic going straight to the downstream side To interfere with the traffic flow, it is necessary to analyze the two situations: the number of through lanes + the number of lateral left-turn lanes is less than or equal to the number of exit lanes and the number of through lanes + the number of lateral left-turn lanes is greater than the number of exit lanes.
[0142] The downstream edge of the second target The other upstream edge of k For example, the following is an example:
[0143] Case 1: e i The number of straight lanes + e k The number of lateral left-turn lanes is less than or equal to Number of exit lanes, e.g. Figure 4a As shown, The sideways turn to the left and downstream side should be eliminated After the lane, connect e i The straight lane and The remaining lanes are connected sequentially from left to right in the forward direction. i The straight lanes in The remaining lanes in correspond to connections. Figure 4a As shown, e i The second lane in the middle is a straight-going turning lane. There are 3 lanes, and 1 lane on the side to turn left Then i Lane 2 and downstream edge The 2nd lane connects.
[0144] Case 2: e i The number of straight lanes + e k The number of lateral left-turn lanes is greater than Number of exit lanes. If there is a conflict between straight-moving vehicles and left-turning vehicles on the side, k lanes need to be eliminated and then e lanes need to be connected in sequence. i and For example, if the lane is from the left side in the forward direction, the downstream edge is removed from the left side in the forward direction. After the k lanes in the forward direction, the upstream edge e i The straight lane in the downstream lane is connected to The lanes in the corresponding connection, k is calculated as follows: k = max (downstream edge Number of exit lanes - upstream edge e i The number of straight lanes in ,0). At this time, if Figure 4b As shown, e i The 1st and 2nd lanes are straight-ahead lanes. There are 2 lanes, and 1 lane on the side to turn left Then k=max(2-2,0)=0, the downstream edge No lane needs to be removed, so the upstream edge e i Lane 2 and downstream edge The second lane of the connection, the upstream edge e i Lane 1 and downstream edge The 2nd lane connects.
[0145] The turning relationships of the second candidate edge are all straight-line turning relationships, and the lane connection relationship should follow the lane connection rules between road sections. Then the lanes between the second candidate edge and the corresponding downstream edge can be connected sequentially. The sequential connection can be from left to right in the forward direction. For example, the second candidate edge is e i , the downstream edge of the second target is For example, the following example:
[0146] Case 1: e i The number of lanes is less than or equal to The number of exit lanes, such as Figure 6a As shown, e i There are 3 lanes. There are 4 lanes, then e i Lane 3 and The 4th lane connects to; e i The second lane of The 3rd lane connects to; e i Lane 1 and The second lane connects to i Lane 1 and The 1st lane connection.
[0147] Case 2: e i The number of lanes is greater than The number of exit lanes, such as Figure 6b As shown, e i There are 4 lanes. There are 3 lanes, then e i Lane 4 and The 3rd lane connects to; e i Lane 3 and The second lane connects to i The second lane of The first lane of the connection; e i Lane 1 and The 1st lane connection.
[0148] At this time, refer to the above Figure 3a to Figure 6b , we can get the lane connection relationship between each turning relationship on each road edge and the corresponding downstream edge.
[0149] The turn reserve lane is determined by the following steps:
[0150] The number of interfering lanes of the second candidate edge is obtained according to the sum of the number of straight lanes of the second candidate edge and the number of left-turn lanes from other upstream edges of the second target downstream edge to the second target downstream edge;
[0151] When the number of interfering lanes is less than or equal to the number of exit lanes of the corresponding second target downstream edge, the number of left-turn lanes from other upstream edges of the second target downstream edge to the second target downstream edge is used as the number of turn reserved lanes of the second target downstream edge;
[0152] When the number of interfering lanes is less than or equal to the number of exit lanes of the corresponding second target downstream edge, the reserved turning lane is determined according to the lane difference between the number of exit lanes of the first target downstream edge and the number of turning lanes of the second candidate edge in the straight direction.
[0153] Refer to the following Figure 7 The construction process of the target simulation road network of an embodiment of the present application is described as follows:
[0154] S1. Input road network data:
[0155] The road network data is required to be in .geojson or .shp format. The road network data includes the segment attribute values of multiple road sides. Each segment attribute includes at least three attribute values: the number of lanes, the lane line type, and the lane turn landmark type. The segment attribute values can be shown in Table 1.
[0156] S2. Construct the candidate road network directed graph G((V,E,P V ,P e ):
[0157] Convert the road network data into a candidate road network directed graph G(V,E,P V ,P E ); where V is a node set {v1,v2,v3,v4,...v n}; E is the edge set {e1,e2,e3,e4,...e n};P V is the attribute value set of the node, including three attribute values: node identifier i, x coordinate value, y coordinate value, etc.; P E is the attribute value set of the edge, including the road identifier j and the starting node identifier v i , terminal node identifier v j , number of lanes, lane line type, lane turn landmark type, and edge length.
[0158] S3. Identify intersections:
[0159] 1) Statistical candidate road network directed graph (V, E, P V ,P E ) The in-and-out degree of each road node;
[0160] 2) Initial screening to obtain the edge set E of potential intersections 1 :
[0161] The crossing edge of a potential intersection is defined as an edge whose length is less than or equal to a set threshold (such as 50 meters) and the node in-and-out degree of the starting and ending points of the crossing edge is greater than or equal to 3. V ,P E ) to initially screen out the cross edges of potential intersections and construct a new edge set E 1 ;
[0162] 3) Construct a directed graph of potential intersections
[0163] Based on the new edge set E 1 , forming a new directed graph
[0164] 4) Extract the directed closed-loop subgraph of each intersection
[0165] In the new directed graph Extract all directed closed-loop subgraphs from Each directed closed subgraph Represents an intersection.
[0166] S4, intersection node aggregation, update the directed graph G(V,E,P V ,P E ):
[0167] For each directed closed subgraph in S2 All the traversals are performed according to the following processing steps. After traversing all directed closed-loop subgraphs We can get the updated directed graph G(V,E,P V ,P E ):
[0168] 1) In the candidate network directed graph G(V,E,P V ,P E )
[0169] 2) In the candidate network directed graph G(V,E,P v ,P E ), update and The starting points of other directly connected downstream edges are
[0170] 3) In the candidate network directed graph G(V,E,P V ,P E ), update and The endpoints of other directly connected upstream edges are
[0171] 4) In the candidate network directed graph G(V,E,PV ,P E ), update the node The coordinates of The average value of all node coordinates;
[0172] 5) In the candidate network directed graph G(V,E,P V ,P E ), delete The nodes contained in outside.
[0173] S5.1. Build the road network node attribute file:
[0174] Traverse the updated G(V,E,P V ,P E ), extract the node identifier i, x-coordinate value, y-coordinate value and other three attribute values of the node, define each road node according to the format, and combine them to form a road network node attribute file.
[0175] If the node number is 373, the x-coordinate value is 0, and the y-coordinate value is 0, then the node is defined in the format as follows:
[0176] <node id="373"x="0"y="0" / > ;
[0177] S5.2. Build the road network edge attribute file:
[0178] Traverse the updated G(V,E,P V ,P E ), extract the road identifier j, starting node identifier, end node identifier, number of lanes, lane line type and other attribute values of the road edge, define each edge according to the format, and combine them to form a road network edge attribute file. For example, if the edge number = 2, the starting node number = 40, the end node number = 39, the number of lanes = 3, and the lane line type = {1: [0,0], 2: [0,0], 3: [0,1]}, then the edge is defined according to the format, as shown in the following example:
[0179] <edge id="2"from="40"to="39"numLanes="3">
[0180] <l ane index="0"changeLeft="no"changeRight="no" / >
[0181] <l ane index="1"changeLeft="no"changeRight="no" / >
[0182] <l ane index="2"changeLeft="no"changeRight="a l l" / >
[0183]
[0184] Where id indicates the road sign on the side of the road; from indicates the starting node sign on the side of the road; to indicates the end node sign on the side of the road; numLanes indicates the number of lanes on the side of the road; index indicates the lane number. Note that the lane number starts from 0, that is, index = "0" indicates the first lane; changeLeft indicates whether the vehicles in the lane can change lanes to the left, and the value is "no" or "all". "no" means that all vehicles cannot change lanes to the left, and "all" means that all vehicles can change lanes to the left; changeRight indicates whether the vehicles in the lane can turn right, and the value is "no" or "all". "no" means that all vehicles cannot change lanes to the right, and "all" means that all vehicles can change lanes to the right.
[0185] S5.3. Construct road network lane connection relationship file:
[0186] Traverse the updated G(V,E,P V ,P E ) for each second candidate edge e i , construct the second candidate edge e i The lane connectivity between the downstream edges that are directly connected to this edge.
[0187] 1) According to the second candidate edge e i Attribute data of the second candidate edge e i The lane turning distribution, that is, which lanes can make U-turns, which lanes can turn left, which lanes can go straight, and which lanes can turn right.
[0188] 2) In G(V,E,P V ,P E ) to find the second candidate edge e i The set of directly connected downstream edges
[0189] 3) Calculate the second candidate edge e in sequence i With downstream edge The counterclockwise angle of the side e is determined according to the turning relationship judgment rule. i To the downstream side The steering relationship is mainly defined as U-turn, left turn, straight going and right turn.
[0190] 4) According to the second candidate edge ei With downstream edge The turning relationship, the second candidate edge e i Lane turning distribution, downstream edge The number of lanes, according to the lane connection rules, generates the second candidate edge e in the format i With downstream edge Lane connection relationship.
[0191] For example, if lane 1 with edge number 9 is connected to lane 2 with edge number 65, the lane connection relationship is defined in the format as follows:
[0192] <connect ion from="9"to="65"fromLane="1"toLane="2" / > .
[0193] The steering relationship determination rules are as follows:
[0194] Calculate the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 150° and 210°. i To the candidate turning edge The turning relationship is a U-turn; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 30° and 150°. i To the candidate turning edge The turning relationship is left turn; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 0°-30° and 330°-360°. i To the candidate turning edge The turning relationship is straight; when the second candidate edge e i With candidate turning edge The counterclockwise angle of the second candidate edge e is between 210° and 330°. i To the candidate turning edge The turning relationship is right turn. i With candidate turning edge The calculation method of the counterclockwise angle θ is as follows:
[0195]
[0196] The calculation formulas for k and n are as follows:
[0197]
[0198] n=(x2-x1)·(y4-y3)-(x4-x3)·(y2-y1)
[0199] Among them, x1, y1 are the second candidate edge e i The starting point x, y coordinates; x2, y2 are the second candidate edge e i The x and y coordinates of the end point; x3 and y3 are the downstream edges The starting point x, y coordinates; x4, y4 are candidate turning edges The x,y coordinates of the end point; π is radians, expressed as 180°.
[0200] The lane connection rules are as follows:
[0201] Lane connection rules are divided into lane connection rules for intersection entrances and exits and lane connection rules between road sections. i The end node is the intersection node, and the lane connection relationship is constructed according to the lane connection rules of the intersection entrance and exit lanes. Otherwise, the lane connection relationship is constructed according to the lane connection rules between road sections.
[0202] Among them, the lane connection rule of the intersection entrance and exit lanes is: when the second candidate edge e i To the downstream side The turning relationship is left turn / U-turn; according to the forward direction from left to right, the upstream edge e i The left turn / U-turn lane in the The lanes in the corresponding connection are divided into two situations.
[0203] Case 1: e i The number of U-turn / left-turn lanes is less than or equal to Number of exit lanes, see Figure 3a As shown, e i The second lane is the left turn lane. When there are 3 lanes, e i The second lane of The 3rd lane connects.
[0204] Case 2: e i The number of U-turn / left-turn lanes is greater than The number of exit lanes, such as Figure 3b As shown, e i Lanes 1, 2, and 3 are all left-turn lanes. There are 2 lanes, e i Lane 3 and The second lane connects to i The second lane of The 1st lane connection.
[0205] Among them, the lane connection rules for the entrance and exit lanes of the intersection are: when the edge e i To the downstream side The turning relationship is straight. In order to eliminate the sideways turn to the left Traffic going straight to the side The interference of traffic flow needs to be considered in two situations.
[0206] Case 1: e i The number of straight lanes + e k The number of lateral left-turn lanes is less than or equal to Number of exit lanes, e.g. Figure 4a As shown, The sideways turn to the left and downstream side should be eliminated After the lane, from left to right in the direction of travel, move e i The straight lanes in The remaining lanes in correspond to connections. Figure 4a As shown, e i The second lane in the middle is a straight-going turning lane. There are 3 lanes, and 1 lane on the side to turn left Then i Lane 2 and downstream edge The 2nd lane connects.
[0207] Case 2: e i The number of straight lanes + e k The number of lateral left-turn lanes is greater than Number of exit lanes. If there is a conflict between straight-moving vehicles and left-turning vehicles on the side, k lanes need to be eliminated and then e lanes need to be connected in sequence. i and Lanes, remove the downstream edge starting from the left in the forward direction After the k lanes in the forward direction, the upstream edge e i The straight lane in the downstream lane is connected to The lanes in the corresponding connection, where k = max (downstream edge Number of exit lanes - upstream edge e i The number of straight lanes in ,0). At this time, if Figure 4b As shown, e i The 1st and 2nd lanes are straight-ahead lanes. There are 2 lanes, and 1 lane on the side to turn left Then k=max(2-2,0)=0, the downstream edge No lane needs to be removed, so the upstream edge e i Lane 2 and downstream edge The second lane of the connection, the upstream edge e i Lane 1 and downstream edge The 2nd lane connects.
[0208] Among them, the lane connection rules for the entrance and exit lanes of the intersection are: when the edge e i To the downstream side The turning relationship is to turn right and follow the forward direction from right to left. i The right turn lane in the The lanes in the corresponding connection are divided into two situations.
[0209] Case 1: e i The number of right-turn lanes is less than or equal to The number of exit lanes, such as Figure 5a As shown, e i The first lane is the right turn lane. There are 3 lanes, e i Lane 1 and The 1st lane connection; The first lane is the upstream lane when turning right. The first lane.
[0210] Case 2: e i The number of right turn lanes is greater than The number of exit lanes, such as Figure 5b As shown, e i Lanes 1, 2, and 3 are all right-turn lanes. There are 2 lanes, e i Lane 1 and The first lane of the connection, e i The second lane of The second lane connects to i The third lane on the upstream side and The 2nd lane connects.
[0211] Among them, the lane connection rule between road sections is to connect the upstream edge e from left to right in the forward direction. i The lanes in the downstream side are The lanes in the corresponding connection. There are two situations:
[0212] Case 1: e i The number of lanes is less than or equal to The number of exit lanes, such as Figure 6a As shown, e i There are 3 lanes. There are 4 lanes, then e i Lane 3 and The 4th lane connects to; e i The second lane of The 3rd lane connects to; e i Lane 1 and The second lane connects toi Lane 1 and The 1st lane connection.
[0213] Case 2: e i The number of lanes is greater than The number of exit lanes, such as Figure 6b As shown, e i There are 4 lanes. There are 3 lanes, then e i Lane 4 and The 3rd lane connects to; e i Lane 3 and The second lane connects to; e i The second lane of The first lane of the connection; e i Lane 1 and The 1st lane connection.
[0214] S6. Construct the target simulation road network:
[0215] Based on the road network node attribute file, road network edge attribute file, and road network lane connection relationship file, the netconvert tool provided in SUMO is used to generate the target simulation road network. Figure 8 shown.
[0216] The above method of the present application is mainly applied to large-scale urban traffic simulation scenarios. By using the road network data to automatically generate a simulated road network, on the one hand, the human modeling cost of the traffic simulation road network in the large-scale urban traffic simulation scenario can be greatly reduced; on the other hand, according to the adjustment and changes of the real road network, by adjusting the relevant attribute data in the GIS road network, the simulated road network can be quickly updated at low cost to ensure the fidelity of the traffic simulation road network data; at the same time, for the scenario of comparing and evaluating different road network traffic organization schemes under the traffic improvement scenario, the simulated road network under different road network traffic organizations can be quickly generated at low cost, and the simulation decision-making application can be efficiently supported.
[0217] It is understandable that the embodiment of the present application also provides a method for generating a traffic strategy, the method comprising:
[0218] Obtain a target simulated road network, wherein the target simulated road network can be obtained by the simulated road network generation method provided in the previous embodiment. The construction structure of the target simulated road network can refer to the previous embodiment and will not be described in detail here.
[0219] Determining a target road area to be simulated in a target simulation road network;
[0220] Carry out traffic flow simulation in the target road area and output simulation results;
[0221] Determine the traffic strategy based on the simulation results.
[0222] Reference Figure 8 and Fig. 9 As shown, when traffic strategy needs to be determined, you can import Figure 8 In the target simulation road network, and select the area A to be analyzed, you can get Fig. 9 As shown in the simulation diagram, at this time, based on Fig. 9 The middle lane connection relationship simulates the vehicle driving state under different traffic flows to analyze and predict the traffic flow and congestion at each traffic light, and then determine the traffic strategy. In other embodiments, the existing traffic strategy can also be evaluated based on the analysis and prediction of the traffic flow and congestion at each traffic light.
[0223] Reference Fig.10 As shown, an embodiment of the present application further provides an electronic device, including:
[0224] One or more processors 601;
[0225] The memory 602 stores one or more programs. When the one or more programs are executed by the one or more processors 601, the one or more processors 601 implement the method provided in any embodiment of the present application.
[0226] The memory 602 is a non-transient network system that can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 602 may optionally include a memory 602 remotely arranged relative to the processor 601, and these remote memories 602 may be connected to the processor 601 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0227] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 602, and the processor 601 is called to execute the method of the embodiments of this application.
[0228] The processor 601 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0229] In some embodiments, the electronic device further comprises:
[0230] Input / output interface, used to realize information input and output;
[0231] Communication interface, used to realize communication interaction between this device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0232] A bus that transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface, and communication interface);
[0233] The processor 601 , the memory 602 , the input / output interface and the communication interface can be connected to each other in communication within the device via a bus.
[0234] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute a method provided in any embodiment of the present application.
[0235] An embodiment of the present application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes a method provided in any embodiment of the present application.
[0236] The system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0237] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0238] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0239] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process or an execution thread, and a component may be located on a computer or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may communicate, for example, through local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems through signals).
[0240] The above describes some embodiments of the present application with reference to the accompanying drawings, but does not limit the scope of the present invention. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present application.
Claims
1. A method for generating a simulated road network, characterized in that: The simulation road network generation method comprises: Acquire road network data, and generate a target road network directed graph according to each road attribute contained in the road network data, wherein the target road network directed graph includes a plurality of road nodes and edges connecting two adjacent road nodes; Determine the node position information and node identification of each road node in the target road network directed graph, and construct road network node attribute data according to the node position information and node identification of each road node; Determine the road sign and lane attribute corresponding to each edge in the target road network directed graph, and construct road network edge attribute data according to the road sign and lane attribute corresponding to each edge; Determine a lane connection relationship between any two adjacent edges based on a lane turning attribute corresponding to each edge in the directed graph of the target road network; A target simulation road network is constructed according to the road network node attribute data, the road network edge attribute data and the lane connection relationship between any two adjacent edges.
2. The method for generating a simulated road network according to claim 1, characterized in that: The generating a target road network directed graph according to each road attribute included in the road network data comprises: Extracting node attributes and edge attributes from the road network data respectively to determine a candidate road network directed graph; the candidate road network directed graph includes a plurality of candidate road nodes and a first candidate edge connecting two adjacent candidate road nodes; Determining the node in-and-out degrees of each first candidate edge according to the node attributes of the candidate road nodes and the edge attributes of the first candidate edges; Determine the first candidate edge whose node in-degree is greater than a preset in-degree threshold as a candidate cross edge; Determine multiple candidate intersection edges that can form an intersection according to each of the candidate intersection edges, and generate corresponding directed closed-loop subgraphs according to the multiple candidate intersection edges of the same intersection; According to the directed closed-loop subgraph, the candidate road network directed graph is updated to obtain the target road network directed graph, wherein the target road network directed graph is a directed graph obtained by removing candidate cross edges of the directed closed-loop subgraph in the candidate road network directed graph.
3. The method for generating a simulated road network according to claim 2, characterized in that: The updating of the candidate road network directed graph according to the directed closed-loop subgraph to obtain the target road network directed graph includes: Traversing each of the directed closed-loop subgraphs, and deleting each candidate cross edge in the traversed directed closed-loop subgraph in the candidate road network directed graph; Calculating the mean of the coordinates of each road node in the same directed closed-loop subgraph to obtain the mean coordinate points corresponding to the directed closed-loop subgraph one by one; Update the starting point of the road edge in the downstream direction directly connected to the endpoint of each deleted candidate intersection edge to the mean coordinate point; Update the starting point of the road edge in the upstream direction directly connected to the endpoint of each deleted candidate intersection edge to the mean coordinate point; In the candidate road network directed graph, each road node information in the directed closed-loop subgraph is deleted and the mean coordinate point is added.
4. The method for generating a simulated road network according to claim 1, characterized in that: The determining of the lane connection relationship between any two adjacent edges based on the lane turning attribute corresponding to each edge in the target road network directed graph includes: Traversing each road edge in the target road network directed graph as a second candidate edge in sequence and determining a downstream edge set corresponding to each second candidate edge in a one-to-one manner according to a lane turning attribute of each second candidate edge; Determining a turning relationship between each of the second candidate edges and each of the corresponding downstream edges according to each of the lane turning attributes and the corresponding downstream edge set; The lane connection relationship between any two adjacent edges is generated according to the turning relationship between each of the second candidate edges and each corresponding downstream edge, and the lane turning attributes of the second candidate edges and the corresponding downstream edges.
5. The method for generating a simulated road network according to claim 4, characterized in that: The determining, according to each lane turning attribute and the corresponding downstream edge set, a turning relationship between each second candidate edge and each corresponding downstream edge includes: Taking each edge in the downstream edge set as a candidate turning edge; Calculating, according to each lane turning attribute, a counterclockwise angle between each of the second candidate edges and each corresponding candidate turning edge; According to the counterclockwise angle, a steering relationship between the second candidate edge and each corresponding candidate turning edge is determined, wherein each of the steering relationships is one of a U-turn steering relationship, a left turn steering relationship, a straight-ahead steering relationship, and a right turn steering relationship.
6. The method for generating a simulated road network according to claim 4, characterized in that: The generating the lane connection relationship between any two adjacent edges according to the turning relationship between each of the second candidate edges and each corresponding downstream edge, and the lane turning attributes of the second candidate edges and the corresponding downstream edges, comprises: Determine the number of turning lanes of the second candidate edge at different turning relationships according to the lane turning attribute of the second candidate edge, and determine the number of exit lanes of the downstream edge at the corresponding turning relationship according to the lane attribute of the downstream edge; taking a downstream edge having a non-straight turning relationship with the second candidate edge as the corresponding first target downstream edge; When the number of turning lanes of the second candidate edge turning toward the first target downstream edge is less than or equal to the number of corresponding exit lanes of the first target downstream edge and the second candidate edge has multiple turning relationships, each turning lane in the second candidate edge turning toward the first target downstream edge is sequentially connected with each corresponding lane in the first target downstream edge one by one to obtain a lane connection relationship between the second candidate edge and the first target downstream edge; When the number of turning lanes of the second candidate edge turning toward the first target downstream edge is greater than the number of corresponding exit lanes of the first target downstream edge and there are multiple turning relationships of the second candidate edge, each lane in the first target downstream edge supporting the turning of the second candidate edge is sequentially connected with a corresponding turning lane in the second candidate edge, and the remaining turning lanes in the second candidate edge turning toward the first target downstream edge are connected with the corresponding outermost lanes in the first target downstream edge, so as to obtain the lane connection relationship between the second candidate edge and the first target downstream edge.
7. The method for generating a simulated road network according to claim 6, characterized in that: The generating the lane connection relationship between any two adjacent edges according to the turning relationship between each of the second candidate edges and each corresponding downstream edge, and the lane turning attributes of the second candidate edges and the corresponding downstream edges, further includes at least one of the following: The downstream edge whose turning relationship with the second candidate edge is a straight-turning relationship is used as the corresponding second target downstream edge; When there are multiple turning relations of the second candidate edge, a turning reserved lane of the second target downstream edge is obtained, and the remaining lanes of the second target downstream edge except the turning reserved lane are sequentially connected to the straight lane of the second candidate edge to obtain a lane connection relationship between the second candidate edge and the second target downstream edge; When the number of lanes of the second candidate edge is greater than the number of exit lanes of the second target downstream edge and the turning relationships of the second candidate edge are all straight-line turning relationships, sequentially connect each through lane in the second target downstream edge with a through lane in the second candidate edge and connect the remaining through lanes in the second candidate edge with the outermost through lane in the second target downstream edge to obtain a lane connection relationship between the second candidate edge and the second target downstream edge; When the number of lanes of the second candidate edge is less than or equal to the number of exit lanes of the second target downstream edge and the turning relationships of the second candidate edge are all straight turning relationships, each straight lane of the second candidate edge is sequentially connected to each straight lane of the second target downstream edge one by one to obtain a lane connection relationship between the second candidate edge and the second target downstream edge.
8. The method for generating a simulated road network according to claim 7, characterized in that: The reserved turning lane is determined by the following steps: Obtaining the number of interfering lanes of the second candidate edge according to the sum of the number of straight lanes of the second candidate edge and the number of left-turn lanes from other upstream edges of the second target downstream edge to the second target downstream edge; When the number of interfering lanes is less than or equal to the number of corresponding exit lanes of the second target downstream edge, the number of left-turn lanes from other upstream edges of the second target downstream edge to the second target downstream edge is used as the number of turn reserved lanes of the second target downstream edge; When the number of interfering lanes is less than or equal to the corresponding number of exit lanes of the second target downstream edge, the turning reserved lane is determined according to the lane difference between the number of exit lanes of the first target downstream edge and the number of turning lanes of the second candidate edge in the straight direction.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the simulation road network generation method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: It includes storing computer executable instructions, and the computer executable instructions are used to be executed by a processor to implement the simulation road network generation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Road network topology simplification method for traffic organization evaluation
CN115424446A
Road network topology construction method and device, equipment and storage medium
CN117760410A
Method, device and system for predicting traffic parameters of a road network
WO2024030077A1