Lane line rendering method, device and computer readable storage medium

By using lane line data in JSON format to update the backend server, the problem of time-consuming and laborious lane line rendering in existing technologies is solved, enabling real-time display and efficient data updating of lane lines in electronic maps.

CN114445520BActive Publication Date: 2026-01-02ZHIDAO NETWORK TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210112157.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2026-01-02
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

Existing lane line rendering methods are time-consuming and labor-intensive, resulting in poor real-time performance of electronic maps, especially with significant workload and delays during data updates.

Method used

Lane line attribute data and line feature vector data in JSON format are updated in the backend server database, reducing the amount of calculation and data. Lane lines are then obtained and drawn through the web frontend.

Benefits of technology

It reduces the consumption of computing resources, enables real-time display of lane lines in electronic maps, and improves the efficiency and response speed of data updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445520B_ABST
    Figure CN114445520B_ABST
Patent Text Reader

Abstract

The application relates to a lane line rendering method, device and computer readable storage medium. The method comprises the following steps: acquiring current map related parameters; acquiring lane line attribute data and line element vector data in JSON format provided by a back-end server according to the current map related parameters; and drawing lane lines corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data. The scheme provided by the application can reduce the consumption of computing resources and can display lane lines in real time on an electronic map.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automatic driving, and particularly relates to a lane line rendering method and device and a computer readable storage medium. BACKGROUND

[0002] Lane lines are important elements of electronic maps. In the related art, a lane line rendering method is to first preprocess high-precision data of lane lines into map tiles of a Web Map Tile Service (WMTS) protocol using a desktop software, and then publish the map tiles as static web resources using a geoserver map server. A web front-end map engine requests different numbered pictures of different levels of the WMTS from a server according to zoom levels and center point information of the map, and displays the pictures in the map after splicing in the map engine. However, the lane line rendering method has the problems of time-consuming and laborious, and poor real-time performance when used in electronic maps. SUMMARY

[0003] To solve or partially solve the problems in the related art, the present application provides a lane line rendering method, device and computer readable storage medium, which can reduce consumption of computing resources and can display lane lines in real time in electronic maps.

[0004] A first aspect of the present application provides a lane line rendering method, comprising:

[0005] obtaining current map related parameters;

[0006] obtaining lane line attribute data and line feature vector data in a JSON format provided by a back-end server according to the current map related parameters;

[0007] drawing lane lines corresponding to the lane line attribute data according to the lane line attribute data and the line feature vector data.

[0008] A second aspect of the present application provides a lane line rendering device, comprising:

[0009] a first obtaining module configured to obtain current map related parameters;

[0010] a second obtaining module configured to obtain lane line attribute data and line feature vector data in a JSON format provided by a back-end server according to the current map related parameters;

[0011] a rendering module configured to draw lane lines corresponding to the lane line attribute data according to the lane line attribute data and the line feature vector data.

[0012] A third aspect of the present application provides an electronic device, comprising:

[0013] Processor; and

[0014] A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.

[0015] A fourth aspect of this application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0016] The technical solution provided in this application can include the following beneficial effects: by obtaining relevant parameters of the current map, and then obtaining lane line attribute data and line feature vector data in JSON format provided by the backend server based on the relevant parameters of the current map, and then drawing lane lines corresponding to the lane line attribute data based on the lane line attribute data and line feature vector data. On the one hand, compared with related technologies that require preprocessing into WMTS protocol map tiles using desktop software, the lane line attribute data and line feature vector data in JSON format of this application are in the database of the backend server. The data can be updated by updating the database, without the need for preprocessing similar to related technologies, greatly reducing the amount of computation. On the other hand, compared with the time spent requesting WMTS images of different levels in related technologies, this application obtains lane line attribute data and line feature vector data in JSON format, with a small data volume, and therefore low latency. In summary, the technical solution of this application can reduce the consumption of computing resources and can display lane lines in real time on electronic maps when applied to electronic maps.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments thereof.

