Road map construction method, device, electronic equipment and storage medium
By obtaining road information from the database and generating separate maps for comparison and auditing, the problem of smart cars taking time and poor accuracy when building and updating high-definition maps is solved, and fast and accurate map construction and updates are achieved.
Patent Information
- Application Number
- CN202210132569.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-14
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-02-14
AI Technical Summary
Smart cars take a long time and have poor accuracy when building and updating HD maps, and are unaudited.
By obtaining road information from the database, generating separate road maps and comparing them to the actual map, reducing drawing time and improving accuracy.
Effectively reduce the time to build maps and ensure the accuracy of map updates through comparison.
Smart Images

Figure CN114526723B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a road map construction method, device, electronic device and storage medium. Background Art
[0002] Existing smart cars are developing rapidly. Smart cars need to use high-definition maps in the process of intelligent assisted driving, and have high requirements for the accuracy and timeliness of maps. However, it takes a long time to build and update high-definition maps for smart cars, and they are not reviewed, so the accuracy is poor. Summary of the invention
[0003] The embodiments of the present application disclose a road map construction method, device, electronic device and storage medium, which can generate a separate road map based on the acquired road information, which is less time-consuming and uses a target map to compare the road map with the road information in the actual map, which helps to compare and review the road map before updating the high-definition map.
[0004] A first aspect of an embodiment of the present application provides a road map construction method, the method comprising:
[0005] Acquire a data file from a database, wherein the data file includes road information collected by the vehicle through a sensor device on the road on which the vehicle is traveling;
[0006] extracting the road information from the data file;
[0007] The road information is drawn on a preset image of a first image size to obtain a road map, and the road map is superimposed on an actual map of the first image size to obtain a target map, wherein the target map is used to compare the road map with the road information in the actual map.
[0008] As an optional implementation manner, in the first aspect of this embodiment, extracting the road information from the data file includes:
[0009] According to the defined data format of the road information, the data file is parsed to obtain the road information.
[0010] As an optional implementation manner, in the first aspect of this embodiment, the road information includes at least geographical location coordinates corresponding to the driving trajectory and the lane line respectively; the road information is drawn on the preset image of the first image size to obtain a road map, including:
[0011] According to the resolution of the preset image of the first image size, the geographical location coordinates corresponding to the driving track and the lane line are converted to obtain the pixel coordinates corresponding to the driving track and the lane line in the preset image;
[0012] The road information is drawn on the preset image according to the pixel coordinates corresponding to the driving track and the lane line, so as to obtain a road map.
[0013] As an optional implementation manner, in the first aspect of this embodiment, the road information is drawn on a preset image of a first image size to obtain a road map, and the road map is superimposed on an actual map of the first image size to obtain a target map, including:
[0014] According to the pixel coordinates respectively corresponding to the driving track and the lane line, the driving track and the lane line are added to the actual map of the first image size to obtain a target map.
[0015] As an optional implementation manner, in the first aspect of this embodiment, after drawing the road information on the preset image of the first image size to obtain a road map, and superimposing the road map with the actual map of the first image size, the method further includes:
[0016] According to a second image size, the road map is resized to obtain a road map of a second image size, where the second image size is any image size smaller than the first image size;
[0017] The road map of the second image size is superimposed on the actual map of the second image size.
[0018] As an optional implementation manner, in the first aspect of this embodiment, the step of resizing the road map according to the second image size to obtain the road map of the second image size includes:
[0019] According to the third image size, the road map of the first image size is segmented to obtain a plurality of groups of road map blocks, each group of road map blocks includes at least two road maps of the third image size, the road maps of the third image sizes each include an equal number of pixels, and the third image size is smaller than or equal to the second image size;
[0020] Synthesizing the road maps of the third image size in each group of road map blocks accordingly to obtain a plurality of synthesized road maps;
[0021] The multiple synthetic road maps are merged according to the second image size to obtain a road map of the second image size.
[0022] As an optional implementation manner, in the first aspect of this embodiment, after drawing the road information on the preset image of the first image size to obtain a road map, the method further includes:
[0023] The road map of the first image size is sent to the database for storage, so that the vehicle-mounted terminal of the vehicle obtains the road map of the first image size from the database and loads the road map of the first image size.
[0024] A second aspect of an embodiment of the present application provides a road map construction device, the device comprising:
[0025] A data acquisition module, used to acquire a data file from a database, wherein the data file includes road information collected by the drivable vehicle on the road on which it is traveling;
[0026] An information extraction module, used for extracting the road information from the data file;
[0027] A picture construction module is used to draw the road information on a preset image of a first image size to obtain a road map, and to superimpose the road map with an actual map of the first image size to obtain a target map, wherein the target map is used to compare the road map with the road information in the actual map, and the first image size is the image size of the preset image.
[0028] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements any one of the road map construction methods disclosed in the embodiments of the present application.
[0029] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, any one of the road map construction methods disclosed in the embodiments of the present application is implemented.
[0030] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0031] A data file containing road information collected by vehicles is obtained from a database, and road information is extracted therefrom. The road information is drawn on a preset image to obtain a separate road map. This can avoid directly drawing road information in an actual map, effectively reducing the time required to draw a map containing road information. The separate road map is superimposed on an actual map of the same image size to compare the road map with the road information in the actual map, thereby ensuring the accuracy of the actual map update. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 It is a schematic diagram of an application scenario of a road map construction method disclosed in an embodiment of the present application;
[0034] Figure 2 It is a method flow diagram of a road map construction method disclosed in an embodiment of the present application;
[0035] Figure 3 is a schematic diagram of a method flow of a road map construction method disclosed in an embodiment;
[0036] Figure 4 is a schematic diagram of a process of obtaining road maps of different image sizes disclosed in an embodiment;
[0037] Figure 5 A schematic diagram of a road map zoom disclosed in an embodiment;
[0038] Figure 6 It is a structural schematic diagram of a road map construction device disclosed in an embodiment of the present application;
[0039] Figure 7 is a schematic structural diagram of another road map construction device disclosed in an embodiment of the present application;
[0040] Figure 8 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0043] The embodiments of the present application disclose a road map construction method, device, electronic device and storage medium, which can generate a separate road map based on the acquired road information, which is less time-consuming, and compares the road map with the actual map to improve the accuracy of updating the road information in the actual map. The following are detailed descriptions.
[0044] See also Figure 1 , Figure 1 Schematic diagram of an application scenario of a road map construction method disclosed in an embodiment of the present application. Figure 1 As shown, the server 10 and the vehicle 20 may be included. The vehicle 20 may be provided with an onboard terminal. The server 10 is in communication connection with the onboard terminal of each vehicle 20. The server 10 may be a server or a server cluster. The server 10 may obtain a data file from a database, extract road information from the data file, construct a road map based on the road information, and store the road map. At this time, the onboard terminal in the vehicle 20 may obtain the stored road map, and load, render and display the road map.
[0045] See also Figure 2 , Figure 2 1 is a schematic diagram of a method flow of a road map construction method disclosed in an embodiment of the present application, and the method can be applied to the aforementioned server 10. Figure 2 As shown, the method may include the following steps:
[0046] 210. Obtain a data file from a database, where the data file includes road information collected by the vehicle through a sensor device on the road on which it is traveling.
[0047] In an embodiment of the present application, the server side obtains a data file from a database, and the database may be an internal database of the server side, or a cloud database such as a cloud disk in an object storage service. The data file obtained by the server side includes road information collected by the vehicle on the road on which it is traveling. In other words, while the vehicle is traveling on the road, it may collect the vehicle's driving status information and the road information of the current road on which it is traveling through sensing equipment such as speed sensors, position sensors, or satellite positioning devices, and the collected information constitutes a data file, and the data file is sent to the database on the server side for storage. There is no specific limitation on the format of the road information and other information in the data file, such as the vehicle's driving status information. Among them, the road information may be information such as lane lines and driving trajectories of the road on which the vehicle is traveling.
[0048] 220. Extract road information from the data file.
[0049] In the embodiment of the present application, the server extracts the road information from the acquired data file. Specifically, when each vehicle generates a data file based on the road information and other information, it can mark the information of different contents separately, for example, marking the road information as road, marking the vehicle status information as car, etc., so that the information of different contents in the generated data file has different marks. At this time, the server can extract the road information in the data file according to the mark corresponding to the road information in the data file.
[0050] In one embodiment, the process of extracting road information from the data file in step 220 performed by the server may include the steps of: parsing the data file according to the defined data format of the road information to obtain the road information.
[0051] In some embodiments, the data file may be a binary code file, such as a snippet file converted through the protobuf protocol, or a file in another data format. The server parses the data file according to the data format of the road information defined in the content, such as the server parses the binary code corresponding to the road information in the snippet file according to the binary code sequence corresponding to the road information defined by the protobuf protocol, thereby obtaining the road information. In an embodiment of the present application, the data file is parsed to obtain the road information through the defined data format of the road information, which can avoid additional identification operations on the road information, and the road information in the data file cannot be extracted when there is no defined data format for the road information, thereby ensuring the security of the information.
[0052] 230. Draw the road information on the preset image of the first image size to obtain a road map, and superimpose the road map with the actual map of the first image size to obtain a target map, wherein the target map is used to compare the road map with the road information in the actual map.
[0053] In an embodiment of the present application, the server side draws the extracted road information on a preset image of the first image size, that is, draws the lane lines and driving tracks of the road on which the vehicle is traveling on the preset image, and obtains a map containing the drawn road information, that is, a road map. After drawing the road map, the server side can superimpose the obtained road map of the first image size on the actual map of the same size to obtain a target map. The server side can transmit the obtained target map to the terminal in the vehicle, so that the terminal displays the target map, so that the map update team can compare the road information in the road map of the same size and the road information in the actual map. Among them, the terminal can be a vehicle-mounted terminal or other terminal devices such as a computer, a mobile phone, etc. The first image size can be an image size under a specified pixel value, such as an image size with a pixel value of 16384*16384. The preset image can be a blank transparent image; for the superposition of the road map and the actual map of the first image size, specifically, after the server draws the travel trajectory and lane lines on this blank transparent image, the drawn road map is overlaid on the actual map of the same image size to form a target map; or the server binds the drawn road map with the actual map of the same image size to form a map set including the road map of the first image size and the actual map of the first image size, and the map set is the target map.
[0054] By adopting the above-mentioned embodiment, it is possible to avoid directly drawing road information in the actual map, effectively reducing the time required to draw a map containing road information, and superimposing a separate road map with an actual map of the same image size to compare the road map with the road information in the actual map, thereby ensuring the accuracy of the actual map update.
[0055] In one embodiment, see Figure 3 , Figure 3 The method flow chart of a road map construction method disclosed in an embodiment is as follows. The method can be applied to the aforementioned server 10. The road information at least includes the geographical location coordinates corresponding to the driving track and the lane line. Figure 3 As shown, the method may include the following steps:
[0056] 310. Obtain a data file from a database, where the data file includes road information collected by the vehicle through a sensor device on the road on which it is traveling.
[0057] In the embodiment of the present application, the specific process of executing step 310 on the server side is the same as the specific process of executing step 210, which will not be repeated here.
[0058] 320. Extract road information from the data file.
[0059] In the embodiment of the present application, the specific process of executing step 320 on the server side is the same as the specific process of executing step 220, which will not be repeated here.
[0060] 330. According to the resolution of the preset image of the first image size, the geographic location coordinates corresponding to the driving track and the lane line are converted to obtain the pixel coordinates corresponding to the driving track and the lane line in the preset image.
[0061] In an embodiment of the present application, the road information includes the driving track of the road on which the vehicle is traveling and the geographical location coordinates of the lane line, and the geographical location coordinates may be longitude and latitude coordinates. The server side can confirm the number of pixels of the preset image of the first image size and the coordinates of each pixel based on the resolution of the preset image of the first image size. There is a fixed range for longitude and latitude coordinates, so based on the number of pixels in the first image size, the conversion relationship between the longitude and latitude coordinate system and the pixel coordinate system can be determined, and then based on the conversion relationship between the longitude and latitude coordinate system and the pixel coordinate system, the geographical location coordinates corresponding to the extracted driving track and lane line are converted, thereby determining the pixel coordinates of the driving track and lane line in the preset image of the first image size.
[0062] For example, if the longitude coordinate of a point in the driving track is LNG, then to convert it to the X-axis coordinate in the pixel coordinate, X=(((LNG+180) / 360×N×256)%256+0.5), where N is the number of pixel groups on the X-axis in the preset image of the first image size in the pixel coordinate system, with 256 pixels as a pixel group, and % is the modulo operation. The conversion of the latitude coordinate to the Y-axis coordinate in the pixel coordinate is similar, and will not be repeated here.
[0063] 340. Draw the road information on the preset image according to the pixel coordinates corresponding to the driving trajectory and the lane line to obtain a road map, and superimpose the road map with the actual map of the first image size to obtain a target map, which is used to compare the road map with the road information in the actual map.
[0064] In an embodiment of the present application, after obtaining the pixel coordinates corresponding to the driving track and the lane line in the preset image of the first image size, the server side draws the driving track and the lane line in the preset image of the first image size according to the pixel coordinates to obtain a road map. Specifically, the server side may split the driving track and the lane line into a plurality of points, and then draw a plurality of points in the preset image of the first image size according to the pixel coordinates of the plurality of points in the preset image of the first image size, thereby obtaining the driving track and the lane line in the preset image of the first image size. After obtaining the road map, the server side superimposes the road map with the actual map of the first image size to obtain the target map in the same manner as in step 210, which will not be repeated here.
[0065] In an embodiment of the present application, the positions of the driving trajectory and lane lines in a preset image of the first image size are determined by the conversion relationship between the geographic location coordinates and the image coordinate data, and then a road image is drawn, thereby improving the accuracy of the road information in the drawn road image.
[0066] In one embodiment, the server side draws the road information on the preset image of the first image size in executing step 340 to obtain a road map, and superimposes the road map with the actual map of the first image size to obtain the target map, which may include the following steps:
[0067] According to the pixel coordinates corresponding to the driving track and the lane line, the driving track and the lane line are added to the actual map of the first image size to obtain the target map.
[0068] In an embodiment of the present application, after the server obtains the pixel coordinates corresponding to the driving track and the lane line in the preset image of the first image size, the server draws the driving track and the lane line in the actual map of the first image size, so that the actual map of the first image size is added with the road information extracted by the server to obtain the target map. Among them, the actual map superimposed with the road map must have not only the same image size, but also the same resolution or number of pixels. Therefore, the server can split the driving track and the lane line into several points according to the pixel coordinates of the driving track and the lane line in the preset image of the first image size, and draw the several points on the corresponding pixels in the actual map of the first image size, thereby completing the addition of the driving track and the lane line on the actual map of the first image size to obtain the target map.
[0069] In an embodiment of the present application, the driving trajectory and lane lines are added to an actual map of the same size as the preset image, and can be directly displayed and compared in one map, which can effectively save storage space.
[0070] In some embodiments, after the server adds the driving track and lane lines to the actual map of the first image size and obtains the target map, it can also mark the driving track and lane lines added to the actual map of the first image size.
[0071] By marking the added driving tracks and lane lines, the updated driving tracks and lane lines in the actual map can be intuitively determined, making it easier to review.
[0072] In some embodiments, when the server adds the driving track and lane line to the actual map of the first image size to obtain the target map, if there is an actual driving track or actual lane line at the position where the driving track or lane line is to be added to the actual map, then the driving track or lane line will not be added to the actual map.
[0073] In the embodiment of the present application, the server side can split the driving track and lane line into several points, and add each point to the actual map of the first image size according to the pixel coordinates corresponding to each point in the preset image of the first image size; if there is already a driving track or lane line point at the corresponding pixel coordinate, then the point from which the driving track and lane line are split is not added to the pixel coordinate. By judging whether there is already a driving track or lane line at the position where the driving track or lane line is to be added, and if so, stopping adding the driving track or lane line, the content to be added to the actual map can be reduced as much as possible, thereby improving the simplicity of the target map.
[0074] In one embodiment, see Figure 4 , Figure 4 The following is a flow chart of obtaining road maps of different image sizes disclosed in an embodiment. After the server executes step 230 of drawing road information on a preset image of a first image size to obtain a road map, and superimposing the road map with an actual map of the first image size, the following steps may also be performed:
[0075] 410. Adjust the size of the road map according to the second image size to obtain a road map of the second image size, where the second image size is any image size smaller than the first image size.
[0076] 420. Superimpose the road map of the second image size and the actual map of the second image size.
[0077] In an embodiment of the present application, after the server draws the driving track and lane line on the preset image of the first image size, the image size of the obtained road map can be adjusted. Since the image size is related to the size and resolution of the content in the image, road maps with different image sizes, different content sizes and different resolutions can be obtained. The server adjusts the size of the road map according to the second image size. Specifically, the road map of the first size can be scaled to a road map of the second image size. After scaling, the server superimposes the road map of the second image size obtained on the actual map of the same size to obtain a target map of the second image size. Among them, the second image size is any image size smaller than the first image size. For example, in the road map of the first image size, it can be a 16*16 image size, 4096*4096 pixel map, which can clearly display the drawn driving track and lane line, and the second image size can be 8*8 image size, 2048*2048 pixels, which can display most of the driving track and lane line.
[0078] In addition, after the server adjusts the size of the road map of the first image size according to the second image size to obtain the road map of the second image size, it can continue to adjust the size of the road map of the second image size according to other image sizes to obtain the road map of other image sizes, and superimpose the road map of other image sizes with the actual map of the same image size, and this process can be repeated multiple times. The other image size can be any image size smaller than the second image size. For example, the other image size can be a 2*2 image size, 512*512 pixels.
[0079] In an embodiment of the present application, a road map of a first image size is scaled to obtain a road map of a different image size, and the road map is superimposed with an actual map of the same size as the scaled road map. The actual maps of different image sizes can be reviewed and updated.
[0080] In one embodiment, see Figure 5 , Figure 5 The process of the server side performing step 410 to adjust the size of the road map according to the second image size to obtain the road map of the second image size may include the following steps:
[0081] According to the third image size, the road map of the first image size is segmented to obtain multiple groups of road map blocks, each group of road map blocks contains at least two road maps of the third image size, the road maps of the third image sizes contain an equal number of pixels, and the third image size is less than or equal to the second image size.
[0082] The road maps of the third image size in each group of road map blocks are synthesized accordingly to obtain a plurality of synthesized road maps.
[0083] According to the second image size, the multiple synthesized road maps are merged to obtain a road map of the second image size.
[0084] In an embodiment of the present application, the server divides the road map of the first image size according to the third image size. The third image size can be the smallest image size set, and each third image size contains the same number of pixels. After dividing the road map of the first image size, the server obtains multiple road maps of the third image size. At least two road maps of the third image size form a group of road map blocks, and the number of road maps of the third image size contained in each group of road map blocks is the same. For example, Figure 5 In the example, the third image size may be an image size of 1*1, and the third image size includes 256*256 pixels. Figure 5 In the figure, the road map of the first image size is a 16*16 image size, 4096*4096 pixel map. At this time, the road map of the first image size is divided according to the third image size to obtain 16 road maps of the third image size. At this time, 4 road maps of the third image size can be combined into a group of road map blocks. Then, the road map of the first image size can include 4 groups of road map blocks after division.
[0085] After the server divides the road map of the first image size, since the road maps of the third image size have the same image size and contain the same number of pixels, the server synthesizes the third image size in each group of road map blocks to obtain multiple synthesized road maps, wherein the number of synthesized road maps is the same as the number of groups of road map blocks. For example, the road map of the first image size contains 4 groups of road map blocks, and the road maps of the third image size in the 4 groups of road map blocks are synthesized to obtain 4 synthesized road maps. After obtaining multiple synthesized road maps, the server merges the synthesized road maps and may adjust the size after merging to obtain a road map of the second image size. For example, in Figure 5In the example, the server can synthesize the 4 road maps of the third image size in each group of road map blocks accordingly. Specifically, every 4 pixels in each road map of the third image size can be merged into 1 pixel. By analogy, the 4 road maps of the third image size in each group of road map blocks can be merged to obtain a synthesized road map with an image size of 2*2 and a pixel number of 256*256. After obtaining the 4 synthesized road maps, the server merges the 4 synthesized road maps to obtain a road map with an image size of 16*16 and a pixel number of 2048*2048. At this time, the server can resize the road map to obtain a road map of the second image size, that is, a road map with an image size of 8*8 and 2048*2048 pixels.
[0086] In an embodiment of the present application, by segmenting a road map of a first image size, synthesizing them in groups, and finally merging them to obtain a road map of a second image size, the integrity of the content contained in the road map of the second image size can be ensured and high definition can be maintained at the second image size.
[0087] In one embodiment, after the server performs step 230 of drawing the road information on the preset image of the first image size to obtain a road map, the server may further perform the following steps:
[0088] The road map of the first image size is sent to a database for storage, so that the vehicle-mounted terminal obtains the road map of the first image size from the database and loads the road map of the first image size.
[0089] In the embodiment of the present application, the server sends the road map of the first image size to a database for storage, and the database may be a database where data files are stored. The vehicle-mounted terminal of the vehicle may obtain the stored road map of the first image size from the database, and load, render and display the road map of the first image size.
[0090] In addition, the vehicle-mounted terminal can also obtain the road map of the second image size or the road map of other image sizes stored in the database, and load, render and display the road map of the second image size or the road map of other image sizes.
[0091] In some embodiments, after obtaining the road map of the first image size, the second image size or other image size, the server can classify the road map according to the image size, and then store the road maps of different levels separately in the database. By storing the road maps of different image sizes in a hierarchical manner, it is more convenient to obtain the road map of the required image size.
[0092] In an embodiment of the present application, the vehicle terminal loads, renders and displays the road map in the database, so that the vehicle terminal does not need to build the road map itself, thereby improving the efficiency of road map construction and shortening the time required for the vehicle terminal to obtain the road map.
[0093] See also Figure 6 , Figure 6 Schematic diagram of a road map construction device disclosed in an embodiment of the present application, which can be applied to a server. Figure 6 As shown, the road map construction device 600 may include: a data acquisition module 610 , an information extraction module 620 and a picture construction module 630 .
[0094] The data acquisition module 610 is used to acquire a data file from a database, where the data file includes road information collected by a drivable vehicle on the road on which it is traveling.
[0095] The information extraction module 620 is used to extract road information from the data file.
[0096] The image construction module 630 is used to draw the road information on a preset image of a first image size to obtain a road map, and to superimpose the road map with an actual map of the first image size to obtain a target map. The target map is used to compare the road map with the road information in the actual map. The first image size is the image size of the preset image.
[0097] In one embodiment, the information extraction module 620 is further configured to:
[0098] According to the defined data format of the road information, the data file is parsed to obtain the road information.
[0099] In one embodiment, the road information includes at least the geographical location coordinates corresponding to the driving track and the lane line.
[0100] The picture construction module 630 is further used for:
[0101] According to the resolution of the preset image of the first image size, the geographical location coordinates corresponding to the driving track and the lane line are converted to obtain the pixel coordinates corresponding to the driving track and the lane line in the preset image.
[0102] According to the pixel coordinates corresponding to the driving trajectory and lane lines, the road information is drawn on the preset image to obtain a road map.
[0103] In one embodiment, the picture construction module 630 is further configured to:
[0104] According to the pixel coordinates corresponding to the driving track and the lane line, the driving track and the lane line are added to the actual map of the first image size to obtain the target map.
[0105] In one embodiment, the picture construction module 630 is further configured to:
[0106] The road map of the first image size is sent to a database for storage, and the vehicle-mounted terminal of the vehicle obtains the road map of the first image size from the database and loads the road map of the first image size.
[0107] Please also read Figure 7 , Figure 7 is a schematic diagram of the structure of another road map construction device disclosed in an embodiment of the present application. Figure 7 The road map construction device shown is composed of Figure 6 The road map construction device shown is optimized. Figure 6 Compared with the road map construction device shown, Figure 7 The road map construction device 600 shown may also include:
[0108] The size adjustment module 640 is used to adjust the size of the road map according to the second image size to obtain a road map of the second image size, where the second image size is any image size smaller than the first image size.
[0109] The road map of the second image size is superimposed on the actual map of the second image size.
[0110] In one embodiment, the size adjustment module 640 is further configured to:
[0111] According to the third image size, the road map of the first image size is segmented to obtain multiple groups of road map blocks, each group of road map blocks contains at least two road maps of the third image size, the road maps of the third image sizes contain an equal number of pixels, and the third image size is less than or equal to the second image size.
[0112] The road maps of the third image size in each group of road map blocks are synthesized accordingly to obtain a plurality of synthesized road maps.
[0113] According to the second image size, the multiple synthesized road maps are merged to obtain a road map of the second image size.
[0114] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of a structure of an electronic device disclosed in an embodiment, and the electronic device can be applied to driving a vehicle, and is not specifically limited here. Figure 8 As shown, the electronic device 800 may include:
[0115] A memory 810 storing executable program code;
[0116] a processor 820 coupled to the memory 810;
[0117] The processor 820 calls the executable program code stored in the memory 810 to execute any one of the road map construction methods disclosed in the embodiments of the present application.
[0118] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the road map construction methods disclosed in the embodiment of the present application.
[0119] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute any one of the road map construction methods disclosed in the embodiments of the present application.
[0120] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0121] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0122] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0125] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0126] The above is a detailed introduction to a road map construction method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A road map construction method, characterized in that: The method comprises: Acquire a data file from a database, wherein the data file includes road information collected by the vehicle through a sensor device on the road on which the vehicle is traveling; extracting the road information from the data file; The road information is drawn on a preset image of a first image size to obtain a road map, and the road map is superimposed on an actual map of the first image size to obtain a target map, wherein the target map is used to compare the road map with the road information in the actual map; The extracting the road information from the data file includes: parsing the data file according to a defined data format of the road information to obtain the road information; the data file is a binary code file, and the data format of the road information includes a binary code sequence corresponding to the road information.
2. The method according to claim 1, characterized in that The road information at least includes the geographical location coordinates corresponding to the driving track and the lane line respectively; the road information is drawn on the preset image of the first image size to obtain a road map, including: According to the resolution of the preset image of the first image size, the geographical location coordinates corresponding to the driving track and the lane line are converted to obtain the pixel coordinates corresponding to the driving track and the lane line in the preset image; The road information is drawn on the preset image according to the pixel coordinates corresponding to the driving trajectory and the lane line, so as to obtain a road map.
3. The method according to claim 2, characterized in that The method of drawing the road information on the preset image of the first image size to obtain a road map, and superimposing the road map with the actual map of the first image size to obtain a target map includes: According to the pixel coordinates respectively corresponding to the driving track and the lane line, the driving track and the lane line are added to the actual map of the first image size to obtain a target map.
4. The method according to claim 1, characterized in that: After drawing the road information on the preset image of the first image size to obtain a road map, and superimposing the road map with the actual map of the first image size, the method further includes: According to a second image size, the road map is resized to obtain a road map of a second image size, where the second image size is any image size smaller than the first image size; The road map of the second image size is superimposed on the actual map of the second image size.
5. The method according to claim 4, characterized in that The step of adjusting the size of the road map according to the second image size to obtain the road map of the second image size includes: According to the third image size, the road map of the first image size is segmented to obtain a plurality of groups of road map blocks, each group of road map blocks includes at least two road maps of the third image size, the road maps of the third image sizes each include an equal number of pixels, and the third image size is smaller than or equal to the second image size; Synthesizing the road maps of the third image size in each group of road map blocks accordingly to obtain a plurality of synthesized road maps; The multiple synthetic road maps are merged according to the second image size to obtain a road map of the second image size.
6. The method according to any one of claims 1 to 5, characterized in that: After drawing the road information on the preset image of the first image size to obtain a road map, the method further includes: The road map of the first image size is sent to the database for storage, so that the vehicle-mounted terminal of the vehicle obtains the road map of the first image size from the database and loads the road map of the first image size.
7. A road map construction device, characterized in that: The device comprises: A data acquisition module, used to acquire a data file from a database, wherein the data file includes road information collected by a drivable vehicle on the road on which it is traveling; An information extraction module, used for extracting the road information from the data file; A picture construction module, used for drawing the road information on a preset image of a first image size to obtain a road map, and superimposing the road map with an actual map of the first image size to obtain a target map, wherein the target map is used for comparing the road map with the road information in the actual map, and the first image size is the image size of the preset image; The information extraction module is further used to parse the data file according to the defined data format of the road information to obtain the road information; the data file is a binary code file, and the data format of the road information includes a binary code sequence corresponding to the road information.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
