Methods for generating 3D map elements

By acquiring the point data and corner types of the graphical vertices of the top view of 3D map elements, 3D map elements are generated, solving the problems of long generation time and poor flexibility in existing technologies, and achieving more efficient and diversified generation effects.

CN115661385BActive Publication Date: 2026-05-26BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SANKUAI ONLINE TECH CO LTD
Filing Date
2022-10-13
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies require obtaining point data for all points when generating 3D map elements, resulting in long generation times and poor flexibility.

Method used

By acquiring the point data of the graphical vertices of the top view of the 3D map element, and combining the corner type and the target graphic, the 3D map element is generated.

Benefits of technology

It reduces the amount of point data acquired, improves generation efficiency, and enhances the style diversity and flexibility of generated 3D map elements by allowing users to customize target graphics and corner types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661385B_ABST
    Figure CN115661385B_ABST
Patent Text Reader

Abstract

This application discloses a method for generating 3D map elements, belonging to the field of computer technology. The method includes: acquiring point data of multiple initial points and a target graphic, wherein the initial points are the vertices of the top view of the 3D map element to be generated, and the point data of the initial points includes the position information of the initial points; determining the turning points of the top view among the multiple initial points based on the position information of the multiple initial points; generating at least one candidate point based on the corner type of the turning points, the at least one candidate point being used to generate the corners of the 3D map element; generating the 3D map element based on the position information of each target point and the target graphic, wherein the target points include the initial points other than the turning points among the multiple initial points and the at least one candidate point, and the cross-section of the 3D map element in the target direction is the target graphic. This method improves the efficiency and flexibility of generating 3D map elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for generating three-dimensional map elements. Background Technology

[0002] With the continuous advancement and development of computer technology, high-precision maps (also known as high-resolution maps) are being used more and more widely. High-precision maps are electronic maps with high accuracy and broad data dimensions, composed of multiple three-dimensional map elements. Therefore, a method for generating three-dimensional map elements is needed to create these elements in high-precision maps.

[0003] In related technologies, point data of all points constituting a 3D map element is obtained, and the 3D map element is drawn based on the point data of all points constituting the 3D map element.

[0004] Because it requires obtaining point data for all the points that make up a 3D map element, the generation time for 3D map elements is long, resulting in low generation efficiency. Furthermore, the styles of 3D map elements generated from the point data of all the points that make up the 3D map element are relatively limited, leading to poor flexibility in the generation process. Summary of the Invention

[0005] This application provides a method for generating three-dimensional map elements, which can be used to solve problems in related technologies. The technical solution is as follows:

[0006] On one hand, embodiments of this application provide a method for generating three-dimensional map elements, the method comprising:

[0007] Acquire point data and target graphics of multiple initial points, wherein the initial points are the graphic vertices of the top view of the three-dimensional map element to be generated, and the point data of the initial points include the position information of the initial points;

[0008] Based on the position information of the plurality of initial points, determine the turning point of the top view among the plurality of initial points;

[0009] Based on the corner type of the turning point, at least one candidate point is generated, and the at least one candidate point is used to generate the corner of the three-dimensional map element;

[0010] The three-dimensional map element is generated based on the location information of each target point and the target graphic. The target point includes the initial point other than the turning point among the plurality of initial points and the at least one candidate point. The cross section of the three-dimensional map element in the target direction is the target graphic.

[0011] In one possible implementation, determining the turning point of the top view among the plurality of initial points based on the position information of the plurality of initial points includes:

[0012] Obtain a horizontal offset value, which indicates the horizontal offset of the target graphic relative to the initial point;

[0013] Connect the multiple initial points to obtain the top view;

[0014] Determine the circumscribed rectangle of the top view;

[0015] The turning point is determined among the multiple initial points based on the position information of the multiple initial points, the circumscribed rectangle, and the horizontal offset value.

[0016] In one possible implementation, determining the turning point among the plurality of initial points based on the position information of the plurality of initial points, the circumscribed rectangle, and the horizontal offset value includes:

[0017] For any one of the plurality of initial points, based on the position information of the any one initial point, the position information of the first point, and the position information of the second point, a first distance between the any one initial point and the first point and a second distance between the any one initial point and the second point are determined, wherein the first point and the second point are initial points adjacent to the any one initial point;

[0018] The rotation radius is determined based on the width of the circumscribed rectangle and the horizontal offset value;

[0019] Based on the rotation radius, determine the lengths of the two sides of the first included angle, where the first included angle is the angle formed by the first point, any initial point, and the second point;

[0020] Based on the fact that both the first distance and the second distance are greater than the lengths of the two sides of the first included angle, the initial point is taken as the turning point.

[0021] In one possible implementation, generating the 3D map elements based on the location information of each target point and the target graphic includes:

[0022] Based on the location information of each target point and the target graphic, candidate graphics corresponding to each target point are generated;

[0023] Place the anchor point of the candidate graphic corresponding to each target point at the corresponding target point;

[0024] Connect the vertices of the candidate graphics corresponding to each target point that are in the same position, and obtain the three-dimensional map elements based on the connection results.

[0025] In one possible implementation, generating candidate graphics corresponding to each target point based on the location information of each target point and the target graphic includes:

[0026] For any one of the target points, obtain the affine transformation matrix corresponding to that target point;

[0027] Based on the location information of any one target point and the target graphic, multiple first reference points are determined. The first reference point is the graphic vertex of the target graphic when the anchor point of the target graphic is placed at any one target point.

[0028] Based on the position information of each first reference point and the affine transformation matrix corresponding to any target point, generate the second reference point corresponding to each first reference point;

[0029] The graphic formed by the second reference points corresponding to each of the first reference points is used as the candidate graphic corresponding to any one of the target points.

[0030] In one possible implementation, connecting the vertices of the candidate graphics corresponding to each target point at the same position, and obtaining the 3D map element based on the connection result, includes:

[0031] Connect the vertices of the candidate graphics corresponding to each target point that are in the same position to obtain a three-dimensional reference element;

[0032] Determine the normal vectors corresponding to each face in the three-dimensional reference element;

[0033] Based on the ray vector and the normal vector corresponding to each face, the color corresponding to each face is determined, and the color corresponding to any face is used to indicate whether any face is visible;

[0034] The three-dimensional map elements are obtained by filling each face with its corresponding color.

[0035] In one possible implementation, determining the color corresponding to each face based on the ray vector and the normal vector corresponding to each face includes:

[0036] For any given face, determine the second angle between the normal vector corresponding to that face and the ray vector;

[0037] The color corresponding to any one of the faces is determined based on the second included angle.

[0038] In one possible implementation, after generating the 3D map elements based on the location information of each target point and the target graphic, the method further includes:

[0039] Based on the top view, a plurality of third points are determined, wherein the third points are located on the edge of the top view or inside the top view;

[0040] Generate the target objects corresponding to each third point;

