WO2023226781A1 - 地图生成方法和相关产品 - Google Patents

地图生成方法和相关产品 Download PDF

Info

Publication number
WO2023226781A1
WO2023226781A1 PCT/CN2023/093636 CN2023093636W WO2023226781A1 WO 2023226781 A1 WO2023226781 A1 WO 2023226781A1 CN 2023093636 W CN2023093636 W CN 2023093636W WO 2023226781 A1 WO2023226781 A1 WO 2023226781A1
Authority
WO
WIPO (PCT)
Prior art keywords
traffic
sequence
layer
map
graph structure
Prior art date
Application number
PCT/CN2023/093636
Other languages
English (en)
French (fr)
Inventor
耿卫东
巴腾跃
于航
李书博
冯微伟
韩博
程思源
张洪波
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023226781A1 publication Critical patent/WO2023226781A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Definitions

  • the present application relates to the field of computers, and in particular to a map generation method and related products.
  • High definition map a high-precision, high-freshness, and high-rich electronic map with both absolute and relative accuracy within 1 meter.
  • High-precision maps are called HD maps in English and are defined from the perspective of data accuracy and feature richness. Defined from the perspective of the grading standards of autonomous driving functions, the English name of high-precision map can be called HAD map (highly automated driving map).
  • High-precision maps contain rich information, including road information such as road type, curvature, and lane line location, as well as environmental object information such as roadside infrastructure, obstacles, and traffic signs, as well as real-time dynamic information such as traffic flow and traffic light status information. .
  • the embodiments of this application disclose a map generation method and related products, which can efficiently generate high-precision maps that can be used for autonomous driving simulation evaluation.
  • inventions of the present application provide a map generation method.
  • the method includes: obtaining a traffic expression map.
  • the traffic expression map is used to express a static traffic scene.
  • the traffic expression map includes at least two layers of graph structures. At least two layers of graph structures include a first layer graph structure and a second layer graph structure. The types of nodes in the first layer graph structure are different from the types of nodes in the second layer graph structure; according to the traffic expression
  • a traffic expression map sequence is obtained, and the traffic expression map sequence is a serialized expression of the traffic expression map; according to the traffic expression map sequence, a map sequence is obtained, and the map sequence is a serialized expression of an electronic map; according to The map sequence is used to obtain the electronic map.
  • the traffic expression graph includes a first-layer graph structure and a second-layer graph structure.
  • the types of nodes in the first-layer graph structure are different from the types of nodes in the second-layer graph structure.
  • the traffic expression graph (can be understood as a heterogeneous graph) includes a first-layer graph structure and a second-layer graph structure.
  • the types of nodes in the first-layer graph structure are different from the types of nodes in the second-layer graph structure. Therefore, It can comprehensively express multiple types of elements in static traffic scenes and effectively represent more complex static traffic scenes.
  • the map generation method provided by the embodiment of the present application expresses the static traffic scene through the traffic expression graph, which is in the form of an isomorphic graph (there is only one type of node in the isomorphic graph and the attribute types and number of parameters described by the nodes are the same).
  • the traffic expression graph which is in the form of an isomorphic graph (there is only one type of node in the isomorphic graph and the attribute types and number of parameters described by the nodes are the same).
  • the traffic expression graph sequence includes an element sequence and a constraint sequence
  • the element sequence represents attribute information of nodes in the traffic expression graph
  • the constraint sequence represents the first layer graph.
  • the traffic expression graph sequence includes an element sequence and a constraint sequence.
  • the element sequence represents the attribute information of the nodes in the traffic expression graph.
  • the constraint sequence represents the connection relationship between any two nodes in the first-layer graph structure, as well as any node in the first-layer graph structure and the second-layer graph structure. The connection relationship between any nodes in the graph structure; it can more accurately and effectively express the various elements contained in the static traffic scene and the relationships between various elements in a unified and global manner.
  • obtaining a traffic expression graph sequence according to the traffic expression graph includes: serializing attribute information of one or more nodes in the traffic expression graph to obtain an element sequence;
  • the intra-layer connection relationship and the inter-layer connection relationship in the traffic expression diagram are serialized to obtain a constraint sequence;
  • the intra-layer connection relationship includes the connection relationship between any two nodes in the first layer graph structure,
  • the inter-layer connection relationship includes a connection relationship between any node in the first layer graph structure and any node in the second layer graph structure; the combination of the element sequence and the constraint sequence
  • the connection relationship between layers may be called the inter-layer pointing relationship.
  • the attribute information of each node in the traffic expression graph is serialized to obtain the element sequence; the intra-layer connection relationship and the inter-layer connection relationship in the traffic expression graph are serialized to obtain the constraint sequence; through
  • Each node, intra-layer connection relationship, and inter-layer connection relationship in the traffic expression graph are encoded and described respectively, and a sequence representation obtained by encoding the traffic expression graph is obtained, that is, the traffic expression graph sequence.
  • the traffic expression diagram is a stacked hierarchical diagram, and the first layer diagram structure and the second layer diagram structure are located in different layers (or levels).
  • the traffic expression diagram is a stacked hierarchical diagram.
  • the stacked hierarchical diagram can more accurately and effectively express the relationships between various elements contained in the static traffic scene in a unified and global manner.
  • the first layer graph structure and the second layer graph structure are constructed according to city planning information; the city planning information is used to obtain a city planning map; and the first layer graph structure is determined.
  • the connection relationship between the nodes in the layer graph structure and the nodes in the second layer graph structure is used to obtain the traffic expression graph.
  • the connection relationship between the nodes in the first-layer graph structure and the nodes in the second-layer graph structure is determined, and the traffic expression graph obtained can be regarded as a "stacked" form of multiple layer graphs ( For example, the first-layer graph structure and the second-layer graph structure) are integrated into a traffic expression graph; a traffic expression graph that expresses static traffic scenes can be accurately formed.
  • constructing the first-layer graph structure according to the city planning information includes: extracting corner points in the city planning graph corresponding to the city planning information as vertices, and obtaining multiple vertices. ; Determine the connection relationship between the plurality of vertices to obtain the first layer graph structure.
  • connection relationship between multiple vertices is determined to obtain the first-layer graph structure; the first-layer graph structure can be quickly constructed.
  • constructing the second-layer graph structure according to the urban planning information includes: extracting traffic elements belonging to the first type from the urban planning graph corresponding to the urban planning information.
  • the first type of traffic elements includes: any one of functional areas, intersections, and lane areas; the connection relationship between the first type of traffic elements is determined to obtain the second layer graph structure.
  • the second-layer graph structure is obtained based on the connection relationship between the first type of traffic elements; so that The second layer graph structure and other layer graph structures are used to construct a traffic expression graph expressing static traffic scenes.
  • each node in the first layer graph structure belongs to the first type
  • each node in the second layer graph structure belongs to the second type
  • the first type is the same as the first type.
  • the second type is different.
  • the first layer graph structure and the second layer graph structure are both isomorphic graphs.
  • the first-level graph structure expresses the relationship between each node belonging to the first type and each node belonging to the first type
  • the second-level graph structure expresses each node belonging to the second type and the relationship between each node belonging to the second type.
  • the relationship between the nodes, the traffic expression graph includes the first-layer graph structure and the second-layer graph structure, which can more accurately and effectively express the various elements contained in the static traffic scene in a unified and global manner.
  • the map sequence has a first element sequence and a second element sequence, the length of the first element sequence and the length of the second element sequence are different, and the first element sequence represents the A traffic element, the second element sequence represents a second traffic element, the type of the first traffic element and the type of the second traffic element are different, the first traffic element and the second traffic element correspond to Traffic elements in the static traffic scene.
  • the first element sequence and the second element sequence have different lengths, and different types of traffic elements are represented by sequences of variable lengths, which can accurately represent different types of traffic elements.
  • the map sequence further includes a first constraint sequence and a second constraint sequence.
  • the length of the first constraint sequence and the length of the second constraint sequence are different.
  • the first constraint sequence represents the connection relationship between the third traffic element and the fourth traffic element
  • the second constraint sequence represents the connection relationship between the fifth traffic element and the sixth traffic element
  • the third traffic element, the fourth traffic element The elements, the fifth traffic element, and the sixth traffic element correspond to traffic elements in the static traffic scene.
  • first constraint sequence and the second constraint sequence have different lengths, and different types of connection relationships are represented by sequences of variable lengths, which can accurately represent different types of connection relationships.
  • the traffic expression map sequence represents functional areas (land use types), roads, and intersection information in the urban planning map, and the map sequence represents crosswalks, sidewalks, traffic lights, and parking lines. , one or more of a driveway, a road accessory. Map sequences represent more detailed road network information.
  • the urban planning map includes land types, roads, etc., but does not include high-precision map information such as specific lanes and road attachments; the map sequence represents high-precision map information such as lanes and road attachments.
  • the traffic expression diagram sequence represents the functional areas (land use types), roads, and intersection information in the urban planning diagram.
  • the user can generate the corresponding electronic map by inputting the urban planning diagram, which can be efficiently and conveniently generated for use. High-precision map data for autonomous driving simulation evaluation.
  • the electronic map is a high-precision map (or also called a high-precision map).
  • high-precision maps can be generated by inputting city planning maps, which can efficiently and conveniently generate high-precision map data that can be used for autonomous driving simulation evaluation.
  • the traffic expression diagram also includes a third layer graph structure and a fourth layer graph structure, the first layer graph structure, the second layer graph structure, the third layer graph structure
  • the types of nodes in any two-layer graph structures of the fourth-layer graph structure and the fourth-layer graph structure are different.
  • embodiments of the present application provide a map generation device, which has the function of implementing the operations in the method embodiment of the first aspect.
  • the functions described can be implemented by hardware, or can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the device includes: an acquisition unit, configured to acquire a traffic expression graph, where the traffic expression graph is used to express a static traffic scene, where the traffic expression graph includes at least a two-layer graph structure, and the at least The two-layer graph structure includes a first-layer graph structure and a second-layer graph structure, and the types of nodes in the first-layer graph structure are different from the types of nodes in the second-layer graph structure; encoding A unit configured to obtain a traffic expression map sequence based on the traffic expression map sequence, where the traffic expression map sequence is a serialized expression of the traffic expression map sequence; a processing unit configured to obtain a map sequence based on the traffic expression map sequence , the map sequence is a serialized expression of an electronic map; according to the map sequence, the electronic map is obtained.
  • an acquisition unit configured to acquire a traffic expression graph, where the traffic expression graph is used to express a static traffic scene, where the traffic expression graph includes at least a two-layer graph structure, and the at least The two-layer graph structure includes a first-layer
  • the traffic expression graph sequence includes an element sequence and a constraint sequence
  • the element sequence represents attribute information of nodes in the traffic expression graph
  • the constraint sequence represents the first layer graph.
  • the encoding unit is specifically used to serialize the attribute information of one or more nodes in the traffic expression graph to obtain an element sequence; to sequence the layers in the traffic expression graph The inner connection relationship and the inter-layer connection relationship are serialized to obtain a constraint sequence; the intra-layer connection relationship includes the connection relationship between any two nodes in the first layer graph structure, and the inter-layer connection relationship includes all The connection relationship between any node in the first-layer graph structure and any node in the second-layer graph structure; the combination of the element sequence and the constraint sequence is used as the sequence of the traffic expression graph Expression, the traffic expression diagram sequence is obtained.
  • the acquisition unit is specifically used to construct the first layer graph structure and the second layer graph structure according to city planning information; the city planning information is used to obtain the city planning map. ; Determine the connection relationship between the nodes in the first layer graph structure and the nodes in the second layer graph structure to obtain the traffic expression diagram.
  • the acquisition unit is specifically used to extract corner points in the urban planning diagram corresponding to the urban planning information as vertices to obtain multiple vertices; and determine connections between the multiple vertices. relationship to obtain the first layer graph structure.
  • the acquisition unit is specifically configured to extract traffic elements belonging to the first type from the city planning map corresponding to the city planning information.
  • the traffic elements of the first type include: functional areas , intersection, or lane area; determine the connection relationship between the first type of traffic elements, and obtain the second layer graph structure.
  • each node in the first layer graph structure belongs to the first type
  • each node in the second layer graph structure belongs to the second type
  • the first type is the same as the first type.
  • the second type is different.
  • the map sequence includes a first element sequence and a second element sequence, the length of the first element sequence and the length of the second element sequence are different, and the first element sequence represents A first traffic element, the second element sequence represents a second traffic element, the type of the first traffic element is different from the type of the second traffic element, the first traffic element corresponds to the second traffic element Traffic elements in the static traffic scene.
  • the second element sequence further includes a first constraint sequence and a second constraint sequence, the length of the first constraint sequence and the length of the second constraint sequence are different, and the first constraint sequence
  • the constraint sequence represents the connection relationship between the third traffic element and the fourth traffic element
  • the second constraint sequence represents the connection relationship between the fifth traffic element and the sixth traffic element
  • the third traffic element the third traffic element
  • the four traffic elements, the fifth traffic element, and the sixth traffic element correspond to traffic elements in the static traffic scene.
  • the traffic expression map sequence represents functional areas (land use types), roads, and intersection information in the urban planning map, and the map sequence represents crosswalks, sidewalks, traffic lights, and parking lines. , one or more of a driveway, a road accessory. Map sequences represent more detailed road network information.
  • the urban planning map includes land types, roads, etc., but does not include high-precision map information such as specific lanes and road attachments; the map sequence represents high-precision map information such as lanes and road attachments.
  • the electronic map is a high-precision map (or also called a high-precision map).
  • the map generation device further includes: an input unit for inputting the city planning map.
  • the map generation device further includes: an output unit for displaying a global urban planning map; An input unit is used to input a part of the global city planning map selected by the user as the city planning map.
  • the map generation device further includes: a communication unit, configured to receive the city planning map sent by the user through a terminal device, and send the electronic map to the terminal device.
  • the traffic expression diagram also includes a third layer graph structure and a fourth layer graph structure, the first layer graph structure, the second layer graph structure, the third layer graph structure
  • the types of nodes in any two-layer graph structures of the fourth-layer graph structure and the fourth-layer graph structure are different.
  • inventions of the present application provide another map generation device.
  • the map generation device includes a processor, and the processor can be used to execute computer execution instructions stored in the memory, so as to implement the above-mentioned first aspect or the first aspect. Any possible implementation of the method shown is executed.
  • the memory is located outside the above-mentioned map generating device.
  • the memory is located within the above map generating device.
  • the processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.
  • the map generation device further includes an input and output device, which is used to input city planning maps and output electronic maps.
  • inventions of the present application provide another map generation device.
  • the map generation device includes a processing circuit and an interface circuit.
  • the interface circuit is used to obtain data or output data, such as inputting a city planning map and outputting an electronic map; the processing circuit For performing the corresponding method as shown in the above first aspect or any possible implementation of the first aspect
  • the present application provides a computer-readable storage medium, which is used to store a computer program that, when run on a computer, enables the above-mentioned first aspect or any possible implementation of the first aspect. The method shown is executed.
  • the present application provides a computer program product.
  • the computer program product includes a computer program or computer code. When run on a computer, the computer program product enables the above-mentioned first aspect or any possible implementation of the first aspect. The method is executed.
  • Figure 1 is an example of a city planning diagram provided by the embodiment of the present application.
  • Figure 2 is an example of a heterogeneous graph provided by the embodiment of the present application.
  • Figure 3 is an example of a high-precision map visualization screenshot corresponding to the urban planning map
  • Figure 4 is a flow chart of a map generation method provided by an embodiment of the present application.
  • Figure 5A is an example of a vertex layer graph structure provided by an embodiment of the present application.
  • Figure 5B is an example of a lane zone layer graph structure provided by the embodiment of the present application.
  • Figure 5C is an example of an intersection layer graph structure provided by the embodiment of the present application.
  • Figure 5D is an example of a functional layer diagram structure provided by the embodiment of the present application.
  • Figure 6 is a flow chart of another map generation method provided by an embodiment of the present application.
  • Figure 7 is an example of a traffic expression diagram provided by the embodiment of the present application.
  • Figure 8 is an example of the visualization result of an electronic map provided by the embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a map generation device provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • an embodiment means that a particular feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application.
  • the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
  • the static traffic scenes in the urban planning map are expressed in the form of heterogeneous graphs (that is, the static traffic scenes in the urban planning maps are expressed using heterogeneous graphs), which can realize the static traffic scenes.
  • the traffic expression graph is a heterogeneous graph. The form of a heterogeneous graph allows the graph to contain multiple different types of nodes, and the attribute types and number of parameters describing the nodes can be different.
  • the map generation solution provided by this application that uses heterogeneous graphs to represent static traffic scenes is compared with the map generation solution that uses isomorphic graphs to represent static traffic scenes.
  • the rich information on surrounding facilities of the road network provided by the heterogeneous graph can provide a reference for generating more realistic traffic flow scenarios.
  • Map generation scenario 1 The user inputs a city planning map (including corresponding city planning legend analysis) to the map generation device through an input device (such as a mouse, keyboard, etc.); the map generation device generates a high-precision map file based on the city planning map.
  • the user inputs a city planning map in JPEG (joint photographic experts group) format or portable network graphics (portable network graphics, PNG) format to the map generation device through the input device.
  • JPEG is the product of the JPEG standard, which was developed by the International Organization for Standardization and is a compression standard for continuous-tone still images.
  • JPEG format is a commonly used image file format with the suffix .jpg or .jpeg.
  • PNG is a bitmap format that uses a lossless compression algorithm.
  • the suffix is .png.
  • the map generation device may be a terminal device with certain data processing capabilities, such as a desktop computer, a laptop computer, etc.
  • Map generation scenario 2 The user selects a part of the global city planning map provided by the map generation device as a local city planning map through an input device (such as a mouse, keyboard, etc.); the map generation device generates a high-precision map file based on the local city planning map. .
  • the map generation device provides a global city planning map for the user to select, and the user can select any continuous area in the global city planning map as a local city planning map; the map generation device generates a map based on the local city planning map. Generate a high-precision map file (corresponding to the continuous area).
  • the map generation device may be a terminal device with certain data processing capabilities, such as a desktop computer, a laptop computer, etc.
  • Map generation scenario 3 The user sends a city planning map (including corresponding city planning legend analysis) to a map generation device (such as a server) through a terminal device (such as a mobile phone, laptop, etc.); the map generation device generates a high-level map based on the city planning map. Precision map file, and send the high-precision map file to the terminal device.
  • a map generation device such as a server
  • a terminal device such as a mobile phone, laptop, etc.
  • Precision map file and send the high-precision map file to the terminal device.
  • the form of a heterogeneous graph allows the graph to contain multiple different types of nodes, and the attribute types and number of parameters describing the nodes can be different. Therefore, it can comprehensively express multiple types of elements in static traffic scenes, that is, it can effectively represent more complex Static traffic scene.
  • the heterogeneous graph i.e., traffic expression graph
  • the heterogeneous graph provided by this application may include a multi-layer graph structure.
  • the heterogeneous graph provided by this application is divided into four layers of graph structure, namely: vertex layer, intersection layer, lane area layer, and functional area layer.
  • the graph structure of each layer is in the form of a isomorphic graph, that is, each layer of the graph structure contains only one type of nodes.
  • Each node within the intersection layer (i.e., intersection layer node) represents an intersection.
  • Each node within a vertex layer represents a vertex layer node.
  • Each node within the lane zone layer represents a lane zone layer node, such as a lane zone.
  • Each node within the ribbon layer represents a ribbon layer node, such as a ribbon.
  • Vertex level nodes, intersection level nodes, lane area level nodes and functional area level nodes are four different types of nodes, which will be described later.
  • the connection relationship between nodes in different layers can be defined (or expressed), for example, the road connection relationship is defined between the intersection layer node and the lane area node.
  • the map generation device fuses multi-layer graph structures into a heterogeneous graph (i.e., traffic expression graph) in the form of "stacking" to form a heterogeneous graph expression model of a static traffic scene.
  • a heterogeneous graph i.e., traffic expression graph
  • FIG 1 is an example of an urban planning map provided by the embodiment of this application.
  • Figure 2 is an example of a heterogeneous graph provided by the embodiment of the present application.
  • the heterogeneous graph in Figure 2 is used to characterize the static traffic scene in the area in the black matrix box in Figure 1.
  • the heterogeneous graph provided by this application is divided into three layers of graph structure: vertex layer, intersection layer, and functional area layer.
  • the heterogeneous graph provided by this application is divided into three layers of graph structure, namely: vertex layer, lane area layer, and functional area layer.
  • the heterogeneous graph provided by this application is divided into two layers of graph structures: a vertex layer and a lane area layer. It should be understood that the heterogeneous graph provided by this application is divided into two or more layers of graph structures, that is, the two-layer graph structure or two or more layers of graph structures are fused into a heterogeneous graph, and each layer of the graph structure is a isomorphic graph.
  • This application defines sequence representations of heterogeneous maps and sequence representations of electronic maps (eg, high-precision maps).
  • This application defines (or provides) coding rules for obtaining heterogeneous map sequences based on heterogeneous maps and coding rules (or coding methods) for obtaining map sequences based on electronic maps.
  • the following describes the definition of a heterogeneous map sequence and the process of generating a heterogeneous map sequence based on a heterogeneous map, as well as the definition of a map sequence and the process of generating a map sequence based on an electronic map.
  • the heterogeneous graph sequence (i.e., traffic graph expression sequence) is divided into two parts (i.e., element sequence and constraint sequence), and the definition and coding rules are described respectively.
  • the element sequence part of the heterogeneous graph sequence is the encoding sequence of the attribute information (or node data of each layer) of the nodes in the heterogeneous graph
  • the constraint sequence part is the intra-layer connection and inter-layer connection relationship in the heterogeneous graph. coding sequence.
  • the heterogeneous graph contains a total of four graph structures: vertex layer, lane area layer, functional area layer, and intersection layer. Therefore, the element sequence part of the heterogeneous graph includes vertex layer nodes, lane area layer nodes, and functional area layer.
  • Vertex: P node (t node , ID, type, x, y, z).
  • P node represents the element sequence of a vertex layer node.
  • t node indicates that the node is a vertex layer node
  • ID indicates the index value of the node
  • type indicates the attributes of the node, which are divided into two categories: primary vertex and secondary vertex
  • x, y, z indicate the three-dimensional coordinates of the node.
  • Primary vertices refer to the corners extracted from urban planning diagrams, which must be included in heterogeneous graphs; secondary vertices refer to nodes manually added by users or generated by programs, indicating the entrance and exit of functional areas, and are the guidance information for generating models. It may not be included in the composition. It should be understood that any vertex layer node (or vertex) in the heterogeneous graph can be represented by P node .
  • a vertex layer node represents a vertex.
  • Lane area P road represents an element sequence of lane area nodes. Among them, t road indicates that the node is a lane area node, ID indicates the index value of the node, type indicates the attributes of the node, including exits, entrances, etc., x, y, z indicate the three-dimensional center point of the node. coordinate, Represents the index of the vertex layer nodes that constitute the lane area, direction represents the position of the entrance and exit contained in the lane area relative to the center point of the node, and area represents the area of the lane area. It should be understood that any lane area node (or lane area) in the heterogeneous graph can be represented by P road .
  • a lane zone node represents a lane zone.
  • P function represents a sequence of elements of a ribbon node.
  • t function indicates that the node is a functional area node
  • ID indicates the index value of the node
  • type indicates the attributes of the node, including exits, entrances, etc.
  • x, y, z indicate the three-dimensional center point of the node.
  • coordinate Indicates the index of the vertex layer nodes that constitute the functional area
  • direction indicates the position of the entrance and exit contained in the node relative to the center point of the node
  • area indicates the area of the functional area. It should be understood that any functional area node (or functional area) in the heterogeneous graph can be represented by P function .
  • a functional area node represents a functional area.
  • P junction represents the element sequence of an intersection node.
  • t junction indicates that the node is an intersection node
  • ID indicates the index value of the node
  • type indicates the attributes of the node, including three-way intersections, four-way intersections, etc.
  • x, y, z represent the three-dimensional coordinates of the center point of the node.
  • coordinate Represents the index of the vertex layer nodes that constitute the intersection
  • area represents the area of the intersection. It should be understood that any intersection node (or intersection) in the heterogeneous graph can be represented by P junction .
  • An intersection node represents an intersection.
  • the constraint sequence of the heterogeneous graph can contain two types. Among them, different types of constraint sequences contain different types of attributes, so the constraint sequence of a heterogeneous graph sequence consists of an indefinite length sequence:
  • Intra-layer connection relationship (t inside , ID1, ID2, type).
  • C inside represents the connection relationship between two nodes belonging to the same layer graph structure in the heterogeneous graph, such as the connection relationship between two vertex layer nodes or the connection relationship between two lane area nodes.
  • t inside indicates that the type of the connection relationship is an intra-layer connection relationship
  • ID1 and ID2 indicate the indexes of the two intra-layer nodes connected by the connection relationship
  • type indicates the connection relationship type of the connection relationship.
  • the vertex layer includes adjacent , connected relationship.
  • Two intra-layer nodes refer to two nodes belonging to the same layer graph structure. In other words, two intra-layer nodes refer to two nodes of the same type.
  • C pointer (t pointer , start, end, type).
  • C pointer represents the connection relationship between two nodes belonging to different layer graph structures in the heterogeneous graph, such as the connection relationship between the vertex layer node and the lane area node.
  • t pointer indicates that the connection relationship is an inter-layer pointing relationship
  • start indicates the index of the starting node of the inter-layer pointing relationship
  • end indicates the index of the end node of the inter-layer pointing relationship
  • type indicates the connection relationship type of the connection relationship.
  • the lane area is connected to the functional area through the entrance and exit.
  • the starting node of the inter-layer pointing relationship is the lane area node
  • the end node of the inter-layer pointing relationship is the functional area node. .
  • the layers (graph structure) of the heterogeneous graph are divided into vertex layers, intersection layers, lane area layers, and functional area layers.
  • the nodes are assigned corresponding types, attributes, or parameter individuals according to the urban planning diagram. Numbers are used to construct intra-layer connection relationships and inter-layer connection relationships, thereby achieving a comprehensive expression of transportation elements and surrounding facilities in urban planning diagrams, that is, generating a heterogeneous diagram that comprehensively expresses transportation elements and peripheral facilities in urban planning diagrams.
  • the map generation device generates a heterogeneous graph sequence (i.e., a traffic expression graph) by traversing the nodes of each layer, the connection relationships within each layer, and the pointing relationships between each layer of the stacked hierarchical graph (i.e., the heterogeneous graph). sequence). Since the number of attributes of nodes in each layer is different and the lengths of attributes of nodes in different layers are different, the sequence finally obtained by encoding the stacked hierarchical graph is a variable-length sequence, that is, the heterogeneous graph sequence includes sequences of different lengths.
  • the symbol ⁇ is defined as the starting symbol of the sequence and each element, and ⁇ is the ending symbol of the sequence, thus representing a variable-length sequence.
  • the map generation device traverses each node in the order of vertex layer, lane area layer, functional area layer, and intersection layer; then, it traverses the connection relationships within each layer in the same order; finally, it traverses the intersection-lane area, intersection
  • the mouth-functional area and lane area-functional area sequentially traverse the pointing relationships between each layer.
  • the stacked hierarchical graph is traversed through the separate encoding descriptions of the nodes in each layer, the connection relationships within the layer, and the pointing relationships between layers, and finally the sequence representation (i.e., the heterogeneous graph sequence) obtained by encoding the stacked hierarchical graph is obtained. Examples are as follows:
  • the sequence before the first ⁇ is the sequence obtained by encoding the nodes (primitives) of each layer (ie, the element sequence), and the sequence between the two ⁇ is the sequence obtained by the constraint encoding (constraint sequence).
  • the whole constitutes a variable-length sequence representation obtained by stacked hierarchical graph encoding.
  • the first ⁇ is preceded by the element sequence of each node in the heterogeneous graph, and the space between the two ⁇ is encoded by the connection relationships in the heterogeneous graph (including intra-layer connection relationships and inter-layer pointing relationships). constraint sequence.
  • serialization of element attributes i.e., attribute information of each node
  • layer of the heterogeneous graph i.e., traffic expression graph
  • intra-layer constraints i.e., intra-layer connection relationships
  • inter-layer constraint relationships i.e., layer connection relationships
  • high-precision map sequence can also be divided into two parts: element sequence and constraint sequence.
  • This application proposes a highly compatible high-precision map sequence encoding rule by referring to various high-precision map formats such as OpenDrive, LaneLet, and NuScenes.
  • OpenDrive is a descriptive file of the road network structure.
  • the NuScenes dataset is a large-scale autonomous driving dataset established by the autonomous driving company nuTonomy.
  • the primitives of the high-precision map can be encoded as a sequence: each value represents a parameter value in a primitive, and can also include the starting symbols of different traffic elements: r( road), l (lane), j (intersection), a (traffic light), s (traffic sign), b (bridge), t (tunnel), m (traffic markings), o (road attachments); primitive The stop character e and the stop character d of the entire sequence. Primitives and parameters are arranged in a fixed order. An example encoding sequence for 1 road is as follows: id 1 , type 1 , speed 1 , lanesCount 1 , controlPoints 1 , e, d.
  • the constraint sequences of high-precision maps are divided into two types: lane connection relationships between roads and lane connection relationships within intersections.
  • the sequence of formula (3) is expressed as the lane with ID a in the road with ID (index value) i, connected to the lane with ID b in the road with ID j.
  • Traffic elements are encoded into sequences based on their adjacency relationships.
  • Each value in the constraint sequence represents the index of a primitive, and can also include the starting symbol of the connection relationship between different elements: r (lane connection relationship between roads), j (lane connection relationship in the intersection), connection relationship The stop character e and the stop character d of the entire sequence.
  • Lane connection relationships (connections) can be sorted from large to small according to the primitive index.
  • the constraint sequence is expressed as: r,n 1 ,1,n 2 ,1,e,n 1 ,-1,n 2 ,-1,e,d.
  • r,n 1 ,1,n 2 ,1,e represents the lane with ID 1 in the road with ID (index value) 1, which is connected to the lane with ID 1 in the road with ID 2
  • n 1 ,- 1,n 2 ,-1 represents the lane with ID -1 on the road with ID (index value) 1, which is connected to the lane with ID -1 on the road with ID 2.
  • the high-precision map sequence is generated by a combination of element sequence and constraint sequence, where the element sequence is based on roads, lanes, tunnels, bridges, intersections, traffic signs, traffic markings, traffic lights, road attachments
  • the objects are arranged in a fixed order
  • the constraint sequence is arranged in a fixed order: the lane connection relationship between roads and the lane connection relationship in the intersection. It should be understood that both the element sequence and the constraint sequence can be sorted in other fixed orders, which is not limited in this application.
  • attribute extraction and serialization coding are performed for different elements in the high-precision map, and the serialization coding of constraints between elements is constructed, and the sequence is combined as a serialized expression of the high-precision map to obtain a high-precision map sequence.
  • this application proposes a deep learning method architecture based on a data-driven sequence-to-sequence generation of high-precision maps (i.e. map generation model).
  • the deep learning method architecture i.e., map generation model
  • the map generation device can finally process the high-precision map sequence into high-precision map data according to the coding rules of the high-precision map.
  • the input of the map generation model proposed in this application is a heterogeneous map sequence (i.e., a traffic map expression sequence), which includes, for example, functional areas (land use types), roads, and intersection information in urban planning maps, while the high-precision map sequence contains roads , lanes, road attachments and other more detailed road network information.
  • a traffic map expression sequence i.e., a traffic map expression sequence
  • the high-precision map sequence contains roads , lanes, road attachments and other more detailed road network information.
  • the NuScenes dataset is a large-scale autonomous driving dataset that released a high-precision map expansion package in 2019.
  • the map contains 11 semantic layers, including crosswalks, sidewalks, traffic lights, parking lines, lanes, etc., meeting the high-precision map data content required for this solution.
  • This map contains semantic vector maps (json format) and corresponding PNG formats of four maps: Boston Harbor, Singapore Queenstown, Singapore North, and Singapore Dutch Village.
  • the OpenStreetMap (OSM) project is a well-known global roadmap production example of a volunteer geographic information (VGI) project with a large number of volunteer participants.
  • VKI volunteer geographic information
  • This project provides global urban planning data, including land types, roads, etc. Although it does not include high-precision map information such as specific lanes and road attachments, it does contain the data required to construct heterogeneous maps in this application.
  • This application can be based on the NuScenes data set. Based on the description, longitude, latitude, and outline information of its four maps (i.e., Boston Harbor, Queenstown, Singapore, Singapore North, and Dutch Village, Singapore), the corresponding data is found in the OpenStreetMap data, and Roads are used as the benchmark for registration and fusion to form a fusion data set in json format.
  • nuScenes data set contains high-precision map (road) data required for heterogeneous graphs, OpenStreetMap The data set contains the functional area data required for heterogeneous graphs, so registration is required to obtain a fused data set for training.
  • a possible registration fusion process is as follows:
  • Construct a functional area semantic layer in nuScenes data Construct a functional area semantic layer, and assign a unique token value to each functional area.
  • the functional area type is the type in OpenStreetMap, and traverses the lane topological relationships and longitude and latitude coordinates in nuScenes. , for each enclosed/semi-enclosed area composed of lanes that contains a functional area, each lane will reference the functional area token;
  • the fusion data set contains information such as land use type and coordinates required for heterogeneous graph sequences (i.e., traffic graph expression sequences), as well as detailed road network information such as roads, lanes, and road attachments required for high-precision maps.
  • the model training device mainly uses the NuScenes data set. Through the description, road outline, longitude and latitude information of the NuScenes data, the corresponding data is downloaded from the global OpenStreetMap data; the functional area and land type data are obtained from the OpenStreetMap data, and in the NuScenes data Add a "function" field and store data by referencing all roads surrounding the closed area to obtain a fused data set.
  • Figure 3 is an example of a high-precision map visualization screenshot corresponding to the urban planning map.
  • the fusion data set is obtained by registering and merging the OpenStreetMap data set and the NuScenes data set.
  • the fusion data set contains not only the land type, coordinates and other information required by the heterogeneous map sequence, but also the detailed road network information such as roads, lanes and road attachments required by the high-precision map.
  • map generation model After completing the construction of the training sample data set, the map generation model can be trained.
  • a possible training process is as follows:
  • Model parameter initialization that is, initializing the parameters of the map generation model
  • the entire training process of the map generation model can use the teacher forcing mechanism, that is, during the training network process, the label value of the training data corresponding to the previous item is directly used as the input of the next state.
  • the map generation model can adopt the Transformer architecture.
  • the Transformer architecture is a sequence-to-sequence deep learning generative model architecture.
  • the map generation model can adopt an encoder-decoder architecture, in which the encoder and decoder are spliced using the same six-layer architecture.
  • this application uses nodes and constraints as units for input embedding, that is, each node, intra-layer constraint, and inter-layer constraint of each layer are regarded as a unified unit. It is mapped to a vector of equal length, then position encoded, and then used as the input of the encoder.
  • the above has described the input (heterogeneous map sequence) and output (map sequence) of the map generation model, and how to construct a training sample data set for training the map generation model.
  • any method can be used
  • the sequence-to-sequence model is used to train the map generation model, which will not be described in detail here. In other words, using a sequence-to-sequence model to perform end-to-end training on input and output can finally produce a map generation model.
  • Figure 4 is a flow chart of a map generation method provided by an embodiment of the present application. As shown in Figure 4, the method includes:
  • the map generating device obtains the traffic expression map.
  • the map generation device can be a terminal device with data processing capabilities such as a tablet computer, a laptop computer, or a desktop computer. It can also be a cloud server, network server, application server, etc.
  • the above traffic expression graph is a heterogeneous graph.
  • the above-mentioned traffic expression graph includes at least two layers of graph structures.
  • the at least two layers of graph structures include a first layer graph structure and a second layer graph structure.
  • the types of nodes in the above-mentioned first layer graph structure are the same as those in the above-mentioned second layer graph structure.
  • the types of nodes are different.
  • the nodes in the first-level graph structure are the above-mentioned vertex layer nodes
  • the vertices in the second-level graph structure are intersection nodes.
  • the above traffic expression diagram can be used to express static traffic scenes.
  • the static traffic scene here can be understood as a traffic scene in a stationary state, that is, the status of vehicles, pedestrians, traffic lights, etc. does not change.
  • Static traffic scenes can include road scenes, tunnel scenes, bridge scenes, intersection scenes and other scenes involving traffic conditions.
  • the first layer graph structure can be any one of the above-mentioned vertex layer, lane area layer, functional area layer, and intersection layer.
  • the second layer graph structure can be any one of the above-mentioned vertex layer, lane area layer, functional area layer, and intersection layer. Any one that is different from the first layer graph structure.
  • the first layer graph structure is the vertex layer, and the nodes in the first layer graph structure are all vertex layer nodes.
  • the second layer graph structure is the lane area layer, and the nodes in the second layer graph structure are all lane area nodes.
  • the first layer graph structure is a vertex layer, and the nodes in the first layer graph structure are all vertex layer nodes.
  • the second layer graph structure is an intersection layer, and the nodes in the second layer graph structure are all intersections. node.
  • the above traffic expression diagram may also include other layer diagram structures. That is to say, the traffic expression diagram obtained by the map generation device includes two or more layers of graph structures, that is, the two-layer graph structures or two or more layers of graph structures are fused into a heterogeneous graph.
  • the traffic expression graph includes a vertex layer, an intersection layer, a lane area layer, and a functional area layer.
  • the traffic expression graph includes a three-layer graph structure, namely: vertex layer, intersection layer, and functional area layer.
  • the traffic expression graph includes a three-layer graph structure, namely: vertex layer, lane area layer, and functional area layer.
  • the traffic expression graph includes a two-layer graph structure: a vertex layer and a lane area layer. It should be noted that there is only one type of node in each layer of the graph structure of the traffic expression graph. For example, the nodes in the vertex layer are all vertex layer nodes, the nodes in the lane area layer are all lane area nodes, the nodes in the intersection layer are all intersection nodes, and the nodes in the functional area layer are all functional area nodes. .
  • the traffic expression diagram also includes a third layer graph structure and a fourth layer graph structure, the above-mentioned first layer graph structure, the above-mentioned second layer graph structure, the above-mentioned third layer graph structure and the above-mentioned fourth layer graph structure.
  • the types of nodes in any two layer graph structures in the layer graph structure are different.
  • the traffic expression graph includes at least the above two-layer graph structure, and also includes the above-mentioned third layer graph structure and the above-mentioned fourth layer graph structure.
  • the first layer of graph structure is a vertex layer
  • the second layer of graph structure is a lane area layer
  • the third layer of graph structure is an intersection layer
  • the fourth layer of graph structure is a functional area layer.
  • each node in the above-mentioned first-layer graph structure belongs to the first type (such as a vertex layer node), and each node in the above-mentioned second-layer graph structure belongs to the second type (such as a functional area node), the above-mentioned first type is different from the above-mentioned second type.
  • the first-level graph structure and the second-level graph structure are both isomorphic graphs.
  • step 401 is as follows: the map generation device constructs the first-layer graph structure and the second-layer graph structure based on the urban planning information; determines (defines) the nodes in the first-layer graph structure and the second-layer graph The connection relationship between the nodes in the structure is used to obtain the traffic expression graph.
  • the urban planning information is an urban planning map (including corresponding urban planning legend analysis).
  • the map generation device can construct a traffic expression map based on urban planning information.
  • map generation device constructs a traffic expression graph based on urban planning information is as follows: the map generation device extracts multiple vertices in the urban planning graph corresponding to the urban planning information, and constructs a vertex layer by defining (determining) the connection relationship between each vertex.
  • FIG. 5A is an example of a vertex layer graph structure provided by an embodiment of the present application.
  • FIG. 5A is an example of a lane zone layer graph structure provided by the embodiment of the present application.
  • r1 to r7 each represent a lane area node.
  • the connection between any two lane area nodes represents the connection relationship between the two lane area nodes.
  • Different connections can represent different types of connection relationships.
  • FIG. 5C is an example of an intersection zone graph structure provided by the embodiment of the present application.
  • J 1 , J 2 , and J 3 each represent an intersection node, and the connection between the two intersection nodes represents the connection relationship between the two intersections.
  • the intersection layer graph structure can contain many different types of intersection nodes.
  • Figure 5D is an example of a functional area layer diagram structure provided by the embodiment of the present application. As shown in Figure 5D, f 1 , f 2 , f 3 , f 4 , f 5 , and f 6 respectively represent a functional area node, and the connection between the two functional area nodes represents the connection between the two functional areas. relation.
  • the functional area layer map structure can contain functional area nodes of various land types, such as public green space, square land, commercial and financial land, cultural and entertainment land, educational land, residential land, science and technology research and development land, commercial and office comprehensive land, etc.
  • the functional area layer diagram structure can contain many different types of connection relationships, such as connecting through lanes, connecting through intersections, etc.
  • the map generation device obtains a traffic expression map sequence based on the traffic expression map.
  • the above traffic expression sequence is a serialized expression of the traffic expression graph.
  • the map generation device can obtain the traffic expression map sequence from the traffic expression map according to the encoding rules defined above.
  • step 402 is as follows: serialize the attribute information of one or more nodes (for example, all nodes) in the traffic expression graph to obtain an element sequence; sequence the intra-layer connection relationships in the traffic expression graph and the inter-layer connection relationship are serialized to obtain a constraint sequence; the above-mentioned intra-layer connection relationship includes the connection relationship between any two nodes in the above-mentioned first-layer graph structure, and the above-mentioned inter-layer connection relationship includes the above-mentioned first-layer graph structure.
  • connection relationship between any node and any node in the above-mentioned second layer graph structure; the combination of the above-mentioned element sequence and the above-mentioned constraint sequence is used as the serialized expression of the above-mentioned traffic expression graph, and the above-mentioned traffic expression graph sequence is obtained.
  • the attribute information of each node for example, including vertex layer nodes, intersection nodes, lane area nodes, and functional area nodes
  • the traffic expression graph is serialized to obtain an element sequence.
  • heterogeneous graph sequence i.e., traffic expression graph
  • process of generating a heterogeneous graph sequence i.e., traffic expression sequence
  • the above traffic expression graph sequence includes an element sequence and a constraint sequence.
  • the above element sequence represents the attribute information of the nodes in the above traffic expression graph.
  • the above constraint sequence represents two elements in the above first layer graph structure.
  • the traffic expression graph sequence may include an element sequence corresponding to each node in the traffic expression graph, and a constraint sequence corresponding to each connection relationship.
  • the map generation device obtains a map sequence based on the traffic expression map sequence.
  • step 403 is as follows: input the traffic expression map sequence into the map generation model for processing to obtain a map sequence.
  • the map generation model can be a sequence-to-sequence model obtained by training. The method of training the map generation model has been described previously and will not be described here.
  • the map generating device obtains the electronic map according to the map sequence.
  • the electronic map can be a high-precision map file.
  • a possible implementation of step 404 is as follows: the map generation device processes the output map sequence and converts it into a json format map file, that is, an electronic map, according to the map encoding rules (ie, the precision map sequence encoding rules described above).
  • a traffic expression map is obtained; a traffic expression map sequence is obtained based on the traffic expression map; and a map sequence is obtained based on the traffic expression map sequence.
  • the form of a heterogeneous graph allows the graph to contain multiple different types of nodes, and the attribute types and number of parameters described by the nodes can be different. Therefore, multiple types of elements in static traffic scenes can be comprehensively expressed, and can be Effectively represent more complex static traffic scenes.
  • the static traffic scene is expressed through the traffic expression graph (a heterogeneous graph), which is different from the isomorphic graph (the node type in the isomorphic graph has only one type and the attribute type described by the node, Compared with expressing static traffic scenes in the form of the same number of parameters (the number of parameters is the same), it can more accurately and effectively express the various elements contained in the static traffic scene in a unified and global manner, thereby providing more realistic information about the surrounding facilities of the road network. Has better scalability.
  • Figure 6 is a flow chart of another map generation method provided by an embodiment of the present application.
  • the method flow in Figure 6 is a possible implementation of the method described in Figure 4 .
  • the way in which the map generation device constructs the traffic expression map and the way in which the traffic expression map sequence is obtained based on the traffic expression map are described.
  • the method includes:
  • the map generation device constructs a first-layer graph structure based on the city planning information, and a second-layer graph structure based on the city planning information.
  • the map generation device can also construct other layer map structures based on urban planning information.
  • the city planning information may be a city planning map.
  • the traffic expression graph includes a three-layer graph structure, namely: a first-layer graph structure, a second-layer graph structure, and a third-layer graph structure.
  • the first-layer graph structure, the second-layer graph structure, and the third-layer graph structure are the vertex layer, intersection layer, and functional area layer in sequence.
  • the traffic expression graph includes a vertex layer, an intersection layer, a lane area layer, and a functional area layer; the first layer graph structure and the second layer graph structure are any two of these four layers.
  • the map generation device can respectively construct a vertex layer, an intersection layer, a lane area layer, and a functional area layer based on urban planning information.
  • the first-layer graph structure is a vertex layer; the map generation device constructs the first-layer graph structure according to the urban planning information as follows: extract the corner points in the urban planning graph corresponding to the urban planning information as Vertices, get multiple vertices; determine the connection relationships between the multiple vertices, and get the first layer graph structure.
  • the corner point in the urban planning map refers to the intersection of two or more straight lines in the urban planning map. Referring to Figure 5A, each native vertex in Figure 5A is a corner point in the urban planning graph.
  • the map generation device can automatically add secondary vertices according to preconfigured rules, and can also support users to manually add secondary vertices.
  • Possible implementation methods for the map generation device to construct a second-layer graph structure based on urban planning information are as follows: extract multiple traffic elements belonging to the first type from the urban planning map corresponding to the urban planning information.
  • the above-mentioned first type of traffic elements include functions Any of the areas, intersections, and lane areas; determine the connection relationship between the above multiple traffic elements, and obtain the above-mentioned second-layer graph structure.
  • the map generation device traverses each traffic element (such as lane area, functional area, intersection) belonging to the second type in the urban planning map; the map generation device defines (determines) the distance between each node belonging to the second type. Connect relationships to build the second-layer graph structure.
  • the map generation device determines the connection relationship between the nodes in the first-layer graph structure and the nodes in the second-layer graph structure, and obtains a traffic expression diagram.
  • step 602 is as follows: merging multiple layer graphs (such as the first layer graph structure and the second layer graph structure) into a heterogeneous graph, that is, a traffic expression graph, in the form of "stacking"; it can accurately Geographically form heterogeneous graphs expressing static traffic scenes.
  • the map generation device can determine the connection relationship between nodes in different layer graph structures, for example: the intersection layer node and the lane area node define a road connection relationship, and fuse the multi-layer graph in the form of "stack" is a heterogeneous graph, forming a heterogeneous graph expression model of static traffic scenes, see Figure 2.
  • the urban planning map input by the user is a partial area of the Singapore Weiyi Technology City urban planning map. This area contains a total of 8 lane areas, 2 intersections, 2 functional areas, and 20 native nodes (or native vertices); the map generation device constructs the vertex layer, intersection layer, lane area layer, and functional area layer according to the urban planning map; by determining different layer maps
  • the connection relationships between nodes in the structure integrate the vertex layer, intersection layer, lane area layer, and functional area layer into a heterogeneous graph, that is, a traffic expression graph.
  • FIG 7 is an example of a traffic expression diagram provided by the embodiment of the present application.
  • the traffic expression map in Figure 7 is a traffic expression map constructed by the map generation device based on part of the Singapore Weiyi Technology City urban planning map.
  • n represents a vertex layer node
  • j represents an intersection layer node
  • r represents a lane area node
  • f represents a functional area layer node.
  • the map generation device serializes the attribute information of each node in the traffic expression graph to obtain an element sequence.
  • the element sequence may include an encoding sequence of attribute information of nodes at each level in the traffic expression graph. Serializing the attribute information of each node in the traffic expression graph can be understood as encoding the attribute information of each node in the traffic expression graph respectively, and obtaining an element sequence representing the attribute information of the node.
  • P node represents the element sequence of a vertex layer node
  • P road represents the element sequence of a lane area node
  • P function represents the element sequence of a functional area node
  • P junction represents the element sequence of an intersection node.
  • the map generation device can use P node to represent any vertex layer node in the traffic expression graph, P road to represent any lane area node in the traffic expression graph, and P function to represent any functional area node in the traffic expression graph.
  • P junction represents any intersection node in the traffic expression graph.
  • P node is the serialization of the attribute information of a vertex layer node
  • P function is the serialization of a functional area node
  • P function is the serialization of a functional area node
  • P junction is the serialization of an intersection node.
  • Table 1 is an example of element sequences provided by embodiments of the present application.
  • Each row in Table 1 is an element sequence of a node, where n represents the vertex layer node, j represents the intersection layer node, r represents the lane area node, f represents the functional area layer node, and ⁇ represents the sequence and the start of each element. symbol.
  • n represents the vertex layer node
  • j represents the intersection layer node
  • r represents the lane area node
  • f represents the functional area layer node
  • represents the sequence and the start of each element. symbol.
  • the map generation device serializes the intra-layer connection relationship and the inter-layer connection relationship in the traffic expression diagram to obtain a constraint sequence.
  • the intra-layer connection relationship in the above-mentioned traffic expression graph includes the connection relationship between two nodes in the first-layer graph structure.
  • the inter-layer connection relationship in the traffic expression graph includes the connection relationship between the nodes in the first-layer graph structure and the nodes in the second-layer graph structure.
  • the constraint sequence may include coding sequences of connection relationships between layers in the traffic expression graph and connection relationships between layers.
  • the map generation device serializing the intra-layer connection relationship and the inter-layer connection relationship in the traffic expression diagram can be understood as encoding the intra-layer connection relationship and the inter-layer connection relationship in the traffic expression diagram respectively to obtain each connection relationship. coding sequence.
  • the map generation device uses C inside to represent the connection relationship between two nodes belonging to the same layer graph structure in the traffic expression graph, that is, the intra-layer connection relationship; and uses C pointer to represent the connection relationship between the two nodes belonging to different layer graph structures in the traffic expression graph.
  • the connection relationship between two nodes is the connection relationship between layers.
  • the map generation device traverses the connection relationships within each layer in order of vertex layer, lane area layer, functional area layer, and intersection layer, and obtains the coding sequence of the connection relationships within each layer; using intersection-lane Area, intersection-functional area, lane area-functional area sequentially traverse the pointing relationship between each layer, and obtain the coding sequence of the connection relationship between each layer.
  • Table 2 is an example of the constraint sequence provided by the embodiment of this application.
  • Each row in Table 2 represents a constraint sequence of a connection relationship, where n represents the vertex layer node, j represents the intersection layer node, r represents the lane area node, f represents the functional area layer node, ⁇ represents the sequence and each connection The starting symbol of the relationship.
  • n represents the vertex layer node
  • j represents the intersection layer node
  • r represents the lane area node
  • f represents the functional area layer node
  • represents the sequence and each connection The starting symbol of the relationship.
  • the map generation device uses the combination of the element sequence and the constraint sequence as a serialized expression of the traffic expression map to obtain a traffic expression map sequence.
  • the element sequence is the element part in the traffic expression graph sequence
  • the constraint sequence is the constraint part in the traffic expression graph sequence.
  • An example of a traffic expression graph sequence is given in equation (1).
  • the map generation device inputs the traffic expression map sequence into the map generation model for processing to obtain a map sequence.
  • the above-mentioned map sequence includes a first element sequence and a second element sequence, the length of the above-mentioned first element sequence and the length of the above-mentioned second element sequence are different, and the above-mentioned first element sequence represents the first traffic element.
  • the above-mentioned second element sequence represents a second traffic element, the type of the above-mentioned first traffic element is different from the type of the above-mentioned second traffic element, the above-mentioned first traffic element and the above-mentioned second traffic element correspond to the traffic elements in the above-mentioned static traffic scene .
  • the first traffic element and the second traffic element may be any two of roads, lanes, tunnels, bridges, intersections, traffic signs, traffic markings, traffic lights, and road appendages.
  • the first traffic element is an intersection
  • the second traffic element is a road
  • the intersection and the road belong to different types of traffic elements.
  • the first traffic element can be represented by a sequence of length M
  • the second traffic element can be represented by a sequence of length N.
  • M and N are integers greater than 0, and M is different from N.
  • the first traffic element can be represented by a sequence of length M, which can be understood that the first traffic element can be represented by M sets of parameters.
  • the first traffic element ie, intersection
  • the first traffic element (ie, intersection) can be represented by four sets of parameters.
  • Each set of parameters includes one or more parameters.
  • the four sets of parameters are: ID (identification), type (type), speed (speed). ), Red_road (intersection internal road); among them, ID is the identifier of the intersection, type represents the type of the intersection, speed represents the speed limit of the intersection, and Red_road represents the identifier of the road belonging to the intersection (or index).
  • ID is the identifier of the intersection
  • type represents the type of the intersection
  • speed represents the speed limit of the intersection
  • Red_road represents the identifier of the road belonging to the intersection (or index).
  • the ID of the internal road of the intersection can be referenced in Ref_road, indicating that it belongs to the intersection road.
  • Table 3 shows an example of an intersection in a high-precision map, and each column in the second to fifth columns in Table 3 represents a set of parameters.
  • the first traffic element i.e., the intersection
  • the intersection can be represented by a sequence containing four sets of parameters, that is, it can be represented by
  • the second traffic element (i.e., road) can be represented by sixteen or more sets of parameters.
  • Each set of parameters includes one or more parameters.
  • the sixteen sets of parameters are: ⁇ (starting symbol), ID, type, speed, leftlanes, rightlanes, width, controlpoints, road marking starting character, type_line, loc1 (location), road accessory start symbol, type_obj1 (road accessory type), loc2 (location), type_obj2 (road accessory type), loc3 (location); where, ⁇ represents the start symbol of the road, and the ID is The identification of the road, type represents the type of the road, speed represents the speed limit of the road, leftlanes represents the number of left lanes on the road, rightlanes represents the number of right lanes on the road, and width represents each lane on the road.
  • controlpoints is a set of coordinates representing the center point of the road
  • type_line refers to the position of the road markings in the road
  • loc1 represents the position of the road markings
  • type_obj1 represents the type of road appendage 1
  • loc2 represents The position of the road appendage 1
  • type_obj2 represents the type of the road appendage 2
  • loc3 represents the position of the road appendage 2.
  • Control points that is, the way to express the position and shape of roads in the OpenDrive data format, are the coordinates of the center point of a set of roads. The number of coordinates of the center point is at least 2. By connecting the center points in sequence, the specific shape description of the road can be obtained.
  • type_line and loc correspond one to one, representing the type and location of road markings respectively.
  • Road markings mainly include yellow solid lines, yellow dashed lines, white solid lines and other types.
  • loc indicates the lane to which the marking belongs.
  • the default marking position is the right side of the lane to which it belongs, the marking shape is the same as the lane shape, and the marking width is the preset default value.
  • the reference of loc to the lane to which it belongs is defined according to the OpenDrive standard, where 0 represents the center lane, 1,2,... represents the left lane from the center to the edge, -1,-2,... represents the right lane from the center to the edge.
  • Lane. type_obj has a one-to-one correspondence with loc, representing the type and location of road attachments respectively.
  • Road accessories mainly include traffic lights, signs and other types.
  • the definition of loc can be described using the st coordinate system in OpenDrive, which is used to represent the relative position of the road appendage on the road.
  • the second traffic element (that is, the road) can be represented by a sequence containing sixteen sets of parameters, that is, it can be represented by a sequence with a length of sixteen.
  • the second traffic element (ie, road) may be represented by more or fewer sets of parameters. That is, different roads can be represented by sequences of different lengths.
  • Table 4 shows an example of roads in the high-precision map. In Table 4, r1, r2, r3, and r4 represent four different roads.
  • Each of the second to seventeenth columns in Table 4 represents a set of parameters.
  • the second traffic element i.e., road
  • the second traffic element can be represented by a sequence containing sixteen sets of parameters, that is, it can be represented by a sequence with a length of sixteen.
  • the first element sequence and the second element sequence have different lengths, and different types of traffic elements are represented by sequences of variable lengths, which can accurately represent different types of traffic elements.
  • the above-mentioned map sequence further includes a first constraint sequence and a second constraint sequence.
  • the length of the above-mentioned first constraint sequence is different from the length of the above-mentioned second constraint sequence.
  • the above-mentioned first constraint sequence represents the third traffic
  • the above-mentioned second constraint sequence represents the connection relationship between the fifth traffic element and the sixth traffic element
  • the above-mentioned sixth traffic element corresponds to the traffic element in the above-mentioned static traffic scene.
  • the first constraint sequence and the second constraint sequence have different lengths, and different types of connection relationships are represented by sequences of variable lengths, which can accurately represent different types of connection relationships.
  • the map generation device obtains the electronic map based on the map sequence.
  • step 607 please refer to step 404.
  • the map generation device can display the processed electronic map through visualization software.
  • Figure 8 is an example of the visualization result of an electronic map provided by the embodiment of the present application.
  • the map generation method provided by the embodiment of the present application expresses the static traffic scene through the traffic expression graph (i.e., the heterogeneous graph), which is different from the isomorphic graph (the node type in the isomorphic graph has only one type and the attribute type and number of parameters described by the node Compared with expressing static traffic scenes in the form of "equally equal"), it can more accurately and effectively express the various elements contained in static traffic scenes in a unified and global manner, thereby providing more realistic information about surrounding facilities on the road network and having better scalability.
  • the heterogeneous graph expression of planning diagrams not only supports basic elements, semantic attributes and complex constraint relationships in traffic scenes, but also provides richer and clearer traffic-related scene information outside the road network.
  • the map generation device can be based on the input of real city planning maps and can conveniently and efficiently generate high-precision map data for autonomous driving simulation.
  • the map generation method provided by the embodiments of this application provides a wealth of information on surrounding facilities outside the road network, and therefore can provide a reference for generating more realistic traffic flow scenarios.
  • the functional area description information in the heterogeneous graph can be used as a basis for the 3D rendering simulator to generate real urban scenes, thereby building a high-quality end-to-end simulation.
  • FIG. 9 is a schematic structural diagram of a map generation device provided by an embodiment of the present application. As shown in Figure 9, the map generation device includes:
  • the acquisition unit 901 is used to obtain a traffic expression map.
  • the traffic expression map is used to express a static traffic scene.
  • the traffic expression map includes at least two layers of graph structure.
  • the at least two layers of graph structure include a first layer of graph structure and a second layer.
  • Graph structure, the types of nodes in the above-mentioned first-layer graph structure are different from the types of nodes in the above-mentioned second-layer graph structure;
  • the encoding unit 902 is used to obtain a traffic expression map sequence based on the above-mentioned traffic expression map, where the above-mentioned traffic expression map sequence is a serialized expression of the above-mentioned traffic expression map;
  • the processing unit 903 is configured to obtain a map sequence based on the above traffic expression map sequence; and obtain an electronic map based on the above map sequence.
  • the encoding unit 902 is specifically used to serialize the attribute information of each node in the traffic expression graph to obtain an element sequence; to sequence the intra-layer connection relationships and inter-layer connections in the traffic expression graph.
  • the connection relationship is serialized to obtain a constraint sequence;
  • the intra-layer connection relationship in the above-mentioned traffic expression diagram includes the connection relationship between the two nodes in the above-mentioned first-layer graph structure, and the inter-layer connection relationship in the above-mentioned traffic expression diagram includes the above-mentioned
  • the connection relationship between the nodes in the first-layer graph structure and the nodes in the above-mentioned second-layer graph structure; the combination of the above-mentioned element sequence and the above-mentioned constraint sequence is used as the serialized expression of the above-mentioned traffic expression graph to obtain the above-mentioned traffic expression graph sequence .
  • the acquisition unit 901 is specifically used to construct the above-mentioned first-layer graph structure and the above-mentioned second-layer graph structure according to urban planning information; the above-mentioned urban planning information is used to obtain the urban planning map; determine the above-mentioned third-layer graph structure The connection relationship between the nodes in the first-layer graph structure and the nodes in the above-mentioned second-layer graph structure obtains the above-mentioned traffic expression graph.
  • the acquisition unit 901 is specifically used to extract multiple vertices in the urban planning graph corresponding to the above urban planning information; determine the connection relationship between the above multiple vertices to obtain the above first layer graph structure .
  • the acquisition unit 901 is specifically configured to extract traffic elements belonging to the first type from the urban planning map corresponding to the above-mentioned urban planning information.
  • the above-mentioned first type of traffic elements include: functional areas, intersections , any item in the lane area; determine the connection relationship between the above-mentioned first type of traffic elements, and obtain the above-mentioned second-layer graph structure.
  • each node in the above-mentioned first-layer graph structure belongs to the first type
  • each node in the above-mentioned second-layer graph structure belongs to the second type.
  • the above-mentioned first type and the above-mentioned second type different.
  • the map generation device further includes: an input unit 904, used to input the above-mentioned city planning map.
  • an input unit 904 used to input the above-mentioned city planning map.
  • the user can input a city planning map to the map generating device through the input unit 904 (for example, including a keyboard, a mouse, a touch screen, etc.).
  • the map generation device further includes: an output unit 905, used to display the global city planning map; and an input unit 904, used to input a part of the above-mentioned global city planning map selected by the user as the above-mentioned city planning map.
  • the user selects a part of the global city planning map provided by the map generation device as the city planning map through an input unit (such as a mouse, keyboard, etc.); the map generation device generates a high-precision map file based on the city planning map.
  • the output unit 905 is used to output an electronic map, such as a high-precision map file.
  • the map generation device further includes: a communication unit 906, configured to receive the user's request via the terminal.
  • the city planning map sent by the terminal device, and the above-mentioned electronic map is sent to the above-mentioned terminal device.
  • Figure 10 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 100 includes a processor 1001 , a memory 1002 , and an input and output device 1003 .
  • the processor 1001, the memory 1002 and the input/output device 1003 are connected to each other through a bus.
  • the terminal device in Figure 10 may be the map generation device in the previous embodiment.
  • Memory 1002 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable Read-only memory (compact disc read-only memory, CDROM), the memory 1002 is used for related instructions and data.
  • the input and output device 1003 is used to input and output data.
  • the processor 1001 may be one or more central processing units (CPUs). When the processor 1001 is a CPU, the CPU may be a single-core CPU or a multi-core CPU. The steps performed by the map generating device in the above embodiment may be based on the structure of the terminal device shown in FIG. 10 .
  • the processor 1001 can implement the functions of the acquisition unit 901, the encoding unit 902, and the processing unit 903; the input and output device 1003 can implement the functions of the input unit 904, the output unit 905, and the communication unit 906 function.
  • the input-output device 1003 includes a display, which may display a map and/or a global city plan.
  • the input and output device 1003 includes an input device such as a keyboard, a mouse, and a touch screen.
  • the input device is used to input a part of the global city planning map selected by the user as the city planning map.
  • the input and output device 1003 includes a communication interface, which is used to receive city planning maps sent by other devices and send electronic maps to other devices.
  • FIG 11 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 1100 may vary greatly due to different configurations or performance, and may include one or more central processing units (CPUs) 1122 ( For example, one or more processors) and memory 1132, one or more storage media 1130 (eg, one or more mass storage devices) storing applications 1142 or data 1144.
  • the memory 1132 and the storage medium 1130 may be short-term storage or persistent storage.
  • the program stored in the storage medium 1130 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server.
  • the central processor 1122 may be configured to communicate with the storage medium 1130 and execute a series of instruction operations in the storage medium 1130 on the server 1100 .
  • the server 1100 may be the above map generating device.
  • Server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and/or, one or more operating systems 1141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and so on.
  • operating systems 1141 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and so on.
  • the central processor 1122 can implement the functions of the acquisition unit 901, the encoding unit 902, and the processing unit 903; the input and output interface 1158 can implement the functions of the communication unit 906.
  • the input and output device 1003 includes a communication interface, which is used to receive city planning maps sent by other devices and send electronic maps to other devices.
  • a computer-readable storage medium stores a computer program.
  • the map generation method provided in the previous embodiment is implemented.
  • Embodiments of the present application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the map generation method provided in the foregoing embodiments.

