Simulation scene construction method and device, electronic equipment and medium
By analyzing map data to determine the 3D model of entities and recovering height information, this solves the problem in existing technologies where planar data of objects cannot accurately determine scene information, and realizes the expansion of 3D information of entities and the accurate construction of simulation scenes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2026-04-07
AI Technical Summary
The existing map data for objects is insufficient to accurately determine the scene information of the objects, and the lack of height data makes it impossible to accurately display the three-dimensional information of the entities.
By acquiring target data from a local area of the map, analyzing the location and type information of entities, determining the 3D model of the entities, constructing a target simulation scene, restoring lost height information, and expanding the 3D information of the entities.
It enables intuitive and effective recognition of entities, improves the fit between simulation and real-world scenarios, and accurately reproduces the three-dimensional features of entities.
Smart Images

Figure CN116305342B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of scene construction, and particularly relates to a method and device for constructing a simulation scene, an electronic device and a medium. BACKGROUND
[0002] In the existing map, only some object plane data such as object boundary coordinates and contour data are included.
[0003] For some objects in a real scene, such as gantry columns, signs, road signs and roadblocks on the road, they can only be displayed on the road surface plane included in the map in a top-down view as information reference, and the scene information where the objects are located cannot be accurately determined. SUMMARY
[0004] In order to solve the above technical problems, the present disclosure provides a method and device for constructing a simulation scene, an electronic device and a medium.
[0005] In a first aspect, the present disclosure provides a method for constructing a simulation scene, comprising:
[0006] obtaining target data, the target data being data of an entity in a local area of a map;
[0007] analyzing the target data to obtain position information and type information of the entity in the target data;
[0008] determining a three-dimensional model of the entity according to the position information and the type information of the entity;
[0009] constructing a target simulation scene according to the position information of the entity and the three-dimensional model of the entity.
[0010] Optionally, the type information of the entity is a first type, and the position information of the entity includes two-dimensional coordinates.
[0011] The determining of the three-dimensional model of the entity according to the position information and the type information of the entity comprises:
[0012] determining a width of the entity according to the two-dimensional coordinates;
[0013] determining a height of the entity according to the width of the entity and the first type;
[0014] determining the three-dimensional model of the entity according to the width of the entity and the height of the entity.
[0015] Optionally, the determining of the height of the entity according to the width of the entity and the first type comprises:
[0016] According to the first type, a preset first inference model is determined, the preset first inference model being used to describe a mapping relationship between a width of a first candidate entity and a height of the first candidate entity;
[0017] Based on the preset first inference model, the height of the entity is determined according to the width of the entity.
[0018] Optionally, the type information of the entity is of a second type, and the position information of the entity includes a two-dimensional coordinate and a radius, the two-dimensional coordinate including a head end point coordinate and a tail end point coordinate.
[0019] The three-dimensional model of the entity is determined according to the position information and the type information of the entity, including:
[0020] A direction vector of the entity is determined according to the head end point coordinate and the tail end point coordinate.
[0021] A first distance between the head end point coordinate and the tail end point coordinate is calculated.
[0022] The height of the entity is determined according to the first distance and the second type.
[0023] The three-dimensional model of the entity is determined according to the direction vector of the entity and the height of the entity.
[0024] Optionally, the height of the entity is determined according to the first distance and the second type, including:
[0025] A preset second inference model is determined according to the second type, the preset second inference model being used to describe a mapping relationship between a second distance between a head end point coordinate and a tail end point coordinate of a second candidate entity and a height of the second candidate entity.
[0026] The height of the entity is determined according to the first distance based on the preset second inference model.
[0027] Optionally, before the target simulation scene is constructed according to the position information of the entity and the three-dimensional model of the entity, the method further includes:
[0028] An initial simulation scene is constructed based on the target data, the initial simulation scene being a two-dimensional simulation scene.
[0029] The target simulation scene is constructed according to the position information of the entity and the three-dimensional model of the entity, including:
[0030] The three-dimensional model of the entity is inserted into the initial simulation scene based on the position information of the entity, to obtain the target simulation scene.
[0031] Optionally, the inserting the three-dimensional model of the entity into the initial simulation scene based on the position information of the entity comprises:
[0032] When the type information of the entity is the first type, the center point coordinate of the entity is calculated according to the position information of the entity.
[0033] The three-dimensional model of the entity is inserted into the initial simulation scene based on the center point coordinate, to obtain a target simulation scene.
[0034] Optionally, the inserting the three-dimensional model of the entity into the initial simulation scene based on the position information of the entity comprises:
[0035] When the type information of the entity is the second type, the center point coordinate of the entity is calculated according to the position information of the entity.
[0036] The three-dimensional model of the entity is inserted into the initial simulation scene based on the center point coordinate and the direction vector of the entity, to obtain a target simulation scene, wherein the direction vector of the entity is determined based on the position information of the entity.
[0037] In a second aspect, the present disclosure provides a simulation scene construction device, comprising:
[0038] An acquisition module is configured to acquire target data, wherein the target data is data of an entity in a local region of a map.
[0039] An analysis module is configured to analyze the target data to obtain position information and type information of the entity in the target data.
[0040] A determination module is configured to determine a three-dimensional model of the entity based on the position information and the type information of the entity.
[0041] A construction module is configured to construct a target simulation scene based on the position information of the entity and the three-dimensional model of the entity.
[0042] Optionally, the type information of the entity is a first type, and the position information of the entity comprises a two-dimensional coordinate.
[0043] The determination module comprises a first determination unit, a second determination unit and a third determination unit.
[0044] The first determination unit is configured to determine a width of the entity based on the two-dimensional coordinate.
[0045] The second determination unit is configured to determine a height of the entity based on the width of the entity and the first type.
[0046] The third determining unit is configured to determine a three-dimensional model of the entity according to the width of the entity and the height of the entity.
[0047] Optionally, the second determining unit is specifically configured to:
[0048] determine a preset first inference model according to the first type, the preset first inference model being used to describe a mapping relationship between the width of the first candidate entity and the height of the first candidate entity;
[0049] determine the height of the entity according to the width of the entity based on the preset first inference model.
[0050] Optionally, the type information of the entity is a second type, and the position information of the entity includes a two-dimensional coordinate and a radius, the two-dimensional coordinate including a head-end point coordinate and a tail-end point coordinate.
[0051] The determining module further includes a fourth determining unit, a calculating unit, a fifth determining unit and a sixth determining unit.
[0052] The fourth determining unit is configured to determine a direction vector of the entity according to the head-end point coordinate and the tail-end point coordinate.
[0053] The calculating unit is configured to calculate a first distance between the head-end point coordinate and the tail-end point coordinate.
[0054] The fifth determining unit is configured to determine the height of the entity according to the first distance and the second type.
[0055] The sixth determining unit is configured to determine a three-dimensional model of the entity according to the direction vector of the entity and the height of the entity.
[0056] Optionally, the fifth determining unit is specifically configured to:
[0057] determine a preset second inference model according to the second type, the preset second inference model being used to describe a mapping relationship between a second distance between the head-end point coordinate and the tail-end point coordinate of the second candidate entity and the height of the second candidate entity;
[0058] determine the height of the entity according to the first distance based on the preset second inference model.
[0059] Optionally, the constructing module is further configured to construct an initial simulation scene based on the target data, the initial simulation scene being a two-dimensional simulation scene.
[0060] The constructing module is specifically configured to:
[0061] insert the three-dimensional model of the entity into the initial simulation scene based on the position information of the entity, to obtain a target simulation scene.
[0062] Optionally, the constructing module is specifically configured to:
[0063] when the type information of the entity is the first type, calculate the center point coordinate of the entity according to the position information of the entity;
[0064] insert the three-dimensional model of the entity into the initial simulation scene based on the center point coordinate, to obtain a target simulation scene.
[0065] Optionally, the constructing module is specifically configured to:
[0066] when the type information of the entity is the second type, calculate the center point coordinate of the entity according to the position information of the entity;
[0067] insert the three-dimensional model of the entity into the initial simulation scene based on the center point coordinate and the direction vector of the entity, to obtain a target simulation scene, wherein the direction vector of the entity is determined according to the position information of the entity.
[0068] In a third aspect, the present disclosure provides an electronic device, comprising:
[0069] one or more processors;
[0070] a storage device configured to store one or more programs,
[0071] when the one or more programs are executed by the one or more processors, the one or more processors implement the simulation scene construction method in any of the embodiments of the present disclosure.
[0072] In a fourth aspect, the present disclosure provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the simulation scene construction method in any of the embodiments of the present disclosure.
[0073] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art: by obtaining target data, performing data analysis on the target data, obtaining the position information and type information of the entity in the target data, determining the three-dimensional model of the entity according to the position information and type information of the entity, restoring the height of the entity whose height information is lost, expanding the three-dimensional information of the entity, and effectively constructing a target simulation scene according to the position information of the entity and the three-dimensional model of the entity, the entity can be intuitively and effectively identified in the scene. BRIEF DESCRIPTION OF DRAWINGS
[0074] The accompanying drawings, which are incorporated herein and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings required by the embodiments or the prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.
[0076] Figure 1 is a flow diagram of a method for constructing a simulation scene provided by an embodiment of the present disclosure;
[0077] Figure 2 is a flow diagram of another method for constructing a simulation scene provided by an embodiment of the present disclosure;
[0078] Figure 3 is a display diagram of an initial simulation scene provided by an embodiment of the present disclosure;
[0079] Figure 4 is a display diagram of a target simulation scene provided by an embodiment of the present disclosure;
[0080] Figure 5 is a structural diagram of a device for constructing a simulation scene provided by an embodiment of the present disclosure;
[0081] Figure 6 is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings required by the embodiments or the prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.
[0083] In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some of the embodiments of the present disclosure, not all the embodiments.
[0084] At present, only planar data of an object can be extracted in a high-precision map, such as two-dimensional coordinates of the object, and height data of the object is lacking. For example, a road portal, a sign, a road sign, and a road barrier all need to have height data, so as to facilitate accurate judgment of scene information.
[0085] Based on this, the disclosure provides a simulation scene construction method and device, electronic equipment and medium. The position information and type information of the entity in the target data are obtained by data analysis of the target data, and the three-dimensional model of the entity is determined according to the position information and type information of the entity, so as to restore the height of the entity with missing height information, expand the three-dimensional information of the entity, and effectively construct the target simulation scene according to the position information of the entity and the three-dimensional model of the entity, so as to intuitively and effectively identify the scene where the entity is located.
[0086] Specifically refer to Figure 1 exemplarily shown in the figures.
[0087] Figure 1 is a flowchart of a simulation scene construction method provided by an embodiment of the disclosure. The embodiment method can be executed by a simulation scene construction device, which can be realized in hardware and / or software, and can be configured in an electronic device. The simulation scene construction method described in any embodiment of the present application can be realized. As shown in the figure, the method specifically includes the following: Figure 1
[0088] S110, obtaining target data.
[0089] The target data is the data of the entity in the local area of the map.
[0090] The target data can be obtained from a high-precision map, and the target data can be displayed in the form of a data model.
[0091] The entity can be one or more objects with missing height data in the local area of the map.
[0092] The target data can be the data of all entities existing in one or more local areas included in the high-precision map, or can be the data of part of the entities existing in one or more local areas included in the high-precision map.
[0093] It should be noted that the all entities / part of the entities mentioned above can include entities with missing height data in the high-precision map, such as flagpoles, traffic lights, speed bumps, traffic signs, etc.
[0094] S120, analyzing the target data to obtain the position information and type information of the entity in the target data.
[0095] The type information of the entity can include multiple types, such as a first type and a second type, the first type can correspond to a geometric solid figure, and the second type can correspond to a column figure, and the disclosure does not limit the specific type of the type information of the entity.
[0096] The position information of the entity corresponds to the type information of the entity, that is, the position information of different entities corresponding to the type information is different.
[0097] For example, when the type information of the entity is a geometric solid figure, the position information of the entity can include two-dimensional coordinates of the entity, such as lower surrounding surface boundary coordinates, lower surrounding surface contour coordinates, etc.; when the type information of the entity is a cylinder figure, the position information of the entity can include two-dimensional coordinates and a radius of the entity, wherein the two-dimensional coordinates can include a center point coordinate of an upper surrounding surface corresponding to the entity and a center point coordinate of a lower surrounding surface corresponding to the entity, and the radius can include a radius of the upper surrounding surface and a radius of the lower surrounding surface.
[0098] The geometric solid figure can include a cuboid, a cube, etc., which are not limited in the present disclosure.
[0099] It should be noted that the center point coordinate of the upper surrounding surface corresponding to the entity can be the same as the center point coordinate of the upper surrounding surface corresponding to the entity, and the radius of the upper surrounding surface can be the same as the radius of the lower surrounding surface, and the entity at this time can be regarded as a cylinder perpendicular to the ground.
[0100] Alternatively, the center point coordinate of the upper surrounding surface corresponding to the entity can be different from the center point coordinate of the upper surrounding surface corresponding to the entity, and the radius of the upper surrounding surface can be the same as the radius of the lower surrounding surface, and the entity at this time can be regarded as a cylinder inclined to the ground.
[0101] Alternatively, the center point coordinate of the upper surrounding surface corresponding to the entity can be the same as the center point coordinate of the upper surrounding surface corresponding to the entity, and the radius of the upper surrounding surface can be different from the radius of the lower surrounding surface, and the entity at this time can be regarded as a circular truncated cone perpendicular to the ground.
[0102] Alternatively, the center point coordinate of the upper surrounding surface corresponding to the entity can be different from the center point coordinate of the upper surrounding surface corresponding to the entity, and the radius of the upper surrounding surface can be different from the radius of the lower surrounding surface, and the entity at this time can be regarded as a circular truncated cone inclined to the ground.
[0103] S130, determining a three-dimensional model of the entity according to the position information and the type information of the entity.
[0104] The three-dimensional model of the entity is a model with three-dimensional information of length, width and height, which can effectively restore the real form of the entity.
[0105] When the type information of the entity is a geometric solid figure, the length of the entity can be the length of the figure corresponding to the lower surrounding surface of the geometric solid figure, the width can be the width of the figure corresponding to the lower surrounding surface of the geometric solid figure, and the height can be the vertical distance from the lower surrounding surface to the upper surrounding surface of the geometric solid figure, or the vertical distance from the upper surrounding surface to the ground.
[0106] When the type information of the entity is a columnar graph, the length of the entity can be the radius or the circumference of the lower surrounding surface of the column, the width of the entity can be the radius or the circumference of the lower surrounding surface of the column, and the height of the entity can be the vertical distance from the lower surrounding surface to the upper surrounding surface of the column or the vertical distance from the upper surrounding surface to the ground level.
[0107] It should be noted that when the entity belongs to an irregular image in the geometric solid graph / columnar graph, the length of the entity can be the distance between the two points farthest apart included in the lower surrounding surface.
[0108] When the type information of the entity is the first type and the position information of the entity includes two-dimensional coordinates, determining the three-dimensional model of the entity according to the position information and the type information of the entity can include:
[0109] determining the width of the entity according to the two-dimensional coordinates;
[0110] determining the height of the entity according to the width of the entity and the first type;
[0111] determining the three-dimensional model of the entity according to the width of the entity and the height of the entity.
[0112] Each entity can correspond to at least four two-dimensional coordinates, each two-dimensional coordinate can correspond to a connection point of the entity projected in the map, and the outline of the entity can be obtained by connecting the at least four two-dimensional coordinates in a clockwise direction / anticlockwise direction.
[0113] For example, entity A corresponds to four two-dimensional coordinates, which are left upper coordinate 1, left lower coordinate 2, right lower coordinate 3, and right upper coordinate 4. According to the two-dimensional coordinates, it can be determined that the width of the entity can be the distance between the left upper coordinate 1 and the left lower coordinate 2, or the distance between the right lower coordinate 3 and the right upper coordinate 4.
[0114] For another example, entity B corresponds to five two-dimensional coordinates, which are left upper coordinate 5, left lower coordinate 6, right lower coordinate 7, middle coordinate 8, and right upper coordinate 9. According to the two-dimensional coordinates, it can be determined that the width of the entity can be the maximum distance between the distance between the right lower coordinate 7 and the right upper coordinate 9 and the distance between the left upper coordinate 5 and the left lower coordinate 6.
[0115] The height of the entity can be the distance between the lower surrounding surface and the upper surrounding surface of the entity, or the distance between the upper surrounding surface and the ground level.
[0116] The embodiment can approximate the three-dimensional outline of the entity based on the width of the entity and the height of the entity, determine the peripheral surface material, color, etc. of the entity based on the width of the entity and the height of the entity, and effectively restore the three-dimensional model of the entity in the real scene.
[0117] The height of the entity is determined according to the width of the entity and the first type, including:
[0118] The preset first inference model is determined according to the first type, and the preset first inference model is used to describe a mapping relationship between the width of the first candidate entity and the height of the first candidate entity.
[0119] The height of the entity is determined according to the width of the entity based on the preset first inference model.
[0120] The database can store a plurality of inference models, such as a first inference model, a second inference model, etc., each inference model corresponding to an entity type, and can be used to determine the height of the same type of entity.
[0121] The first inference model is the inference model corresponding to the first type, and the mapping relationship between the width of the first candidate entity and the height of the first candidate entity can effectively represent the proportional relationship between the width of the first candidate entity and the height of the first candidate entity.
[0122] The height of the entity is determined according to the width of the entity based on the preset first inference model, which can include: based on the preset first inference model and the proportional relationship between the width of the first candidate entity and the height of the first candidate entity, the height of the entity is calculated.
[0123] Therefore, based on the first inference model obtained from the entity in the real scene, the real height of the entity of the first type can be accurately estimated.
[0124] When the type information of the entity is the second type, the position information of the entity includes a two-dimensional coordinate and a radius, and the two-dimensional coordinate includes a head point coordinate and a tail point coordinate, the three-dimensional model of the entity is determined according to the position information and the type information of the entity, including:
[0125] The direction vector of the entity is determined according to the head point coordinate and the tail point coordinate.
[0126] The first distance between the head point coordinate and the tail point coordinate is calculated.
[0127] The height of the entity is determined according to the first distance and the second type.
[0128] The three-dimensional model of the entity is determined according to the direction vector of the entity and the height of the entity.
[0129] The head point coordinate and the tail point coordinate can be the center point coordinates of the upper and lower surrounding surfaces of the entity, respectively. When the head point coordinate is the center point coordinate of the upper surrounding surface of the entity, the tail point coordinate can be the center point coordinate of the lower surrounding surface of the entity, or when the head point coordinate is the center point coordinate of the lower surrounding surface of the entity, the tail point coordinate can be the center point coordinate of the upper surrounding surface of the entity.
[0130] It should be noted that the head end point coordinate is the coordinate of the first point under the entity when the target data is parsed, and the tail end point coordinate is the coordinate of the second point under the entity when the target data is parsed.
[0131] The direction vector of the entity can be a vector in the direction from the head end point to the tail end point.
[0132] The height of the entity can be the distance between the lower enclosing surface of the entity (such as the enclosing surface where the head end point is located) and the upper enclosing surface (such as the enclosing surface where the tail end point is located), or the distance between the upper enclosing surface of the entity (such as the enclosing surface where the tail end point is located) and the ground plane (such as the plane where the head end point is located).
[0133] The embodiment can approximate the three-dimensional profile of the entity based on the direction vector of the entity and the height of the entity, and determine the peripheral surface material, color, etc. of the entity based on the direction vector of the entity and the height of the entity, so as to effectively restore the three-dimensional model of the entity in the real scene.
[0134] The height of the entity can be determined based on the first distance and the second type, including:
[0135] The second inference model is determined according to the second type, and the second inference model is used to describe the mapping relationship between the second distance between the head end point coordinate and the tail end point coordinate of the second candidate entity and the height of the second candidate entity.
[0136] The height of the entity is determined based on the first distance and the second inference model.
[0137] The second inference model is one of the inference models stored in the database, which can correspond to the second type, and the mapping relationship between the second distance between the head end point coordinate and the tail end point coordinate of the second candidate entity and the height of the second candidate entity can effectively represent the proportional relationship between the second distance between the head end point coordinate and the tail end point coordinate of the second candidate entity and the height of the second candidate entity.
[0138] The height of the entity is determined based on the second distance and the second inference model, which can include: based on the second inference model and the proportional relationship between the second distance and the height of the second candidate entity, the height of the entity is calculated.
[0139] Therefore, based on the second inference model obtained from the entity in the real scene, the real height of the entity of the second type can be accurately estimated.
[0140] S140, according to the position information of the entity and the three-dimensional model of the entity, a target simulation scene is constructed.
[0141] The three-dimensional model of the entity can be drawn into the target simulation scene according to the position information of the entity in the target data and the three-dimensional model corresponding to the entity, so as to construct the simulation scene with three-dimensional information.
[0142] The simulation scene construction method provided in the embodiment can obtain target data, perform data analysis on the target data to obtain position information and type information of an entity in the target data, determine a three-dimensional model of the entity according to the position information and the type information of the entity, restore the height of the entity with missing height information, expand the three-dimensional information of the entity, and effectively construct a target simulation scene according to the position information of the entity and the three-dimensional model of the entity, thereby facilitating intuitive and effective identification of a scene where the entity is located.
[0143] Figure 2 is a flowchart of another simulation scene construction method provided in the embodiment of the disclosure. The embodiment is based on the above-mentioned embodiment, and further includes the following steps before S140:
[0144] S131, constructing an initial simulation scene based on the target data.
[0145] The initial simulation scene is a two-dimensional simulation scene.
[0146] The initial simulation scene constructed based on the target data can include a two-dimensional graph corresponding to each entity in the target data. For example, the initial simulation scene can include a two-dimensional graph corresponding to a vehicle, a road line, an overpass, and the like. Figure 3 For example, as shown in the example.
[0147] Figure 3 The two-dimensional graph can include a top view state of a plurality of entities, such as a vehicle, a road line, an overpass, and the like.
[0148] One possible implementation of S140 is as follows:
[0149] S1401, inserting a three-dimensional model of an entity into the initial simulation scene based on position information of the entity, to obtain a target simulation scene.
[0150] The target simulation scene can be a three-dimensional simulation scene, which can effectively reflect three-dimensional characteristics of an entity included in the scene. For example, as shown in the example. Figure 4 For example, as shown in the example.
[0151] Figure 4 The target simulation scene can include a region 1, a region 2, and a region 3.
[0152] The region 1 can be used to describe a three-dimensional model corresponding to a vehicle, the region 2 can be used to describe a three-dimensional model corresponding to a road sign, and the region 3 can be used to describe a three-dimensional model corresponding to a portal column.
[0153] It should be noted that in the target simulation scene, different colors can be used to mark the three-dimensional models of different entities, so as to facilitate observation.
[0154] Optionally, based on the type information of the entity, the target simulation scene can be constructed in the following multiple implementation manners.
[0155] In some embodiments, when the type information of the entity is a first type, the center point coordinates of the entity are calculated according to the position information of the entity.
[0156] Based on the center point coordinates, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain the target simulation scene.
[0157] In the initial simulation scene, the two-dimensional graph with the entity can be used to construct the three-dimensional model of the entity to the position of the entity in the initial simulation scene according to the center point coordinates of the entity, so as to effectively obtain the target simulation scene with the three-dimensional characteristics of multiple entities.
[0158] In some embodiments, when the type information of the entity is a second type, the center point coordinates of the entity are calculated according to the position information of the entity.
[0159] Based on the center point coordinates and the direction vector of the entity, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain the target simulation scene, and the direction vector of the entity is determined according to the position information of the entity.
[0160] Based on the center point coordinates of the entity and the direction vector of the entity, the position of the three-dimensional model of the entity can be calibrated, so that the entity can be constructed into the simulation scene according to the arrangement manner of the entity in the real scene.
[0161] Therefore, the fitting degree between the target simulation scene and the real scene can be effectively improved, so that the real scene where the entity is located can be accurately restored.
[0162] Figure 5 FIG. 1 is a structural schematic diagram of a simulation scene construction device provided by an embodiment of the present disclosure; the device is configured in an electronic device, and can implement the simulation scene construction method described in any embodiment of the present disclosure. The device specifically includes the following:
[0163] The acquisition module 510 is configured to acquire target data, wherein the target data is data of an entity in a local area of a map.
[0164] The analysis module 520 is configured to analyze the target data to obtain position information and type information of the entity in the target data.
[0165] The determination module 530 is configured to determine a three-dimensional model of the entity according to the position information and the type information of the entity.
[0166] The construction module 540 is configured to construct a target simulation scene according to the position information of the entity and the three-dimensional model of the entity.
[0167] In this embodiment, optionally, the type information of the entity is a first type, and the position information of the entity includes two-dimensional coordinates.
[0168] The determination module 530 includes a first determination unit, a second determination unit, and a third determination unit.
[0169] The first determination unit is configured to determine the width of the entity according to the two-dimensional coordinates.
[0170] The second determination unit is configured to determine the height of the entity according to the width of the entity and the first type.
[0171] The third determination unit is configured to determine the three-dimensional model of the entity according to the width of the entity and the height of the entity.
[0172] In this embodiment, optionally, the second determination unit is specifically configured to:
[0173] determine a preset first inference model according to the first type, the preset first inference model being used to describe a mapping relationship between the width of a first candidate entity and the height of the first candidate entity.
[0174] determine the height of the entity according to the width of the entity based on the preset first inference model.
[0175] In this embodiment, optionally, the type information of the entity is a second type, the position information of the entity includes two-dimensional coordinates and a radius, and the two-dimensional coordinates include a head-end point coordinate and a tail-end point coordinate.
[0176] The determination module 530 further includes a fourth determination unit, a calculation unit, a fifth determination unit, and a sixth determination unit.
[0177] The fourth determination unit is configured to determine a direction vector of the entity according to the head-end point coordinate and the tail-end point coordinate.
[0178] The calculation unit is configured to calculate a first distance between the head-end point coordinate and the tail-end point coordinate.
[0179] The fifth determination unit is configured to determine the height of the entity according to the first distance and the second type.
[0180] The sixth determination unit is configured to determine the three-dimensional model of the entity according to the direction vector of the entity and the height of the entity.
[0181] In the embodiment, the fifth determining unit is configured to:
[0182] According to the second type, a preset second inference model is determined, the preset second inference model is used to describe a mapping relationship between a second distance between a head end point coordinate and a tail end point coordinate of a second candidate entity and a height of the second candidate entity;
[0183] Based on the preset second inference model, the height of the entity is determined according to the first distance.
[0184] In the embodiment, the construction module 540 is further configured to construct an initial simulation scene based on the target data, the initial simulation scene being a two-dimensional simulation scene.
[0185] The construction module 540 is configured to:
[0186] Based on the position information of the entity, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain a target simulation scene.
[0187] In the embodiment, the construction module 540 is configured to:
[0188] When the type information of the entity is the first type, the center point coordinate of the entity is calculated according to the position information of the entity.
[0189] Based on the center point coordinate, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain a target simulation scene.
[0190] In the embodiment, the construction module 540 is configured to:
[0191] When the type information of the entity is the second type, the center point coordinate of the entity is calculated according to the position information of the entity.
[0192] Based on the center point coordinate and the direction vector of the entity, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain a target simulation scene, the direction vector of the entity being determined according to the position information of the entity.
[0193] Through the simulation scene construction device of the embodiment, the target data is analyzed to obtain the position information and the type information of the entity in the target data, the three-dimensional model of the entity is determined according to the position information and the type information of the entity, the height of the entity with missing height information is restored, the three-dimensional information of the entity is expanded, and the target simulation scene is effectively constructed according to the position information of the entity and the three-dimensional model of the entity, so that the scene where the entity is located can be intuitively and effectively identified.
[0194] The simulation scene construction apparatus provided in this embodiment of the invention can execute the simulation scene construction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0195] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. For example... Figure 6 As shown, the electronic device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of processors 610 in the electronic device can be one or more. Figure 6 Taking a processor 610 as an example; the processor 610, memory 620, input device 630, and output device 640 in the electronic device can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0196] The memory 620, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the simulation scene construction method in this embodiment of the invention. The processor 610 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 620, thereby realizing the simulation scene construction method provided in this embodiment of the invention.
[0197] The memory 620 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 620 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 620 may further include memory remotely located relative to the processor 610, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0198] Input device 630 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device, and may include a keyboard, mouse, etc. Output device 640 may include a display device such as a screen.
[0199] This disclosure also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to implement the simulation scene construction method provided in this embodiment of the invention.
[0200] Of course, the computer executable instructions of the storage medium provided by the embodiments of the present application are not limited to the method operations described above, and can also perform the related operations in the construction method of the simulation scene provided by any of the embodiments of the present application.
[0201] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH, a hard disk, or an optical disc, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.
[0202] It is worth noting that in the above embodiments of the search device, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy distinction, and do not limit the protection scope of the present application.
[0203] It should be noted that in this paper, relationship terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0204] The foregoing is merely illustrative of the various implementations of the present disclosure and the general principles thereof. Numerous modifications can be made to these illustrations, and equivalents can be substituted therefor, without departing from the scope of the present disclosure. The specific embodiments commensurate with the specific application are intended to be illustrative only and not limiting of the scope of the application as set forth in the following claims.
Claims
1. A method for constructing a simulation scene, characterized in that, include: Acquire target data, which is the data of entities in a local area of a map; The target data is parsed to obtain the location information and type information of the entities in the target data. When the type information of the entity is a first type, the location information of the entity includes two-dimensional coordinates. When the type information of the entity is a second type, the location information of the entity includes the coordinates of the first endpoint, the coordinates of the last endpoint, and the radius. When the type information of the entity is the first type, the width of the entity is determined according to the two-dimensional coordinates; the height of the entity is determined according to the width of the entity and the first type; and the three-dimensional model of the entity is determined according to the width and height of the entity. When the type information of the entity is the second type, the direction vector of the entity is determined according to the coordinates of the first endpoint and the coordinates of the last endpoint; the first distance between the coordinates of the first endpoint and the coordinates of the last endpoint is calculated; the height of the entity is determined according to the first distance and the second type; and the three-dimensional model of the entity is determined according to the direction vector of the entity and the height of the entity. Based on the target data, an initial simulation scene is constructed. The initial simulation scene is a two-dimensional simulation scene, which includes two-dimensional graphics corresponding to the top view state of multiple entities. When the type information of the entity is the first type, the center point coordinates of the entity are calculated according to the position information of the entity; based on the center point coordinates, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain the target simulation scene; When the type information of the entity is the second type, the center point coordinates of the entity are calculated according to the position information of the entity; based on the center point coordinates and the direction vector of the entity, the three-dimensional model of the entity is inserted into the initial simulation scene to obtain the target simulation scene. The direction vector of the entity is determined by the position information of the entity.
2. The method according to claim 1, characterized in that, Determining the height of the entity based on its width and the first type includes: Based on the first type, a preset first inference model is determined, wherein the preset first inference model is used to describe the mapping relationship between the width of the first candidate entity and the height of the first candidate entity; Based on the preset first reasoning model, the height of the entity is determined according to the width of the entity.
3. The method according to claim 1, characterized in that, Determining the height of the entity based on the first distance and the second type includes: Based on the second type, a preset second reasoning model is determined. The preset second reasoning model is used to describe the mapping relationship between the second distance between the first endpoint coordinates and the last endpoint coordinates of the second candidate entity and the height of the second candidate entity. Based on the preset second reasoning model, the height of the entity is determined according to the first distance.
4. A device for constructing a simulation scene, characterized in that, include: The acquisition module is used to acquire target data, which is the data of entities in a local area of the map; The parsing module is used to parse the target data to obtain the location information and type information of the entities in the target data. When the type information of the entity is a first type, the location information of the entity includes two-dimensional coordinates, and when the type information of the entity is a second type, the location information of the entity includes the coordinates of the first endpoint, the coordinates of the last endpoint, and the radius. The determination module is used to determine the width of the entity based on the two-dimensional coordinates when the type information of the entity is the first type; determine the height of the entity based on the width of the entity and the first type; and determine the three-dimensional model of the entity based on the width of the entity and the height of the entity. The determining module is further configured to: determine the direction vector of the entity based on the coordinates of the first endpoint and the coordinates of the last endpoint when the type information of the entity is the second type; calculate a first distance between the coordinates of the first endpoint and the coordinates of the last endpoint; determine the height of the entity based on the first distance and the second type; and determine the three-dimensional model of the entity based on the direction vector of the entity and the height of the entity. The construction module is used to construct an initial simulation scene based on the target data. The initial simulation scene is a two-dimensional simulation scene, which includes two-dimensional graphics corresponding to the top view state of multiple entities. The construction module is further configured to, when the type information of the entity is the first type, calculate the center point coordinates of the entity according to the position information of the entity; and insert the three-dimensional model of the entity into the initial simulation scene based on the center point coordinates to obtain the target simulation scene. The construction module is further configured to, when the type information of the entity is the second type, calculate the center point coordinates of the entity based on the position information of the entity; and, based on the center point coordinates and the direction vector of the entity, insert the three-dimensional model of the entity into the initial simulation scene to obtain the target simulation scene, wherein the direction vector of the entity is determined by the position information of the entity.
5. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for constructing a simulation scenario as described in any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for constructing the simulation scene as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Three-dimensional map construction method, system and server
CN112819956A