[0041] Determine the positions corresponding to each third point on the three-dimensional map elements;

[0042] Place the target object corresponding to each of the third points at the positions corresponding to each of the third points.

[0043] In one possible implementation, determining a plurality of third points based on the top view includes:

[0044] Determine the perimeter of the top view;

[0045] Determine the interval distance based on the perimeter;

[0046] Starting from any one of the plurality of initial points, multiple third points are determined on the top view according to the interval distance.

[0047] In one possible implementation, determining a plurality of third points based on the top view includes:

[0048] Multiple fourth points are obtained by evenly marking points within the circumscribed rectangle corresponding to the top view;

[0049] Multiple fifth points are determined from among the multiple fourth points by ray casting, the fifth points being located inside the top view;

[0050] Based on the location information of each fifth point, determine the probability of occurrence of each fifth point;

[0051] The fifth point, where the probability of occurrence meets the probability requirement, is referred to as the third point.

[0052] On the other hand, embodiments of this application provide a three-dimensional map element generation apparatus, the apparatus comprising:

[0053] The acquisition module is used to acquire point data of multiple initial points and target graphics. The initial points are the graphic vertices of the top view of the three-dimensional map element to be generated, and the point data of the initial points include the position information of the initial points.

[0054] The determining module is used to determine the turning point of the top view among the plurality of initial points based on the position information of the plurality of initial points;

[0055] A generation module is used to generate at least one candidate point based on the corner type of the turning point, wherein the at least one candidate point is used to generate the corner of the three-dimensional map element;

[0056] The generation module is further configured to generate the three-dimensional map element based on the location information of each target point and the target graphic. The target point includes the initial point other than the turning point among the plurality of initial points and the at least one candidate point. The cross section of the three-dimensional map element in the target direction is the target graphic.

[0057] In one possible implementation, the determining module is configured to acquire a horizontal offset value, which indicates the horizontal offset of the target graphic relative to the initial point; connect the plurality of initial points to obtain the top view; determine the circumscribed rectangle of the top view; and determine the turning point among the plurality of initial points based on the position information of the plurality of initial points, the circumscribed rectangle, and the horizontal offset value.

[0058] In one possible implementation, the determining module is configured to, for any one of the plurality of initial points, determine a first distance between the any one initial point and the first point, and a second distance between the any one initial point and the second point, based on the position information of the any one initial point, the position information of the first point, and the position information of the second point, wherein the first point and the second point are initial points adjacent to the any one initial point; determine a rotation radius based on the width of the circumscribed rectangle and the horizontal offset value; determine the lengths of the two sides of a first included angle based on the rotation radius, wherein the first included angle is the angle formed by the first point, the any one initial point, and the second point; and, based on the fact that both the first distance and the second distance are greater than the lengths of the two sides of the first included angle, designate the any one initial point as the turning point.

[0059] In one possible implementation, the generation module is configured to generate candidate graphics corresponding to each target point based on the location information of each target point and the target graphic; place the anchor points of the candidate graphics corresponding to each target point at the corresponding target point; connect the graphic vertices located at the same position in the candidate graphics corresponding to each target point, and obtain the three-dimensional map element based on the connection result.

[0060] In one possible implementation, the generation module is configured to: obtain the affine transformation matrix corresponding to any one of the target points; determine multiple first reference points based on the position information of the target point and the target graphic, wherein the first reference points are the graphic vertices of the target graphic when the anchor point of the target graphic is placed at the target point; generate second reference points corresponding to each first reference point based on the position information of each first reference point and the affine transformation matrix corresponding to the target point; and use the graphic formed by the second reference points corresponding to each first reference point as a candidate graphic corresponding to the target point.

[0061] In one possible implementation, the generation module is used to connect the vertices of the candidate graphics corresponding to each target point that are located at the same position to obtain a three-dimensional reference element; determine the normal vector corresponding to each face in the three-dimensional reference element; determine the color corresponding to each face according to the ray vector and the normal vector corresponding to each face, and the color corresponding to any face is used to indicate whether the face is visible; fill each face with color according to the color corresponding to each face to obtain the three-dimensional map element.

[0062] In one possible implementation, the generation module is configured to, for any given face, determine a second angle between the normal vector and the ray vector corresponding to that face; and determine the color corresponding to that face based on the second angle.

[0063] In one possible implementation, the determining module is further configured to determine a plurality of third points based on the top view, wherein the third points are located on the edge of the top view or are located inside the top view;

[0064] The generation module is further configured to generate target objects corresponding to each third point; determine the positions corresponding to each third point on the three-dimensional map elements; and place the target objects corresponding to each third point at the positions corresponding to each third point.

[0065] In one possible implementation, the determining module is configured to determine the perimeter of the top view; determine the interval distance based on the perimeter; and determine a plurality of third points on the top view, starting from any one of the plurality of initial points, according to the interval distance.

[0066] In one possible implementation, the determining module is used to uniformly mark points in the circumscribed rectangle corresponding to the top view to obtain multiple fourth points; determine multiple fifth points among the multiple fourth points using the ray method, wherein the fifth points are located inside the top view; determine the occurrence probability of each fifth point based on the position information of each fifth point; and select the fifth point whose occurrence probability meets the probability requirement as the third point.

[0067] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor, so that the computer device implements any of the above-described methods for generating three-dimensional map elements.

[0068] On the other hand, a computer-readable storage medium is also provided, wherein at least one piece of program code is stored in the computer-readable storage medium, the at least one piece of program code being loaded and executed by a processor to enable a computer to implement the method for generating three-dimensional map elements as described above.

[0069] On the other hand, a computer program or computer program product is also provided, wherein the computer program or computer program product stores at least one computer instruction, which is loaded and executed by a processor to enable the computer to implement any of the above-described methods for generating three-dimensional map elements.

[0070] The technical solution provided in this application has at least the following beneficial effects:

[0071] The technical solution provided in this application only requires obtaining the point data of the vertices of the top view of the 3D map element when generating 3D map elements. Based on the point data of the vertices, the corner type, and the target graphic, the 3D map element is generated. Since only the point data of the vertices needs to be obtained, the number of point data points is reduced, thus saving time required to generate 3D map elements and improving the generation efficiency. Furthermore, the target graphic and corner type are user-defined. Therefore, generating 3D map elements according to the target graphic and corner type ensures that the cross-section of the generated 3D map element in the target direction is the target graphic, and the corner type of the generated 3D map element is the corner type. This diversifies the style of the generated 3D map elements and further improves the flexibility of generating 3D map elements. Attached Figure Description

[0072] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0073] Figure 1 This is a schematic diagram illustrating the implementation environment of a method for generating three-dimensional map elements provided in this application embodiment;

[0074] Figure 2 This is a flowchart of a method for generating three-dimensional map elements provided in an embodiment of this application;

[0075] Figure 3 This is a schematic diagram of a top view provided in an embodiment of this application;