Landscapes

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

Abstract

本申请实施例公开了智能车领域,尤其涉及高精地图生成领域的一种高精地图生成方法和相关产品,该方法包括:获取交通表达图,所述交通表达图用于表达静态交通场景,所述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,所述第一层图结构中的节点的类型与所述第二层图结构中的节点的类型不同;根据所述交通表达图,得到交通表达图序列,所述交通表达图序列为所述交通表达图的序列化表达;根据所述交通表达图序列,得到地图序列;根据所述地图序列,得到电子地图;与以同构图的形式表达静态交通场景相比,可更准确地对静态交通场景所包含的各类元素进行统一、全局的表达,进而提供更真实的路网周边设施信息。

Description

地图生成方法和相关产品
本申请要求于2022年05月23日提交中国专利局、申请号为202210564091.6、申请名称为“地图生成方法和相关产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,尤其涉及一种地图生成方法和相关产品。
背景技术
高精度地图(high definition map,HD map):绝对精度和相对精度均在1米以内的高精度、高新鲜度、高丰富度的电子地图。高精度地图的英文称为HD map是从数据精度和要素丰富度的角度定义。从自动驾驶功能的分级标准角度定义,高精度地图的英文可称为HAD map(highly automated driving map)。高精度地图所蕴含的信息丰富,含有道路类型、曲率、车道线位置等道路信息,以及路边基础设施、障碍物、交通标志等环境对象信息,同时包括交通流量、红绿灯状态信息等实时动态信息。
随着自动驾驶智能水平的不断提升,自动驾驶系统需要面对与处理的路况信息将越来越复杂,这需要“感知、决策与执行”核心技术能力更加强壮、鲁棒和安全。自动驾驶系统的仿真测评是有效降低算法测试成本,提升验证效率的有力途径之一。其中,高精地图的路网覆盖广度及丰富性是算法验证的充分性的重要保证。目前开源的高精度地图的数据集,均为通过实际车辆、传感器采集,通过人工标注方法完成。这些数据集虽然数据真实可靠,但制作成本高,周期长,且数据量、数据丰富性等方面难以以满足自动驾驶测评需求。因此需要研究如何高效地生成可用于自动驾驶仿真测评的高精度地图的方法。
发明内容
本申请实施例公开了一种地图生成方法和相关产品,可高效地生成可用于自动驾驶仿真测评的高精度地图。
第一方面,本申请实施例提供一种地图生成方法,该方法包括:获取交通表达图,所述交通表达图用于表达静态交通场景,所述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,所述第一层图结构中的节点的类型与所述第二层图结构中的节点的类型不同;根据所述交通表达图,得到交通表达图序列,所述交通表达图序列为所述交通表达图的序列化表达;根据所述交通表达图序列,得到地图序列,所述地图序列为电子地图的序列化表达;根据所述地图序列,得到所述电子地图。
本申请实施例中,交通表达图包括第一层图结构和第二层图结构,该第一层图结构中的节点的类型与该第二层图结构中的节点的类型不同。交通表达图(可理解为异构图)包括第一层图结构和第二层图结构,该第一层图结构中的节点的类型与该第二层图结构中的节点的类型不同,因此可综合表达静态交通场景中的多类元素,可有效表征更为复杂的静态交通场景。本申请实施例提供的地图生成方法通过交通表达图对静态交通场景进行表达,与以同构图(同构图中的节点类型只有一类且节点描述的属性类型、参数个数等均相同)的形式表达 静态交通场景相比,可更准确、有效地对静态交通场景所包含的各类元素进行统一、全局的表达,进而提供更真实的路网周边设施信息,具有更好的扩展性。
在一种可能的实现方式中,所述交通表达图序列包括元素序列和约束序列,所述元素序列表示所述交通表达图中的节点的属性信息,所述约束序列表示所述第一层图结构中的任意两个节点之间的连接关系,以及所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系。
在该实现方式中,交通表达图序列包括元素序列和约束序列。该元素序列表示交通表达图中的节点的属性信息,约束序列表示第一层图结构中的任意两个节点之间的连接关系,以及该第一层图结构中的任一节点和第二层图结构中的任一节点之间的连接关系;可更准确、有效地对静态交通场景所包含的各类元素以及各类元素之间的关系进行统一、全局的表达。
在一种可能的实现方式中,所述根据所述交通表达图,得到交通表达图序列包括:对所述交通表达图中的一个或多个节点的属性信息进行序列化,得到元素序列;对所述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;所述层内连接关系包括所述第一层图结构中的任意两个节点之间的连接关系,所述层间连接关系包括所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系;将所述元素序列和所述约束序列的组合作为所述交通表达图的序列化表达,得到所述交通表达图序列。本申请中,层间连接关系可称为层间指向关系。
在该实现方式中,对交通表达图中的各节点的属性信息进行序列化,得到元素序列;对该交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;通过分别对该交通表达图中的各节点、层内连接关系、层间连接关系的编码描述,得到对该交通表达图编码得到的序列表示,即交通表达图序列。
在一种可能的实现方式中,所述交通表达图为堆叠式层次图,所述第一层图结构和所述第二层图结构位于不同的图层(或者说层次)。
在该实现方式中,交通表达图为堆叠式层次图,通过堆叠式层次图可更准确、有效地对静态交通场景所包含的各类元素之间的关系进行统一、全局的表达。
在一种可能的实现方式中,所述根据城市规划信息,构建所述第一层图结构和所述第二层图结构;所述城市规划信息用于得到城市规划图;确定所述第一层图结构中的节点和所述第二层图结构中的节点之间的连接关系,得到所述交通表达图。
在该实现方式中,确定第一层图结构中的节点和第二层图结构中的节点之间的连接关系,得到交通表达图可视为以“堆叠”的形式,将多个层图(例如第一层图结构和第二层图结构)融合为一个交通表达图;可以准确地形成表达静态交通场景的交通表达图。
在一种可能的实现方式中,所述根据所述城市规划信息,构建所述第一层图结构包括:提取所述城市规划信息对应的城市规划图中的角点作为顶点,得到多个顶点;确定所述多个顶点之间的连接关系,得到所述第一层图结构。
在该实现方式中,确定多个顶点之间的连接关系,得到第一层图结构;可以快速地构建第一层图结构。
在一种可能的实现方式中,所述根据所述城市规划信息,构建所述第二层图结构包括:从所述城市规划信息对应的城市规划图中提取属于第一类型的交通元素,所述第一类型的交通元素包括:功能区、交叉口、车道区中的任一项;确定所述第一类型的交通元素之间的连接关系,得到所述第二层图结构。
在该实现方式中,根据第一类型的交通元素之间的连接关系,得到第二层图结构;以便 利用该第二层图结构和其他层图结构来构建表达静态交通场景的交通表达图。
在一种可能的实现方式中,所述第一层图结构中的各节点均属于第一类型,所述第二层图结构中的各节点均属于第二类型,所述第一类型与所述第二类型不同。所述第一层图结构和所述第二层图结构均为同构图。
在该实现方式中,第一层图结构表达属于第一类型的各节点和属于第一类型的各节点之间的关系,第二层图结构表达属于第二类型的各节点和属于第二类型的各节点之间的关系,交通表达图包括该第一层图结构和该第二层图结构,可更准确、有效地对静态交通场景所包含的各类元素进行统一、全局的表达。
在一种可能的实现方式中,所述地图序列第一元素序列和第二元素序列,所述第一元素序列的长度和所述第二元素序列的长度不同,所述第一元素序列表示第一交通元素,所述第二元素序列表示第二交通元素,所述第一交通元素的类型和所述第二交通元素的类型不同,所述第一交通元素和所述第二交通元素对应于所述静态交通场景中的交通元素。
在该实现方式中,第一元素序列和第二元素序列的长度不同,不同类型的交通元素通过不定长的序列表示,可以准确地表示不同类型的交通元素。
在一种可能的实现方式中,所述地图序列还包括第一约束序列和第二约束序列,所述第一约束序列的长度和所述第二约束序列的长度不同,所述第一约束序列表示第三交通元素和第四交通元素之间的连接关系,所述第二约束序列表示第五交通元素和第六交通元素之间的连接关系,所述第三交通元素、所述第四交通元素、所述第五交通元素、所述第六交通元素对应于所述静态交通场景中的交通元素。
在该实现方式中,第一约束序列和第二约束序列的长度不同,不同类型的连接关系通过不定长的序列表示,可以准确地表示不同类型的连接关系。
在一种可能的实现方式中,所述交通表达图序列表示所述城市规划图中的功能区(用地类型)、道路、交叉口信息,所述地图序列表示人行横道、人行道、交通灯、停车线、车道、道路附属物中的一项或多项。地图序列表示更为细致的路网信息。也就是说,城市规划图中包括用地类型、道路等,不包含具体车道、道路附属物等高精度地图信息;地图序列表示车道、道路附属物等高精度地图信息。
在该实现方式中,交通表达图序列表示城市规划图中的功能区(用地类型)、道路、交叉口信息,用户通过输入城市规划图就能生成相应的电子地图,可高效、便捷生成可用于自动驾驶仿真测评的高精度地图数据。
在一种可能的实现方式中,所述电子地图为高精地图(或者称为高精度地图)。
在该实现方式中,通过输入城市规划图就能生成高精地图,可高效、便捷生成可用于自动驾驶仿真测评的高精度地图数据。
在一种可能的实现方式中,所述交通表达图还包括第三层图结构和第四层图结构,所述第一层图结构、所述第二层图结构、所述第三层图结构以及所述第四层图结构中任意两层图结构中的节点的类型不同。
第二方面,本申请实施例提供了一种地图生成装置,该地图生成装置具有实现上述第一方面方法实施例中的操作的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。在一种可能的实现方式中,该装置包括:获取单元,用于获取交通表达图,所述交通表达图用于表达静态交通场景,所述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,所述第一层图结构中的节点的类型与所述第二层图结构中的节点的类型不同;编码 单元,用于根据所述交通表达图,得到交通表达图序列,所述交通表达图序列为所述交通表达图的序列化表达;处理单元,用于根据所述交通表达图序列,得到地图序列,所述地图序列为电子地图的序列化表达;根据所述地图序列,得到所述电子地图。
在一种可能的实现方式中,所述交通表达图序列包括元素序列和约束序列,所述元素序列表示所述交通表达图中的节点的属性信息,所述约束序列表示所述第一层图结构中的任意两个节点之间的连接关系,以及所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系。
在一种可能的实现方式中,所述编码单元,具体用于对所述交通表达图中的一个或多个节点的属性信息进行序列化,得到元素序列;对所述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;所述层内连接关系包括所述第一层图结构中的任意两个节点之间的连接关系,所述层间连接关系包括所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系;将所述元素序列和所述约束序列的组合作为所述交通表达图的序列化表达,得到所述交通表达图序列。
在一种可能的实现方式中,所述获取单元,具体用于根据城市规划信息,构建所述第一层图结构和所述第二层图结构;所述城市规划信息用于得到城市规划图;确定所述第一层图结构中的节点和所述第二层图结构中的节点之间的连接关系,得到所述交通表达图。
在一种可能的实现方式中,所述获取单元,具体用于提取所述城市规划信息对应的城市规划图中的角点作为顶点,得到多个顶点;确定所述多个顶点之间的连接关系,得到所述第一层图结构。
在一种可能的实现方式中,所述获取单元,具体用于从所述城市规划信息对应的城市规划图中提取属于第一类型的交通元素,所述第一类型的交通元素包括:功能区、交叉口、车道区中的任一项;确定所述第一类型的交通元素之间的连接关系,得到所述第二层图结构。
在一种可能的实现方式中,所述第一层图结构中的各节点均属于第一类型,所述第二层图结构中的各节点均属于第二类型,所述第一类型与所述第二类型不同。
在一种可能的实现方式中,所述地图序列包括第一元素序列和第二元素序列,所述第一元素序列的长度和所述第二元素序列的长度不同,所述第一元素序列表示第一交通元素,所述第二元素序列表示第二交通元素,所述第一交通元素的类型和所述第二交通元素的类型不同,所述第一交通元素和所述第二交通元素对应于所述静态交通场景中的交通元素。
在一种可能的实现方式中,所述第二元素序列还包括第一约束序列和第二约束序列,所述第一约束序列的长度和所述第二约束序列的长度不同,所述第一约束序列表示第三交通元素和第四交通元素之间的连接关系,所述第二约束序列表示第五交通元素和第六交通元素之间的连接关系,所述第三交通元素、所述第四交通元素、所述第五交通元素、所述第六交通元素对应于所述静态交通场景中的交通元素。
在一种可能的实现方式中,所述交通表达图序列表示所述城市规划图中的功能区(用地类型)、道路、交叉口信息,所述地图序列表示人行横道、人行道、交通灯、停车线、车道、道路附属物中的一项或多项。地图序列表示更为细致的路网信息。也就是说,城市规划图中包括用地类型、道路等,不包含具体车道、道路附属物等高精度地图信息;地图序列表示车道、道路附属物等高精度地图信息。
在一种可能的实现方式中,所述电子地图为高精地图(或者称为高精度地图)。
在一种可能的实现方式中,地图生成装置还包括:输入单元,用于输入所述城市规划图。
在一种可能的实现方式中,地图生成装置还包括:输出单元,用于显示全局城市规划图; 输入单元,用于输入用户选择的所述全局城市规划图中的一部分作为所述城市规划图。
在一种可能的实现方式中,地图生成装置还包括:通信单元,用于接收用户通过终端设备发送的所述城市规划图,以及向所述终端设备发送所述电子地图。
在一种可能的实现方式中,所述交通表达图还包括第三层图结构和第四层图结构,所述第一层图结构、所述第二层图结构、所述第三层图结构以及所述第四层图结构中任意两层图结构中的节点的类型不同。
关于第二方面或第二方面的各种可能的实施方式所带来的技术效果,可参考对于第一方面或第一方面的各种可能的实施方式的技术效果的介绍。
第三方面,本申请实施例提供另一种地图生成装置,该地图生成装置包括处理器,该处理器可以用于执行存储器所存储的计算机执行指令,以使上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
在一种可能的实现方式中,存储器位于上述地图生成装置之外。
在一种可能的实现方式中,存储器位于上述地图生成装置之内。
本申请实施例中,处理器和存储器还可能集成于一个器件中,即处理器和存储器还可能被集成于一起。
在一种可能的实现方式中,所述地图生成装置还包括输入输出设备,该输入输出设备,用于输入城市规划图以及输出电子地图等。
第四方面,本申请实施例提供另一种地图生成装置,该地图生成装置包括处理电路和接口电路,该接口电路用于获取数据或输出数据,例如输入城市规划图以及输出电子地图;处理电路用于执行如上述第一方面或第一方面的任意可能的实现方式所示的相应的方法
第五方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,当其在计算机上运行时,使得上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
第六方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机程序或计算机代码,当其在计算机上运行时,使得上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
图1为本申请实施例提供的一种城市规划图的示例;
图2为本申请实施例提供的一种异构图的示例;
图3为城市规划图相对应的高精度地图可视化截图示例;
图4为本申请实施例提供的一种地图生成方法流程图;
图5A为本申请实施例提供的一种顶点层图结构的示例;
图5B为本申请实施例提供的一种车道区层图结构的示例;
图5C为本申请实施例提供的一种交叉口层图结构的示例;
图5D为本申请实施例提供的一种功能层图结构的示例;
图6为本申请实施例提供的另一种地图生成方法流程图;
图7为本申请实施例提供的一种交通表达图的示例;
图8为本申请实施例提供的一种电子地图的可视化结果的示例;
图9为本申请实施例提供的一种地图生成装置的结构示意图;
图10为本申请实施例提供的一种终端设备的结构示意图;
图11是本申请实施例提供的一种服务器的结构示意图。
具体实施方式
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等仅用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。
在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。本申请中使用的术语“多个”是指两个或两个以上。
如背景技术部分所述,目前需要研究如何高效地生成可用于自动驾驶仿真测评的高精度地图的方法。本申请提供了可高效地生成可用于自动驾驶仿真测评的高精度地图的方法。本申请提供的地图生成方法中,以异构图的方式对城市规划图中的静态交通场景进行表达(即采用异构图表达城市规划图中的静态交通场景),可实现对静态交通场景的相对统一和全局的表达。本申请中,交通表达图是一种异构图。异构图的形式允许图中包含多类不同类型的节点,且描述节点的属性类型、参数个数均可不相同,因此可综合表达静态交通场景中的多类元素,即有效表征更为复杂的静态交通场景。由于异构图相比于同构图可表征更为复杂的静态交通场景,因此本申请提供的采用异构图表征静态交通场景的地图生成方案与采用同构图表征静态交通场景的地图生成方案相比,可以提供真实的路网周边设施信息(或者说路网外周边设施信息),具有更好的扩展性。另外,异构图提供的丰富的路网周边设施信息,可为生成更真实的交通流场景提供参考。
下面先对申请实施例提供的地图生成方法适用的场景进行简单的介绍。
地图生成场景1:用户通过输入设备(例如鼠标、键盘等)向地图生成装置输入城市规划图(含相应的城市规划图例解析);该地图生成装置根据该城市规划图生成高精地图文件。例如,用户通过输入设备向地图生成装置输入JPEG(joint photographic experts group)格式或便携式网络图形(portable network graphics,PNG)格式的城市规划图。JPEG是JPEG标准的产物,该标准由国际标准化组织制订,是面向连续色调静止图像的一种压缩标准。JPEG格式是常用的图像文件格式,后缀名为.jpg或.jpeg。PNG是一种采用无损压缩算法的位图格式, 后缀名为.png。地图生成装置可以是具备一定数据处理能力的终端设备,例如台式电脑、笔记本电脑等。
地图生成场景2:用户通过输入设备(例如鼠标、键盘等)选择地图生成装置提供的全局城市规划图中的一部分作为局部城市规划图;该地图生成装置根据该局部城市规划图生成高精地图文件。在该场景中,地图生成装置提供一个可供用户选择的全局城市规划图,用户可选择该全局城市规划图中的任意一个连续区域作为局部城市规划图;该地图生成装置根据该局部城市规划图生成高精地图文件(对应于该连续区域)。地图生成装置可以是具备一定数据处理能力的终端设备,例如台式电脑、笔记本电脑等。
地图生成场景3:用户通过终端设备(例如手机、笔记本电脑等)向地图生成装置(例如服务器)发送城市规划图(含相应的城市规划图例解析);该地图生成装置根据该城市规划图生成高精地图文件,并将该高精地图文件发送给该终端设备。
下面先介绍与本申请提供的地图生成方法相关的技术特征。
同构图
同构图中的节点类型只有一类,并且描述节点的属性类型、参数个数等均相同。目前常用的方法均为以同构图的形式表达静态交通场景。由于此类方法对于静态交通场景的描述多局限或着重于某一特定方面的描述,例如对于道路网络的描述,因此难以对静态交通场景所包含的各类元素进行统一、全局的表达。
异构图
异构图的形式允许图中包含多类不同类型的节点,且描述节点的属性类型、参数个数均可不相同,因此可综合表达静态交通场景中的多类元素,即有效表征更为复杂的静态交通场景。本申请提供的异构图(即交通表达图)可包含多层图结构。示例性的,本申请提供的异构图分为四层图结构,分别为:顶点层、交叉口层、车道区层、功能区层。每一层的图结构均为同构图形式,即每层图结构的内部均只包含一种类型的节点。交叉口层内的每个节点(即交叉口层节点)均表示一个交叉口。顶点层内的每个节点均表示一个顶点层节点。车道区层内的每个节点均表示一个车道区层节点,例如一个车道区。功能区层内的每个节点均表示一个功能区层节点,例如一个功能区。顶点层节点、交叉口层节点、车道区层节点以及功能区层节点是四种不同类型的节点,后面再描述这些节点。异构图中可定义(或者说表达)不同层节点间的连接关系,例如交叉口层节点与车道区节点间定义道路相连关系。在一种可能的实现方式中,地图生成装置以“堆叠”的形式,将多层图结构融合为一个异构图(即交通表达图),形成静态交通场景的异构图表达模型。图1为本申请实施例提供的一种城市规划图的示例。图2为本申请实施例提供的一种异构图的示例。图2中的异构图用于表征图1中的黑色矩阵框中的区域中的静态交通场景。示例性的,本申请提供的异构图分为三层图结构,分别为:顶点层、交叉口层、功能区层。示例性的,本申请提供的异构图分为三层图结构,分别为:顶点层、车道区层、功能区层。示例性的,本申请提供的异构图分为两层图结构,分别为:顶点层、车道区层。应理解,本申请提供的异构图分为两层或两层以上图结构,即由两层图结构或两层以上图结构融合为一个异构图,每层图结构为一个同构图。
异构图和电子地图的序列化表示
本申请定义了异构图的序列表示和电子地图(例如高精度地图)的序列表示。本申请定义(或者说提供)根据异构图得到异构图序列的编码规则和根据电子地图得到地图序列的编码规则(或者说编码方式)。下面描述异构图序列的定义、根据异构图生成异构图序列的过程,以及地图序列的定义、根据电子地图生成地图序列的过程。
将异构图序列(即交通图表达序列)分为元素与约束两部分(即元素序列和约束序列),分别进行定义与编码规则的描述。异构图序列的元素序列部分为异构图中的各层节点的属性信息(或者说各层节点数据)的编码序列,约束序列部分为异构图中的各层内连接、层间连接关系的编码序列。示例性的,异构图中共包含顶点层、车道区层、功能区层、交叉口层四层图结构,因此异构图的元素序列部分共包含顶点层节点、车道区层节点、功能区层节点、交叉口层节点四种不同类型的节点。由于不同类型的节点包含不同属性,因此不同类型的元素序列由一个不定长的序列组成:
顶点:Pnode=(tnode,ID,type,x,y,z)。Pnode表示一个顶点层节点的元素序列。其中,tnode表示该节点为顶点层节点,ID表示该节点的索引值,type表示该节点的属性,分为原生顶点与次生顶点两类,x,y,z表示该节点的三维坐标。原生顶点是指城市规划图中提取得到的角点,异构图中必须包含;次生顶点是指用户手动添加或程序生成的节点,表示功能区出入口等含义,为生成模型的指导信息,异构图中可不包含。应理解,异构图中的任意一个顶点层节点(或者说顶点)可以用Pnode来表示。一个顶点层节点表征一个顶点。
车道区:Proad表示一个车道区节点的元素序列。其中,troad表示该节点为车道区节点,ID表示该节点的索引值,type表示该节点的属性,包括包含出口、包含入口等多类,x,y,z表示该节点的中心点的三维坐标,表示构成该车道区的顶点层节点的索引,direction表示该车道区包含的出入口相对于该节点的中心点的位置,area表示该车道区的面积。应理解,异构图中的任意一个车道区节点(或者说车道区)可以用Proad来表示。一个车道区节点表征一个车道区。
功能区:Pfunction表示一个功能区节点的元素序列。其中,tfunction表示该节点为功能区节点,ID表示该节点的索引值,type表示该节点的属性,包括包含出口、包含入口等多类,x,y,z表示该节点的中心点的三维坐标,表示构成该功能区的顶点层节点的索引,direction表示该节点包含的出入口相对于该节点的中心点的位置,area表示该功能区的面积。应理解,异构图中的任意一个功能区节点(或者说功能区)可以用Pfunction来表示。一个功能区节点表征一个功能区。
交叉口:Pjunction表示一个交叉口节点的元素序列。其中,tjunction表示该节点为交叉口节点,ID表示该节点的索引值,type表示该节点的属性,包括三岔口、四岔口等多类,x,y,z表示该节点的中心点的三维坐标,表示构成该交叉口的顶点层节点的索引,area表示该交叉口的面积。应理解,异构图中的任意一个交叉口节点(或者说交叉口)可以用Pjunction来表示。一个交叉口节点表征一个交叉口。
异构图的约束序列中,由于异构图中包含层内连接关系和层间连接关系两种连接类型,因此异构图的约束序列可包含两种类型。其中,不同类型的约束序列包含不同类型的属性,因此异构图序列的约束序列由不定长序列组成:
层内连接关系:Cinside=(tinside,ID1,ID2,type)。Cinside表示异构图中属于同一层图结构的两个节点之间的连接关系,例如两个顶点层节点之间的连接关系或两个车道区节点之间的连接关系等。其中,tinside表示该连接关系的类型为层内连接关系,ID1,ID2表示该连接关系连接的两个层内节点的索引,type表示该连接关系的连接关系类型,如顶点层内包括相邻、相连关系。两个层内节点是指属于同一层图结构的两个节点。或者说,两个层内节点是指两 个类型相同的节点。
层间连接关系:Cpointer=(tpointer,start,end,type)。Cpointer表示异构图中属于不同层图结构的两个节点之间的连接关系,例如顶点层节点与车道区节点之间的连接关系。其中,tpointer表示该连接关系为层间指向关系,start表示该层间指向关系的起始节点的索引,end表示该层间指向关系的结束节点的索引,type表示该连接关系的连接关系类型。例如,车道区与功能区存在车道区通过出入口与功能区相连的层间指向关系,其中,该层间指向关系的起始节点为车道区节点,该层间指向关系的结束节点为功能区节点。
在一种可能的实现方式中,异构图的图层(图结构)分为顶点层、交叉口层、车道区层、功能区层,根据城市规划图赋予节点相应的类型、属性或参数个数,构建层内连接关系与层间连接关系,从而实现城市规划图中的交通元素与周边设施的综合表达,即生成综合表达城市规划图中的交通元素与周边设施的异构图。
在一种可能的实现方式中,地图生成装置通过遍历堆叠式层次图(即异构图)的各层节点、各层内连接关系、各层间指向关系生成异构图序列(即交通表达图序列)。由于各层节点的属性个数不同,不同层内节点的属性长度不同,因此导致最终将堆叠式层次图编码得到的序列为变长序列,即异构图序列中包括长度不同的序列。本申请中,定义符号Λ为序列及每个元素的起始符号,Ω为序列的终止符号,由此表示变长序列。示例性的,地图生成装置以顶点层、车道区层、功能区层、交叉口层顺序遍历各节点;然后,以同样的顺序遍历各层内连接关系;最后,以交叉口-车道区、交叉口-功能区、车道区-功能区顺序遍历各层间指向关系。
通过各层节点、层内连接关系、层间指向关系的分别编码描述,对堆叠式层次图进行遍历,最终得到对堆叠式层次图编码得到的序列表示(即异构图序列)的示例如下:
其中,第一个Ω之前为各层节点(primitive)编码得到的序列(即元素序列),两个Ω之间为约束编码得到的序列(约束序列)。整体构成了堆叠式层次图编码得到的变长序列表示。或者说,第一个Ω之前为异构图中的各节点的元素序列,两个Ω之间为由异构图中的各连接关系(包括层内连接关系和层间指向关系)编码得到的约束序列。应理解,针对异构图(即交通表达图)的每层元素属性(即每个节点的属性信息)进行序列化,以及层内约束(即层内连接关系)和层间约束关系(即层间连接关系)的序列化,并将序列组合作为异构图的序列化表达,即异构图序列。
高精度地图序列定义同样可分为元素序列与约束序列两部分。本申请通过参考OpenDrive、LaneLet、NuScenes等多种高精度地图格式,提出一种高兼容性的高精度地图序列编码规则。OpenDrive是对路网结构的描述性文件。NuScenes数据集是自动驾驶公司nuTonomy建立的大规模自动驾驶数据集。一种可能的实现方式中,高精度地图的元素序列包含道路、车道、隧道、桥梁、交叉口、交通标志、交通标线、交通灯、道路附属物共9类,其中每个元素根据类型不同,用一组不定长序列表示:
N=(t,p);  (2)
t表示元素(primitive)类型,p表示该类型primitive的参数集合。根据不同类型primitive的参数描述(或者说属性信息),可以将高精度地图的primitive编码为序列:每个值代表1个primitive中的参数值,还可包含不同交通元素的起始符:r(道路),l(车道),j(交叉口),a(交通灯),s(交通标志),b(桥梁),t(隧道),m(交通标线),o(道路附属物);primitive 的停止符e和整个序列的停止符d。primitive和参数按照固定顺序排列。1条道路的示例编码序列如下所示:id1,type1,speed1,lanesCount1,controlPoints1,e,d。
高精度地图的约束序列分为道路间车道连接关系、交叉口内车道连接关系两类,同样不同类型的连接关系对应的约束序列包含的属性不同,用一组不定长序列表示:
R=(Ni,La,Nj,Lb);   (3)
公式(3)的序列表示为ID(索引值)为i的道路中ID为a的车道,与ID为j的道路中ID为b的车道相连。根据交通元素的邻接关系编码为序列。约束序列中的每个值代表1个primitive的索引,还可包含不同元素之间连接关系的起始符:r(道路间的车道连接关系),j(交叉口中的车道连接关系),连接关系停止符e和整个序列的停止符d。车道连接关系(connection)可按照primitive索引从大到小排序。以2条相邻的双向单车道道路为例,约束序列表示为:r,n1,1,n2,1,e,n1,-1,n2,-1,e,d。其中,r,n1,1,n2,1,e表示ID(索引值)为1的道路中ID为1的车道,与ID为2的道路中ID为1的车道相连,n1,-1,n2,-1表示ID(索引值)为1的道路中ID为-1的车道,与ID为2的道路中ID为-1的车道相连。
在一种可能的实现方式中,高精度地图序列按元素序列、约束序列进行组合生成,其中元素序列按照道路、车道、隧道、桥梁、交叉口、交通标志、交通标线、交通灯、道路附属物的固定顺序排列,约束序列按照:道路间的车道连接关系、交叉口中的车道连接关系的固定顺序排列。应理解,元素序列和约束序列按照均可按照其他固定顺序排序,本申请不作限定。也就是说,针对高精度地图中的不同元素进行属性提取和序列化编码,并构建元素间约束的序列化编码,并将序列组合作为高精度地图的序列化表达,即得到高精度地图序列。
基于上述对于异构图的序列表示和电子地图(例如高精度地图)的序列表示的定义与描述,本申请提出一种基于数据驱动方式的序列到序列生成高精度地图的深度学习方法架构(即地图生成模型)。也就是说,本申请提供的深度学习方法架构(即地图生成模型),输入为异构图序列,输出为高精度地图序列。地图生成装置最终可根据高精度地图的编码规则,将高精度地图序列处理转化为高精度地图数据。
下面首先针对用于训练地图生成模型的训练样本数据集进行描述。本申请提出的地图生成模型的输入为异构图序列(即交通图表达序列),例如包含城市规划图中的功能区(用地类型)、道路、交叉口信息,而高精度地图序列中包含道路、车道、道路附属物等更为细致的路网信息。目前任何单一开源数据集均无法直接用于训练本申请提出的地图生成模型,因此本申请提出了基于NuScenes数据集与OpenStreetMap数据的融合数据集构建方法。
NuScenes数据集一个大型的自动驾驶数据集,该数据集在2019年发布高精度地图扩展包。该地图包含11个语义层,包括人行横道、人行道、交通灯、停车线、车道等,满足本方案所需的高精度地图数据内容。该地图包含有波士顿海港、新加坡皇后镇、新加坡北、新加坡荷兰村4张地图的语义矢量地图(json格式)和对应的PNG格式。OpenStreetMap(OSM)项目是志愿者地理信息(volunteered geographic information,VGI)项目的一个著名的全球路线图生产示例,该项目具有大量的自愿参加者。该项目提供覆盖全球范围的城市规划数据,其中包括用地类型、道路等,虽不包含具体车道、道路附属物等高精度地图信息,但包含本申请中构建异构图所需的数据。
本申请可以NuScenes数据集为主,基于其四个地图(即波士顿海港、新加坡皇后镇、新加坡北、新加坡荷兰村)数据的描述、经纬度、轮廓信息,在OpenStreetMap数据中查找对应的数据,并以道路为基准进行配准、融合,形成json格式的融合数据集。
配准融合过程:nuScenes数据集包含异构图所需高精度地图(道路)数据,OpenStreetMap 数据集包含异构图所需功能区数据,因此需要进行配准,得到融合数据集进行训练。一种可能的配准融合过程如下:
(1)下载数据:遍历nuScenes中所有节点的经纬度,取边界值,下载OpenStreetMap对应区域内的数据;
(2)遍历功能区:遍历下载OpenStreetMap数据中所有功能区数据,及组成其所有节点的经纬度坐标;
(3)nuScenes数据中构建功能区语义层:构建功能区语义层,并对每个功能区赋予唯一token(标记)值,功能区类型为OpenStreetMap中的类型,遍历nuScenes中车道拓扑关系及经纬度坐标,对于包含功能区的每个由车道组成的封闭/半封闭区域,每条车道将引用该功能区token;
(4)后处理:进行可视化,手动解决数据冲突问题。
该融合数据集包含异构图序列(即交通图表达序列)所需的用地类型、坐标等信息,同时包含高精度地图所需道路、车道、道路附属物等细致的路网信息。举例来说,模型训练装置以NuScenes数据集为主,通过NuScenes数据的描述、道路轮廓、经纬度信息,在全球OpenStreetMap数据中下载相应数据;通过OpenStreetMap数据获取功能区、用地类型数据,在NuScenes数据中增添“function”(功能区)字段,通过引用围成该封闭区域的所有道路进行数据存储,从而得到融合数据集。图3为城市规划图相对应的高精度地图可视化截图示例。融合数据集由OpenStreetMap数据集和NuScenes数据集进行配准、融合得到。融合数据集中,既包含异构图序列所需的用地类型、坐标等信息,同时包含高精度地图所需道路、车道、道路附属物等细致的路网信息。
完成训练样本数据集构建后,即可进行地图生成模型的训练。一种可能的训练过程如下:
(1)模型参数初始化,即初始化地图生成模型的参数;
(2)将数据集中的异构图序列输入到生成模型,正向计算输出地图序列;
(3)获取地图序列计算值与标签值(ground truth)的损失函数,计算梯度向量;
(4)通过梯度向量调整地图生成模型的参数,使得损失函数向减小的趋势调节;
(5)反复迭代上述过程,直到损失函数达到设置值或不再下降。
地图生成模型的整个训练过程可采用teacher forcing机制,即在训练网络过程中,直接使用训练数据的标签值对应上一项作为下一个状态(state)的输入。
本申请中,地图生成模型可采用Transformer架构。Transformer架构是一种序列到序列深度学习生成模型架构。本申请中,地图生成模型可采用encoder-decoder架构,其中encoder和decoder采用六层相同的架构进行拼接。在输入嵌入(input embedding)步骤中,本申请中采用以节点、约束为单位进行input embedding,即将各层的每个节点、层内约束、层间约束中每个约束分别视为一个统一单位,映射为等长的向量,而后做位置编码,继而作为编码器的输入。上述已描述了地图生成模型的输入(异构图序列)和输出(地图序列),以及如何构建用于训练地图生成模型的训练样本数据集,对于本领域技术人员来说,可采用任意一种序列到序列的模型来训练得到地图生成模型,这里不再详述。也就是说,采用序列到序列的模型对输入输出进行端到端的训练最终可得到地图生成模型。
下面结合附图介绍本申请提供的地图生成方法。
图4为本申请实施例提供的一种地图生成方法流程图。如图4所示,该方法包括:
401、地图生成装置获取交通表达图。
地图生成装置可以是平板电脑、笔记本电脑、台式电脑等具备数据处理能力的终端设备, 也可以是云服务器、网络服务器、应用服务器等。
上述交通表达图为一种异构图。上述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,上述第一层图结构中的节点的类型与上述第二层图结构中的节点的类型不同。例如,第一层图结构中的节点为上述顶点层节点,第二层图结构中的顶点为交叉口节点。
上述交通表达图可用于表达静态交通场景。这里静态交通场景可理解为处于静止状态的交通场景,即车辆、行人、信号灯等的状态均不改变。静态交通场景可包括道路场景、隧道场景、桥梁场景、交叉口场景等任意涉及交通状况的场景。
第一层图结构可以是上述顶点层、车道区层、功能区层、交叉口层中的任一个,第二层图结构可以是上述顶点层、车道区层、功能区层、交叉口层中与第一层图结构不同的任一个。例如,第一层图结构为顶点层,该第一层图结构中的节点均为顶点层节点,第二层图结构为车道区层,该第二层图结构中的节点均为车道区节点。又例如,第一层图结构为顶点层,该第一层图结构中的节点均为顶点层节点,第二层图结构为交叉口层,该第二层图结构中的节点均为交叉口节点。上述交通表达图还可包括其他层图结构。也就是说,地图生成装置获取的交通表达图包括两层或两层以上图结构,即由两层图结构或两层以上图结构融合为一个异构图。示例性的,交通表达图包括顶点层、交叉口层、车道区层、功能区层。示例性的,交通表达图包括三层图结构,分别为:顶点层、交叉口层、功能区层。示例性的,交通表达图包括三层图结构,分别为:顶点层、车道区层、功能区层。示例性的,交通表达图包括两层图结构,分别为:顶点层、车道区层。需要说明的是,交通表达图的每层图结构中有且只有一种类型的节点。示例性的,顶点层中的节点均为顶点层节点,车道区层中的节点均为车道区节点,交叉口层中的节点均为交叉口节点,功能区层中的节点均为功能区节点。
在一种可能的实现方式中,交通表达图还包括第三层图结构和第四层图结构,上述第一层图结构、上述第二层图结构、上述第三层图结构以及上述第四层图结构中任意两层图结构中的节点的类型不同。或者说,交通表达图包括上述至少两层图结构,另外包括上述第三层图结构和上述第四层图结构。示例性的,第一层图结构为顶点层,第二层图结构为车道区层,第三层图结构为交叉口层,第四层图结构为功能区层。
在一种可能的实现方式中,上述第一层图结构中的各节点均属于第一类型(例如顶点层节点),上述第二层图结构中的各节点均属于第二类型(例如功能区节点),上述第一类型与上述第二类型不同。第一层图结构和第二层图结构均为同构图。
步骤401一种可能的实现方式如下:地图生成装置根据城市规划信息,构建第一层图结构和第二层图结构;确定(定义)该第一层图结构中的节点和该第二层图结构中的节点之间的连接关系,得到交通表达图。示例性的,城市规划信息为城市规划图(含相应的城市规划图例解析)。也就是说,地图生成装置可根据城市规划信息,构建交通表达图。
地图生成装置根据城市规划信息,构建交通表达图的一个举例如下:地图生成装置提取城市规划信息对应的城市规划图中的多个顶点,通过定义(确定)各顶点间的连接关系,构建顶点层图结构;以顶点层图结构为基础,从城市规划图中提取交叉口、车道区、功能区等元素(或者说节点,例如交叉口节点、车道区节点、功能区节点),通过分别定义(确定)同类型的各元素之间的连接关系,构建交叉口层图结构、车道区层图结构、功能区层图结构;通过定义不同层图结构的节点间的连接关系,从而使得各层图结构,以“堆叠”的形式融为一体,形成城市规划图的“异构图”表达。城市规划图中的顶点可理解为两条或两条以上线段相交的点。图5A为本申请实施例提供的一种顶点层图结构的示例。如图5A所示,n1至n31分 别表示一个原生顶点或次生顶点,两个顶点间的实线表示相连关系,两个顶点间的虚线表示相邻关系。图5B为本申请实施例提供的一种车道区层图结构的示例。如图5B所示,r1至r7分别表示一个车道区节点,任意两个车道区节点之间的连线表示这两个车道区节点之间的连接关系,不同连线可表示不同类型的连接关系。图5C为本申请实施例提供的一种交叉口区层图结构的示例。如图5C所示,J1、J2、J3表示分别表示一个交叉口节点,两个交叉口节点之间的连线表示这两个交叉口之间的连接关系。交叉口层图结构中可包含多种不同类型的交叉口节点。图5D为本申请实施例提供的一种功能区层图结构的示例。如图5D所示,f1、f2、f3、f4、f5、f6分别表示一个功能区节点,两个功能区节点之间的连线表示这两个功能区之间的连接关系。功能区层图结构中可包含多种不同用地类型的功能区节点,例如公共绿地、广场用地、商业金融用地、文化娱乐用地、教育用地、居民用地、科技研发用地、商业办公综合用地等。功能区层图结构中可包含多种不同类型的连接关系,例如通过车道相连、通过交叉口相连等。
402、地图生成装置根据交通表达图,得到交通表达图序列。
上述交通表达序列为交通表达图的序列化表达。地图生成装置可按照上述定义的编码规则由交通表达图得到交通表达图序列。
步骤402一种可能的实现方式如下:对上述交通表达图中的一个或多个节点(例如所有的节点)的属性信息进行序列化,得到元素序列;对上述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;上述层内连接关系包括上述第一层图结构中的任意两个节点之间的连接关系,上述层间连接关系包括上述第一层图结构中的任一节点和上述第二层图结构中的任一节点之间的连接关系;将上述元素序列和上述约束序列的组合作为上述交通表达图的序列化表达,得到上述交通表达图序列。示例性的,对上述交通表达图中的每个节点(例如包括顶点层节点、交叉口节点、车道区节点、功能区节点)的属性信息进行序列化,得到元素序列。
由于前面(异构图和电子地图的序列化表示)已描述了异构图序列(即交通表达图)的定义以及根据异构图生成异构图序列(即交通表达序列)的过程,故这里不作赘述。
在一种可能的实现方式中,上述交通表达图序列包括元素序列和约束序列,上述元素序列表示上述交通表达图中的节点的属性信息,上述约束序列表示上述第一层图结构中的两个节点之间的连接关系,以及上述第一层图结构中的节点和上述第二层图结构中的节点之间的连接关系。应理解,交通表达图序列中可包含交通表达图中的每个节点对应的元素序列,以及各连接关系对应的约束序列。
403、地图生成装置根据交通表达图序列,得到地图序列。
步骤403一种可能的实现方式如下:将交通表达图序列输入至地图生成模型做处理,得到地图序列。地图生成模型可以是训练得到的一个序列到序列的模型。前面已描述了训练得到地图生成模型的方式,这里不再陈述。
404、地图生成装置根据地图序列,得到电子地图。
电子地图可以是一个高精地图文件。步骤404一种可能的实现方式如下:地图生成装置根据地图编码规则(即前面描述的精度地图序列编码规则),将输出的地图序列处理转化为json格式的地图文件,即电子地图。
本申请实施例中,获取交通表达图;根据该交通表达图,得到交通表达图序列;根据该交通表达图序列,得到地图序列。异构图的形式允许图中包含多类不同类型的节点,且节点描述的属性类型、参数个数均可不相同,因此可综合表达静态交通场景中的多类元素,可有 效表征更为复杂的静态交通场景。本申请实施例提供的地图生成方法中,通过交通表达图(一种异构图)对静态交通场景进行表达,与以同构图(同构图中的节点类型只有一类且节点描述的属性类型、参数个数等均相同)的形式表达静态交通场景相比,可更准确、有效地对静态交通场景所包含的各类元素进行统一、全局的表达,进而提供更真实的路网周边设施信息,具有更好的扩展性。
图6为本申请实施例提供的另一种地图生成方法流程图。图6中的方法流程是图4描述的方法的一种可能的实现方式。在该实现方式中,描述了地图生成装置构建交通表达图的方式以及根据交通表达图得到交通表达图序列的方式。如图6所示,该方法包括:
601、地图生成装置根据城市规划信息,构建第一层图结构,以及根据城市规划信息,构建第二层图结构。
上述第一层图结构中的各节点均属于第一类型,上述第二层图结构中的各节点均属于第二类型,上述第一类型与上述第二类型不同。地图生成装置还可根据城市规划信息构建其他层图结构。城市规划信息可以是城市规划图。示例性的,交通表达图包括三层图结构,分别为:第一层图结构、第二层图结构、第三层图结构。例如,第一层图结构、第二层图结构、第三层图结构依次为顶点层、交叉口层、功能区层。示例性的,交通表达图包括顶点层、交叉口层、车道区层、功能区层;第一层图结构和第二层图结构为这四层中的任意两层。地图生成装置可根据城市规划信息分别构建顶点层、交叉口层、车道区层、功能区层。
在一种可能的实现方式中,第一层图结构为顶点层;地图生成装置根据城市规划信息,构建第一层图结构的方式如下:提取城市规划信息对应的城市规划图中的角点作为顶点,得到多个顶点;确定该多个顶点之间的连接关系,得到第一层图结构。城市规划图中的角点是指该城市规划图中两条或两条以上直线的交点。参阅图5A,图5A中的每个原生顶点均为城市规划图中的一个角点。地图生成装置在原生顶点的基础上,可按照预先配置的规则自动添加次生顶点,也可以支持用户手动添加次生顶点。
地图生成装置根据城市规划信息,构建第二层图结构可能的实现方式如下:从城市规划信息对应的城市规划图中提取属于第一类型的多个交通元素,上述第一类型的交通元素包括功能区、交叉口、车道区中的任一项;确定上述多个交通元素之间的连接关系,得到上述第二层图结构。举例来说,地图生成装置遍历城市规划图中属于第二类型的各交通元素(例如车道区、功能区、交叉口);地图生成装置通过定义(确定)属于第二类型的各节点之间的连接关系,构建第二层图结构。
602、地图生成装置确定第一层图结构中的节点和第二层图结构中的节点之间的连接关系,得到交通表达图。
步骤602一种可能的实现方式如下:以“堆叠”的形式,将多个层图(例如第一层图结构和第二层图结构)融合为一个异构图,即交通表达图;可以准确地形成表达静态交通场景的异构图。示例性的,地图生成装置可确定不同层图结构中的节点间的连接关系,例如:交叉口层节点与车道区节点间定义通过道路相连关系,以“堆叠”的形式,将多层图融合为一个异构图,形成静态交通场景的异构图表达模型,参阅图2。
地图生成装置根据城市规划信息对应的城市规划图构建交通表达图的一个举例如下:用户输入的城市规划图为新加坡维壹科技城城市规划图的部分区域,该区域共包含8个车道区、2个交叉口、2个功能区、20个原生节点(或者称为原生顶点);地图生成装置根据城市规划图分别构建顶点层、交叉口层、车道区层、功能区层;通过确定不同层图结构中的节点间的连接关系,将顶点层、交叉口层、车道区层、功能区层融合为一个异构图,即交通表达图。 图7为本申请实施例提供的一种交通表达图的示例。图7中的交通表达图为地图生成装置根据新加坡维壹科技城城市规划图的部分区域所构建的交通表达图。图7中,n表示顶点层节点、j表示交叉口层节点、r表示车道区节点、f表示功能区层节点。
603、地图生成装置对交通表达图中的各节点的属性信息进行序列化,得到元素序列。
元素序列可包括交通表达图中的各层节点的属性信息的编码序列。对交通表达图中的各节点的属性信息进行序列化可以理解为分别对交通表达图中的每个节点的属性信息进行编码,得到一个表示该节点的属性信息的元素序列。例如,Pnode表示一个顶点层节点的元素序列,Proad表示一个车道区节点的元素序列,Pfunction表示一个功能区节点的元素序列,Pjunction表示一个交叉口节点的元素序列。应理解,地图生成装置可通过Pnode表示交通表达图中的任意顶点层节点,通过Proad表示交通表达图中的任意车道区节点,通过Pfunction表示交通表达图中的任意功能区节点,通过Pjunction表示交通表达图中的任意交叉口节点。或者说,Pnode为一个顶点层节点的属性信息的序列化,Pfunction为一个功能区节点的序列化,Pfunction为一个功能区节点的序列化,Pjunction为一个交叉口节点的序列化。表1为本申请实施例提供的元素序列的示例。
表1
表1中的每行为一个节点的元素序列,其中,n表示顶点层节点、j表示交叉口层节点、r表示车道区节点、f表示功能区层节点,Λ表示序列及每个元素的起始符号。表1中的各参数的含义请参阅Pnode、Proad、Pfunction、Pjunction中的各参数的含义。
604、地图生成装置对交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列。
上述交通表达图中的层内连接关系包括第一层图结构中的两个节点之间的连接关系。上 述交通表达图中的层间连接关系包括上述第一层图结构中的节点和上述第二层图结构中的节点之间的连接关系。约束序列可包括交通表达图中的各层连接关系和各层间连接关系的编码序列。地图生成装置对交通表达图中的层内连接关系和层间连接关系进行序列化可理解为分别对交通表达图中的各层内连接关系和各层间连接关系进行编码,得到每个连接关系的编码序列。示例性的,地图生成装置通过Cinside表示交通表达图中属于同一层图结构的两个节点之间的连接关系,即层内连接关系;通过Cpointer表示交通表达图中属于不同层图结构的两个节点之间的连接关系,即层间连接关系。在一种可能的实现方式中,地图生成装置以顶点层、车道区层、功能区层、交叉口层顺序遍历各层内连接关系,得到各层内连接关系的编码序列;以交叉口-车道区、交叉口-功能区、车道区-功能区顺序遍历各层间指向关系,得到各层间连接关系的编码序列。表2为本申请实施例提供的约束序列的示例。
表2
表2中的每行为表示一种连接关系的约束序列,其中,n表示顶点层节点、j表示交叉口层节点、r表示车道区节点、f表示功能区层节点,Λ为序列及每个连接关系的起始符号。表2中的各参数的含义可参阅Cinside和Cpointer中的各参数的含义。
605、地图生成装置将元素序列和约束序列的组合作为交通表达图的序列化表达,得到交通表达图序列。
元素序列为交通表达图序列中的元素部分,约束序列为交通表达图序列中的约束部分。交通表达图序列的一个示例参阅公式(1)。
606、地图生成装置将交通表达图序列输入至地图生成模型做处理,得到地图序列。
在一种可能的实现方式中,上述地图序列包括第一元素序列和第二元素序列,上述第一元素序列的长度和上述第二元素序列的长度不同,上述第一元素序列表示第一交通元素,上述第二元素序列表示第二交通元素,上述第一交通元素的类型和上述第二交通元素的类型不同,上述第一交通元素和上述第二交通元素对应于上述静态交通场景中的交通元素。第一交通元素、第二交通元素可以是道路、车道、隧道、桥梁、交叉口、交通标志、交通标线、交通灯、道路附属物中的任意两种。例如,第一交通元素为交叉口,第二交通元素为道路,交叉口和道路属于不同类型的交通元素。在该例子中,第一交通元素可用长度为M的序列表示,第二交通元素可用长度为N的序列表示,M和N为大于0的整数,M与N不同。第一交通元素可用长度为M的序列表示可理解为该第一交通元素可用M组参数表示。举例来说,第一交通元素(即交叉口)可用四组参数来表示,每组参数包括一个或多个参数,该四组参数分别为:ID(标识)、type(类型)、speed(速度)、Red_road(交叉口内部道路);其中,ID为该交叉口的标识,type表示该交叉口的类型、speed表示该交叉口的限速,Red_road表示所属该交叉口的道路的标识(或者说索引)。在交叉口定义中,可将交叉口的内部道路的ID在Ref_road进行引用,表示其属于交叉口道路。表3示出了高精地图中的交叉口的示例,表3中的第二列至第五列中的每列表示一组参数。参阅表3,第一交通元素(即交叉口)可用包含四组参数的序列表示,即可用长度为四的序列表示。
表3
举例来说,第二交通元素(即道路)可用十六组参数或更多组参数来表示,每组参数包括一个或多个参数,该十六组参数分别为:Λ(起始符)、ID、type(类型)、speed(速度)、leftlanes(左车道)、rightlanes(右车道)、width(宽度)、controlpoints(控制点)、道路标线起始符、type_line(标线类型)、loc1(位置)、道路附属物起始符、type_obj1(道路附属物类型)、loc2(位置)、type_obj2(道路附属物类型)、loc3(位置);其中,Λ表示道路的起始符,ID为该道路的标识,type表示该道路的类型、speed表示该道路的限速,leftlanes表示该道路中的左车道的个数,rightlanes表示该道路中的右车道的个数,width表示该道路中的各车道的宽度,controlpoints是一组表示该道路的中心点的坐标,type_line是指该道路中的道路标线的位置,loc1表示该道路标线的位置,type_obj1表示道路附属物1的类型,loc2表示该道路附属物1的位置,type_obj2表示道路附属物2的类型,loc3表示该道路附属物2的位置。控制点,即OpenDrive数据格式中表示道路位置、形状的方式,是一组道路的中心点的坐标。中心点的坐标个数至少为2,将中心点依次连接,即可得到道路具体形状描述。type_line与loc一一对应,分别代表道路标线的类型与位置。道路标线主要包括黄实线、黄虚线、白实线等多种类型。loc则表示该标线所属车道。默认标线位置为所属车道的右侧位置,标线形状与车道形状相同,标线宽度为预设默认值。loc对所属车道的引用按OpenDrive标准定义,其中0表示中心车道,1,2,…表示从中心至边缘处的左车道,-1,-2,…表示从中心至边缘处的右 车道。type_obj与loc一一对应,分别代表道路附属物的类型与位置。道路附属物主要包括红绿灯、指示牌等多种类型。loc的定义可采用OpenDrive中的s-t坐标系进行描述,用于表示该道路附属物位于该道路的相对位置。在该举例中,第二交通元素(即道路)可用包含十六组参数的序列表示,即可用长度为十六的序列表示。应理解,第二交通元素(即道路)可用更多或更少组参数来表示。也就是说,不同的道路可用不同长度的序列表示。表4示出了高精地图中的道路的示例。表4中,r1、r2、r3、r4表示4条不同的道路。表4中的第二列至第十七列中的每一列表示一组参数。参阅表4,第二交通元素(即道路)可用包含十六组参数的序列表示,即可用长度为十六的序列表示。
表4
第一元素序列和第二元素序列可以是N=(t,p),t表示元素(primitive)类型,p表示该类型primitive的参数集合。地图序列中可包括多个元素序列,不同类型的元素可用一组不定长序列表示。也就是说,N=(t,p)可表示不同类型的交通元素。在该实现方式中,第一元素序列和第二元素序列的长度不同,不同类型的交通元素通过不定长的序列表示,可以准确地表示不同类型的交通元素。
在一种可能的实现方式中,上述地图序列还包括第一约束序列和第二约束序列,上述第一约束序列的长度和上述第二约束序列的长度不同,上述第一约束序列表示第三交通元素和第四交通元素之间的连接关系,上述第二约束序列表示第五交通元素和第六交通元素之间的连接关系,上述第三交通元素、上述第四交通元素、上述第五交通元素、上述第六交通元素对应于上述静态交通场景中的交通元素。第一约束序列和第二约束序列可以用R=(Ni,La,Nj,Lb)表示,R=(Ni,La,Nj,Lb)表示ID(索引值)为i的道路中ID为a的车道,与ID为j的道路中ID为b的车道相连。地图序列中可包括多个约束序列,不同类型的连接关系可用一组不定长序列表示。也就是说,R=(Ni,La,Nj,Lb)可表示不同类型的连接关系。在该实现方式中,第一约束序列和第二约束序列的长度不同,不同类型的连接关系通过不定长的序列表示,可以准确地表示不同类型的连接关系。
607、地图生成装置根据地图序列,得到电子地图。
步骤607可参阅步骤404。地图生成装置可通过可视化软件来展示处理得到的电子地图。图8为本申请实施例提供的一种电子地图的可视化结果的示例。
本申请实施例提供的地图生成方法通过交通表达图(即异构图)对静态交通场景进行表达,与以同构图(同构图中的节点类型只有一类且节点描述的属性类型、参数个数等均相同)的形式表达静态交通场景相比,可更准确、有效地对静态交通场景所包含的各类元素进行统一、全局的表达,进而提供更真实的路网周边设施信息,具有更好的扩展性。或者说,城市 规划图的异构图表达,除支持交通场景中的基本元素、语义属性与复杂约束关系外,还提供了更丰富、明确的交通相关路网外场景信息。地图生成装置可基于真实城市规划图的输入,可便捷、高效地生成面向自动驾驶仿真的高精度地图数据。本申请实施例提供的地图生成方法由于提供了丰富的路网外周边设施信息,因此可为生成更真实的交通流场景提供参考。另外,异构图中的功能区描述信息,可作为3D渲染模拟器生成真实城市场景依据,从而构建高质量端到端仿真。
下面结合附图介绍可实施本申请实施例提供的地图生成方法的地图生成装置的结构。
图9为本申请实施例提供的一种地图生成装置的结构示意图。如图9所示,地图生成装置包括:
获取单元901,用于获取交通表达图,上述交通表达图用于表达静态交通场景,上述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,上述第一层图结构中的节点的类型与上述第二层图结构中的节点的类型不同;
编码单元902,用于根据上述交通表达图,得到交通表达图序列,上述交通表达图序列为上述交通表达图的序列化表达;
处理单元903,用于根据上述交通表达图序列,得到地图序列;根据上述地图序列,得到电子地图。
在一种可能的实现方式中,编码单元902,具体用于对上述交通表达图中的各节点的属性信息进行序列化,得到元素序列;对上述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;上述交通表达图中的层内连接关系包括上述第一层图结构中的两个节点之间的连接关系,上述交通表达图中的层间连接关系包括上述第一层图结构中的节点和上述第二层图结构中的节点之间的连接关系;将上述元素序列和上述约束序列的组合作为上述交通表达图的序列化表达,得到上述交通表达图序列。
在一种可能的实现方式中,获取单元901,具体用于根据城市规划信息,构建上述第一层图结构和上述第二层图结构;上述城市规划信息用于得到城市规划图;确定上述第一层图结构中的节点和上述第二层图结构中的节点之间的连接关系,得到上述交通表达图。
在一种可能的实现方式中,获取单元901,具体用于提取上述城市规划信息对应的城市规划图中的多个顶点;确定上述多个顶点之间的连接关系,得到上述第一层图结构。
在一种可能的实现方式中,获取单元901,具体用于从上述城市规划信息对应的城市规划图中提取属于第一类型的交通元素,上述第一类型的交通元素包括:功能区、交叉口、车道区中的任一项;确定上述第一类型的交通元素之间的连接关系,得到上述第二层图结构。
在一种可能的实现方式中,上述第一层图结构中的各节点均属于第一类型,上述第二层图结构中的各节点均属于第二类型,上述第一类型与上述第二类型不同。
在一种可能的实现方式中,地图生成装置还包括:输入单元904,用于输入上述城市规划图。举例来说,用户可通过输入单元904(例如包括键盘、鼠标、触摸屏等)向地图生成装置输入城市规划图。
在一种可能的实现方式中,地图生成装置还包括:输出单元905,用于显示全局城市规划图;输入单元904,用于输入用户选择的上述全局城市规划图中的一部分作为上述城市规划图。举例来说,用户通过输入单元(例如鼠标、键盘等)选择地图生成装置提供的全局城市规划图中的一部分作为城市规划图;该地图生成装置根据该城市规划图生成高精地图文件。或者,输出单元905,用于输出电子地图,例如输出高精地图文件。
在一种可能的实现方式中,地图生成装置还包括:通信单元906,用于接收用户通过终 端设备发送的城市规划图,以及向上述终端设备发送上述电子地图。
图10为本申请实施例提供的一种终端设备的结构示意图。如图10所示,该终端设备100包括处理器1001、存储器1002、输入输出设备1003。该处理器1001、存储器1002和输入输出设备1003通过总线相互连接。图10中的终端设备可以为前述实施例中的地图生成装置。
存储器1002包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmableread only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CDROM),该存储器1002用于相关指令及数据。输入输出设备1003用于输入和输出数据。
处理器1001可以是一个或多个中央处理器(central processing unit,CPU),在处理器1001是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。上述实施例中由地图生成装置所执行的步骤可以基于该图10所示的终端设备的结构。在一些实施例中,处理器1001可实现获取单元901的功能、编码单元902的功能以及处理单元903的功能;输入输出设备1003可实现输入单元904的功能、输出单元905的功能以及通信单元906的功能。例如,输入输出设备1003包括显示器,显示器可显示地图和/或全局城市规划图。又例如,输入输出设备1003包括键盘、鼠标、触摸屏等输入设备,该输入设备用于输入用户选择的全局城市规划图中的一部分作为城市规划图。又例如,输入输出设备1003包括通信接口,该通信接口用于接收其他设备发送的城市规划图,以及向其他设备发送电子地图。
图11是本申请实施例提供的一种服务器的结构示意图,该服务器1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1122(例如,一个或一个以上处理器)和存储器1132,一个或一个以上存储应用程序1142或数据1144的存储介质1130(例如一个或一个以上海量存储设备)。其中,存储器1132和存储介质1130可以是短暂存储或持久存储。存储在存储介质1130的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1122可以设置为与存储介质1130通信,在服务器1100上执行存储介质1130中的一系列指令操作。服务器1100可以上述地图生成装置。
服务器1100还可以包括一个或一个以上电源1126,一个或一个以上有线或无线网络接口1150,一个或一个以上输入输出接口1158,和/或,一个或一个以上操作系统1141,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例中由地图生成装置所执行的步骤可以基于该图11所示的服务器结构。在一些实施例中,中央处理器1122可实现获取单元901的功能、编码单元902的功能以及处理单元903的功能;输入输出接口1158可实现通信单元906的功能。例如,输入输出设备1003包括通信接口,该通信接口用于接收其他设备发送的城市规划图,以及向其他设备发送电子地图。
在本申请的实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现前述实施例所提供的地图生成方法。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行前述实施例所提供的地图生成方法。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (21)

  1. 一种地图生成方法,其特征在于,包括:
    获取交通表达图,所述交通表达图用于表达静态交通场景,所述交通表达图包括至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,所述第一层图结构中的节点的类型与所述第二层图结构中的节点的类型不同;
    根据所述交通表达图,得到交通表达图序列,所述交通表达图序列为所述交通表达图的序列化表达;
    根据所述交通表达图序列,得到地图序列,所述地图序列为电子地图的序列化表达;
    根据所述地图序列,得到所述电子地图。
  2. 根据权利要求1所述的方法,其特征在于,所述交通表达图序列包括元素序列和约束序列,所述元素序列表示所述交通表达图中的节点的属性信息,所述约束序列表示所述第一层图结构中的任意两个节点之间的连接关系,以及所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述交通表达图,得到交通表达图序列包括:
    对所述交通表达图中的一个或多个节点的属性信息进行序列化,得到元素序列;
    对所述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;所述层内连接关系包括所述第一层图结构中的任意两个节点之间的连接关系,所述层间连接关系包括所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系;
    将所述元素序列和所述约束序列的组合作为所述交通表达图的序列化表达,得到所述交通表达图序列。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述获取交通表达图包括:
    根据城市规划信息,构建所述第一层图结构和所述第二层图结构;所述城市规划信息用于得到城市规划图;
    确定所述第一层图结构中的节点和所述第二层图结构中的节点之间的连接关系,得到所述交通表达图。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述城市规划信息,构建所述第一层图结构包括:
    提取所述城市规划信息对应的城市规划图中的角点作为顶点,得到多个顶点;
    确定所述多个顶点之间的连接关系,得到所述第一层图结构。
  6. 根据权利要求4或5所述的方法,其特征在于,所述根据所述城市规划信息,构建所述第二层图结构包括:
    从所述城市规划信息对应的城市规划图中提取属于第一类型的交通元素,所述第一类型的交通元素包括:功能区、交叉口、车道区中的任一项;
    确定所述第一类型的交通元素之间的连接关系,得到所述第二层图结构。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述交通表达图还包括第三层图结构和第四层图结构,所述第一层图结构、所述第二层图结构、所述第三层图结构以及所述第四层图结构中任意两层图结构中的节点的类型不同。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述地图序列包括第一元素序列和第二元素序列,所述第一元素序列的长度和所述第二元素序列的长度不同,所述第一元素序列表示第一交通元素,所述第二元素序列表示第二交通元素,所述第一交通元素的类型和所述第二交通元素的类型不同,所述第一交通元素和所述第二交通元素对应于所述静态交通场景中的交通元素。
  9. 根据权利要求8所述的方法,其特征在于,所述地图序列还包括第一约束序列和第二约束序列,所述第一约束序列的长度和所述第二约束序列的长度不同,所述第一约束序列表示第三交通元素和第四交通元素之间的连接关系,所述第二约束序列表示第五交通元素和第六交通元素之间的连接关系,所述第三交通元素、所述第四交通元素、所述第五交通元素、所述第六交通元素对应于所述静态交通场景中的交通元素。
  10. 一种地图生成装置,其特征在于,包括:
    获取单元,用于获取交通表达图,所述交通表达图用于表达静态交通场景,所述交通表达图至少两层图结构,所述至少两层图结构包括第一层图结构和第二层图结构,所述第一层图结构中的节点的类型与所述第二层图结构中的节点的类型不同;
    编码单元,用于根据所述交通表达图,得到交通表达图序列,所述交通表达图序列为所述交通表达图的序列化表达;
    处理单元,用于根据所述交通表达图序列,得到地图序列,所述地图序列为电子地图的序列化表达;根据所述地图序列,得到所述电子地图。
  11. 根据权利要求10所述的装置,其特征在于,所述交通表达图序列包括元素序列和约束序列,所述元素序列表示所述交通表达图中的节点的属性信息,所述约束序列表示所述第一层图结构中的任意两个节点之间的连接关系,以及所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系。
  12. 根据权利要求10或11所述的装置,其特征在于,
    所述编码单元,具体用于对所述交通表达图中的一个或多个节点的属性信息进行序列化,得到元素序列;
    对所述交通表达图中的层内连接关系和层间连接关系进行序列化,得到约束序列;所述层内连接关系包括所述第一层图结构中的任意两个节点之间的连接关系,所述层间连接关系包括所述第一层图结构中的任一节点和所述第二层图结构中的任一节点之间的连接关系;
    将所述元素序列和所述约束序列的组合作为所述交通表达图的序列化表达,得到所述交通表达图序列。
  13. 根据权利要求10至12任一项所述的装置,其特征在于,
    所述获取单元,具体用于根据城市规划信息,构建所述第一层图结构和所述第二层图结 构;所述城市规划信息用于得到城市规划图;
    确定所述第一层图结构中的节点和所述第二层图结构中的节点之间的连接关系,得到所述交通表达图。
  14. 根据权利要求13所述的装置,其特征在于,
    所述获取单元,具体用于提取所述城市规划信息对应的城市规划图中的角点作为顶点,得到多个顶点;
    确定所述多个顶点之间的连接关系,得到所述第一层图结构。
  15. 根据权利要求13或14所述的装置,其特征在于,
    所述获取单元,具体用于从所述城市规划信息对应的城市规划图中提取属于第一类型的交通元素,所述第一类型的交通元素包括:功能区、交叉口、车道区中的任一项;
    确定所述第一类型的交通元素之间的连接关系,得到所述第二层图结构。
  16. 根据权利要求10至15任一项所述的装置,其特征在于,所述交通表达图还包括第三层图结构和第四层图结构,所述第一层图结构、所述第二层图结构、所述第三层图结构以及所述第四层图结构中任意两层图结构中的节点的类型不同。
  17. 根据权利要求10至16任一项所述的装置,其特征在于,所述地图序列包括第一元素序列和第二元素序列,所述第一元素序列的长度和所述第二元素序列的长度不同,所述第一元素序列表示第一交通元素,所述第二元素序列表示第二交通元素,所述第一交通元素的类型和所述第二交通元素的类型不同,所述第一交通元素和所述第二交通元素对应于所述静态交通场景中的交通元素。
  18. 根据权利要求17所述的装置,其特征在于,所述第二元素序列还包括第一约束序列和第二约束序列,所述第一约束序列的长度和所述第二约束序列的长度不同,所述第一约束序列表示第三交通元素和第四交通元素之间的连接关系,所述第二约束序列表示第五交通元素和第六交通元素之间的连接关系,所述第三交通元素、所述第四交通元素、所述第五交通元素、所述第六交通元素对应于所述静态交通场景中的交通元素。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时,使所述处理器执行权利要求1至9任意一项所述的方法。
  20. 一种通信装置,其特征在于,包括处理器,所述处理器与存储器耦合,所述存储器存储指令,所述处理器用于执行所述指令,使得所述通信装置执行如权利要求1至9任一项所述的方法。
  21. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,所述计算机程序包括程序指令,所述程序指令被执行时使得计算机执行如权利要求1至9中任一项所述的方法。
