Disclosure of Invention
In order to solve the problems of building component semantic information loss, low operation efficiency or low accuracy or at least partially solve the problems of the existing indoor map model building method, the embodiment of the invention provides an indoor map model building method and device based on BIM.
According to a first aspect of an embodiment of the present invention, there is provided a building method of an indoor map model based on BIM, including:
Constructing a grid-based map model of a building according to BIM data of the building;
constructing a topological map model of the building according to the grid-based map model;
generating a hybrid indoor map model of the building according to the grid-based map model and the topological map model;
Wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
Specifically, the step of constructing a grid-based map model of a building from building's BIM data includes:
extracting geometric information and semantic information of the building components from the IFC file of the BIM data;
mapping the component into a grid of planar panels of the building according to the geometric information of the component;
setting the passing state of each grid mapped by the component according to the semantic information of the component;
And constructing the map model based on the grid according to the traffic state of the grid.
Specifically, the step of extracting geometric information and semantic information of each component in the building from the IFC file of the BIM data includes:
Obtaining geometric information of the component from IfcProduct; wherein the geometric information includes a shape representation and a position layout;
IfcSlab is taken as a passable area;
IfcDoor as a member that can pass through an obstacle;
Other IfcProduct than IfcSlab and IfcDoor are used as obstacles; wherein the other IfcProduct includes IfcWall.
In particular, the step of mapping said elements into a grid of planar panels of said building according to the geometrical information of said elements comprises:
Mapping IfcSlab to a two-dimensional plane;
gridding the two-dimensional plane with the grid size of n x n, and marking the grid covered by IfcSlab as a passable state; wherein n is a positive integer;
Mapping the obstacle to the two-dimensional plane, and marking the grid covered by the obstacle as an unvented state;
IfcDoor is mapped to the two-dimensional plane and the mesh covered by IfcDoor is marked as passable.
Specifically, the step of constructing a topological map model of the building from the grid-based map model includes:
according to an image refinement method, refining grids in a passable state in the grid-based map model;
And establishing topological links for the thinned grid in the passable state, and constructing the topological map model.
Specifically, according to the image refinement method, the step of refining the grid of the passable state in the grid-based map model includes:
in the first sub-iteration, for any one of the trafficable state grids k, deleting the trafficable state grid if the following condition is satisfied:
Ck=1;
2≤Dk≤6;
in the second sub-iteration, for any one of the trafficable state grids k, deleting the trafficable state grid if the following condition is satisfied:
Ck=1;
2≤Dk≤6;
Wherein, C k is connectivity of the grid k in a passable state, D k is expansibility of the grid k in a passable state, O ki is occupancy state of the ith adjacent unit of the grid k in a passable state, and i ranges from 1 to 8;
until no grid of passable states is deleted in both the first and second sub-iterations.
Specifically, establishing topological links for the refined grid in the passable state, and constructing the topological map model includes the steps of:
acquiring a grid with expansibility of 1 from the thinned grid in the passable state;
Marking a grid with expansibility of 1 as a starting unit, and marking a unique adjacent unit of the starting unit as a current traversing unit for constructing a passable route;
if the expansibility of the current traversal unit is greater than 2, marking the current traversal unit as an end node, constructing a passable route from the starting unit to the end node, marking the end node as a starting unit, and marking each non-traversed adjacent unit of the starting unit as a current traversal unit for constructing a passable route next time;
If the expansibility of the current traversal unit is equal to 2 and the non-traversed adjacent unit of the current traversal unit is not located in a row from the starting unit to the current traversal unit, marking the current traversal unit as an ending node, constructing a passable route from the starting unit to the ending node, marking the ending node as the starting unit, and marking the non-traversed adjacent unit of the starting unit as the current traversal unit of the next passable route;
If the expansibility of the current traversal unit is equal to 2, and the non-traversed adjacent unit of the current traversal unit is positioned in a row from the starting unit to the current traversal unit, marking the non-traversed adjacent unit as the current traversal unit for constructing a passable route next time;
And if the expansibility of the current traversal unit is equal to 1, marking the current traversal unit as an end node, and constructing a passable route from the starting unit to the end node.
Specifically, the step of generating a hybrid indoor map model of the building from the grid-based map model and the topological map model comprises:
marking states in the grid-based map model before refinement according to the refined grid with the passable states as topological nodes;
and fusing the state of each grid in the grid-based map model and the passable route in the topological map model, and constructing the hybrid indoor map model.
According to a second aspect of the embodiment of the present invention, there is provided a building apparatus for building an indoor map model based on BIM, including:
the first construction module is used for constructing a grid-based map model of the building according to BIM data of the building;
the second building module is used for building a topological map model of the building according to the grid-based map model;
The generation module is used for generating a mixed indoor map model of the building according to the grid-based map model and the topological map model;
Wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
According to a third aspect of embodiments of the present invention, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor invoking the program instructions to be able to perform the building method of a BIM-based indoor map model provided by any of the various possible implementations of the first aspect.
The embodiment of the invention provides a building method and a building device for an indoor map model based on BIM (building information modeling), which are characterized in that a grid-based map model is built according to BIM data, so that the grid-based map model contains semantic and geometric information of building components, then a grid-based map model is used for building a topological map model, so that an association relationship exists between the two models, the two models are conveniently fused to generate a hybrid indoor map model, and the hybrid indoor map model has the characteristics of the grid-based map model and the topological map model, and has high precision and high operation efficiency.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
In one embodiment of the present invention, a building method for building an indoor map model based on BIM is provided, and fig. 1 is a schematic overall flow chart of the building method for building an indoor map model based on BIM provided in the embodiment of the present invention, where the method includes: s101, constructing a grid-based map model of a building according to BIM data of the building;
Specifically, the geometric and semantic information of the defined building elements is extracted from the BIM data, and then the building elements are mapped into the planar grids according to the geometric and semantic information of the building elements, so that the grid-based indoor map model is generated.
Mesh-based map models are easy to build and can support different types of geometry-based path queries and interactions at the spatial unit level. However, a large number of spatial units may increase the run-time index of the algorithm, resulting in performance problems and corresponding other problems.
S102, constructing a topological map model of the building according to the grid-based map model;
unlike the existing work, the embodiment automatically generates the topological map model directly according to the grid-based map model, so that the association relationship exists between the grid-based map model and the topological map model, and the two models are convenient to fuse.
S103, generating a hybrid indoor map model of the building according to the grid-based map model and the topological map model; wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
And combining the generated grid-based map model and the topological map model to form the hybrid indoor map model. The grid-based map model and the topological map model are generally applied to different scenes, the grid-based map model has high accuracy, the topological map model can efficiently find the shortest path, and the hybrid indoor map model inherits the accuracy of the grid map model and the efficient query of the paths in the topological map model.
The traffic state of each mesh includes a trafficable state and an unvented state, the traffic state of the mesh being determined by whether the construction mapped to the mesh is an obstacle. The topological nodes in the topological map model are some grids in the grid-based map model, and the topological nodes are topologically linked to form a communicable route.
According to the embodiment, the grid-based map model is built according to BIM data, so that the grid-based map model contains semantic and geometric information of building components, and then the grid-based map model is used for building the topological map model, so that an association relationship exists between the two models, the two models can be fused conveniently to generate the hybrid indoor map model, and the hybrid indoor map model has the characteristics of the grid-based map model and the topological map model, so that the accuracy is high and the operation efficiency is high.
On the basis of the above embodiment, the step of constructing the grid-based map model of the building according to the building BIM data in the present embodiment includes: extracting geometric information and semantic information of the building components from the IFC file of the BIM data; mapping the component into a grid of planar panels of the building according to the geometric information of the component; and setting the passing state of each grid mapped to by the component according to the semantic information of the component.
The IFC (Industry Foundation Class, industry base class) is an internationally recognized BIM data specification, and in this embodiment, it is assumed that all BIM data adopted meets the IFC specification. Geometric information and semantic information of building components are extracted from the IFC file, and geometric and semantic information necessary for constructing a grid-based map model is extracted on the premise of minimizing information redundancy in the information extraction process.
The three-dimensional building elements are then discretized and mapped into a planar grid. In constructing the planar grid, a bounding box of a planar slab in a building is first calculated, coordinates of a lower right point in the plane are set to (0, 0), and an indoor space is simulated using a square grid. Then, each space unit occupies an area with the size of n multiplied by n cm 2, and the plane plate is scattered into square grids, or hexagonal grids. The building elements are mapped into a planar grid. If a certain mesh is occupied by an obstacle, it is not passable; otherwise, the grid is passable. Thereby obtaining a grid-based map model. The desired building element is first extracted and mapped to a plane, which represents a planar slab. The plane is then divided into a number of non-overlapping square grids. The square occupied by the obstacle is an unperforable area, and the other square is a passable area.
Obviously, the smaller n, the more accurate the grid-based map model. If a mesh is occupied by an obstacle, then its pass feature value is set to 0; otherwise, the pass characteristic value is set to 1. The traffic state of grid k is defined as follows:
On the basis of the above embodiment, the step of extracting the geometric information and the semantic information of each component in the building from the IFC file of the BIM data in this embodiment includes: obtaining geometric information of the component from IfcProduct; wherein the geometric information includes a shape representation and a position layout; ifcSlab is taken as a passable area; ifcDoor as a member that can pass through an obstacle; other IfcProduct than IfcSlab and IfcDoor are used as obstacles; wherein the other IfcProduct includes IfcWall.
Any building element having a geometric shape may be a passable space, such as a slab or an obstacle, such as a wall, during a path query. Thus, all objects having three-dimensional geometry are extraction objects of the building information extraction process. Since only IfcProduct can store shape representations and position layouts according to the IFC specification, the present embodiment contemplates building elements inherited from IfcProduct.
Two types of basic semantic information need to be extracted before a grid-based map model is built. The first is IfcSlab because IfcSlab defines a sleb that provides space for walking. The second is IfcDoor, which provides a passageway for obstructions such as IfcWall. And grid-based map models do not allow for automatic identification of obstacles.
On the basis of the above embodiment, the step of mapping the component into the grid of the planar plate of the building according to the geometric information of the component in this embodiment includes: mapping IfcSlab to a two-dimensional plane; gridding the two-dimensional plane with the grid size of n x n, and marking the grid covered by IfcSlab as a passable state; mapping the obstacle to the two-dimensional plane, and marking the grid covered by the obstacle as an unvented state; ifcDoor is mapped to the two-dimensional plane and the mesh covered by IfcDoor is marked as passable.
Specifically, after valuable geometric and semantic information is extracted from the IFC file, a cross-over operation is performed on the planar slabs on which the doors and obstructions overlap. The boundary obstacle is generated by identifying the intersection region between the door and the obstacle and the planar plate through the intersection operation. Since the planar plate is a plane, the result of the interaction will also be a plane and can be easily mapped into a planar grid. The state of the plane grid mapped to by the boundary obstacle is set to an unvented state, and other plane grids are set to a trafficable state.
On the basis of the above embodiment, in this embodiment, the step of constructing a topological map model of the building according to the grid-based map model includes: according to an image refinement method, refining grids in a passable state in the grid-based map model; and establishing topological links for the thinned grid in the passable state, and constructing the topological map model.
Specifically, the embodiment adopts the image refinement theory to automatically generate the topological map model according to the grid-based map model. Each space cell is marked as either a passable state or an unviewable state by the grid-based map model. After the grid-based map model is refined, a skeleton of the navigable grid is obtained. Obviously, it is easy to obtain a topological map model from the skeleton of the grid-based map model. Thus, generating a topological map model from a grid-based map model comprises two steps: grid refinement and topological linking. The present embodiment is not limited to the mesh refinement method and the topology linking method. The step of mesh refinement aims at removing the selected trafficable mesh, discarding most of the original trafficable mesh on the basis of preserving the topological relation of the original mesh map model. Topological relationships include scope and connectivity. The step of topologically linking aims at constructing a navigable route from the refined navigable grid.
On the basis of the above embodiment, according to the image refinement method in this embodiment, the step of refining the grid in the passable state in the grid-based map model includes: in the first sub-iteration, for any one of the trafficable state grids k, deleting the trafficable state grid if the following condition is satisfied:
Ck=1;
2≤Dk≤6;
in the second sub-iteration, for any one of the trafficable state grids k, deleting the trafficable state grid if the following condition is satisfied:
Ck=1;
2≤Dk≤6;
Wherein, C k is connectivity of the grid k in a passable state, D k is expansibility of the grid k in a passable state, O ki is occupancy state of the ith adjacent unit of the grid k in a passable state, and i ranges from 1 to 8; and stopping the grid refinement process until the grid in the passable state is not deleted in the first sub-iteration and the second sub-iteration.
In particular, refinement algorithms can be divided into two broad categories, iterative and non-iterative. Although non-iterative algorithms are faster than iterative algorithms, accurate refinement results are not always produced. The present embodiment employs a parallel iterative algorithm to refine the grid-based map model. The definition is as follows before the refinement.
Define 1 occupancy state the occupancy state of a mesh in a mesh-based map model refers to whether the mesh is occupied by an obstacle.
The occupancy state of grid k is characterized by O k, then there are:
the passing characteristic value of the grid k is represented by P k, which is obvious that:
Pk=1-Ok (3)
definition 2 connectivity, which represents the number of objects connected to a particular grid.
In general, connectivity C k for grid k can be defined as:
where s= {1,3,5,7}, and k i is the ith neighboring cell of grid k. Specifically, eight adjacent cells of grid k are numbered in a counterclockwise order starting from the right-hand adjacent cell of grid k. Fig. 2 shows eight adjacent cells of grid k.
Defining 3 expandability, expandability D k of grid k is the number of available grids in the neighboring cells of grid k, then there are:
the present embodiment uses two sub-iterations to sparse grid-based map models.
On the basis of the above embodiment, in this embodiment, establishing a topological link for the refined grid in the passable state, and the step of constructing the topological map model includes: acquiring a grid with expansibility of 1 from the thinned grid in the passable state; marking a grid with expansibility of 1 as a starting unit, and marking a unique adjacent unit of the starting unit as a current traversing unit for constructing a passable route; if the expansibility of the current traversal unit is greater than 2, marking the current traversal unit as an end node, constructing a passable route from the starting unit to the end node, marking the end node as a starting unit, and marking each non-traversed adjacent unit of the starting unit as a current traversal unit for constructing a passable route next time; if the expansibility of the current traversal unit is equal to 2 and the non-traversed adjacent unit of the current traversal unit is not located in a row from the starting unit to the current traversal unit, marking the current traversal unit as an ending node, constructing a passable route from the starting unit to the ending node, marking the ending node as the starting unit, and marking the non-traversed adjacent unit of the starting unit as the current traversal unit of the next passable route; if the expansibility of the current traversal unit is equal to 2, and the non-traversed adjacent unit of the current traversal unit is positioned in a row from the starting unit to the current traversal unit, marking the non-traversed adjacent unit as the current traversal unit for constructing a passable route next time; and if the expansibility of the current traversal unit is equal to 1, marking the current traversal unit as an end node, and constructing a passable route from the starting unit to the end node.
Specifically, the embodiment builds a topological map model through topological links based on the refined grid map model. In the refined grid map model, grids with expansibility value equal to 1 are nodes in the topological model diagram. The topological linking process starts with any grid k of D k =1, which is marked as a starting unit s and a current traversal unit c. Then, the direction of expansibility is obtained from c to its only neighboring cell n. n is marked as current traversal unit c and is processed according to four conditions:
a. If D c is more than 2, marking c as an end node e, constructing a passable route from s to e, marking c as a starting unit s, and marking each non-traversed adjacent unit of s as a current traversed unit c for constructing the passable route next time;
b. If D c = 2 and the non-traversed neighboring cell of the current traversed cell c is not located in the row from s to c, then marking c as end node e, constructing a traversable route from s to e, marking c as start cell s, and marking the non-traversed neighboring cell of s as the current traversed cell c of the next constructing traversable route;
c. if D c =2 and the non-traversed neighboring cell of the current traversed cell c is located in the row from s to c, marking the non-traversed neighboring cell as the current traversed cell c of the next construction traversable route;
d. If D c =1, the current traversal unit c is marked as an end node e, and a passable route from the start unit s to the end node e is constructed.
The following code summarizes the overall process of generating a topological map model using a grid-based map model. Wherein line 2 refines the grid-based map model, lines 3-5 produce the topological map model, and lines 7-16 show the detailed steps of grid-based map model refinement. Lines 10 and 11 perform a first sub-iteration in grid refinement, and lines 12 and 13 process a second sub-iteration. Lines 17 and 31 are topologically linked processes that operate in a recursive manner.
On the basis of the above embodiment, in this embodiment, the step of generating the hybrid indoor map model of the building according to the grid-based map model and the topological map model includes: marking states in the grid-based map model before refinement according to the refined grid with the passable states as topological nodes; and fusing the state of each grid in the grid-based map model and the passable route in the topological map model, and constructing the hybrid indoor map model.
Specifically, the hybrid indoor map model has features of a grid-based map model and a topological map model. Grid-based map models are optimized by marking navigable grids in the refined grid-based map as topological nodes.
Thus, for grid k in the optimized grid-based map model, its state S k is:
The hybrid indoor map model has features of both an optimized grid-based map model and a topological map model for path finding. The indoor map model should include floors and non-planar paths. The grid-based map model accurately simulates the floor path. Non-horizontal paths include stairs, ramps and elevators. The stairs and ramp are defined by IfcStair and IfcRamp, respectively. The present embodiment obtains IfcStair and IfcRamp defined objects and constructs a physical transit route between the two endpoints of each non-horizontal object directly in the topology model.
In another embodiment of the present invention, an indoor path query method based on any one of the indoor map model building methods is provided, and fig. 3 is a schematic overall flow chart of the indoor path query method provided by the embodiment of the present invention, where the method includes: 301, obtaining a topological node closest to a preset starting point and a topological node closest to a preset end point from a hybrid indoor map model based on an expansion strategy, taking the topological node closest to the preset starting point as a topological unit starting point, and taking the topological node closest to the preset end point as a topological unit end point;
Where path inquiry generally refers to finding a route between two points while avoiding collision with an obstacle. Path querying, also known as path planning, trajectory planning and routing, is a fundamental problem in the fields of robotics, automation, computer aided design, computer graphics, and the like. Indoor path querying remains a very challenging task due to the lack of indoor maps. Currently, the building of indoor map models still depends on the manual modeling mode.
The grid-based map can accurately identify a start point and an end point in a three-dimensional indoor space and realize accurate path inquiry. However, in grid-based map models, executing the path query algorithm for path planning is inefficient. The topological map model may solve the problem of inefficiency in executing the routing algorithm in the grid map model. Accurate identification of start and end points in indoor environments in topological maps remains a challenge. Since the start and end points are typically not located on topology nodes in the topology map model and do not match the nearest topology node. Without the text, unreasonable paths, such as detour paths and obstacle-crossing paths, may be generated near the start and end points during the path planning process.
In the prior art, a grid-based map model or a topological map model is used alone when making a path query. Applying a map model alone would result in inefficient path finding or inaccurate path generation. The hybrid indoor map model in the present embodiment first constructs a grid-based map model using the building data extracted in the BIM, and then generates a topological map model on the basis of the grid-based map model. Because the mixed indoor map model integrates the accuracy of the grid map model and the path query efficiency of the topological map model, accurate and efficient indoor path query can be realized.
Some shortest path algorithms such as an A-star algorithm, a breadth-first search (Breadth FIRST SEARCH, BFS) algorithm and the like can be directly applied to a grid map model for route searching. But these algorithms are not efficient when the number of grids is large. Similarly, dijkstra et al algorithm may also be used to find the shortest path in the topological map model. However, in the absence of text definitions, mapping spatial starting points or ending points onto nodes in a topological map model is not straightforward, especially in complex indoor environments.
The problem of path query can be solved through two steps using a hybrid indoor map model. First, an extended strategy is utilized to find the closest topological node to a given start and end point using an optimized grid-based map. The extended policy may be a breadth-first search policy. Second, an algorithm like Dijkstra is used to calculate the shortest path between two topology nodes. Finally, the shortest path can be obtained by linking three independent but interrelated paths. The three paths are paths from a preset starting point to a nearest topological unit starting point, from the topological unit starting point to a topological unit end point, and from the topological unit end point to the preset end point respectively.
S302, calculating the shortest path between the topological unit starting point and the topological unit ending point based on a Dijkstra algorithm according to the passable route in the mixed indoor map model;
When searching the shortest path between two topological units, generating a temporary topological map on the basis of a topological map model. First, a path between two topological units is segmented in a temporary topological map model. Assuming grid k is located in path (i, j), then (i, j) is temporarily segmented into (i, k) and (k, j). Then, find the shortest path in the temporary topology map using Dijkstra.
S303, acquiring the shortest path from the preset starting point to the preset terminal according to the shortest path from the preset starting point to the topological unit starting point, the shortest path from the preset terminal to the topological unit terminal and the shortest path between the topological unit starting point and the topological unit terminal.
In this embodiment, because the grid-based map model includes semantic information of the indoor space, and the topology map model is efficient in terms of road finding, features of the grid map model in the hybrid indoor map model are applied to match a start point and an end point to a topology node closest to the start point and the end point, and features of the topology map model in the hybrid indoor map model are used to query a shortest path between the start point and the end point of a topology unit, so that accurate and efficient path query is realized.
Based on the above embodiment, the step of obtaining, based on the expansion policy, the topology node closest to the preset starting point and the topology node closest to the preset ending point from the hybrid indoor map model in this embodiment includes: searching topology nodes closest to the designated starting point and the designated end point by utilizing a breadth-first search strategy, and mapping the preset starting point and the preset end point into grids containing the preset starting point and the preset end point;
if the grid mapped to the preset starting point is a topological node, the preset starting point is used as the starting point of the topological unit; if the grid mapped to the preset terminal is a topological node, the preset terminal is used as the terminal of the topological unit, and inquiry is stopped;
If the grid mapped by the preset starting point is not a topological node, judging whether the adjacent unit of the preset starting point is a topological node or not, and if not, judging whether the adjacent unit of the adjacent unit is a topological node or not, and iterating until at least one topological node is found. When a plurality of topological nodes are found, selecting the topological node with the least quantity of inclined grids between the topological node and a preset starting point as the starting point of the topological unit;
If the grid mapped by the preset end point is not a topological node, judging whether the adjacent unit of the preset end point is a topological node, if not, judging whether the adjacent unit of the adjacent unit is a topological node, and iterating until at least one topological node is found. When a plurality of topological nodes are found, the topological node with the least number of inclined grids passing through between the topological nodes and the preset terminal point is selected as the terminal point of the topological unit.
The following code summarizes the routing algorithm using a hybrid indoor map model. Wherein rows 2 and 3 use mesh-based mapping to query paths from start and end points to their nearest topological cells, respectively. Line 4 finds the shortest path between two topological cells on the topological map model. Specifically, lines 7-14 present detailed steps for finding the nearest topological node using a grid-based map model. Lines 15-22 are the process of calculating the shortest path using the Dijkstra algorithm, with lines 16-20 constructing the temporary topology map model.
The embodiment solves the problems of detouring and obstacle crossing in the path query, wherein the problems exist in a path searching scheme for carrying out the path query by using a topological map, and the embodiment uses the characteristics of a grid-based map model to query the path from a starting point and an ending point to topological nodes, so that routes around the starting point and the ending point are not overlapped with topological edges; instead, a topological ground model map is used to obtain a path between two topological units, most of the routes between the two topological units overlapping topological edges. The present embodiment does not search the topology map for the nearest topology node, thus avoiding the path detour and traversal problems.
To evaluate the efficiency of this example, the experiment did not consider the influence of the population, but only the influence of free flow on individual persons, and the experimental study results are shown in table 1.
Table 1 comparison of seek times
And randomly selecting 15 points to perform a path finding experiment. The path-finding scheme and Dijkstra path-finding method proposed by the embodiment are compared with the path-finding time of the A-star path-finding method on the grid-based map model. Clearly, A-star performs worst among all 15 wayfinding tasks. In most tasks, a-star takes more than 150 seconds to find the shortest path. At the same time, the cost of the proposed method and Dijkstra method in all 15 tasks is about 3 seconds. The demonstration study results show that 8 of the routing schemes in this example are slightly faster than Dijkstra, and the average time is 3.39 seconds, slightly greater than Dijkstra. This is because the routing algorithm in this embodiment also calculates the shortest path between two topology units using Dijkstra's algorithm. Experimental results prove the effectiveness of the routing scheme proposed in this embodiment.
Current research mainly utilizes grid-based map models or topological graph models to construct indoor path query schemes, resulting in inefficiency or inaccuracy. The embodiment aims to provide an accurate and efficient indoor path query method which jointly adopts the advantages of a grid-based map model and a BIM-based topological map model. Firstly, a hybrid indoor map model is proposed, which comprises the steps of generating a grid-based map model by using a BIM model, and extracting a topological map model from the grid-based map model; grid-based map models are obtained by mapping and discretizing 3D space into planar grids; obtaining a skeleton of a passable area in the grid-based map model by using a refinement algorithm; and a grid linking algorithm is provided for generating a topological map from the refined grid; on the basis of the hybrid indoor map model, an indoor path query method is provided, which can accurately match a starting point and an ending point by using a grid-based map model and efficiently find the shortest path by using a topological map model.
In another embodiment of the present invention, a building method for building a building indoor map model based on BIM is provided, which is used for implementing the building method for building an indoor map model based on BIM in the foregoing embodiments. Therefore, the descriptions and definitions in the embodiments of the building method of the indoor map model based on the BIM can be used for understanding each execution module in the embodiment of the invention. Fig. 4 is a schematic diagram of the overall structure of a building block diagram of an indoor map model building device based on BIM according to the embodiment of the present invention, where the device includes a first building module 401, a second building module 402, and a generating module 403, where:
The first construction module 401 is configured to construct a grid-based map model of a building according to BIM data of the building;
The first construction module 401 extracts the defined geometric and semantic information of the building elements from the BIM data and then maps the building elements into a planar mesh according to the geometric and semantic information of the building elements, generating a mesh-based indoor map model.
The second construction module 402 constructs a topological map model of the building according to the grid-based map model;
The second building module 402 automatically generates a topological map model directly according to the grid-based map model, so that an association relationship exists between the grid-based map model and the topological map model, and the two models are conveniently fused.
The generating module 403 is configured to generate a hybrid indoor map model of the building according to the grid-based map model and the topological map model; wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
The generation module 403 combines the generated grid-based map model and the topological map model to form a hybrid indoor map model. The grid-based map model and the topological map model are generally applied to different scenes, the grid-based map model has high accuracy, the topological map model can efficiently find the shortest path, and the hybrid indoor map model inherits the accuracy of the grid map model and the efficient query of the paths in the topological map model.
The traffic state of each mesh includes a trafficable state and an unvented state, the traffic state of the mesh being determined by whether the construction mapped to the mesh is an obstacle. The topological nodes in the topological map model are some grids in the grid-based map model, and the topological nodes are topologically linked to form a communicable route.
According to the embodiment, the grid-based map model is built according to BIM data, so that the grid-based map model contains semantic and geometric information of building components, and then the grid-based map model is used for building the topological map model, so that an association relationship exists between the two models, the two models can be fused conveniently to generate the hybrid indoor map model, and the hybrid indoor map model has the characteristics of the grid-based map model and the topological map model, so that the accuracy is high and the operation efficiency is high.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor (processor) 501, communication interface (Communications Interface) 502, memory (memory) 503, and communication bus 504, wherein processor 501, communication interface 502, memory 503 complete communication with each other through communication bus 504. The processor 501 may call logic instructions in the memory 503 to perform the following method: constructing a grid-based map model of a building according to BIM data of the building; constructing a topological map model of the building according to the grid-based map model; generating a hybrid indoor map model of the building according to the grid-based map model and the topological map model; wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
Further, the logic instructions in the memory 503 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The present embodiment provides a non-transitory computer readable storage medium storing computer instructions that cause a computer to perform the methods provided by the above-described method embodiments, for example, including: constructing a grid-based map model of a building according to BIM data of the building; constructing a topological map model of the building according to the grid-based map model; generating a hybrid indoor map model of the building according to the grid-based map model and the topological map model; wherein the hybrid indoor map model includes a traffic state of each grid in the grid-based map model, and topology nodes in the topology map model and a trafficable route determined according to the topology nodes.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.