[0076] Figure 4 This is a schematic diagram of the circumscribed rectangle in a top view provided in an embodiment of this application;

[0077] Figure 5 This is a schematic diagram illustrating the determination of candidate points provided in an embodiment of this application;

[0078] Figure 6 This is a schematic diagram of obtaining a candidate image corresponding to any target point according to an embodiment of this application;

[0079] Figure 7 This is a schematic diagram of a three-dimensional map element provided in an embodiment of this application;

[0080] Figure 8 This is a schematic diagram illustrating the determination of multiple third points according to an embodiment of this application;

[0081] Figure 9 This is a schematic diagram illustrating the determination of multiple third points according to an embodiment of this application;

[0082] Figure 10 This is a schematic diagram of another three-dimensional map element provided in an embodiment of this application;

[0083] Figure 11 This is a schematic diagram of the structure of a three-dimensional map element generation device provided in an embodiment of this application;

[0084] Figure 12 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0085] Figure 13 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0087] Figure 1 This is a schematic diagram illustrating the implementation environment of a method for generating three-dimensional map elements provided in this application embodiment, such as... Figure 1 As shown, the implementation environment includes: terminal device 101 and server 102.

[0088] The method for generating 3D map elements provided in this application embodiment can be executed by terminal device 101, server 102, or jointly by terminal device 101 and server 102; this application embodiment does not limit this. In the case where the method for generating 3D map elements provided in this application embodiment is jointly executed by terminal device 101 and server 102, server 102 undertakes the main computational work, and terminal device 101 undertakes the secondary computational work; or, server 102 undertakes the secondary computational work, and terminal device 101 undertakes the main computational work; or, server 102 and terminal device 101 collaborate using a distributed computing architecture.

[0089] Optionally, the terminal device 101 can be any electronic product capable of human-computer interaction with a user through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting device. The terminal device 101 includes, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The server 102 can be a single server, a server cluster consisting of multiple servers, or any of the following: a cloud computing platform or a virtualization center. This application embodiment does not limit this. The server 102 communicates with the terminal device 101 via a wired or wireless network. The server 102 has data receiving, data processing, and data sending functions. Of course, the server 102 may also have other functions, which are not limited in this application embodiment.

[0090] Those skilled in the art should understand that the terminal device 101 and server 102 described above are merely illustrative examples. Other existing or future terminal devices or servers that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.

[0091] This application provides a method for generating three-dimensional map elements. This method can be executed by a computer device and can be applied to the aforementioned... Figure 1 The implementation environment is shown. The computer equipment can be... Figure 1 Terminal device 101 in the middle can also be Figure 1The server 102 in this embodiment is not limited thereto. Figure 2 The flowchart shown in this embodiment of the present application illustrates a method for generating three-dimensional map elements. Figure 2 As shown, the method includes the following steps 201 to 204.

[0092] In step 201, point data of multiple initial points and target graphics are acquired. The initial points are the graphic vertices of the top view of the three-dimensional map element to be generated, and the point data of the initial points include the position information of the initial points.

[0093] The initial point's location information indicates its coordinates, which are two-dimensional coordinates, including coordinates in a first dimension and coordinates in a second dimension. The first dimension is the X dimension, and the second dimension is the Y dimension, or vice versa. This application does not limit the specific method used to obtain point data for multiple initial points. For example, there are four methods for obtaining point data for multiple initial points.

[0094] Method 1: The computer device is the terminal device. The terminal device displays a point data acquisition page with multiple point data input boxes. Based on the input operation in any point data input box, the terminal device acquires point data of multiple initial points.

[0095] Method 2: The computer device acts as a server, and the server and terminal devices interact via a wired or wireless network. The terminal device obtains point data for multiple initial points using Method 1 described above, and then sends this point data to the server so that the server can acquire the point data for multiple initial points.

[0096] Method 3: The computer device is a server. The server stores 3D map elements. The server maps the 3D map elements to obtain a top view of the 3D map elements. The server determines the point data of each graphic vertex in the top view of the 3D map elements. The server uses each graphic vertex as an initial point. That is, the server obtains the point data of multiple initial points.

[0097] The 3D map element can be any map element, and this application embodiment does not limit this. There are various ways to obtain 3D map elements, and this application embodiment does not limit the method of obtaining 3D map elements. For example, 3D map elements are obtained from a geospatial data cloud platform.

[0098] Method 4: The computer device is the terminal device, and the terminal device interacts with the server through wired and wireless networks. The server obtains point data for multiple initial points through Method 3 above, and sends the point data for multiple initial points to the terminal device so that the terminal device can obtain point data for multiple initial points.

[0099] It should be noted that point data of multiple initial points can be obtained in any of the above methods, and this application embodiment does not limit this.

[0100] In one possible implementation, the process of a computer device acquiring a target graphic includes: the computer device acquiring a cross-sectional style, parsing the cross-sectional style, and obtaining cross-sectional data, which includes the target image. Optionally, the cross-sectional style is set based on user needs, and the content of the cross-sectional style is not limited in this embodiment. The cross-sectional style includes the shape of the cross-section of a 3D map element in the target direction. Optionally, the computer device is a terminal device, which displays a cross-sectional style input box. Based on the user's input in the cross-sectional style input box, the terminal device acquires the cross-sectional style. Alternatively, the computer device is a server, and the server and terminal device communicate via wired and wireless networks. After the terminal device acquires the cross-sectional style, it sends the cross-sectional style to the server so that the server can acquire the cross-sectional style. For example, the cross-sectional style is "offset: [0, 0], shape: rectangle(1, 3)".

[0101] In one possible implementation, the cross-sectional data may also include horizontal offset values ​​and vertical offset values, wherein the horizontal offset values ​​are used to indicate the horizontal offset of the target graphic relative to the initial point; and the vertical offset values ​​are used to indicate the vertical offset of the target graphic relative to the initial point.

[0102] For example, the cross-section style is "offset: [0, 0], shape: rectangle(1, 3)". Parsing it, the cross-section data obtained is "horizontal offset value is 0, vertical offset value is 0, and the target shape is a rectangle with a length of 1 and a width of 3".

[0103] For example, if the cross-section style is "offset: [1, 3], shape: square(5)", and it is parsed, the cross-section data obtained is "horizontal offset value is 1, vertical offset value is 3, and the target shape is a square with a side length of 5".

[0104] In step 202, the turning point of the top view is determined among the multiple initial points based on the position information of the multiple initial points.

[0105] In one possible implementation, the process of determining the turning point of the top view among multiple initial points based on the position information of multiple initial points includes: obtaining a horizontal offset value, which is used to indicate the horizontal offset of the target graphic relative to the initial points; connecting multiple initial points to obtain the top view; determining the circumscribed rectangle of the top view; and determining the turning point among multiple initial points based on the position information of multiple initial points, the circumscribed rectangle, and the horizontal offset value.

