Model construction method and device and computer readable storage medium

Through edge node resampling and wall top node height consistent construction conditions, multiple wall and top nodes are constructed, which solves the problems of low tunnel modeling efficiency and high cost in the existing technology, and achieves fast and efficient 3D Tunnel model construction.

CN118799510APending Publication Date: 2024-10-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310416072.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, manual tunnel modeling and point cloud-based tunnel modeling methods are inefficient and costly, and cannot effectively build an intuitive three-dimensional tunnel model.

Method used

By obtaining the long edge elements on the road surface elements, resampling the edge node alignment, determining the target edge node pairs, and constructing wall and roof nodes based on these nodes, the three-dimensional tunnel structure model can be quickly constructed.

Benefits of technology

It significantly improves the efficiency of model construction, reduces data processing costs, and achieves efficient three-dimensional tunnel model construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799510A_ABST
    Figure CN118799510A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a model construction method and device and a computer readable storage medium, and the method can be applied to the field of maps, and comprises the steps: obtaining long edge elements on road surface elements; performing side node alignment resampling between the long side elements to obtain long side elements comprising a plurality of target side nodes after side node alignment resampling; determining a target edge node pair formed between the long edge elements, and constructing a plurality of corresponding wall surface nodes based on the target edge node pair; constructing a plurality of corresponding top surface nodes according to the plurality of wall surface nodes; and performing three-dimensional modeling based on the plurality of target edge nodes, the plurality of wall surface nodes and the plurality of top surface nodes, and constructing a tunnel structure model. Therefore, based on the road surface elements, a plurality of wall surface nodes and a plurality of top surface nodes are constructed through the construction conditions that the side nodes are aligned and resampled and the wall top nodes are consistent in height, so that three-dimensional modeling is quickly performed on the tunnel structure model, the model construction efficiency is improved, and the data processing cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a model building method, device and computer-readable storage medium. Background Art

[0002] With the continuous development of society, roads have become more and more complicated. People need to use electronic maps to complete route planning and navigation when traveling. Since two-dimensional electronic maps (including two-dimensional information of roads, i.e., longitude information and latitude information) cannot intuitively display the spatial layout of tunnels, the demand for three-dimensional tunnel construction of three-dimensional electronic maps (including three-dimensional information of roads, i.e., longitude information, latitude information and altitude information) is becoming more and more obvious.

[0003] In the related art, manual tunnel modeling or point cloud-based tunnel modeling technology is generally used to construct three-dimensional tunnels. During the research and practice of the related art, the inventors of the present application found that in the related art, whether it is manual tunnel modeling or point cloud-based tunnel modeling, data processing is relatively cumbersome, the model construction efficiency is very low, and the labor cost is extremely high. Summary of the invention

[0004] The embodiments of the present application provide a model building method, device and computer-readable storage medium, which can improve the efficiency of model building and save costs.

[0005] To solve the above technical problems, the present application provides the following technical solutions:

[0006] A model building method, comprising:

[0007] Acquire a long edge element on a road surface element, wherein the long edge element includes a plurality of edge nodes;

[0008] Performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling;

[0009] Determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height;

[0010] Constructing corresponding multiple top surface nodes according to the multiple wall surface nodes;

[0011] Three-dimensional modeling is performed based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model.

[0012] A model building device, comprising:

[0013] An acquisition unit, used for acquiring a long edge element on a road surface element, wherein the long edge element includes a plurality of edge nodes;

[0014] A sampling unit, used for performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling;

[0015] A first construction unit is used to determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height;

[0016] A second construction unit is used to construct a corresponding plurality of top surface nodes according to the plurality of wall surface nodes;

[0017] The third construction unit is used to perform three-dimensional modeling based on the multiple target edge nodes, the multiple wall nodes and the multiple top surface nodes to construct a tunnel structure model.

[0018] In some embodiments, the sampling unit is used to:

[0019] Calculate the position percentage of each edge node on the long edge feature;

[0020] The edge nodes are resampled on the long edge elements corresponding to each edge node in turn according to the same position percentage to obtain long edge elements including multiple target edge nodes.

[0021] In some embodiments, the first building block comprises:

[0022] A first determining subunit is used to determine the edge node pairs that are in the same position percentage on the aligned long edge elements as target edge node pairs;

[0023] A second determining subunit, configured to determine a corresponding wall top height based on the target edge node pair;

[0024] A calculation subunit, used for calculating a corresponding wall offset distance according to the distance between the target edge node pairs;

[0025] The construction subunit is used to construct a corresponding plurality of wall nodes based on the target edge node pair under the constraints of the wall top height and the wall offset distance.

[0026] In some embodiments, the second determining subunit is used to:

[0027] Obtaining the heights of two target edge nodes in the target edge node pair;

[0028] Compare the heights of the two target edge nodes and determine the target height of the target edge node with the larger height;

[0029] Based on the target height plus the preset wall height, the wall top height is obtained.

[0030] In some embodiments, the computing subunit is used to:

[0031] Obtaining the distance between the target edge node pairs;

[0032] A preset wall curvature is obtained, and a corresponding wall offset distance is calculated according to the spacing and the preset wall curvature.

[0033] In some embodiments, the construction subunit is used to:

[0034] Determine a horizontal offset direction and a vertical offset direction of each target edge node in the target edge node pair;

[0035] Using the cosine function as the offset function of the curve corresponding to the wall offset distance;

[0036] In the horizontal offset direction, determining the horizontal coordinate offset of the wall node corresponding to each target edge node according to the offset function and the preset number of wall sampling points;

[0037] In the vertical offset direction, the ordinate offset of the wall node corresponding to each target edge node is determined according to the preset number of wall sampling points and the wall top height;

[0038] Based on the horizontal coordinate offset and the vertical coordinate offset, a plurality of wall nodes corresponding to the target edge node pair are constructed.

[0039] In some embodiments, the construction subunit is further used for:

[0040] Determine a horizontal offset direction and a vertical offset direction of each target edge node in the target edge node pair;

[0041] Using the cosine function as the offset function of the curve corresponding to the wall offset distance;

[0042] In the horizontal offset direction, determining the horizontal coordinate offset of the wall node corresponding to each target edge node according to the offset function and the preset number of wall sampling points;

[0043] In the vertical offset direction, determining a target wall height based on a difference between the wall top height and a height indicated by each target edge node;

[0044] Determine the ordinate offset of the wall node corresponding to each target edge node according to the ratio of the target wall height to the number of preset wall sampling points;

[0045] Based on the horizontal coordinate offset and the vertical coordinate offset, a plurality of wall nodes corresponding to the target edge node pair are constructed.

[0046] In some embodiments, the acquisition unit is used to:

[0047] Get multiple nodes on the road surface feature;

[0048] Calculate the corresponding angle data of each node in turn;

[0049] Confirming the nodes whose angle data meet the preset conditions as right-angle corner nodes;

[0050] The long side element on the road surface element is determined according to the right-angle corner node.

[0051] In some embodiments, the second building block is used to:

[0052] A determination subunit, configured to determine an arc angle according to a symmetrical wall top node among the plurality of wall nodes;

[0053] The construction subunit is used to construct a corresponding plurality of top surface nodes according to the arc angle and the preset number of top surface sampling points.

[0054] In some embodiments, the determining subunit is used to:

[0055] Calculate the corresponding center coordinates of the circle according to the coordinates of the symmetrical wall top nodes among the multiple wall nodes;

[0056] Based on the coordinates of the circle center and the coordinates of the symmetrical wall top node, the corresponding arc angle is determined.

[0057] In some embodiments, the third building block is used to:

[0058] Expand the external wall nodes based on the target edge nodes on each long edge element to obtain an external wall long edge element corresponding to each long edge element, wherein the external wall long edge element includes a plurality of target external wall edge nodes;

[0059] Determine a target exterior wall edge node pair formed between the exterior wall long side elements, and construct a corresponding plurality of exterior wall surface nodes based on the target exterior wall edge node pair, wherein the exterior wall top nodes of the plurality of exterior wall surface nodes have the same height;

[0060] Constructing a corresponding plurality of external wall top surface nodes according to the plurality of external wall surface nodes;