[0019] Figure 1 This is a schematic flowchart illustrating the lane line rendering method in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of the lane line rendering device shown in the embodiments of this application;

[0021] Figure 3 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application. Detailed Implementation

[0022] Embodiments of the present application will be described more fully hereinafter with reference to the accompanying drawings. While embodiments of the application are described in sufficient detail to enable one skilled in the art to practice the application, it should be understood that other embodiments can be realized and that logical and mechanical changes can be made without departing from the spirit of the application. Thus, the following detailed description is not intended to limit the application, which is defined in the appended claims.

[0023] The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the description of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It also should be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0024] It should be understood that although the terms "first," "second," "third," etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy. These terms are used merely to distinguish one from another. For example, a first information can also be termed a second information, and, similarly, a second information can also be termed a first information, without departing from the scope of the present application. Therefore, the features defined by "first," "second," etc. can be any one or more of the features, explicitly or implicitly, unless otherwise specified.

[0025] In the field of automatic driving, lane lines are important elements of electronic maps. In the related art, a lane line rendering method is to first preprocess high-precision data of lane lines into map tiles of a WMTS protocol using a desktop software, and then publish the map tiles as static web resources using a geoserver map server. A web front-end map engine requests different numbered pictures of different levels of the WMTS from the server according to the zoom level and the center point information of the map, and displays the pictures in the map after splicing in the map engine. However, since the WMTS is a method of publishing digital map services using a pre-defined tile method, the tiles are organized in a pyramid structure and stored according to the map level, and the higher the map level, the smaller the range of the map represented by each tile. The WMTS tiles need to be preprocessed using a desktop software, which is time-consuming and laborious. The larger the data volume, the greater the workload. Since the high-precision map has high precision, the map level is high, and the number of generated tiles increases geometrically with the increase of the map level, the data storage volume and the data processing time increase dramatically. When the web front-end engine loads the WMTS tiles, it needs to request pictures from the back-end geoserver map server, which takes time, resulting in a delay in loading the WMTS tiles. During the map movement, the loading speed of the lane lines lags behind the advancing speed of the map, resulting in a poor experience. In addition, the generation of WMTS tiles requires preprocessing using a desktop software, and when the data is updated, a new WMTS tile needs to be produced using the desktop software, which is a great workload and is not convenient for data updating. In other words, the lane line rendering method described above has the problems of time-consuming and laborious, and poor real-time performance when used in electronic maps.

[0026] To solve the above problems, the embodiment of the present application provides a lane line rendering method, which can reduce the consumption of computing resources and can display lane lines in real time on an electronic map.

[0027] The technical solutions of the embodiments of the present application are described in detail below with reference to the drawings.

[0028] Referring to Figure 1 FIG. 1 is a flowchart of a lane line rendering method according to an embodiment of the present application. The method can be applied to a web front-end and mainly includes steps S101-S103, which are described as follows.

[0029] Step S101: Obtain current map related parameters.

[0030] In the embodiment of the present application, the current map related parameters include the layer name and the latitude and longitude data of the current map. The layer name of the current map is related to the elements to be displayed on the current map, and different layer names correspond to different elements to be displayed on the current map. The latitude and longitude data of the current map indicates the range of the elements corresponding to the layer name displayed on the current map.

[0031] Step S102: According to the current map related parameters, the JSON format lane line attribute data and line feature vector data provided by the backend server are obtained.

[0032] As mentioned before, the method of the embodiments of the present application is mainly applied to the Web front end. The so-called Web front end is relative to the Web back end which interacts with the database to process the corresponding business logic in the Web implementation. Specifically, it refers to the front-end performance that the user can see and touch in the Web application, including the structure of the Web page, the appearance and vision of the Web, and the interaction at the Web level, etc. JSON, which stands for JavaScript Object Notation, means JavaScript object notation. It is a lightweight data exchange format based on text and independent of language. Therefore, in the embodiments of the present application, the JSON format lane line attribute data and line feature vector data provided by the backend server means that the data amount is small. It should be noted that the line feature vector data is one of the types of vector data, and the types of vector data include point feature vector data, line feature vector data, and surface feature vector data. The line feature vector data is obtained from the backend server instead of the point feature vector data or the surface feature vector data based on the compromise between efficiency and data amount. In addition, the backend server can be a backend geoserver map server.