[0106] Optionally, multiple initial points can be connected sequentially to obtain a top view. For example... Figure 3 The diagram shown is a top view of an embodiment of this application. Figure 3 The image shows three initial points. Connecting these three initial points in sequence yields a top view.

[0107] In one possible implementation, the process of determining the bounding rectangle of the top view includes: using the top view as the bounding rectangle based on the fact that the top view is a rectangle; and determining the bounding rectangle based on the fact that the top view is not a rectangle. For example... Figure 4 This is a schematic diagram of the circumscribed rectangle in a top view provided in an embodiment of this application.

[0108] This application does not limit the process of determining a turning point among multiple initial points based on the position information of multiple initial points, the bounding rectangle, and the horizontal offset value. For example, the process of determining a turning point among multiple initial points based on the position information of multiple initial points, the bounding rectangle, and the horizontal offset value includes the following steps 1 to 4.

[0109] Step 1: For any one of the multiple initial points, based on the position information of any one initial point, the position information of the first point, and the position information of the second point, determine the first distance between any one initial point and the first point, and the second distance between any one initial point and the second point. The first point and the second point are the initial points adjacent to any one initial point.

[0110] The process of determining the first distance between any initial point and the first point, and the second distance between any initial point and the second point, based on the position information of any initial point, the position information of the first point, and the position information of the second point, includes: determining the first distance between any initial point and the first point based on the position information of any initial point and the position information of the first point; and determining the second distance between any initial point and the second point based on the position information of any initial point and the position information of the second point. It should be noted that the process of determining the first distance between any initial point and the first point based on the position information of any initial point and the position information of the first point is similar to the process of determining the second distance between any initial point and the second point based on the position information of any initial point and the position information of the second point. This embodiment of the application only uses the process of determining the first distance between any initial point and the first point based on the position information of any initial point and the position information of the first point as an example for illustration.

[0111] Optionally, the cosine distance between the position information of any initial point and the position information of the first point is taken as the first distance between the initial point and the first point. For example, the first distance between the initial point and the first point is determined according to the following formula (1) based on the position information of the initial point and the position information of the first point.

[0112]

[0113] In the above formula (1), L is the first distance between any initial point and the first point, (X1, Y1) is the position information of any initial point, and (X2, Y2) is the position information of the first point.

[0114] Step 2: Determine the rotation radius based on the width and horizontal offset of the circumscribed rectangle;

[0115] In one possible implementation, the process of determining the rotation radius based on the width and horizontal offset of the bounding rectangle includes taking half of the sum of the width and horizontal offset of the bounding rectangle as the rotation radius. For example, the rotation radius is determined according to the following formula (2) based on the width and horizontal offset of the bounding rectangle.

[0116]

[0117] In the above formula (2), R is the rotation radius, W is the width of the circumscribed rectangle, and B is the horizontal offset value.

[0118] Step 3: Determine the lengths of the two sides of the first included angle based on the radius of rotation. The first included angle is the angle formed by the first point, any initial point, and the second point.

[0119] Optionally, the lengths of the two sides of the first included angle are the same. The lengths of the two sides of the first included angle are determined according to the following formula (3) based on the radius of rotation.

[0120]

[0121] In the above formula (3), S is the length of the two sides of the first included angle, R is the radius of rotation, and A is the first included angle.

[0122] Step 4: Based on the lengths of the two sides where the first distance and the second distance are greater than the first included angle, take any initial point as a reference point.

[0123] In one possible implementation, any initial point is designated as a turning point if both the first distance between any initial point and the first point, and the second distance between any initial point and the second point, are greater than the lengths of the two sides of the first included angle. If the first distance between any initial point and the first point is not greater than the lengths of the two sides of the first included angle, and / or the second distance between any initial point and the second point is not greater than the lengths of the two sides of the first included angle, then other initial points are traversed until a turning point is determined among multiple initial points.

[0124] For example, point data of three initial points 1, 2 and 3 are obtained. After the above process, initial point 2 is determined to be the turning point.

[0125] In step 203, at least one candidate point is generated based on the corner type of the turning point, and the at least one candidate point is used to generate the corner of the three-dimensional map element.

[0126] In one possible implementation, after determining the inflection point, the angle type of the inflection point is set by the user. The process of generating at least one candidate point based on the angle type of the inflection point includes: if the angle type of the inflection point is miter, then the inflection point is used as a candidate point. If the angle type of the inflection point is non-miter, then multiple candidate points are generated based on the rotation radius and the first included angle.

[0127] Optionally, the process of generating multiple candidate points based on the rotation radius and the first included angle includes: determining the bisector of the first included angle, which divides the first included angle into two angles of equal length; determining the origin on the bisector, with the distance from the origin to the turning point being the rotation radius; determining an arc with the origin as the center and the target value as the radius, where the target value is less than the rotation radius, the starting point of the arc being on the line connecting the turning point and the first point, and the ending point of the arc being on the line connecting the turning point and the second point; and determining multiple candidate points from among the multiple points located on the arc. The target value is set based on experience or adjusted according to the implementation environment; this embodiment does not limit this. For example, if the rotation radius is 10, then the target value is 8. The number of candidate points determined is set based on experience or adjusted according to the implementation environment; this embodiment does not limit this. Figure 5 This is a schematic diagram illustrating the determination of candidate points according to an embodiment of this application. Specifically, two points are selected as candidate points from among multiple points located on an arc.

[0128] In step 204, a three-dimensional map element is generated based on the location information of each target point and the target graphic. The target point includes an initial point other than the turning point and at least one candidate point among multiple initial points. The cross section of the three-dimensional map element in the target direction is the target graphic.

[0129] In one possible implementation, the process of generating 3D map elements based on the location information of each target point and the target graphic includes: generating candidate graphics corresponding to each target point based on the location information of each target point and the target graphic; placing the anchor points of the candidate graphics corresponding to each target point at the corresponding target point; connecting the vertices of the graphics in the same position in the candidate graphics corresponding to each target point; and obtaining the 3D map elements based on the connection results. The cross-section of the 3D map elements in the target direction is the target graphic, where the target direction can refer to the direction perpendicular to the ground.

[0130] The anchor point of the candidate graphic corresponding to the target point can be the midpoint of the bottom edge of the candidate graphic corresponding to the target point, or it can be the vertex of the bottom edge of the candidate graphic corresponding to the target point; the graphic vertices located in the same position can be the graphic vertex located in the upper left corner, the graphic vertex located in the lower left corner, the graphic vertex located in the upper right corner, or the graphic vertex located in the lower right corner. This application embodiment does not limit this.