[0061] Based on the multiple target external wall edge nodes, multiple external wall surface nodes, multiple external wall top surface nodes, multiple target edge nodes, multiple wall surface nodes and multiple top surface nodes, three-dimensional modeling is performed to construct a tunnel structure model.

[0062] In some embodiments, the device further comprises a mapping unit, which is used to:

[0063] The inner wall surface of the tunnel structure model is divided into a wall area, a ceiling light area and a ceiling area;

[0064] Performing texture coordinate mapping based on the wall area, ceiling light area and ceiling area respectively;

[0065] Performing texture coordinate mapping on the outer wall surface of the tunnel structure model;

[0066] Texture coordinate mapping is performed on the side surface of the tunnel structure model.

[0067] A computer-readable storage medium stores a plurality of instructions suitable for loading by a processor to execute the steps in the above-mentioned model building method.

[0068] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned model building method when executing the computer program.

[0069] A computer program product or computer program, the computer program product or computer program includes computer instructions, the computer instructions are stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer performs the steps in the above-mentioned model building method.

[0070] The embodiment of the present application obtains the long side elements on the road surface elements; performs the side node alignment resampling between the long side elements to obtain the long side elements including multiple target side nodes after the side node alignment resampling; determines the target side node pairs formed between the long side elements, and constructs corresponding multiple wall nodes based on the target side node pairs; constructs corresponding multiple top surface nodes based on multiple wall nodes; performs three-dimensional modeling based on multiple target side nodes, multiple wall nodes and multiple top surface nodes to construct a tunnel structure model. In this way, based on the road surface elements, multiple wall nodes and multiple top surface nodes are constructed through the construction conditions of the side node alignment resampling and the wall top node height consistency, thereby realizing the rapid three-dimensional modeling of the tunnel structure model. Compared with the solutions of manual tunnel modeling or point cloud-based tunnel modeling in the related technology, the efficiency of model construction is greatly improved and the data processing cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0072] Figure 1 is a schematic diagram of a scenario of a model building system provided in an embodiment of the present application;

[0073] Figure 2 It is a flow chart of the model building method provided in the embodiment of the present application;

[0074] Figure 3a It is a scene schematic diagram of the model building method provided in the embodiment of the present application;

[0075] Figure 3b is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0076] Figure 3c is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0077] Figure 3d is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0078] Figure 3e is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0079] Figure 3f is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0080] Figure 4 is another flow chart of the model building method provided in the embodiment of the present application;

[0081] Figure 5a is another flow chart of the model building method provided in the embodiment of the present application;

[0082] Figure 5b is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0083] Figure 5c is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0084] Figure 5d is another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0085] Figure 5eis another scenario schematic diagram of the model building method provided in an embodiment of the present application;

[0086] Figure 6 is a schematic diagram of the structure of a model building device provided in an embodiment of the present application;

[0087] Figure 7 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION

[0088] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0089] In order to better illustrate the embodiments of the present application, some related concepts are introduced below:

[0090] High-precision Shapefile: High-precision road surfaces stored in the Shapefile file format can be used for three-dimensional reconstruction of road surfaces. Shapefile is a non-topological simple format for storing the geometric position and attribute information of geographic features.

[0091] Position resampling: Find the two long sides of the rectangular face and resample the points on the two long sides to the same number in proportion.

[0092] UV mapping: Texture coordinates are called UVs, and the process of applying texture to a surface is called UV mapping.

[0093] Tunnel internal elements: various additional elements besides the main tunnel structure, including: fire extinguishers, emergency telephones, fire hydrants, etc.

[0094] It should be noted that some processes described in the specification, claims and drawings include multiple steps that appear in a specific order, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, the descriptions such as "first" and "second" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0095] The embodiments of the present application provide a model building method, device, and computer-readable storage medium, which relate to the map field and the transportation field.

[0096] See also Figure 1 , Figure 1The scenario diagram of the information processing system provided in the embodiment of the present application includes: a terminal 11 and a server 20. The terminal 11 and the server 20 can be connected through a communication network. The communication network includes a wireless network and a wired network, wherein the wireless network includes a combination of one or more of a wireless wide area network, a wireless local area network, a wireless metropolitan area network, and a wireless personal network. The network includes network entities such as routers and gateways, which are not shown in the figure. The terminal 11 can exchange information with the server 20 through the communication network. For example, the server 20 sends map data to the terminal 11.

[0097] The information processing system may include an information processing device, which may be specifically integrated in a server 20. The server 20 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, and is used to obtain long edge elements on road surface elements, which include multiple edge nodes; perform edge node alignment resampling between the long edge elements to obtain long edge elements including multiple target edge nodes after edge node alignment resampling; determine the target edge node pairs formed between the long edge elements, and construct corresponding multiple wall nodes based on the target edge node pairs, wherein the wall top nodes of the multiple wall nodes have the same height; construct corresponding multiple top surface nodes based on the multiple wall nodes; perform three-dimensional modeling based on the multiple target edge nodes, multiple wall nodes, and multiple top surface nodes to construct a tunnel structure model. The tunnel structure model is sent as map data to the terminal 11 for tunnel display.

[0098] The information processing system may also include a terminal, which may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle terminal, an aircraft, etc. Figure 1 In the example, the terminal is Figure 1 The terminal 11 in the embodiment may be installed with various clients required by users, such as a map client. The terminal 11 may be used to display a three-dimensional tunnel according to map data.

[0099] It should be noted that Figure 1 The scenario diagram of the information processing system shown is merely an example. The information processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of information processing systems and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.

[0100] The following are detailed descriptions of each.

[0101] The embodiment of the present application provides a model building method, which can be executed by a terminal or a server, or by both the terminal and the server. The embodiment of the present application takes the execution of the model building method by the server as an example for explanation.

[0102] See also Figure 2 , Figure 2 : is a flow chart of the model building method provided in the embodiment of the present application. The model building method includes:

[0103] In step 101, the long edge element on the road surface element is obtained.

[0104] It is understandable that in the specific implementation of the present application, related data such as user information and map data are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0105] The embodiment of the present application is applied to the scene of tunnel structure model construction. The road surface element can be obtained from the high-precision Shapefile file. The road surface element can also be called a surface element. The surface element is represented by a point string that is closed at the beginning and the end. The road surface element is usually represented as a polygon that is approximately rectangular. For a better description of the embodiment of the present application, please refer to Figure 3a As shown, Figure 3a The rectangle in the figure is the road surface feature.

[0106] In the related art, since the number of sampling points (nodes) on both sides of the road surface element with elevation is not necessarily the same, such as Figure 3a As shown, the number of sampling points along the left side of the road surface element is 8, and the number of sampling points along the right side of the road surface element is 9, and the positions of the sampling points are uneven, which will bring great difficulties to the subsequent tunnel modeling process.

[0107] In order to solve the above technical problems, the embodiment of the present application can unify the number of sampling points along both sides of the road line to support subsequent modeling processing. Please refer to the following steps for details. First, the long side element on the road surface element can be obtained, such as Figure 3a As shown, the long side feature has the same extension direction as the road line.

[0108] In some embodiments, the step of obtaining the long side element on the road surface element may include:

[0109] (1) Obtain multiple nodes on the road surface elements;

[0110] (2) Calculate the corresponding angle data of each node in turn;

[0111] (3) confirming the node whose angle data meets the preset conditions as a right-angle corner node;

[0112] (4) Determine the long side element on the road surface element based on the right-angle corner node.

[0113] Please continue to read Figure 3a As shown, obtain multiple nodes {p1, p2, ..., p n}, where n is 17. Further, in order to confirm the long side element, the coordinates of the three consecutive points p can be used. m-1 ,p m ,p m+1 , the two direction vectors Then the angle data of each point can be calculated, which can be calculated by the following formula:

[0114]

[0115] Among them, acos() is the arc cosine function, which can be used to calculate the corresponding angle data ∠p of each node m- 1p m p m+1 The preset condition may be a right angle range, such as a right angle range of 80 to 100 degrees, and thus according to the formula 90°-α≤∠p m-1 p m p m+1 ≤90°+α finds the right-angle corner point of the road surface element, where α is the right-angle judgment threshold and can be set to 10 degrees, that is, the nodes with angles in the right angle range of 80 degrees to 100 degrees are confirmed as right-angle corner nodes.