[0033] As an embodiment of the present application, according to the current map related parameters, the JSON format lane line attribute data and line feature vector data provided by the backend server can be: calling the service provided by the backend server, and receiving the JSON format lane line attribute data and line feature vector data returned by the backend server by inputting the layer name and the latitude and longitude data of the current map. Specifically, the web front-end map engine calls the service of the WFS protocol published by the backend geoserver map server by inputting the layer name and the latitude and longitude data of the current map. Since the layer name of the current map corresponds to the elements to be displayed in the current map, such as lane lines, and the latitude and longitude data of the current map indicates the range of the elements corresponding to the layer name displayed in the current map, the backend geoserver map server returns the JSON format lane line attribute data and line feature vector data to the web front-end map engine according to the layer name and the latitude and longitude data of the current map. The lane line attribute data includes lane line type and lane line color, and the lane line type includes single solid line, single dashed line, double solid line, double dashed line, left dashed right solid, and / or left solid right dashed, and the lane line color includes white and / or yellow, etc.

[0034] Step S103: According to the lane line attribute data and the line feature vector data, the lane line corresponding to the lane line attribute data is drawn.

[0035] As described above, the lane line attribute data includes lane line type and lane line color, and in the field of traffic, the simplest lane line type is single solid line and single dashed line, and rendering single solid line is the basis of rendering other types of lane lines, so it can be started from rendering single solid line and single dashed line. In an embodiment of the present application, according to the lane line attribute data and the line feature vector data, drawing the lane line corresponding to the lane line attribute data can be: if the lane line type is single solid line, then according to the lane line type, the lane line color and the line feature vector data, the single solid line lane line is drawn; if the lane line type is single dashed line, then according to the lane line type, the lane line color and the line feature vector data, the single dashed line lane line is drawn. In other words, according to whether the lane line type returned by the back-end geoserver map server is single solid line or single dashed line, and then according to the lane line type, the lane line color and the line feature vector data of these single solid line or single dashed line, the single solid line or single dashed line lane line is drawn by the Web front-end map engine. Specifically, as an embodiment of the present application, when the lane line type is single solid line, according to the lane line type, the lane line color and the line feature vector data, the single solid line lane line can be drawn as follows: at a first preset distance (for example, 7.5 cm) apart on both sides of the line segment corresponding to the line feature vector data, a first target line segment and a second target line segment parallel to the line segment and having the same shape are drawn; all points with the same horizontal axis coordinates of the first target line segment and the second target line segment are connected in a preset direction to form a grid polygon with the connecting line of the end points of the first target line segment and the second target line segment as the boundary; the grid polygon is filled with white or yellow according to the lane line color included in the lane line attribute data, and the lane line with the type of single solid line is obtained. It should be noted that in the above embodiment, not only two end point pairs (one end point pair is two end points with the same horizontal axis coordinates of the first target line segment and the second target line segment) of the first target line segment and the second target line segment are connected, but also all points between the two end point pairs are connected, because the actual scene single solid line is not a straight line segment (here, the straight line is not a straight line segment without distinction between thick and thin in the geometric sense, but a straight line segment with a certain width), but it may be a line segment with a certain arc. When the actual scene single solid line is an arc line segment, if only the two end point pairs of the first target line segment and the second target line segment with the same horizontal axis coordinates are connected and all points between the two end point pairs are omitted, the finally rendered single solid line is still a straight line segment, which does not conform to the actual scene single solid line. For example, assuming that the first target line segment contains 20 points and the second target line segment also contains 20 points with the same horizontal axis coordinates as the 20 points of the first target line segment, then every two points with the same horizontal axis coordinates in the 20 pairs of points are connected.