[0131] Optionally, the process of generating candidate graphics corresponding to each target point based on the position information of each target point and the target graphic includes: for any target point among the target points, obtaining the affine transformation matrix corresponding to the target point; determining multiple first reference points based on the position information of the target point and the target graphic, wherein the first reference points are the graphic vertices of the target graphic when the anchor point of the target graphic is placed at any target point; determining second reference points corresponding to each first reference point based on the position information of each first reference point and the affine transformation matrix corresponding to the target point; and using the graphic formed by the second reference points corresponding to each first reference point as the candidate graphic corresponding to the target point.

[0132] The affine transformation matrix corresponding to any target point is set based on experience or adjusted according to the implementation environment; this embodiment does not limit this. The first reference point is the vertex of the target graphic when the midpoint of the bottom edge of the target graphic is placed at any target point.

[0133] The process of determining multiple first reference points based on the location information of any target point and the target graphic includes: determining multiple first reference points based on the location information of any target point and the graphic information of the target graphic. The graphic information of the target graphic refers to the information used to construct the target graphic. For example, if the target graphic is a rectangle, then the graphic information of the target graphic refers to the length and width of the rectangle. As another example, if the target graphic is a square, then the graphic information of the target graphic refers to the side length of the square.

[0134] For example, if the target graphic is a rectangle with a length of 1 and a width of 3, and the position information of any target point is (2, 1), then based on the length and width of the rectangle and the position information of any target point, the multiple first reference points determined are (1.5, 1), (2.5, 1), (1.5, 4), and (2.5, 4).

[0135] Optionally, the process of generating a second reference point corresponding to each first reference point based on the position information of each first reference point and the affine transformation matrix corresponding to any target point includes: multiplying the position information of any first reference point with the affine transformation matrix corresponding to any target point, and using the result as the second reference point corresponding to any first reference point.

[0136] For example, the affine transformation matrix corresponding to any target point is: If the position information of any first reference point is (1.5, 1), then the second reference point corresponding to any first reference point is (1.5M+P1.5N+Q).

[0137] like Figure 6 This is a schematic diagram of obtaining a candidate graphic corresponding to any target point according to an embodiment of this application.

[0138] In one possible implementation, after determining the candidate graphics corresponding to each target point, the process of connecting the vertices of the candidate graphics at the same position and obtaining the 3D map elements based on the connection results includes: connecting the vertices of the candidate graphics at the same position to obtain 3D reference elements, and using the 3D reference elements as 3D map elements. Alternatively, connecting the vertices of the candidate graphics at the same position to obtain 3D reference elements, determining the normal vectors corresponding to each face of the 3D reference elements; determining the color corresponding to each face based on the ray vectors and the normal vectors corresponding to each face, with the color of any face used to indicate whether any face is visible; and filling each face with color based on the color of each face to obtain the 3D map elements. Figure 7 This is a schematic diagram of a three-dimensional map element provided in an embodiment of this application.

[0139] Optionally, the process of determining the normal vectors corresponding to each face of a 3D reference element is similar. This embodiment only illustrates the process of determining the normal vector corresponding to any one face of a 3D reference element. This process includes: obtaining the vectors of the first and second sides of any face, where the endpoint of the first side's vector is the starting point of the second side's vector; performing a cross product operation on the vectors of the first and second sides to obtain an intermediate vector; and performing a cross product operation on the intermediate vector and the vector of the first side to obtain the normal vector corresponding to any face.

[0140] Optionally, the ray vector is set based on experience or adjusted according to the implementation environment; this embodiment does not limit this. The process of determining the color corresponding to each face based on the ray vector and the normal vector corresponding to each face includes: for any face, determining the second angle between the normal vector and the ray vector corresponding to that face; and determining the color corresponding to that face based on the second angle. Optionally, if the second angle is acute, a first color is used as the color corresponding to that face; if the second angle is obtuse, a second color is used as the color corresponding to that face. The first color and the second color are different; the first color indicates that any face is visible, and the second color indicates that any face is not visible. For example, the first color is white, and the second color is black.

[0141] Optionally, the process of determining the second included angle between the normal vector and the ray vector corresponding to any face includes: determining the cosine value of the second included angle based on the normal vector and the ray vector of any face, and determining the second included angle based on the cosine value of the second included angle.

[0142] For example, the cosine value of the second included angle is determined according to the normal vector and the ray vector of any face, according to the following formula (4).

[0143]

[0144] In the above formula (4), cosθ is the cosine value of the second included angle. Let be the normal vector of any face. Let θ be the ray vector, θ be the second included angle, and · represent the vector dot product operation.

[0145] In one possible implementation, after generating 3D map elements, objects can be placed on the 3D map elements, such as streetlights, railings, trees, etc. The process includes: determining multiple third points based on the top view, where the third points are located on the edge of the top view or inside the top view; generating target objects corresponding to each third point; determining the position corresponding to each third point on the 3D map elements; and placing the target objects corresponding to each third point at the corresponding positions.

[0146] This application does not limit the method of determining multiple third points based on a top view. Exemplarily, this application provides two implementation methods for determining multiple third points based on a top view.

[0147] Method 1: Determine the perimeter of the top view; based on the perimeter, determine the interval distance, and using any one of the multiple initial points as the starting point, determine multiple third points on the top view according to the interval distance.

[0148] The process of determining the perimeter of the top view includes: determining the distance between two adjacent initial points based on the position information of multiple initial points; determining the sum of the distances between two adjacent initial points, and using this sum as the perimeter of the top view. Optionally, the process of determining the interval distance based on the perimeter includes: using the quotient between the perimeter and a reference value as the interval distance. The reference value is set based on experience or adjusted according to the implementation environment; this embodiment does not limit this. For example, the reference value is 16.

[0149] For example, four initial points are obtained, where the distance between initial point 1 and initial point 2 is 8, the distance between initial point 2 and initial point 3 is 8, the distance between initial point 3 and initial point 4 is 8, and the distance between initial point 4 and initial point 1 is 8. The sum of the distances between any two adjacent initial points is 32, which is the perimeter. Using a reference value of 4, the interval distance is 32 / 4 = 8. Therefore, multiple third points are determined on the top view according to the interval distance. Figure 8 This is a schematic diagram illustrating the determination of multiple third points according to an embodiment of this application. The distance between two adjacent third points is the interval distance.

[0150] It should be noted that the multiple third points determined according to implementation method one are located on the edges of the top view.

[0151] Method 2: Evenly mark points in the bounding rectangle corresponding to the top view to obtain multiple fourth points; use the ray method to determine multiple fifth points among the multiple fourth points, with the fifth points located inside the top view; determine the probability of occurrence of each fifth point based on the position information of each fifth point, and select the fifth point whose occurrence probability meets the probability requirement as the third point.

[0152] For example, the fifth point, where the probability of occurrence is greater than a probability threshold, is designated as the third point. The probability threshold is set based on experience or adjusted according to the implementation environment; this embodiment does not limit its application. For example, the probability threshold is 90%.

[0153] The process of determining multiple fifth points from multiple fourth points using the ray method includes: for any fourth point, draw a ray to the left or right from any fourth point as the starting point; if the number of intersections between the ray and the top view is odd, then any fourth point is taken as the fifth point.