PCT/CN2023/093636 2022-05-23 2023-05-11 地图生成方法和相关产品 WO2023226781A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210564091.6 2022-05-23
CN202210564091.6A CN115131455A (zh) 2022-05-23 2022-05-23 地图生成方法和相关产品

Publications (1)

Publication Number Publication Date
WO2023226781A1 true WO2023226781A1 (zh) 2023-11-30

Family

ID=83376525

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/093636 WO2023226781A1 (zh) 2022-05-23 2023-05-11 地图生成方法和相关产品

Country Status (2)

Country Link
CN (1) CN115131455A (zh)
WO (1) WO2023226781A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131455A (zh) * 2022-05-23 2022-09-30 华为技术有限公司 地图生成方法和相关产品

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256811A (zh) * 2020-10-19 2021-01-22 武汉中海庭数据技术有限公司 一种基于图结构的地图信息表示方法及装置
US20210302170A1 (en) * 2020-03-31 2021-09-30 Gm Cruise Holdings Llc Map maintenance and verification
CN115131455A (zh) * 2022-05-23 2022-09-30 华为技术有限公司 地图生成方法和相关产品

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210302170A1 (en) * 2020-03-31 2021-09-30 Gm Cruise Holdings Llc Map maintenance and verification
CN112256811A (zh) * 2020-10-19 2021-01-22 武汉中海庭数据技术有限公司 一种基于图结构的地图信息表示方法及装置
CN115131455A (zh) * 2022-05-23 2022-09-30 华为技术有限公司 地图生成方法和相关产品