[0036] As an embodiment of the present application, when the lane line type is a single dashed line, the lane line of the single dashed line can be drawn according to the lane line type, the lane line color and the line element vector data by: cutting the line element vector data corresponding line segment into a plurality of equal length line segments; for the plurality of equal length line segments, rendering the line segment L i as a lane line of a transparent single solid line, rendering the line segment L i+1 as a lane line of a single solid line of yellow or white color, to obtain the lane line of the type of the single dashed line, wherein the line segment L i and the line segment L i+1 are adjacent equal length line segments in the plurality of equal length line segments. In the embodiment, rendering the line segment L i as a lane line of a transparent single solid line, rendering the line segment L i+1 as a lane line of a single solid line of yellow or white color, means that only the line element vector data corresponding line segment is replaced by the line segment L i and the line segment L i+1 in the embodiment of drawing the lane line of the single solid line according to the lane line type, the lane line color and the line element vector data. In addition, it should be noted that when the line element vector data corresponding line segment is cut into a plurality of equal length line segments, it is obviously necessary to cut into an integer number of equal length line segments. Specifically, it can be that from the starting point of the line element vector data corresponding line segment, along the direction of the line segment, the interval nDistance (for example, nDistance = 2.5 meters) is used as the interval, the total length lineDistance of the line segment is divided by the interval nDistance to obtain the number of equal length line segments totalstep. If the totalstep here is not an integer, the totalstep that is not an integer is rounded to an integer as the number of equal length line segments totalstep', and the total length lineDistance of the line segment is divided by totalstep' to obtain a new interval nDistance'. The line element vector data corresponding line segment is cut into a plurality of equal length line segments with the interval nDistance'.

[0037] As an embodiment of the present application, according to the lane line attribute data and the line element vector data, drawing the lane line corresponding to the lane line attribute data can be: if the lane line type is double solid line, rendering a yellow or white single solid line lane line at a second preset distance interval on both sides of the line segment corresponding to the line element vector data according to the method of drawing the single solid line lane line in the above embodiment; if the lane line type is double dashed line, rendering a yellow or white single dashed line lane line at a third preset distance interval on both sides of the line segment corresponding to the line element vector data according to the method of drawing the single dashed line lane line in the above embodiment. Specifically, when the lane line type is double solid line, rendering a yellow or white single solid line lane line at a second preset distance interval on both sides of the line segment corresponding to the line element vector data according to the method of drawing the single solid line lane line in the above embodiment can be: drawing a left side line segment parallel to and identical in shape to the line segment at a second preset distance interval on the left side of the line segment corresponding to the line element vector data, drawing a first target line segment and a second target line segment parallel to and identical in shape to the left side line segment at a first preset distance interval on both sides of the left side line segment, connecting all points with the same horizontal axis coordinates of the first target line segment and the second target line segment according to the preset direction to form a grid polygon with the connecting line of the end points of the first target line segment and the second target line segment as the boundary, and filling the grid polygon with white or yellow according to the lane line color included in the lane line attribute data to obtain a left side lane line of the single solid line type; drawing a right side line segment parallel to and identical in shape to the line segment at a second preset distance interval on the right side of the line segment corresponding to the line element vector data, drawing a third target line segment and a fourth target line segment parallel to and identical in shape to the right side line segment at a first preset distance interval on both sides of the right side line segment, connecting all points with the same horizontal axis coordinates of the third target line segment and the fourth target line segment according to the preset direction to form a grid polygon with the connecting line of the end points of the third target line segment and the fourth target line segment as the boundary, and filling the grid polygon with white or yellow according to the lane line color included in the lane line attribute data to obtain a right side lane line of the single solid line type; and the above left side lane line of the single solid line and the right side lane line of the single solid line together form a double solid line lane line.