[0154] Optionally, the process of determining the probability of occurrence of each fifth point based on its location information includes: for any fifth point, determining the uniform hash value of that fifth point based on its location information; and using the ratio of the uniform hash value of the fifth point to a first value as the probability of occurrence of that fifth point, where the first value is determined based on the range of the uniform hash value. For example, if the range of the uniform hash value is (0, 64), then the first value is 64. Based on the location information of any fifth point, the uniform hash value of that fifth point is determined to be 32, therefore the probability of occurrence of that fifth point is determined to be 32 / 64 = 1 / 2 = 50%.

[0155] It should be noted that the multiple third points determined according to implementation method two are located inside the top view.

[0156] like Figure 9 This is a schematic diagram of determining multiple third points provided in an embodiment of this application. In (1), the black dots are multiple fourth points obtained by evenly marking dots in the outer rectangle of the top view. In (2), the black dots are multiple fifth points determined by the ray method among the multiple fourth points. In (3), the black dots are the fifth points whose occurrence probability meets the probability requirements, that is, the determined third points.

[0157] Optionally, the process of generating the target object corresponding to each third point includes: generating a reference object based on reference information, whereby the reference information indicates the shape of the reference object; and generating the target object corresponding to each third point based on the reference object. The reference information is set based on experience or adjusted according to the implementation environment, and this embodiment does not limit this. For example, the reference information is: cylinder(1, 5), that is, a cylinder with a radius of 1 and a height of 5. For example, the process of generating the reference object based on the reference information includes: inputting the reference information into the rendering engine, and generating the reference object through the rendering engine.

[0158] Optionally, the target objects corresponding to each third point can be generated based on the reference object in the following two ways.

[0159] Method 1: Use the reference object as the target object corresponding to each third point.

[0160] Determine the number of third points, copy and paste the reference objects according to the number of third points to obtain multiple reference objects, and use each of the multiple reference objects as the target object corresponding to each third point.

[0161] For example, there are 10 third points. The reference objects are copied and pasted 9 times to obtain 10 reference objects, and one reference object corresponds to one third point.

[0162] Method 2: The point data also includes color, which is used to indicate the color of the initial point. Based on the colors of multiple initial points, the color of each third point is determined; based on the colors of each third point, the reference object is filled with color to obtain the target object corresponding to each third point.

[0163] Optionally, the process of determining the color of each third point based on the colors of multiple initial points includes: for any third point among the third points, determining the third distance between the third point and the first initial point, the fourth distance between the third point and the second initial point, and the fifth distance between the first initial point and the second initial point, wherein the first initial point and the second initial point are initial points adjacent to the third point; and determining the color of the third point based on the third distance, the fourth distance, the fifth distance, the color of the first initial point, and the color of the second initial point.

[0164] The color of any initial point includes an R (red) value, a G (green) value, and a B (blue) value. The process of determining the color of any third point based on the third distance, fourth distance, fifth distance, the color of the first initial point, and the color of the second initial point includes: determining the R value of any third point based on the third distance, fourth distance, fifth distance, the R value of the first initial point, and the R value of the second initial point; determining the G value of any third point based on the third distance, fourth distance, fifth distance, the G value of the first initial point, and the G value of the second initial point; determining the B value of any third point based on the third distance, fourth distance, fifth distance, the B value of the first initial point, and the B value of the second initial point; and using the color corresponding to the R, G, and B values ​​of any third point as the color of that third point.

[0165] It should be noted that the process of determining the R value, G value, and B value of any third point is similar. This application embodiment only illustrates the process of determining the R value of any third point. For example, based on the third distance, fourth distance, fifth distance, the R value of the first initial point, and the R value of the second initial point, the R value of any third point is determined according to the following formula (5).

[0166]

[0167] In the above formula (5), R i Let R be the value of any third point, L3 be the third distance between any third point and the first initial point, L4 be the fourth distance between any third point and the second initial point, and L5 be the fifth distance between the first initial point and the second initial point. i-1 Let R be the value of the first initial point. i+1 R is the value of the second initial point.

[0168] For example, if the R value of any third point is 0, the G value is 255, and the B value is 0, then the color corresponding to the R value, G value, and B value of any third point is green, that is, the color of any third point is green.

[0169] like Figure 10 This is a schematic diagram of another three-dimensional map element provided in an embodiment of this application, wherein a three-dimensional map element is displayed, and a target object is also displayed on the three-dimensional map element.

[0170] In one possible implementation, using a computer device as the terminal device, after generating 3D map elements, the terminal device can also display the generated 3D map elements. Alternatively, using a computer device as the server, after generating 3D map elements, the server sends the generated 3D map elements to the terminal device, which then displays the generated 3D map elements.

[0171] The above method, when generating 3D map elements, only needs to obtain the point data of the vertices of the top view of the 3D map element. Based on the point data of the vertices, the corner type, and the target graphic, the 3D map element is generated. Since only the point data of the vertices needs to be obtained, the number of point data points is reduced, thus saving time required to generate 3D map elements and improving the generation efficiency. Furthermore, the target graphic and corner type are user-defined. Therefore, generating 3D map elements according to the target graphic and corner type ensures that the cross-section of the generated 3D map element in the target direction is the target graphic, and the corner type of the generated 3D map element is the corner type. This diversifies the styles of the generated 3D map elements, further improving the flexibility of 3D map element generation.

[0172] Figure 11 The diagram shown is a structural schematic of a three-dimensional map element generation device provided in an embodiment of this application. Figure 11 As shown, the device includes:

[0173] The acquisition module 1101 is used to acquire point data of multiple initial points and target graphics. The initial points are the graphic vertices of the top view of the three-dimensional map element to be generated, and the point data of the initial points include the position information of the initial points.

[0174] The determining module 1102 is used to determine the turning point of the top view among multiple initial points based on the position information of multiple initial points;

[0175] The generation module 1103 is used to generate at least one candidate point based on the corner type of the turning point, and the at least one candidate point is used to generate the corner of the three-dimensional map element.

[0176] The generation module 1103 is also used to generate three-dimensional map elements based on the location information of each target point and the target graphic. The target points include initial points other than turning points among multiple initial points and at least one candidate point. The cross section of the three-dimensional map element in the target direction is the target graphic.

[0177] In one possible implementation, module 1102 is used to obtain a horizontal offset value, which indicates the horizontal offset of the target graphic relative to the initial point; connect multiple initial points to obtain a top view; determine the circumscribed rectangle of the top view; and determine the turning point among the multiple initial points based on the position information of the multiple initial points, the circumscribed rectangle, and the horizontal offset value.