[0116] For further information, please also refer to Figure 3b As shown, nodes 12, 13, 14 and 15 whose angle data meet the preset conditions are confirmed as right-angle corner nodes. In this way, two long side elements on the road surface element, namely the left long side element Segleft and the right long side element Segright, can be determined according to the number of nodes and distances between the right-angle corner nodes.

[0117] In step 102, edge node alignment resampling is performed between long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling.

[0118] Please continue to read Figure 3bAs shown, in order to unify the number of sampling points along both sides of the road line and support subsequent modeling processing, the embodiment of the present application can perform edge node alignment resampling of the nodes between the long edge elements, that is, resample the points on the two long edge elements proportionally to the same number, and obtain a long edge element including multiple target edge nodes after edge node alignment resampling. At this time, the number of target edge nodes on the two long edge elements is equal.

[0119] In some implementations, edge node alignment resampling is performed between the long edge elements to obtain a long edge element including a plurality of target edge nodes after edge node alignment resampling, including:

[0120] (1) Calculate the position percentage of each edge node on the long edge element;

[0121] (2) Resampling the edge nodes on the long edge elements corresponding to each edge node in turn according to the same position percentage to obtain long edge elements including multiple target edge nodes.

[0122] Among them, the position percentage of each edge node on the long edge element can be calculated, and the position percentage is the ratio of the length of the position of the edge node on the corresponding long edge element to the length of the entire long edge element. Therefore, in order to achieve a uniform number of edge nodes between long edge elements, the edge nodes can be resampled according to the same position percentage on the long edge elements corresponding to each edge node in turn. For example, when the edge node is on the left long edge element Segleft, it is necessary to resample the edge nodes according to the same position percentage on the right long edge element Segright corresponding to the edge node, that is, to add an interpolation node at the same position percentage of the right long edge element Segright to achieve edge node resampling. By analogy, the left long edge element Segleft and the right long edge element Segright containing the same number of target edge nodes on both sides can be obtained.

[0123] For example, see also Figure 3c As shown, for the edge node p on the right long edge element Segright m , its position percentage in the right long edge element Segright is β%, where β is [0, 100]. Then it is necessary to m Resample the edge nodes on the left long edge element Segleft according to the same position percentage β%, and add an interpolation node p' on the left long edge element Segleft according to the same position percentage β% m , and so on, the edge nodes are resampled on the long edge elements corresponding to each edge node according to the same position percentage, and the left long edge element Segleft and the right long edge element Segright are obtained, both of which include 15 target edge nodes.

[0124] In step 103, target edge node pairs formed between long edge elements are determined, and corresponding multiple wall nodes are constructed based on the target edge node pairs.

[0125] Please continue to read Figure 3c As shown in the figure, after the above-mentioned edge node resampling, the left long edge element Segleft and the right long edge element Segright both contain the same number of target edge nodes, and the target edge nodes between the left long edge element Segleft and the right long edge element Segright are symmetrical to each other, so that the number of sampling points of the long edge elements on both sides of the road line is unified, and the positions correspond one to one, which is convenient for subsequent modeling processing.

[0126] Based on this, the symmetrical edge node pair between the left long side element Segleft and the right long side element Segright can be determined as the target edge node pair. In order to further construct the tunnel structure model, it is necessary to construct the wall element on the basis of the target edge node pair. In the relevant technology, each edge node carries elevation (height) information, so that the heights of the two target edge nodes in the target edge node pair may be different. If the same preset wall height is added directly on the basis of the heights of the two target edge nodes in the target edge node pair to construct the wall element, the wall top heights of the two wall elements will be different, which will affect the subsequent top surface construction.

[0127] In order to solve the above technical problems, the embodiment of the present application sets a restriction that the height of the wall node is the same as the wall top node, and the wall top node is the node corresponding to the highest vertex of the wall element. In this way, based on the restriction that the target edge node pair is the same as the wall top node height, multiple wall nodes can be extended upward from each target edge node to realize the construction of the wall element.

[0128] In some implementations, determining the target edge node pairs formed between the long edge elements and constructing corresponding multiple wall nodes based on the target edge node pairs includes:

[0129] (1) determining the edge node pairs that have the same position percentage on the aligned long edge elements as the target edge node pairs;

[0130] (2) determining the corresponding wall top height based on the target edge node pair;

[0131] (3) Calculate the corresponding wall offset distance according to the distance between the target edge node pairs;

[0132] (4) Under the constraints of the wall top height and the wall offset distance, a corresponding plurality of wall nodes are constructed based on the target edge node pair.

[0133] Among them, the edge node pairs with the same position percentage on the left long edge element Segleft and the right long edge element Segright can be determined as the target edge node pairs. Please continue to refer to Figure 3c As shown, 15 target edge node pairs can be determined.

[0134] The same wall top height can be set for each target edge node pair, and the wall top height is used to limit the maximum height of the wall element. Furthermore, a preset wall curvature can be set according to demand. The preset wall curvature refers to the ratio of the inward inclination depth of the tunnel wall to the tunnel width. The value of the preset wall curvature can be [0, 0.5]. The larger the preset wall curvature, the greater the inward inclination of the wall, and the smaller the preset wall curvature, the smaller the inward inclination of the wall. In this way, the spacing between the target edge node pairs can be calculated. The spacing represents the tunnel width. The spacing is calculated with the preset wall curvature to obtain the corresponding wall offset distance.

[0135] Based on this, under the constraints of the wall top height and the wall offset distance, the target edge nodes in each target edge node pair can be extended to construct multiple wall nodes that meet the above constraints. The number of wall nodes is consistent with the number of node samplings on the tunnel wall, and the number of node samplings on the tunnel wall is an integer, such as 3 or 5.

[0136] In some implementations, determining the corresponding wall top height based on the target edge node pair includes:

[0137] (1.1) Obtain the heights of the two target edge nodes in the target edge node pair;

[0138] (1.2) Compare the heights of the two target edge nodes and determine the target height of the target edge node with the larger height;

[0139] (1.3) Based on the target height plus the preset wall height, the wall top height is obtained.

[0140] In order to better illustrate the embodiments of the present application, please refer to Figure 3d As shown, the target edge node P left and the target edge node P right Constitute a set of target edge node pairs P pair , get the target edge node P left and the target edge node P right Further, compare the target edge node P left and the target edge node P right The height of the left target edge node H is obtained left >Height H of the right target edge node right , thereby determining the target edge node P with a greater height leftTarget height H left .

[0141] The preset wall height H Wall The wall height can be set by the user. In order to ensure the same final wall top height, the target height H left Add the preset wall height H Wall , get the wall top height H target At this point, it can be seen that the left wall height H leftwall That is H Wall . The height of the right wall is H rightwall H is the height of the wall top target Subtract H right .

[0142] In some implementations, calculating the corresponding wall offset distance according to the distance between the target edge node pairs includes:

[0143] (2.1) Obtain the distance between the target edge node pair;

[0144] (2.2) Obtain a preset wall curvature, and calculate a corresponding wall offset distance based on the spacing and the preset wall curvature.

[0145] The distance between two target edge nodes in the target edge node pair can be obtained, and the tunnel width can be determined according to the distance, and then the preset wall curvature can be obtained. The value of the preset wall curvature can be [0, 0.5]. For example, the preset wall curvature can be 0.3. In this way, the corresponding wall offset distance can be calculated according to the distance and the preset wall curvature.

[0146] In some implementations, under the constraints of the wall top height and the wall offset distance, constructing a corresponding plurality of wall nodes based on the target edge node pair includes:

[0147] (3.1) determining the horizontal offset direction and the vertical offset direction of each target edge node in the target edge node pair;

[0148] (3.2) The cosine function is used as the offset function of the curve corresponding to the wall offset distance;

[0149] (3.3) In the horizontal offset direction, the horizontal coordinate offset of the wall node corresponding to each target edge node is determined according to the offset function and the preset number of wall sampling points;

[0150] (3.4) In the vertical offset direction, the vertical coordinate offset of the wall node corresponding to each target edge node is determined according to the preset number of wall sampling points and the wall top height;

[0151] (3.5) Based on the horizontal coordinate offset and the vertical coordinate offset, construct multiple wall nodes corresponding to the target edge node pair.