[0038] Similarly, when the lane line type is double dashed line, rendering a yellow or white single dashed line lane line at a third preset distance interval on both sides of the line segment corresponding to the line element vector data according to the method of drawing the single dashed line lane line in the above embodiment can be: drawing a left side line segment parallel to and identical in shape to the line segment at a third preset distance interval on the left side of the line segment corresponding to the line element vector data, cutting the left side line segment into a plurality of equal length line segments, and according to the plurality of equal length line segments, cutting the line segment L i rendering a transparent single solid line lane line, and cutting the line segment L i+1The lane line rendered as a single solid line in yellow or white is a left lane line of a single dashed line type; and a right lane line of a single dashed line type is drawn at a third preset distance on the right side of the line segment in the line element vector data, the right lane line is cut into a plurality of equal-length line segments; for the plurality of equal-length line segments, the line segment L i The lane line rendered as a single solid line in yellow or white is a left lane line of a single dashed line type; and a right lane line of a single dashed line type is drawn at a third preset distance on the right side of the line segment in the line element vector data, the right lane line is cut into a plurality of equal-length line segments; for the plurality of equal-length line segments, the line segment L i+1 The lane line rendered as a single solid line in yellow or white is a right lane line of a single dashed line type, wherein the line segment L i The lane line rendered as a single solid line in yellow or white is a right lane line of a single dashed line type, wherein the line segment L i+1 The lane line rendered as a single solid line in yellow or white is a right lane line of a single dashed line type, wherein the line segment L

[0039] As another embodiment of the present application, according to the lane line attribute data and the line element vector data, the lane line corresponding to the lane line attribute data can be drawn as follows: if the lane line type is a left solid and right dashed lane line, a lane line rendered as a single solid line in yellow or white is drawn at a fourth preset distance on the left side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single solid line in the above embodiment, and a lane line rendered as a single dashed line in yellow or white is drawn at a fifth preset distance on the right side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single dashed line in the above embodiment; the lane line rendered as a single solid line and the lane line rendered as a single dashed line constitute the left solid and right dashed lane line. For the lane line rendered as a single solid line and the lane line rendered as a single dashed line, refer to the related description of the above embodiment, which will not be repeated here.

[0040] As another embodiment of the present application, according to the lane line attribute data and the line element vector data, the lane line corresponding to the lane line attribute data can be drawn as follows: if the lane line type is a left solid and right dashed lane line, a lane line rendered as a single solid line in yellow or white is drawn at a fourth preset distance on the left side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single solid line in the above embodiment, and a lane line rendered as a single dashed line in yellow or white is drawn at a fifth preset distance on the right side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single dashed line in the above embodiment; the lane line rendered as a single solid line and the lane line rendered as a single dashed line constitute the left solid and right dashed lane line. For the lane line rendered as a single solid line and the lane line rendered as a single dashed line, refer to the related description of the above embodiment, which will not be repeated here.

[0041] As another embodiment of the present application, according to the lane line attribute data and the line element vector data, the lane line corresponding to the lane line attribute data can be drawn as follows: if the lane line type is a left solid and right dashed lane line, a lane line rendered as a single solid line in yellow or white is drawn at a fourth preset distance on the left side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single solid line in the above embodiment, and a lane line rendered as a single dashed line in yellow or white is drawn at a fifth preset distance on the right side of the line segment in the line element vector data according to the method of drawing the lane line rendered as a single dashed line in the above embodiment; the lane line rendered as a single solid line and the lane line rendered as a single dashed line constitute the left solid and right dashed lane line. For the lane line rendered as a single solid line and the lane line rendered as a single dashed line, refer to the related description of the above embodiment, which will not be repeated here. Figure 1According to the lane line rendering method, the lane line attribute data and the line feature vector data in the JSON format provided by the backend server are acquired according to the current map related parameters, and then the lane line corresponding to the lane line attribute data is drawn according to the lane line attribute data and the line feature vector data. On the one hand, compared with the related art, the lane line attribute data and the line feature vector data in the JSON format are in the database of the backend server, and the data can be updated by updating the database, without the need of the similar preprocessing in the related art, so that the calculation amount is greatly reduced. On the other hand, compared with the related art, the lane line attribute data and the line feature vector data in the JSON format are acquired, so that the data amount is small, and the time delay is small. In summary, the technical scheme can reduce the consumption of the calculation resource, and can be applied to the electronic map to display the lane line in real time.