[0178] In one possible implementation, the determining module 1102 is used to determine, for any one of a plurality of initial points, a first distance between the initial point and the first point and a second distance between the initial point and the second point, based on the position information of the initial point, the position information of the first point, and the position information of the second point, wherein the first point and the second point are initial points adjacent to the initial point; determine the rotation radius based on the width of the circumscribed rectangle and the horizontal offset value; determine the lengths of the two sides of the first included angle based on the rotation radius, wherein the first included angle is the angle formed by the first point, the initial point, and the second point; and, based on the fact that both the first distance and the second distance are greater than the lengths of the two sides of the first included angle, designate the initial point as a turning point.

[0179] In one possible implementation, the generation module 1103 is used to generate candidate graphics corresponding to each target point based on the location information and target graphics of each target point; place the anchor point of the candidate graphics corresponding to each target point at the corresponding target point; connect the graphic vertices in the candidate graphics corresponding to each target point that are in the same position, and obtain the three-dimensional map elements based on the connection results.

[0180] In one possible implementation, the generation module 1103 is used to obtain the affine transformation matrix corresponding to any one of the target points; determine multiple first reference points based on the position information of any one target point and the target graphic, wherein the first reference points are the graphic vertices of the target graphic when the anchor point of the target graphic is placed at any one target point; generate second reference points corresponding to each first reference point based on the position information of each first reference point and the affine transformation matrix corresponding to any one target point; and use the graphic composed of the second reference points corresponding to each first reference point as the candidate graphic corresponding to any one target point.

[0181] In one possible implementation, the generation module 1103 is used to connect the vertices of the candidate graphics corresponding to each target point in the same position to obtain a three-dimensional reference element; determine the normal vector corresponding to each face in the three-dimensional reference element; determine the color corresponding to each face according to the ray vector and the normal vector corresponding to each face, and the color corresponding to any face is used to indicate whether any face is visible; fill each face with color according to the color corresponding to each face to obtain a three-dimensional map element.

[0182] In one possible implementation, the generation module 1103 is used to determine, for any face, a second angle between the normal vector and the ray vector corresponding to that face; and to determine the color corresponding to any face based on the second angle.

[0183] In one possible implementation, the determining module 1102 is further configured to determine, based on the top view, a plurality of third points, the third points being located on the edge of the top view, or the third points being located inside the top view;

[0184] The generation module 1103 is also used to generate the target object corresponding to each third point; determine the position of each third point on the 3D map element; and place the target object corresponding to each third point at the position of each third point.

[0185] In one possible implementation, module 1102 is used to determine the perimeter of the top view; determine the interval distance based on the perimeter; and determine multiple third points on the top view according to the interval distance, starting from any one of the multiple initial points.

[0186] In one possible implementation, the determining module 1102 is used to uniformly mark points in the bounding rectangle corresponding to the top view to obtain multiple fourth points; multiple fifth points are determined from the multiple fourth points by the ray method, and the fifth points are located inside the top view; the occurrence probability of each fifth point is determined according to the position information of each fifth point; and the fifth point whose occurrence probability meets the probability requirement is taken as the third point.

[0187] When generating 3D map elements, the aforementioned device only needs to acquire the point data of the vertices of the top view of the 3D map element. Based on the point data of the vertices, the corner type, and the target graphic, the 3D map element is generated. Since only the point data of the vertices needs to be acquired, the number of point data points is reduced, thus saving time required to generate 3D map elements and improving the generation efficiency. Furthermore, the target graphic and corner type are user-defined. Therefore, generating 3D map elements according to the target graphic and corner type ensures that the cross-section of the generated 3D map element in the target direction is the target graphic, and the corner type of the generated 3D map element is the corner type. This diversifies the styles of the generated 3D map elements, further improving the flexibility of 3D map element generation.

[0188] It should be understood that the above-described apparatus is only illustrated by the division of the functional modules described above when implementing its functions. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0189] Figure 12This illustration shows a structural block diagram of a terminal device 1200 provided in an exemplary embodiment of this application. The terminal device 1200 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal device 1200 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0190] Typically, terminal device 1200 includes a processor 1201 and a memory 1202.

[0191] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1201 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1201 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0192] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one instruction, which is executed by the processor 1201 to implement the method for generating three-dimensional map elements provided in the method embodiments of this application.

[0193] In some embodiments, the terminal device 1200 may also optionally include: a peripheral device interface 1203 and at least one peripheral device. The processor 1201, memory 1202, and peripheral device interface 1203 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 1207, a positioning assembly 1208, and a power supply 1209.

[0194] Peripheral device interface 1203 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1201 and memory 1202. In some embodiments, processor 1201, memory 1202 and peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1201, memory 1202 and peripheral device interface 1203 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0195] The radio frequency (RF) circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1204 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1204 can communicate with other terminal devices through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1204 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0196] Display screen 1205 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1205 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1201 for processing. In this case, display screen 1205 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1205, disposed on the front panel of terminal device 1200; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal device 1200 or in a folded design; in still other embodiments, display screen 1205 may be a flexible display screen, disposed on a curved or folded surface of terminal device 1200. Furthermore, display screen 1205 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1205 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0197] The camera assembly 1206 is used to acquire images or videos. Optionally, the camera assembly 1206 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal device 1200, and the rear-facing camera is located on the back of the terminal device 1200. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1206 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0198] The audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1201 for processing, or input to the radio frequency circuit 1204 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal device 1200. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1207 may also include a headphone jack.

[0199] The positioning component 1208 is used to locate the current geographical location of the terminal device 1200 in order to enable navigation or LBS (Location Based Service). The positioning component 1208 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Granas system, or the European Union's Galileo system.

[0200] Power supply 1209 is used to supply power to the various components in terminal device 1200. Power supply 1209 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1209 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0201] In some embodiments, the terminal device 1200 further includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: an accelerometer 1211, a gyroscope 1212, a pressure sensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and a proximity sensor 1216.

[0202] Accelerometer 1211 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal device 1200. For example, accelerometer 1211 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1201 can control display screen 1205 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1211. Accelerometer 1211 can also be used for games or for acquiring user motion data.

[0203] The gyroscope sensor 1212 can detect the orientation and rotation angle of the terminal device 1200. The gyroscope sensor 1212 can work in conjunction with the accelerometer sensor 1211 to collect the user's 3D movements on the terminal device 1200. Based on the data collected by the gyroscope sensor 1212, the processor 1201 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0204] The pressure sensor 1213 can be disposed on the side bezel of the terminal device 1200 and / or on the lower layer of the display screen 1205. When the pressure sensor 1213 is disposed on the side bezel of the terminal device 1200, it can detect the user's grip signal on the terminal device 1200, and the processor 1201 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1213. When the pressure sensor 1213 is disposed on the lower layer of the display screen 1205, the processor 1201 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1205. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0205] The fingerprint sensor 1214 is used to collect a user's fingerprint. The processor 1201 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 1201 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 1214 can be located on the front, back, or side of the terminal device 1200. When the terminal device 1200 has a physical button or manufacturer logo, the fingerprint sensor 1214 can be integrated with the physical button or manufacturer logo.