[0152] The horizontal offset direction and the vertical offset direction of each target edge node in the target edge node pair can be determined. The horizontal offset direction refers to the direction parallel to the ground, the horizontal offset direction points to the inside of the tunnel, and the vertical offset direction refers to the direction perpendicular to the ground and upward. For a better description of the embodiments of the present application, please refer to Figure 3e As shown, the target edge node P left and the target edge node P right Constitute a set of target edge node pairs P pair , the target edge node pair P pair The wall offset distance D offset It can be calculated by the following formula:

[0153] D offset =C Wall ×|P left -P right |

[0154] The C Wall is the preset wall curvature, C Wall ∈[0,0.5], the |P left -P right | is the target edge node P left and the target edge node P right Therefore, the wall offset distance D can be calculated by the above formula. offset It should be noted that when C Wall When it is equal to 0, it is a vertical wall. When it is other values, the wall will be offset inward. pair Target edge node P left The horizontal offset direction v hor_left =Normalize(P right -P left ), target edge node P right The horizontal offset direction v hor_right =Normalize(P left -P right ), the Normalize() is a normalization function, that is, the target edge node P left The horizontal offset direction is P left Point to P right In the horizontal direction, the target edge node P right The horizontal offset direction is P right Point to P left In the horizontal direction, the target edge node P left and the target edge node Pright The vertical offset direction v ver =(0,0,1), which represents the direction vertical to the ground.

[0155] Furthermore, the Cos function (cosine function) in the trigonometric function can be used as the offset function (also understood as the kernel function) of the curve corresponding to the wall offset distance. The angle θ∈[0,π / 2] of the cosine function is a monotonically decreasing curve whose value gradually decreases from 1 to 0. In this way, the curve distance of the angle θ∈[0,π / 2] of the cosine function can be set according to the wall offset distance. The number of preset wall sampling points (tunnel wall fineness N wall ) is the number of node samplings on the tunnel wall, which can be an integer, that is, the number of preset wall sampling points determines the number of wall nodes.

[0156] Therefore, the N of the wall wall The sampling points are equivalent to every The k-th horizontal offset is The P wall Equal to 5, K represents the sampling point, the value of K is [2, 5], according to the horizontal offset Determine the horizontal coordinate offset, the target edge node P left The vertical axis offset is (H leftwall / P wall ×k), the target edge node P right The vertical axis offset is (H rightwall / P wall ×k).

[0157] In this way, based on the superposition of the horizontal coordinate offset and the vertical coordinate offset, the target edge node P is constructed. left and the target edge node P right Corresponding multiple wall nodes, in order to better illustrate the embodiment of this application, please continue to refer to Figure 3e As shown, the target edge node P left For example, the target edge node P left The location of the wall node It can be calculated by the following formula:

[0158]

[0159] Based on the above formula, the target edge node P can be calculated in turn left Multiple wall nodes, namely P left , and It should be noted that the target edge node P left is the initial wall node of the wall node, and realizes the construction of the target edge node P leftCorresponding multiple wall nodes, similarly, can achieve the construction of target edge node P right The corresponding multiple wall nodes, and the target edge node P left The height of the wall top node and the target edge node P right The height of the wall top node is the same as that of the wall top node. This allows for rapid construction of the subsequent top surface. Similarly, multiple wall nodes corresponding to each target edge node can be constructed.

[0160] In some implementations, the method of determining the ordinate offset of the wall node corresponding to each target edge node according to the preset number of wall sampling points and the wall top height includes:

[0161] (4.1) Determine the target wall height based on the difference between the wall top height and the height indicated by each target edge node;

[0162] (4.2) According to the ratio of the target wall height and the number of preset wall sampling points, the vertical coordinate offset of the wall node corresponding to each target edge node is determined.

[0163] Among them, since the target wall height of the target edge node may be different for the target edge node, it is necessary to calculate the corresponding wall top height H at each target edge node. target The target wall height of each target edge node is determined by subtracting the height difference indicated by the corresponding target edge node from the basis. For a better understanding of the embodiments of the present application, please continue to refer to Figure 3d As shown, the target edge node P left The target wall height is H leftwall , target edge node P right Target wall height H right H target Subtract H right .

[0164] Furthermore, the target edge node P left The ordinate offset of the corresponding wall node is (H leftwall / P wall ×k), and the target edge node P right The ordinate offset of the corresponding wall node is (H rightwall / P wall ×k).

[0165] In step 104, a corresponding plurality of top surface nodes are constructed according to the plurality of wall surface nodes.

[0166] Among them, after completing the construction of multiple wall nodes of two symmetrical target edge nodes in the target edge node pair, since the heights of the wall top nodes of the wall nodes of the left and right target edge nodes are the same, node sampling can be performed based on the left and right wall top nodes with a circular arc segment to generate top surface elements and construct corresponding multiple top surface nodes.

[0167] In some implementations, constructing a corresponding plurality of top surface nodes according to a plurality of wall surface nodes may include:

[0168] (1) determining an arc angle according to a symmetrical wall top node among the multiple wall nodes;

[0169] (2) Constructing a plurality of corresponding top surface nodes according to the arc angle and the preset number of top surface sampling points.

[0170] In order to better illustrate the embodiments of the present application, please refer to Figure 3f As shown, after completing the target edge node P left and the target edge node P right After calculating the wall nodes, we can get the top nodes of the left and right walls. and and The height is the same, so according to the and Determine the arc angle γ, which can represent a segment of a circle. The number of preset top surface sampling points (i.e., the tunnel top surface fineness N Hall ) is the number of node sampling on the top surface of the tunnel, and the value of this number is an integer.

[0171] Furthermore, on the arc corresponding to the arc angle γ, each interval γ / N Hall The point sampling is performed once at an angle until the number of sampling times reaches the preset number of top surface sampling points, and then multiple corresponding top surface nodes can be constructed.

[0172] In some implementations, determining the arc angle according to the symmetrical wall top node among the multiple wall nodes may include:

[0173] (1.1) Calculate the corresponding center coordinates of the circle according to the coordinates of the symmetrical wall top nodes among the multiple wall nodes;

[0174] (1.2) Based on the coordinates of the center of the circle and the coordinates of the symmetrical wall top node, determine the corresponding arc angle.

[0175] Please continue to refer to 3f, and you can use the top nodes of the left and right walls to calculate the wall top nodes. and To calculate the center point P of the corresponding circleHC , so as to realize the top surface of the tunnel to be N arc segments of a circle Hall The core problem is how to calculate the radius R of the circle and the corresponding center point P of the circle. HC , the specific calculation process is as follows:

[0176] like Figure 3f As shown, P HC P SC =RN Hall , the H Hall =H total (Total tunnel height)-H wall (target wall height), Because the top node of the wall and The coordinates of P are known. SC is the midpoint of the two, so the P SC The coordinates of H are also known, and the value of d can be calculated. Hall is also known, so according to the Pythagorean theorem of triangles, that is, (RH Hall ) 2 +d 2 =R 2 , we can calculate the value of the radius R, and then calculate the center point P HC The coordinates of P SC The vertical coordinate minus |P HC P SC |. Based on this, we can use the coordinates of the center of the circle and the coordinates of the symmetrical wall top node Determine the corresponding arc angle γ.

[0177] In step 105, three-dimensional modeling is performed based on multiple target edge nodes, multiple wall nodes, and multiple top surface nodes to construct a tunnel structure model.

[0178] Among them, after realizing the construction of multiple target edge nodes, multiple wall nodes and multiple top surface nodes, the nodes can be connected to form basic triangular faces to realize three-dimensional modeling, thereby realizing the construction of the tunnel structure model. In one embodiment, after constructing the tunnel structure model, the tunnel structure model can be mapped by UV mapping to realize the visual rendering of the tunnel structure model.

[0179] As can be seen from the above, the embodiment of the present application obtains the long side elements on the road surface elements; performs the side node alignment resampling between the long side elements to obtain the long side elements including multiple target side nodes after the side node alignment resampling; determines the target side node pairs formed between the long side elements, and constructs corresponding multiple wall nodes based on the target side node pairs; constructs corresponding multiple top surface nodes based on multiple wall nodes; performs three-dimensional modeling based on multiple target side nodes, multiple wall nodes and multiple top surface nodes to construct a tunnel structure model. In this way, based on the road surface elements, through the side node alignment resampling and the construction conditions of the wall top node height consistency, multiple wall nodes and multiple top surface nodes are constructed, thereby realizing rapid three-dimensional modeling of the tunnel structure model. Compared with the solutions of manual tunnel modeling or point cloud-based tunnel modeling in the related technology, the efficiency of model construction is greatly improved and the data processing cost is reduced.