[0042] Corresponding to the foregoing application function implementation method embodiments, the present application further provides a lane line rendering device, an electronic device and corresponding embodiments.

[0043] Referring to Figure 2 is a structural schematic diagram of a lane line rendering device according to an embodiment of the present application. For the convenience of description, only the parts related to the embodiments of the present application are shown. Figure 2 The example device can be applied to a Web front end, and mainly includes a first acquisition module 201, a second acquisition module 202 and a rendering module 203, wherein:

[0044] The first acquisition module 201 is configured to acquire current map related parameters.

[0045] The second acquisition module 202 is configured to acquire lane line attribute data and line feature vector data in the JSON format provided by a backend server according to the current map related parameters.

[0046] The rendering module 203 is configured to draw lane lines corresponding to the lane line attribute data according to the lane line attribute data and the line feature vector data.

[0047] As to the device in the foregoing embodiments, the specific manners in which various modules perform operations have been described in detail in the embodiments about the method, and will not be described in detail here.

[0048] Optionally, the current map related parameters in the foregoing embodiments include a layer name and longitude and latitude data of a current map, Figure 2The second obtaining module 202 of the example can include a calling unit configured to call a service provided by a backend server, and receive lane line attribute data and line element vector data returned by the backend server in JSON format by inputting a layer name and longitude and latitude data of a current map.

[0049] Optionally, the lane line attribute data of the above embodiment includes a lane line type and a lane line color, Figure 2 The second obtaining module 202 of the example can include a first drawing unit and a second drawing unit.

[0050] The first drawing unit is configured to draw a single solid lane line according to the lane line type, the lane line color and the line element vector data if the lane line type is a single solid line.

[0051] The second drawing unit is configured to draw a single dashed lane line according to the lane line type, the lane line color and the line element vector data if the lane line type is a single dashed line.

[0052] Optionally, the first drawing unit of the above example can include a third drawing unit, a connecting unit and a filling unit.

[0053] The third drawing unit is configured to draw a first target line segment and a second target line segment parallel to and identical in shape to a line segment corresponding to the line element vector data at a first preset distance on both sides of the line segment.

[0054] The connecting unit is configured to connect all points with the same horizontal axis coordinates of the first target line segment and the second target line segment in a preset direction to form a checkered polygon with a line connecting the endpoints of the first target line segment and the second target line segment as a boundary.

[0055] The filling unit is configured to fill the checkered polygon with the lane line color included in the lane line attribute data as white or yellow to obtain a lane line of the single solid line type.

[0056] Optionally, the second drawing unit of the above example can include a cutting unit and a fourth drawing unit.

[0057] The cutting unit is configured to cut the line segment corresponding to the line element vector data into a plurality of equal-length line segments.

[0058] The fourth drawing unit is configured to, for the plurality of equal-length line segments, render a line segment L i as a transparent single solid lane line, render a line segment L i+1 as a single solid lane line in yellow or white to obtain a lane line of the single dashed line type, wherein the line segment L i and the line segment L i+1 are adjacent equal-length line segments in the plurality of equal-length line segments.

[0059] Optionally, Figure 2 The second obtaining module 202 of the example can include a fifth drawing unit and a sixth drawing unit, wherein:

[0060] The fifth drawing unit is configured to, if the lane line type is a double solid line, render a yellow or white single solid lane line on both sides of the line segment corresponding to the line element vector data at a second preset distance.