Also Published As

Publication number Publication date
CN115131455A (zh) 2022-09-30

Similar Documents

Publication Publication Date Title
CN109979006B (zh) 室内路网模型构建方法及装置
KR101932623B1 (ko) 3차원 도로 모델의 모델링 방법, 장치 및 저장 매체
Teo et al. BIM-oriented indoor network model for indoor and outdoor combined route planning
Galin et al. Authoring hierarchical road networks
KR100915209B1 (ko) 엑스엠엘 기반의 입체 건물 입면 및 내부 자동 모델링 및내비게이션 시스템 및 그 방법
Kim et al. Planning and visualising 3D routes for indoor and outdoor spaces using CityEngine
WO2023226781A1 (zh) 地图生成方法和相关产品
CN113899384B (zh) 车道级道路的路口面显示方法、装置、设备、介质及程序
Kong et al. Enhanced facade parsing for street-level images using convolutional neural networks
Graser Integrating open spaces into OpenStreetMap routing graphs for realistic crossing behaviour in pedestrian navigation
CN115100643B (zh) 融合三维场景语义的单目视觉定位增强方法和设备
CN115438133A (zh) 一种基于语义关系的地理实体几何表达方法
CN112053440A (zh) 单体化模型的确定方法及通信装置
WO2021146906A1 (zh) 测试场景仿真方法、装置、计算机设备和存储介质
She et al. 3D building model simplification method considering both model mesh and building structure
Nguyen et al. Realistic road path reconstruction from GIS data
WO2023209560A1 (en) Machine learning for vector map generation
Tian et al. Real-to-synthetic: Generating simulator friendly traffic scenes from graph representation
US20230168106A1 (en) Method, apparatus, and system for providing mock map data for map design validation and documentation
CN115757674A (zh) 地图处理方法、装置、设备及存储介质
Stavric et al. From 3D building information modeling towards 5D city information modeling
Somanath et al. On procedural urban digital twin generation and visualization of large scale data
Paz et al. Towards a realistic traffic and driving simulation using 3D rendering
Richter et al. Challenges and experiences in using heterogeneous, geo-referenced data for automatic creation of driving simulator environments
Delazari et al. UFPR CampusMap: a laboratory for a Smart City developments

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23810854

Country of ref document: EP

Kind code of ref document: A1