[0180] In combination with the method described in the above embodiment, the method will be further described in detail with examples below.

[0181] In this embodiment, the model building device is specifically integrated in a server as an example for description, and specific reference is made to the following description.

[0182] See also Figure 4 , Figure 4 Another schematic diagram of the process of building a model provided in the embodiment of the present application. The process of the method may include:

[0183] In step 201, the server obtains multiple nodes on the road surface element, calculates the corresponding angle data of each node in turn, confirms the nodes whose angle data meet the preset conditions as right-angle corner nodes, and determines the long side elements on the road surface element based on the right-angle corner nodes.

[0184] Please also read Figure 5a As shown, the embodiments of the present application are divided according to functions, including step A (preprocessing), step B (tunnel structure model construction) and step C (tunnel UV mapping). Step A corresponds to 201 to 202 in the embodiments of the present application, step B corresponds to 203 to 211 in the embodiments of the present application, and step C corresponds to 212 in the embodiments of the present application. For specific implementation details, please refer to the description of the following embodiments.

[0185] Please continue to read Figure 3a As shown, obtain multiple nodes {p1, p2, ..., p n}, where n is 17. Further, in order to confirm the long side element, the coordinates of the three consecutive points p can be used. m-1 ,p m ,p m+1 , the two direction vectors Then the angle data of each point can be calculated, which can be calculated by the following formula:

[0186]

[0187] Among them, acos() is the arc cosine function, which can be used to calculate the corresponding angle data ∠p of each node m- 1p m p m+1 The preset condition may be a right angle range, such as a right angle range of 80 to 100 degrees, and thus according to the formula 90°-α≤∠p m-1 p m p m+1 ≤90°+α finds the right-angle corner point of the road surface element, where α is the right-angle judgment threshold and can be set to 10 degrees, that is, the nodes with angles in the right angle range of 80 degrees to 100 degrees are confirmed as right-angle corner nodes.

[0188] For further information, please refer to Figure 3b As shown, nodes 12, 13, 14 and 15 whose angle data meet the preset conditions are confirmed as right-angle corner nodes. In this way, two long side elements on the road surface element, namely the left long side element Segleft and the right long side element Segright, can be determined according to the number of nodes and distances between the right-angle corner nodes.

[0189] In step 202, the server calculates the position percentage of each edge node on the long edge element, and resamples the edge nodes on the long edge elements corresponding to each edge node according to the same position percentage to obtain a long edge element including multiple target edge nodes.

[0190] Please continue reading Figure 3c As shown, for the edge node p on the right long edge element Segright m , its position percentage in the right long edge element Segright is β%, where β is [0, 100]. Then it is necessary to m Resample the edge nodes on the left long edge element Segleft according to the same position percentage β%, and add an interpolation node p' on the left long edge element Segleft according to the same position percentage β% m , and so on, the edge nodes are resampled on the long edge elements corresponding to each edge node according to the same position percentage, and the left long edge element Segleft and the right long edge element Segright are obtained, both of which include 15 target edge nodes.

[0191] In step 203, the server determines the edge node pairs that are at the same position percentage on the aligned long edge elements as target edge node pairs, obtains the heights of the two target edge nodes in the target edge node pairs, compares the heights of the two target edge nodes, determines the target height of the target edge node with a larger height, and obtains the wall top height based on the target height plus the preset wall height.

[0192] Please continue reading Figure 3c As shown, the edge node pairs that are in the same position percentage on the aligned left long edge element Segleft and the right long edge element Segright can be determined as target edge node pairs, and 15 target edge node pairs can be determined.

[0193] Please continue reading Figure 3d As shown, the target edge node P left and the target edge node P right Constitute a set of target edge node pairs P pair , get the target edge node P left and the target edge node P right Further, compare the target edge node P left and the target edge node P right The height of the left target edge node H is obtained left >Height H of the right target edge node right , thereby determining the target edge node P with a greater height left Target height H left .

[0194] The preset wall height H Wall The wall height can be set by the user. In order to ensure the same final wall top height, the target height H left Add the preset wall height H Wall , get the wall top height H target At this point, it can be seen that the left wall height H leftwall That is H Wall . The height of the right wall is H rightwall H is the height of the wall top target Subtract H right .

[0195] In step 204, the server obtains the distance between the target edge node pairs, obtains the preset wall curvature, and calculates the corresponding wall offset distance according to the distance and the preset wall curvature.

[0196] The distance between two target edge nodes in the target edge node pair can be obtained, and the tunnel width can be determined according to the distance, and then the preset wall curvature can be obtained. The value of the preset wall curvature can be [0, 0.5]. For example, the preset wall curvature can be 0.3. In this way, the corresponding wall offset distance can be calculated according to the distance and the preset wall curvature.

[0197] Please continue reading Figure 3e As shown, the target edge node P left and the target edge node P right Constitute a set of target edge node pairs P pair , the target edge node pair P pair The wall offset distance D offset It can be calculated by the following formula:

[0198] D offset =C Wall ×|P left -P right |

[0199] The C Wall is the preset wall curvature, C Wall ∈[0,0.5], the |P left -P right | is the target edge node P left and the target edge node P right The interval between.

[0200] In step 205, the server determines the horizontal offset direction and the vertical offset direction of each target edge node in the target edge node pair, and uses the cosine function as the offset function of the curve corresponding to the wall offset distance.

[0201] Please continue to read Figure 3e As shown, determine the target edge node pair P pair Target edge node P left The horizontal offset direction v hor_left =Normalize(P right -P left ), target edge node P right The horizontal offset direction v hor_right =Normalize(P left -P right ), that is, the target edge node P left The horizontal offset direction is P left Point to P right In the horizontal direction, the target edge node P right The horizontal offset direction is P right Point to P left In the horizontal direction, the target edge node Pleft and the target edge node P right The vertical offset direction v ver =(0,0,1), which represents the direction vertical to the ground.

[0202] Furthermore, the Cos function (cosine function) in the trigonometric function can be used as the offset function (also understood as the kernel function) of the curve corresponding to the wall offset distance. The angle θ∈[0,π / 2] of the cosine function is a monotonically decreasing curve whose value gradually decreases from 1 to 0. In this way, the curve distance of the angle θ∈[0,π / 2] of the cosine function can be set according to the wall offset distance.

[0203] In step 206, the server determines the horizontal coordinate offset of the wall node corresponding to each target edge node according to the offset function and the preset number of wall sampling points in the horizontal offset direction.

[0204] Among them, the preset number of wall sampling points (tunnel wall fineness N wall ) is the number of node samplings on the tunnel wall, which can be 5. The number of preset wall sampling points determines the number of wall nodes.

[0205] Based on this, the server is horizontally offset, and the wall N wall The sampling points are equivalent to every The k-th horizontal offset is The P wall Equal to 5, K represents the sampling point, the value of K is [2, 5], according to the horizontal offset Determines the horizontal axis offset.

[0206] In step 207, the server determines the target wall height in the vertical offset direction based on the difference between the wall top height and the height indicated by each target edge node, and determines the vertical coordinate offset of the wall node corresponding to each target edge node according to the ratio of the target wall height to the preset number of wall sampling points.

[0207] Please continue to read Figure 3d As shown, the target edge node P left The target wall height is H leftwall , target edge node P right Target wall height H rightwall H target Subtract H right .

[0208] Furthermore, the target edge node P left The ordinate offset of the corresponding wall node is (H leftwall / P wall ×k), and the target edge node P rightThe ordinate offset of the corresponding wall node is (H rightwall / P wall ×k).

[0209] In step 208, the server constructs a plurality of wall nodes corresponding to the target edge node pair based on the horizontal coordinate offset and the vertical coordinate offset.

[0210] Please continue to read Figure 3e As shown, the target edge node P left For example, the target edge node P left The location of the wall node It can be calculated by the following formula:

[0211]