[0061] The sixth drawing unit is configured to, if the lane line type is a double dashed line, render a yellow or white single dashed lane line on both sides of the line segment corresponding to the line element vector data at a third preset distance.

[0062] Optionally, Figure 2 The second obtaining module 202 of the example can include a seventh drawing unit and an eighth drawing unit, wherein:

[0063] The seventh drawing unit is configured to, if the lane line type is a left solid right dashed lane line, render a yellow or white single solid lane line on the left side of the line segment corresponding to the line element vector data at a fourth preset distance, and render a yellow or white single dashed lane line on the right side of the line segment corresponding to the line element vector data at a fifth preset distance.

[0064] The eighth drawing unit is configured to, if the lane line type is a left dashed right solid lane line, render a yellow or white single dashed lane line on the left side of the line segment corresponding to the line element vector data at a sixth preset distance, and render a yellow or white single solid lane line on the right side of the line segment corresponding to the line element vector data at a seventh preset distance.

[0065] Figure 3 FIG. 1 is a structural schematic diagram of an electronic device according to an example of the present application.

[0066] Referring to Figure 3 , the electronic device 300 includes a memory 310 and a processor 320.

[0067] The processor 320 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor.

[0068] The memory 310 can include various types of storage units, such as a system memory, a read-only memory (ROM), and a permanent storage device. Among them, the ROM can store static data or instructions required by the processor 320 or other modules of the computer. The permanent storage device can be a read-and-write storage device. The permanent storage device can be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a mass storage device (such as a magnetic or optical disk, a flash memory) as a permanent storage device. In some other embodiments, the permanent storage device can be a removable storage device (such as a floppy disk, an optical drive). The system memory can be a read-and-write storage device or a volatile read-and-write storage device, such as a dynamic random access memory. The system memory can store some or all of the instructions and data required by the processor during runtime. In addition, the memory 310 can include a combination of any computer-readable storage media, including various types of semiconductor memory chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks and / or optical disks. In some embodiments, the memory 310 can include a read-and / or write removable storage device, such as a compact disc (CD), a read-only digital versatile disc (such as DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a min SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include a carrier wave and a transient electronic signal transmitted through a wireless or wired transmission.

[0069] The memory 310 stores executable code, which, when processed by the processor 320, can cause the processor 320 to perform part or all of the above-mentioned methods.

[0070] Furthermore, the method according to the present application can also be implemented as a computer program or a computer program product, which comprises computer program code instructions for executing some or all of the steps of the above-mentioned method according to the present application.

[0071] Alternatively, the present application can also be implemented as a computer readable storage medium (or a non-transitory machine readable storage medium or a machine readable storage medium) having stored thereon executable codes (or computer programs or computer instruction codes) which, when executed by a processor of an electronic device (or a server, etc.), cause the processor to perform some or all of the steps of the above-mentioned method according to the present application.

[0072] The above has described the embodiments of the present application, the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, practical application, or improvement to the technology in the market, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.

Claims

1. A lane line rendering method applied to a Web front end, characterized in that, The method comprises: acquiring current map related parameters; acquiring lane line attribute data and line element vector data in JSON format provided by a backend server according to the current map related parameters, the lane line attribute data comprising lane line type and lane line color; drawing a lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data, which comprises: if the lane line type is a single solid line, then drawing a lane line of the single solid line according to the lane line type, the lane line color and the line element vector data, which comprises: drawing a first target line segment and a second target line segment parallel to and identical in shape to a line segment corresponding to the line element vector data at a first preset distance on both sides of the line segment, connecting all points with the same horizontal axis coordinates of the first target line segment and the second target line segment in a preset direction to form a checkered polygon with a line connecting the endpoints of the first target line segment and the second target line segment as a boundary, and filling the checkered polygon with white or yellow according to the lane line color comprised in the lane line attribute data to obtain a lane line of the single solid line type; If the lane line type is a single dashed line, then according to the lane line type, lane line color and line element vector data, a single dashed lane line is drawn, including: cutting the line element vector data corresponding line segment into a plurality of equal length line segments; for the plurality of equal length line segments, according to the method of drawing a single solid lane line, the line segment L i is rendered as a transparent single solid lane line, the line segment L i+1 is rendered as a yellow or white single solid lane line, obtaining a lane line of type single dashed line, the line segment L i and the line segment L i+1 are adjacent equal length line segments in the plurality of equal length line segments.

2. The lane line rendering method of claim 1, wherein, the current map related parameters comprising layer name and latitude and longitude data of a current map, and the acquiring of the lane line attribute data and the line element vector data in JSON format provided by the backend server according to the current map related parameters comprises: calling a service provided by the backend server to receive the lane line attribute data and the line element vector data in JSON format returned by the backend server by inputting the layer name and the latitude and longitude data of the current map.

3. The lane line rendering method of claim 1, wherein, the drawing of the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data comprises: if the lane line type is a double solid line, then rendering a lane line of a single solid line in yellow or white on both sides of a line segment corresponding to the line element vector data at a second preset distance according to the method of drawing a lane line of a single solid line; if the lane line type is a double dashed line, then rendering a lane line of a single dashed line in yellow or white on both sides of a line segment corresponding to the line element vector data at a third preset distance according to the method of drawing a lane line of a single dashed line.

4. The lane line rendering method of claim 1, wherein, the drawing of the lane line corresponding to the lane line attribute data according to the lane line attribute data and the line element vector data comprises: if the lane line type is a left solid right dashed lane line, then rendering a lane line of a single solid line in yellow or white on the left side of a line segment corresponding to the line element vector data at a fourth preset distance according to the method of drawing a lane line of a single solid line, and rendering a lane line of a single dashed line in yellow or white on the right side of the line segment at a fifth preset distance according to the method of drawing a lane line of a single dashed line. If the lane line type is a left dashed and right solid lane line, a yellow or white single-dashed lane line is rendered at a sixth preset distance on the left side of the line segment corresponding to the line feature vector data, and a yellow or white single-solid lane line is rendered at a seventh preset distance on the right side of the line segment corresponding to the line feature vector data.

5. A lane line rendering apparatus, applied to a Web front end, characterized in that, The apparatus comprises: A first obtaining module configured to obtain current map-related parameters; A second obtaining module configured to obtain lane line attribute data and line feature vector data provided by a back-end server in JSON format according to the current map-related parameters, the lane line attribute data including a lane line type and a lane line color; A rendering module configured to draw lane lines corresponding to the lane line attribute data according to the lane line attribute data and the line feature vector data, including: If the lane line type is a single solid lane line, a single solid lane line is drawn according to the lane line type, the lane line color, and the line feature vector data, including: first and second target line segments parallel to and identical in shape to the line segment are drawn at a first preset distance on both sides of the line segment corresponding to the line feature vector data, all points with the same horizontal axis coordinates of the first and second target line segments are connected in a preset direction to form a checkered polygon bounded by a line connecting the endpoints of the first and second target line segments, and the checkered polygon is filled with the lane line color included in the lane line attribute data to obtain a single solid lane line. If the lane line type is a single dashed line, then according to the lane line type, lane line color and line element vector data, a single dashed lane line is drawn, including: cutting the line element vector data corresponding line segment into a plurality of equal length line segments; for the plurality of equal length line segments, according to the method of drawing a single solid lane line, the line segment L i is rendered as a transparent single solid lane line, the line segment L i+1 is rendered as a yellow or white single solid lane line, obtaining a lane line of type single dashed line, the line segment L i and the line segment L i+1 are adjacent equal length line segments in the plurality of equal length line segments.

6. An electronic device, comprising: The apparatus comprises: A processor; and A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method of any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The memory having executable code stored thereon, which, when executed by the processor of the electronic device, causes the processor to perform the method of any one of claims 1 to 4.