[0206] The optical sensor 1215 is used to collect ambient light intensity. In one embodiment, the processor 1201 can control the display brightness of the display screen 1205 based on the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1205 is increased; when the ambient light intensity is low, the display brightness of the display screen 1205 is decreased. In another embodiment, the processor 1201 can also dynamically adjust the shooting parameters of the camera assembly 1206 based on the ambient light intensity collected by the optical sensor 1215.

[0207] The proximity sensor 1216, also known as a distance sensor, is typically installed on the front panel of the terminal device 1200. The proximity sensor 1216 is used to detect the distance between the user and the front of the terminal device 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front of the terminal device 1200 is gradually decreasing, the processor 1201 controls the display screen 1205 to switch from a screen-on state to a screen-off state; when the proximity sensor 1216 detects that the distance between the user and the front of the terminal device 1200 is gradually increasing, the processor 1201 controls the display screen 1205 to switch from a screen-off state to a screen-on state.

[0208] Those skilled in the art will understand that Figure 12 The structure shown does not constitute a limitation on the terminal device 1200, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0209] Figure 13 This is a schematic diagram of the server structure provided in the embodiments of this application. The server 1300 can vary considerably due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1301 and one or more memories 1302. The one or more memories 1302 store at least one line of program code, which is loaded and executed by the one or more processors 1301 to implement the three-dimensional map element generation method provided in the various method embodiments described above. Of course, the server 1300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1300 may also include other components for implementing device functions, which will not be elaborated here.

[0210] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one piece of program code that is loaded and executed by a processor to enable a computer to implement any of the above-described methods for generating three-dimensional map elements.

[0211] Optionally, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0212] In an exemplary embodiment, a computer program or computer program product is also provided, which stores at least one computer instruction, which is loaded and executed by a processor to enable the computer to implement any of the above-described methods for generating three-dimensional map elements.

[0213] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the point data of the initial point and the target graphic involved in this application were obtained with full authorization.

[0214] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0215] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0216] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating three-dimensional map elements, characterized in that, The method includes: Acquire point data and target graphics of multiple initial points, wherein the initial points are the graphic vertices of the top view of the three-dimensional map element to be generated, and the point data of the initial points include the position information of the initial points; Based on the position information of the plurality of initial points, determine the turning point of the top view among the plurality of initial points; Based on the corner type of the turning point, at least one candidate point is generated, and the at least one candidate point is used to generate the corner of the three-dimensional map element; The three-dimensional map element is generated based on the location information of each target point and the target graphic. The target point includes the initial point other than the turning point among the plurality of initial points and the at least one candidate point. The cross section of the three-dimensional map element in the target direction is the target graphic. The step of determining the turning point of the top view among the plurality of initial points based on the position information of the plurality of initial points includes: Obtain a horizontal offset value, which indicates the horizontal offset of the target graphic relative to the initial point; Connect the multiple initial points to obtain the top view; Determine the circumscribed rectangle of the top view; Based on the position information of the plurality of initial points, the circumscribed rectangle, and the horizontal offset value, the turning point is determined among the plurality of initial points; The step of determining the turning point from the plurality of initial points based on the position information of the plurality of initial points, the circumscribed rectangle, and the horizontal offset value includes: For any one of the plurality of initial points, based on the position information of the any one initial point, the position information of the first point, and the position information of the second point, a first distance between the any one initial point and the first point and a second distance between the any one initial point and the second point are determined, wherein the first point and the second point are initial points adjacent to the any one initial point; The rotation radius is determined based on the width of the circumscribed rectangle and the horizontal offset value; Based on the rotation radius, determine the lengths of the two sides of the first included angle, where the first included angle is the angle formed by the first point, any initial point, and the second point; Based on the fact that both the first distance and the second distance are greater than the lengths of the two sides of the first included angle, the initial point is taken as the turning point.

2. The method according to claim 1, characterized in that, The step of generating the 3D map elements based on the location information of each target point and the target graphic includes: Based on the location information of each target point and the target graphic, candidate graphics corresponding to each target point are generated; Place the anchor point of the candidate graphic corresponding to each target point at the corresponding target point; Connect the vertices of the candidate graphics corresponding to each target point that are in the same position, and obtain the three-dimensional map elements based on the connection results.

3. The method according to claim 2, characterized in that, The step of generating candidate images corresponding to each target point based on the location information of each target point and the target image includes: For any one of the target points, obtain the affine transformation matrix corresponding to that target point; Based on the location information of any one target point and the target graphic, multiple first reference points are determined. The first reference point is the graphic vertex of the target graphic when the anchor point of the target graphic is placed at any one target point. Based on the position information of each first reference point and the affine transformation matrix corresponding to any target point, generate the second reference point corresponding to each first reference point; The graphic formed by the second reference points corresponding to each of the first reference points is used as the candidate graphic corresponding to any one of the target points.

4. The method according to claim 2, characterized in that, The step of connecting the vertices of the candidate graphics corresponding to each target point at the same position, and obtaining the 3D map elements based on the connection results, includes: Connect the vertices of the candidate graphics corresponding to each target point that are in the same position to obtain a three-dimensional reference element; Determine the normal vectors corresponding to each face in the three-dimensional reference element; Based on the ray vector and the normal vector corresponding to each face, the color corresponding to each face is determined, and the color corresponding to any face is used to indicate whether any face is visible; The three-dimensional map elements are obtained by filling each face with its corresponding color.

5. The method according to claim 4, characterized in that, The step of determining the color corresponding to each face based on the ray vector and the normal vector corresponding to each face includes: For any given face, determine the second angle between the normal vector corresponding to that face and the ray vector; The color corresponding to any one of the faces is determined based on the second included angle.

6. The method according to any one of claims 1 to 5, characterized in that, After generating the 3D map elements based on the location information of each target point and the target graphic, the method further includes: Based on the top view, a plurality of third points are determined, wherein the third points are located on the edge of the top view or inside the top view; Generate the target objects corresponding to each third point; Determine the positions corresponding to each third point on the three-dimensional map elements; Place the target object corresponding to each of the third points at the positions corresponding to each of the third points.

7. The method according to claim 6, characterized in that, The determination of multiple third points based on the top view includes: Determine the perimeter of the top view; Determine the interval distance based on the perimeter; Starting from any one of the plurality of initial points, multiple third points are determined on the top view according to the interval distance.

8. The method according to claim 6, characterized in that, The determination of multiple third points based on the top view includes: Multiple fourth points are obtained by evenly marking points within the circumscribed rectangle corresponding to the top view; Multiple fifth points are determined from among the multiple fourth points by ray casting, the fifth points being located inside the top view; Based on the location information of each fifth point, determine the probability of occurrence of each fifth point; The fifth point, where the probability of occurrence meets the probability requirement, is referred to as the third point.