[0212] Based on the above formula, the target edge node P can be calculated in turn left Multiple wall nodes, namely P left , and It should be noted that the target edge node P left is the initial wall node of the wall node, and realizes the construction of the target edge node P left Corresponding multiple wall nodes, similarly, can achieve the construction of target edge node P right The corresponding multiple wall nodes, and the target edge node P left The height of the wall top node and the target edge node P right The height of the wall top node is the same as that of the wall top node. This allows for rapid construction of the subsequent top surface. Similarly, multiple wall nodes corresponding to each target edge node can be constructed.

[0213] In step 209, the server calculates the corresponding center coordinates according to the coordinates of the symmetrical wall top nodes among the multiple wall nodes, determines the corresponding arc angle based on the center coordinates and the coordinates of the symmetrical wall top nodes, and constructs the corresponding multiple top surface nodes according to the arc angle and the preset number of top surface sampling points.

[0214] Please continue to refer to 3f. You can use the top nodes of the left and right walls to and To calculate the center point P of the corresponding circle HC , so as to realize the top surface of the tunnel to be N arc segments of a circle Hall The core problem is how to calculate the radius R of the circle and the corresponding center point P of the circle. HC , the specific calculation process is as follows:

[0215] P HC P SC=RH Hall , the H Hall =H total (Total tunnel height)-H wall (target wall height), Because the top node of the wall and The coordinates of P are known. SC is the midpoint of the two, so the P SC The coordinates of H are also known, and the value of d can be calculated. Hall is also known, so according to the Pythagorean theorem of triangles, that is, (RH Hall ) 2 +d 2 =R 2 , we can calculate the value of the radius R, and then calculate the center point P HC The coordinates of P SC The vertical coordinate minus |P HC P SC |. Based on this, we can use the coordinates of the center of the circle and the coordinates of the symmetrical wall top node Determine the corresponding arc angle γ.

[0216] The preset number of top surface sampling points (i.e., the tunnel top surface fineness N Hall ) is the number of node samples on the tunnel top surface, which is an integer, for example, 5. Further, on the arc corresponding to the arc angle γ, each interval γ / N Hall The point sampling is performed once at an angle until the number of sampling times reaches the preset number of top surface sampling points, and the corresponding 5 top surface nodes can be constructed.

[0217] In step 210, the server performs exterior wall node expansion based on the target edge node on each long edge element, obtains the exterior wall long edge element corresponding to each long edge element, determines the target exterior wall edge node pairs formed between the exterior wall long edge elements, and constructs corresponding multiple exterior wall surface nodes based on the target exterior wall edge node pairs.

[0218] Among them, steps 201 to 209 construct a tunnel structure model of the inner wall of the tunnel. In order to build a more realistic tunnel structure model, it is also necessary to consider the tunnel structure model of the outer wall of the tunnel. In this way, the server can expand the outer wall nodes based on the target edge nodes on the left and right long edge elements to obtain the outer wall long edge elements corresponding to each field edge element. The outer wall long edge elements include multiple target outer wall edge nodes, the number of target outer wall boundary points and the target edge nodes. It should be noted that when calculating the offset of the outer wall long edge element, no height change will be generated. For example, please refer to Figure 5b As shown, the long side element Seg left Take the example to calculate the Offset of the long side element of the left outer wall left, for Seg left The first node P first With the last node P last For example, it only needs to be rotated 90° outward according to its extension direction, and then offset T Wall The corresponding target external wall edge node can be obtained by calculating the distance of the target edge node p. m For Two vectors and normalize them, offset direction vector The direction indicated by the offset direction vector always points to the long side element of the exterior wall, that is, assuming that the offset direction vector Towards the inside of the tunnel, the offset direction vector Inversely, further, according to the target edge node p m and the offset direction vector Calculate the target edge node p m The corresponding target outer wall edge node p' m , and so on, we can get the long edge element Seg left Each target edge node is extended to multiple target exterior wall edge nodes after the exterior wall node is expanded, and the multiple target exterior wall edge nodes are connected to form an exterior wall long edge element.

[0219] Based on this, the tunnel structure model of the tunnel outer wall can be modeled by referring to the construction process of the tunnel structure model of the inner wall of the tunnel, that is, the target outer wall edge node pair formed between the outer wall long side elements is determined, and the corresponding multiple outer wall nodes are constructed based on the target outer wall edge node pair, and the outer wall top node heights of the multiple outer wall nodes are the same. This implementation process is consistent with the principle of constructing multiple wall nodes based on the long side elements mentioned above, so it will not be described in detail. It should be noted that the outer wall offset distance of the outer wall element is equal to the wall offset distance D offset .

[0220] In step 211, the server constructs a corresponding plurality of exterior wall top surface nodes according to the plurality of exterior wall surface nodes, performs three-dimensional modeling based on a plurality of target exterior wall edge nodes, a plurality of exterior wall surface nodes, a plurality of exterior wall top surface nodes, a plurality of target edge nodes, a plurality of wall surface nodes, and a plurality of top surface nodes to construct a tunnel structure model.

[0221] Among them, the implementation process of the server constructing a corresponding plurality of external wall top surface nodes according to a plurality of external wall surface nodes is consistent with the principle of constructing a plurality of top surface nodes based on wall surface nodes, so it will not be described in detail.

[0222] Furthermore, the inner wall of the tunnel can be modeled in three dimensions based on multiple target edge nodes, multiple wall nodes, and multiple top surface nodes to obtain the tunnel structure model of the inner wall of the tunnel. The outer wall of the tunnel can be modeled in three dimensions based on multiple target outer wall edge nodes, multiple outer wall nodes, and multiple outer wall top surface nodes to obtain the tunnel structure model of the outer wall of the tunnel. In this way, the nodes between the tunnel structure model of the inner wall of the tunnel and the tunnel structure model of the outer wall of the tunnel can be connected to form a basic triangular face to achieve the modeling of the entire tunnel structure model. It should be noted that the direction of the triangular face should be paid attention to. The normal direction of the triangular face of the outer wall of the tunnel should face outward, and the normal direction of the triangular face of the inner wall of the tunnel should face inward to ensure the correctness of subsequent mapping. The arc points formed by the inner wall of the tunnel and the outer wall of the tunnel can also be connected to form a triangular face to achieve the modeling of the side of the tunnel.

[0223] To better illustrate the embodiments of this application, please refer to Figure 5c As shown, the entire tunnel structure model is shown in tunnel structure model D and tunnel structure model E.

[0224] In step 212, the server divides the inner wall surface of the tunnel structure model into a wall area, a ceiling light area, and a top surface area, performs texture coordinate mapping based on the wall area, the ceiling light area, and the top surface area, respectively, performs texture coordinate mapping on the outer wall surface of the tunnel structure model, and performs texture coordinate mapping on the side surface of the tunnel structure model.

[0225] After the entire tunnel structure model is built, it is necessary to perform UV mapping on the inner wall, outer wall and side of the tunnel structure model to achieve a more realistic rendering effect. Figure 5d As shown, in order to ensure that the deformation of the texture is minimized, the inner wall can be divided into three parts: the wall area, the ceiling light area and the top surface area, and UV coordinates are assigned to each part to achieve mapping. That is, a separate texture is used for the wall area, and the UV coordinates from the bottom to the top of the wall gradually increase from 0 to 1, covering a complete wall texture. The ceiling light area is a part with a fixed length on both sides of the top surface area. Using a separate light texture for this area can ensure that the texture light is not stretched. The remaining top surface area can directly use any repeated texture to achieve UV mapping of the inner wall.

[0226] Furthermore, you can UV map the outer wall of the tunnel structure model and the side of the tunnel structure model. To achieve the realistic rendering effect of the three-dimensional tunnel, please refer to Figure 5e As shown, the rendered three-dimensional tunnels are shown as three-dimensional tunnel G and three-dimensional tunnel H.

[0227] Through the above operations, a regularized and parameterized automated 3D tunnel modeling solution is provided based on the existing high-precision map data. Based on the Shapefile road surface elements, a simple 3D road surface can be converted into a complex tunnel structure model composed of many triangular faces through data preprocessing, tunnel structure construction, and tunnel UV mapping. It has the characteristics of low cost, high speed, and free adjustment of tunnel morphology, and can be applied to the 3D model reconstruction process or product of large-scale urban roads and high-altitude roads.

[0228] As can be seen from the above, the embodiment of the present application obtains the long side elements on the road surface elements; performs the side node alignment resampling between the long side elements to obtain the long side elements including multiple target side nodes after the side node alignment resampling; determines the target side node pairs formed between the long side elements, and constructs corresponding multiple wall nodes based on the target side node pairs; constructs corresponding multiple top surface nodes based on multiple wall nodes; performs three-dimensional modeling based on multiple target side nodes, multiple wall nodes and multiple top surface nodes to construct a tunnel structure model. In this way, based on the road surface elements, through the side node alignment resampling and the construction conditions of the wall top node height consistency, multiple wall nodes and multiple top surface nodes are constructed, thereby realizing rapid three-dimensional modeling of the tunnel structure model. Compared with the solutions of manual tunnel modeling or point cloud-based tunnel modeling in the related technology, the efficiency of model construction is greatly improved and the data processing cost is reduced.

[0229] See also Figure 6 , Figure 6 A structural schematic diagram of a model building device provided in an embodiment of the present application, wherein the model building device may include an acquisition unit 301, a sampling unit 302, a first building unit 303, a second building unit 304 and a third building unit 305, and the model building device is applied to a server.

[0230] The acquisition unit 301 is used to acquire a long edge element on a road surface element, where the long edge element includes a plurality of edge nodes.

[0231] In some embodiments, the acquisition unit 301 is used to:

[0232] Get multiple nodes on the road surface feature;

[0233] Calculate the corresponding angle data of each node in turn;

[0234] The node whose angle data meets the preset conditions is confirmed as a right-angle corner node;

[0235] The long side element on the road surface element is determined according to the right-angle corner node.

[0236] The sampling unit 302 is used to perform edge node alignment resampling between the long edge elements to obtain long edge elements including multiple target edge nodes after edge node alignment resampling.

[0237] In some implementations, the sampling unit 302 is used to:

[0238] Calculate the position percentage of each edge node on the long edge feature;

[0239] The edge nodes are resampled on the long edge elements corresponding to each edge node in turn according to the same position percentage to obtain long edge elements including multiple target edge nodes.

[0240] The first construction unit 303 is used to determine the target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height.

[0241] In some embodiments, the first construction unit 303 includes:

[0242] A first determining subunit is used to determine the edge node pairs that are in the same position percentage on the aligned long edge elements as target edge node pairs;

[0243] A second determining subunit, configured to determine a corresponding wall top height based on the target edge node pair;

[0244] A calculation subunit, used for calculating a corresponding wall offset distance according to the distance between the target edge node pairs;

[0245] The construction subunit is used to construct a corresponding plurality of wall nodes based on the target edge node pair under the constraints of the wall top height and the wall offset distance.

[0246] In some embodiments, the second determining subunit is used to:

[0247] Get the heights of the two target edge nodes in the target edge node pair;

[0248] Compare the heights of the two target edge nodes and determine the target height of the target edge node with the larger height;

[0249] Based on the target height plus the preset wall height, the wall top height is obtained.

[0250] In some embodiments, the computing subunit is used to:

[0251] Get the distance between the target edge node pair;

[0252] The preset wall curvature is obtained, and a corresponding wall offset distance is calculated according to the spacing and the preset wall curvature.

[0253] In some embodiments, the construction subunit is used to:

[0254] Determine the horizontal offset direction and the vertical offset direction of each target edge node in the target edge node pair;

[0255] The cosine function is used as the offset function of the curve corresponding to the offset distance of the wall;

[0256] In the horizontal offset direction, the horizontal coordinate offset of the wall node corresponding to each target edge node is determined according to the offset function and the preset number of wall sampling points;

[0257] In the vertical offset direction, the ordinate offset of the wall node corresponding to each target edge node is determined according to the preset number of wall sampling points and the wall top height;

[0258] Based on the horizontal coordinate offset and the vertical coordinate offset, a plurality of wall nodes corresponding to the target edge node pair are constructed.

[0259] In some embodiments, the construction subunit is further used for:

[0260] Determine the horizontal offset direction and the vertical offset direction of each target edge node in the target edge node pair;

[0261] The cosine function is used as the offset function of the curve corresponding to the offset distance of the wall;

[0262] In the horizontal offset direction, the horizontal coordinate offset of the wall node corresponding to each target edge node is determined according to the offset function and the preset number of wall sampling points;

[0263] In the vertical offset direction, determining the target wall height based on the difference between the wall top height and the height indicated by each target edge node;

[0264] Determine the vertical coordinate offset of the wall node corresponding to each target edge node according to the ratio of the target wall height to the number of preset wall sampling points;

[0265] Based on the horizontal coordinate offset and the vertical coordinate offset, a plurality of wall nodes corresponding to the target edge node pair are constructed.

[0266] The second constructing unit 304 is configured to construct a corresponding plurality of top surface nodes according to the plurality of wall surface nodes.

[0267] In some embodiments, the second construction unit 304 is used to:

[0268] A determination subunit is used to determine an arc angle according to a symmetrical wall top node among the multiple wall nodes;

[0269] The construction subunit is used to construct a corresponding plurality of top surface nodes according to the arc angle and the preset number of top surface sampling points.

[0270] In some embodiments, the determining subunit is used to:

[0271] Calculate the corresponding circle center coordinates according to the coordinates of the symmetrical wall top nodes among the multiple wall nodes;

[0272] Based on the coordinates of the circle center and the coordinates of the symmetrical wall top node, the corresponding arc angle is determined.

[0273] The third construction unit 305 is used to perform three-dimensional modeling based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model.

[0274] In some embodiments, the third building block is used to:

[0275] Expand the external wall nodes based on the target edge nodes on each long edge element to obtain the external wall long edge element corresponding to each long edge element, wherein the external wall long edge element includes a plurality of target external wall edge nodes;

[0276] Determine a target exterior wall edge node pair formed between the exterior wall long side elements, and construct a corresponding plurality of exterior wall surface nodes based on the target exterior wall edge node pair, wherein the exterior wall top nodes of the plurality of exterior wall surface nodes have the same height;

[0277] Constructing corresponding multiple external wall top surface nodes according to the multiple external wall surface nodes;

[0278] Based on the multiple target external wall edge nodes, multiple external wall surface nodes, multiple external wall top surface nodes, multiple target edge nodes, multiple wall surface nodes and multiple top surface nodes, three-dimensional modeling is performed to construct a tunnel structure model.

[0279] In some embodiments, the device further includes a mapping unit, which is used to:

[0280] The inner wall surface of the tunnel structure model is divided into a wall area, a ceiling light area and a top surface area;

[0281] Texture coordinate mapping is performed based on the wall area, ceiling light area and top surface area respectively;

[0282] Carry out texture coordinate mapping on the outer wall surface of the tunnel structure model;

[0283] Texture coordinate mapping is performed on the side of the tunnel structure model.

[0284] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.

[0285] As can be seen from the above, the embodiment of the present application obtains the long side elements on the road surface elements through the acquisition unit 301; the sampling unit 302 performs the edge node alignment resampling between the long side elements, and obtains the long side elements including multiple target edge nodes after the edge node alignment resampling; the first construction unit 303 determines the target edge node pairs formed between the long side elements, and constructs corresponding multiple wall nodes based on the target edge node pairs; the second construction unit 304 constructs corresponding multiple top surface nodes based on multiple wall nodes; the third construction unit 305 performs three-dimensional modeling based on multiple target edge nodes, multiple wall nodes and multiple top surface nodes to construct a tunnel structure model. In this way, based on the road surface elements, through the edge node alignment resampling and the construction conditions of the wall top node height consistency, multiple wall nodes and multiple top surface nodes are constructed, thereby realizing the rapid three-dimensional modeling of the tunnel structure model. Compared with the solutions of manual tunnel modeling or point cloud-based tunnel modeling in the related technology, the efficiency of model construction is greatly improved and the data processing cost is reduced.

[0286] The present application also provides a computer device, which may be a server. Figure 7 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:

[0287] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 7 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0288] The processor 401 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 401 may include one or more processing cores; optionally, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0289] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and model building by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0290] The computer device also includes a power supply 403 for supplying power to various components. Optionally, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0291] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0292] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby implementing the various method steps provided in the aforementioned embodiments, as follows:

[0293] Obtain a long edge element on a road surface element, the long edge element including a plurality of edge nodes;

[0294] Performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling;

[0295] Determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height;

[0296] Constructing corresponding multiple top surface nodes according to the multiple wall surface nodes;

[0297] Three-dimensional modeling is performed based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model.

[0298] In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the image processing method above, and will not be repeated here.

[0299] As can be seen from the above, the computer device of the embodiment of the present application can obtain the long side elements on the road surface elements; perform the side node alignment resampling between the long side elements to obtain the long side elements including multiple target side nodes after the side node alignment resampling; determine the target side node pairs formed between the long side elements, and construct corresponding multiple wall nodes based on the target side node pairs; construct corresponding multiple top surface nodes based on multiple wall nodes; perform three-dimensional modeling based on multiple target side nodes, multiple wall nodes and multiple top surface nodes to construct a tunnel structure model. In this way, based on the road surface elements, through the side node alignment resampling and the construction conditions of the wall top node height consistency, multiple wall nodes and multiple top surface nodes are constructed, thereby realizing rapid three-dimensional modeling of the tunnel structure model. Compared with the solutions of manual tunnel modeling or point cloud-based tunnel modeling in the related technology, the efficiency of model construction is greatly improved and the data processing cost is reduced.

[0300] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0301] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the model building methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0302] Obtain a long edge element on a road surface element, the long edge element including a plurality of edge nodes;

[0303] Performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling;

[0304] Determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height;

[0305] Constructing corresponding multiple top surface nodes according to the multiple wall surface nodes;

[0306] Three-dimensional modeling is performed based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model.

[0307] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations provided in the above embodiments.

[0308] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0309] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the model building methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the model building methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0310] The above is a detailed introduction to a model building method, device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A model building method, characterized in that: include: Acquire a long edge element on a road surface element, wherein the long edge element includes a plurality of edge nodes; Performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling; Determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height; Constructing corresponding multiple top surface nodes according to the multiple wall surface nodes; Three-dimensional modeling is performed based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model.

2. The model building method according to claim 1, characterized in that: The step of performing the edge node alignment resampling between the long edge elements to obtain the long edge elements including a plurality of target edge nodes after the edge node alignment resampling comprises: Calculate the position percentage of each edge node on the long edge feature; The edge nodes are resampled on the long edge elements corresponding to each edge node in turn according to the same position percentage to obtain long edge elements including multiple target edge nodes.

3. The model building method according to claim 2, characterized in that: The determining of the target edge node pairs formed between the long edge elements and constructing corresponding multiple wall nodes based on the target edge node pairs includes: The edge node pairs that are in the same position percentage on the aligned long edge elements are determined as target edge node pairs; Determine a corresponding wall top height based on the target edge node pair; Calculate the corresponding wall offset distance according to the distance between the target edge node pairs; Under the constraints of the wall top height and the wall offset distance, a corresponding plurality of wall nodes are constructed based on the target edge node pairs.

4. The model building method according to claim 3, characterized in that: The determining the corresponding wall top height based on the target edge node pair includes: Obtaining the heights of two target edge nodes in the target edge node pair; Compare the heights of the two target edge nodes and determine the target height of the target edge node with the larger height; Based on the target height plus the preset wall height, the wall top height is obtained.

5. The model building method according to claim 3, characterized in that: The calculating the corresponding wall offset distance according to the distance between the target edge node pairs includes: Obtaining the distance between the target edge node pairs; A preset wall curvature is obtained, and a corresponding wall offset distance is calculated according to the spacing and the preset wall curvature.

6. The model building method according to claim 3, characterized in that: The step of constructing a plurality of corresponding wall nodes based on the target edge node pairs under the constraints of the wall top height and the wall offset distance includes: Determine a horizontal offset direction and a vertical offset direction of each target edge node in the target edge node pair; Using the cosine function as the offset function of the curve corresponding to the wall offset distance; In the horizontal offset direction, determining the horizontal coordinate offset of the wall node corresponding to each target edge node according to the offset function and the preset number of wall sampling points; In the vertical offset direction, the ordinate offset of the wall node corresponding to each target edge node is determined according to the preset number of wall sampling points and the wall top height; Based on the horizontal coordinate offset and the vertical coordinate offset, a plurality of wall nodes corresponding to the target edge node pair are constructed.

7. The model building method according to claim 6, characterized in that: The method of determining the ordinate offset of the wall node corresponding to each target edge node according to the preset number of wall sampling points and the wall top height includes: Determine a target wall height based on a difference between the wall top height and the height indicated by each target edge node; According to the ratio of the target wall height to the number of preset wall sampling points, the ordinate offset of the wall node corresponding to each target edge node is determined.

8. The model building method according to any one of claims 1 to 7, characterized in that: The step of obtaining the long side element on the road surface element comprises: Get multiple nodes on the road surface feature; Calculate the corresponding angle data of each node in turn; Confirming the nodes whose angle data meet the preset conditions as right-angle corner nodes; The long side element on the road surface element is determined according to the right-angle corner node.

9. The model building method according to any one of claims 1 to 8, characterized in that: The step of constructing a corresponding plurality of top surface nodes according to the plurality of wall surface nodes comprises: Determining an arc angle according to a symmetrical wall top node among the plurality of wall nodes; According to the arc angle and the preset number of top surface sampling points, a corresponding plurality of top surface nodes are constructed.

10. The model building method according to claim 9, characterized in that: The step of determining the arc angle according to the symmetrical wall top nodes among the plurality of wall nodes comprises: Calculate the corresponding center coordinates of the circle according to the coordinates of the symmetrical wall top nodes among the multiple wall nodes; Based on the coordinates of the circle center and the coordinates of the symmetrical wall top node, the corresponding arc angle is determined.

11. The model building method according to any one of claims 1 to 10, characterized in that: The three-dimensional modeling is performed based on the multiple target edge nodes, the multiple wall nodes, and the multiple top surface nodes to construct a tunnel structure model, including: Expand the external wall nodes based on the target edge nodes on each long edge element to obtain an external wall long edge element corresponding to each long edge element, wherein the external wall long edge element includes a plurality of target external wall edge nodes; Determine a target exterior wall edge node pair formed between the exterior wall long side elements, and construct a corresponding plurality of exterior wall surface nodes based on the target exterior wall edge node pair, wherein the exterior wall top nodes of the plurality of exterior wall surface nodes have the same height; Constructing a corresponding plurality of external wall top surface nodes according to the plurality of external wall surface nodes; Based on the multiple target external wall edge nodes, multiple external wall surface nodes, multiple external wall top surface nodes, multiple target edge nodes, multiple wall surface nodes and multiple top surface nodes, three-dimensional modeling is performed to construct a tunnel structure model.

12. The model building method according to claim 11, characterized in that: After constructing the tunnel structure model, the method further includes: The inner wall surface of the tunnel structure model is divided into a wall area, a ceiling light area and a ceiling area; Performing texture coordinate mapping based on the wall area, ceiling light area and ceiling area respectively; Performing texture coordinate mapping on the outer wall surface of the tunnel structure model; Texture coordinate mapping is performed on the side surface of the tunnel structure model.

13. A model building device, characterized in that: include: An acquisition unit, used for acquiring a long edge element on a road surface element, wherein the long edge element includes a plurality of edge nodes; A sampling unit, used for performing edge node alignment resampling between the long edge elements to obtain long edge elements including a plurality of target edge nodes after edge node alignment resampling; A first construction unit is used to determine a target edge node pair formed between the long edge elements, and construct a corresponding plurality of wall nodes based on the target edge node pair, wherein the wall top nodes of the plurality of wall nodes have the same height; A second construction unit is used to construct a corresponding plurality of top surface nodes according to the plurality of wall surface nodes; The third construction unit is used to perform three-dimensional modeling based on the multiple target edge nodes, the multiple wall nodes and the multiple top surface nodes to construct a tunnel structure model.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the model building method according to any one of claims 1 to 12.

15. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the model building method according to any one of claims 1 to 12 when executing the computer program.

16. A computer program product comprising a computer program or instructions, characterized in that The computer program or instructions are used by a processor to execute the steps in the model building method according to any one of claims 1 to 12.