Hard mountain building automatic assembly method based on semantic tag rule

Through the automatic assembly method of hard mountain buildings based on semantic label rules, problems such as huge systems and difficult data acquisition in digital modeling of ancient buildings are solved, efficient and accurate digital modeling and automated construction are achieved, and the protection and dissemination of ancient buildings are promoted.

CN120070730APending Publication Date: 2025-05-30BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411971727.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When performing high-precision digital acquisition and modeling of ancient buildings, the existing technology has problems such as huge system, difficulty in obtaining three-dimensional data, difficult semantic understanding, irregular standards, and high modeling costs.

Method used

The automatic assembly method of hard mountain buildings based on semantic label rules is adopted, and high-precision digital modeling and automated construction of ancient buildings is realized by designing semantic labels of hard mountain buildings, building component rule bases, completing building assembly and selecting tour plans.

Benefits of technology

It improves the efficiency and accuracy of digital modeling of ancient buildings, ensures consistency of construction, reduces modeling costs, and promotes the dissemination and protection of ancient buildings through the design of virtual exhibition halls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070730A_ABST
    Figure CN120070730A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic hard mountain building assembly method based on a semantic tag rule, which comprises the following steps: S1, designing a hard mountain building semantic tag, and storing attribute information associated with the hard mountain building semantic tag; s2, constructing a component rule base; s3, assembling of the whole hard mountain building is completed; s4, selecting a touring scheme; according to the method, high-precision digital acquisition and modeling are performed on the historic building, and the historic building is automatically constructed by using the semantic label rule, so that the construction efficiency can be improved, the accuracy and consistency of construction can be ensured, and the construction efficiency is improved. The problems that an ancient building system is huge, three-dimensional data are difficult to obtain, semantic understanding is difficult, the standard is not standard, and the modeling cost is high are solved. Meanwhile, the ancient buildings can be spread and popularized by means of various channels and platforms, so that more people can know and pay attention to the protection and inheritance problems of the ancient buildings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics, and specifically provides an automatic assembly method for hard mountain buildings based on semantic tag rules. Background Art

[0002] Ancient buildings carry the history and culture of human civilization, and they also contain rich information and value. With the continuous development of modern technology, the application of digital modeling and virtual reality has gradually become an important means of protecting and inheriting ancient building culture; these technologies can not only restore the original appearance of ancient buildings with high precision, but also enable the public to feel the historical and cultural connotations of ancient buildings through virtual reality technology. Through the application of digital modeling and virtual reality technology, these precious cultural heritages can be better preserved and inherited, and more people can understand and appreciate the historical and cultural value of ancient buildings.

[0003] Deficiencies of the prior art:

[0004] Currently, there are problems in high-precision digital acquisition and modeling of ancient buildings, such as the huge ancient building system, difficult acquisition of three-dimensional data, difficult semantic understanding, non-standard standards, and high modeling costs. Summary of the Invention

[0005] The purpose of the present invention is to provide an automatic assembly method for hard mountain buildings based on semantic tag rules to solve the problems raised in the above background art.

[0006] To achieve the above purpose, the present invention provides the following technical solution: an automatic assembly method for hard mountain buildings based on semantic tag rules, and the specific steps of this automatic assembly method are as follows:

[0007] S1. Design semantic tags for hard mountain buildings and store and retrieve attribute information associated with the semantic tags of hard mountain buildings;

[0008] S2. Build a component rule library: Use the collected point cloud data and attribute information of hard mountain buildings to generate ancient building components programmatically. The programmatic generation of ancient building components is divided into the generation of simple components and the generation of complex components, and then build a component rule library;

[0009] S3. Complete the assembly of the entire hard mountain building: First, retrieve the component model and assembly rules from the generated component rule library, and use the component assembly algorithm to generate a component assembly sequence L. Finally, generate ancient building component models one by one in the virtual space according to the sequence L and move them to the correct positions;

[0010] S4. Select a tour plan: Generate a viewing sequence of the collections in the ancient building virtual exhibition hall based on the improved A* algorithm, and the user selects a suitable tour plan according to their own needs.

[0011] Preferably, in step S1, the attribute information is divided into invariant attribute information and variable attribute information. The invariant attribute information includes component ID, length, width, height, thickness, diameter, and storage path. The variable attribute information includes the position, rotation, and scaling of the component in three-dimensional space.

[0012] Preferably, step S1 specifically includes the following steps:

[0013] a1. Set the initial anchor point of the component model at the center of the object;

[0014] a2. Set the initial positive direction of the component model as the +X direction in the left-handed coordinate system, and the initial up direction as the +Z direction;

[0015] a3. Ensure that the model state conforms to the actual display state of the entity. For models with a large horizontal plane, make it perpendicular to the coordinate axis; for models with axis features, make it parallel to the coordinate axis;

[0016] a4. Uniformly set the scaling ratio of the component model to 1:1:1;

[0017] a5. Use meters as the basic unit for the component model size, and the model size corresponds to the size of the ancient building entity.

[0018] Preferably, step S2 specifically includes the following steps:

[0019] b1. Vertex position calculation:

[0020] Let N i , T i , B i be the normal vector, tangent vector, and binormal vector of each spline knot i respectively, where i ∈ [1, n], and the contour of the tubular mesh is defined by the user; transform the contour into a plane i defined by T i and point P i . Starting from each contour knot j ∈ [1, m], emit a ray in the direction. Let be the intersection point of

[0021]

[0022] where n is the number of spline curve knots defined by the user, m is the number of knots included in the contour defined by the user, i represents the j-th knot of the i-th plane, and P represents any point on the i-th plane; represents the ray emitted along the is the direction vector, and the calculation formula is:

[0023]

[0024] where d is the modulus of the vector ;

[0025] b2. Position offset calculation:

[0026] The displacement curve is a custom function y(x), where x ∈ [0, 1]; along the direction, displace any vertex of the pipeline grid to obtain the displaced vertex:

[0027]

[0028] where φ is a user-defined value used to scale the function y(x), n is the total number of splines, is the point after position offset, is a direction vector, with the starting point of the direction being point p i , and the ending point being point p i represents a certain point defined in the i-th plane, represents the j-th point in the i-th plane;

[0029] b3. Direction constraint calculation:

[0030] The result after constraint is calculated according to the following formula:

[0031]

[0032]

[0033] where α is the included angle between the vector B i and , B i is the binormal vector of node i, and δ is the user-defined constraint threshold.

[0034] Preferably, in step S3, L = {S 0 , S 1 , S 2 , … S m-1 , S m}.

[0035] Preferably, step S3 specifically includes the following steps:

[0036] c1. Initialization phase: Load the configuration file, generate the corresponding data structure, and load the semantic rules;

[0037] c2. Read the assembly rules one by one, generate the assembly sequence diagram G, and find one or more nodes with an in-degree of 0, and return the component ID information contained in the nodes;

[0038] c3. Perform a topological sort on the graph G, continuously delete the nodes with an in-degree of 0, and add the component IDs in the nodes to the result array; if there are no nodes with an in-degree of 0 and the graph G is not empty, it means the initial nodes are not selected properly, return to step c2 to select new nodes with an in-degree of 0 again. If there are no nodes with an in-degree of 0 and the graph G is empty, it means a feasible assembly sequence is found, and enter step c4;

[0039] c4. Read the component IDs in the Result array sequentially and return the result.

[0040] Preferably, the specific steps of step S4 include:

[0041] Use the improved A* algorithm to find the path points, and use the Hausdorff distance in the collection sequence as the cost function to improve the A* algorithm. The cost function of the improved A* algorithm is:

[0042] F i = G i + H i #

[0043]

[0044] Where F i is the final cost, G i is the movement cost from the starting point to the current position, and the Manhattan distance from the starting point to the current position is used. H i is the estimated movement cost from the current position to the termination point. μ and ω are dynamically changing parameters; MDist() is a function to calculate the Manhattan distance between point P i and P s , Dist() is a function to calculate the Euclidean distance between point P i and P s , Haus() is a function to calculate the Hausdorff distance between point P i and P s , P s is the initial point calculated currently, P i is the termination point calculated currently, MDist max represents the maximum distance generated during the calculation process;

[0045] MDist(P i ,P s ) = |x i - x s | + |yi -y s |#

[0046]

[0047] Haus(P i ,P s ) = max(h(P i ,P s ), h(P s ,P i ))#

[0048]

[0049] Among them, x i and y i are the abscissa and ordinate of point P i , x s and y s are the abscissa and ordinate of point P s , h(P i ,P s ) calculates the forward distance, h(P s ,P i ) calculates the backward distance, Haus(P i ,P s ) calculates the bidirectional Hausdorff distance.

[0050] Preferably, in step b2, the value is set to [0, 1].

[0051] Preferably, in step b3, the threshold δ value is set to

[0052] Preferably, μ = 1.0 and ω = 2.0 are set.

[0053] Compared with the prior art, the beneficial effects of the present invention are:

[0054] The invention relates to an automatic assembly method for hard-mountain architecture based on semantic tag rules. The steps include: S1 designing semantic tags for hard-mountain architecture and storing and retrieving attribute information associated with the semantic tags of hard-mountain architecture; S2 constructing a component rule library: using the collected point cloud data and attribute information of hard-mountain architecture to generate ancient building components programmatically. The programmatic generation of ancient building components is divided into the generation of simple components and the generation of complex components, and then the component rule library is constructed; S3 completing the assembly of the entire hard-mountain architecture: first retrieving component models and assembly rules from the generated component rule library, and using a component assembly algorithm to generate a component assembly sequence L. Finally, according to the sequence L, ancient building component models are generated one by one in the virtual space and moved to the correct positions; S4 selecting a tour plan: generating a viewing sequence of the collections in the ancient building virtual exhibition hall based on an improved A* algorithm, and users can select a suitable tour plan according to their own needs. The invention performs high-precision digital acquisition and modeling of ancient buildings, and uses semantic tag rules to automate the construction of ancient buildings, which can not only improve the construction efficiency, but also ensure the accuracy and consistency of the construction, and solve the problems of the huge ancient building system, difficult acquisition of three-dimensional data, difficult semantic understanding, non-standard standards, and high modeling costs. At the same time, it can also be used for the dissemination and promotion of ancient buildings through various channels and platforms, so that more people can understand and pay attention to the protection and inheritance of ancient buildings. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 FIG. is a flowchart of an automatic assembly method for hard-mountain architecture based on semantic tag rules of the present invention;

[0056] Figure 2 FIG. is a hierarchical structure diagram of semantic tags of hard-mountain architecture built according to the present invention;

[0057] Table 1 is an example diagram of the semantic rules of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0059] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. are based on the orientation or positional relationships shown in the drawings. These are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention.

[0060] In the description of this patent, it should be noted that unless otherwise clearly specified and defined, the terms "installation", "connection", and "setting" should be understood in a broad sense. For example, they can be fixedly connected and set, or detachably connected and set, or integrally connected and set. For those of ordinary skill in the art, the specific meanings of the above terms in this patent can be understood according to specific circumstances.

[0061] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, the meaning of "several" is two or more unless otherwise clearly and specifically defined.

[0062] Embodiment

[0063] Please refer to Figure 1-2 As shown, a technical solution of an automatic assembly method for a hard mountain building based on semantic tag rules provided by the present invention: This automatic assembly method specifically includes the following steps:

[0064] S1. Design semantic tags for the hard mountain building and store and retrieve the attribute information associated with the semantic tags of the hard mountain building. The attribute information is divided into invariant attribute information and variable attribute information. The invariant attribute information includes component ID, length, width, height, thickness, diameter, and storage path. The variable attribute information includes the position, rotation, and scaling of the component in three-dimensional space;

[0065] The sources of ancient building data mainly include: professional books and journal papers describing various architectural factions; domestic museum websites; collection of ancient building entities; ancient building three-dimensional data can usually be represented by point cloud data, voxel data, and mesh data. In addition, when it comes to the editing of building models, curves are usually used to describe the spatial shape of objects; when storing three-dimensional data, according to different coding rules, there are also various storage formats, including OBJ, FBX, and PLY;

[0066] As shown in Table 1, each component is equipped with a unique component ID. Before assembly, all base components are found through a method similar to topological sorting, and their initial positions are read from the database or the front end. After assembly, components associated with them are continuously searched until all components are loaded; the loaded components may be a single component or a composite component composed of some basic components; as shown in Table 1, Component 10 is assembled from Components 1, 5, and 8, and Component 5 is composed of Components 1 and 2. When assembling, Component 1 should be assembled first, and then Component 2. The assembly of Component 5 can only be carried out after the assembly of Components 2, 3, and 4 is completed;

[0067]

[0068] Table 1 Example of Semantic Rules

[0069] a1. The initial anchor point of the component model is set at the center of the object;

[0070] a2. The initial positive direction of the component model is set as the +X direction in the left - hand coordinate system, and the initial up - direction is the +Z direction;

[0071] a3. Ensure that the model state is consistent with the actual display state of the entity. For models with a large horizontal plane, make it perpendicular to the coordinate axis; for models with axis features, make it parallel to the coordinate axis to maximize the display of component information in the three - view drawings;

[0072] a4. The scaling ratio of the component model is uniformly set to 1:1:1;

[0073] a5. The dimension unit of the component model is based on meters, and the model size corresponds to the size of the ancient building entity;

[0074] S2. Build a component rule library: Use the collected point cloud data and attribute information of the hard - mountain building to generate ancient building components programmatically. The programmatic generation of ancient building components is divided into the generation of simple components and the generation of complex components, and then build a component rule library;

[0075] b1. Vertex position calculation:

[0076] Let N i 、T i 、B i be the normal vector, tangent vector, and binormal vector of each spline node i respectively, where i ∈ [1, n], and the contour of the tubular grid is defined by the user; transform the contour into a plane i defined by T i and point P i . Starting from each contour node j ∈ [1, m], emit a ray in the direction. The ray is The intersection point with the i+1 plane is calculated as follows:

[0077]

[0078] where n is the number of knots of the spline curve defined by the user, and m is the number of knots included in the contour defined by the user. represents the j-th knot of the i-th plane, P i represents any point on the i-th plane; represents the ray emitted along the direction by the j-th knot on the i-th plane, is The direction vector of, and the calculation formula is:

[0079]

[0080] where d is the modulus of the vector ;

[0081] b2. Position offset calculation:

[0082] The displacement curve is a user-defined function y(x), where x ∈ [0, 1]; Displace any vertex of the pipeline grid along the direction to obtain the displaced vertex:

[0083]

[0084] where φ is a value defined by the user, and the φ value is set to [0, 1] to scale the function y(x), and n is the total number of splines. is the point after position offset, is a direction vector, and the starting point of the direction is point p i , and the ending point is point p i represents a certain point defined within the i-th plane, represents the j-th point within the i-th plane;

[0085] b3. Direction constraint calculation:

[0086] The direction constraint is used to select the vertices to be shifted and the directions of the vertices to be shifted according to the user-defined angle threshold δ, and the result after constraint is calculated as follows:

[0087]

[0088] where α is the included angle between the vector B i and , and B iis the double tangent vector of node i, and δ is the user-defined constraint threshold, and the threshold δ value is set to

[0089] S3. Complete the assembly of the entire hard mountain building: First, retrieve the component model and assembly rules from the generated component rule library, and use the component assembly algorithm to generate the component assembly sequence L. Finally, generate the ancient building component models one by one in the virtual space according to the sequence L and move them to the correct positions;

[0090] c1. Initialization stage: Load the configuration file, generate the corresponding data structure, and load the semantic rules;

[0091] c2. Read the assembly rules one by one, generate the assembly sequence diagram G, and find one or more nodes with an in-degree of 0, and return the component ID information contained in the nodes;

[0092] c3. Perform a topological sort on the graph G, continuously delete the nodes with an in-degree of 0, and add the component IDs in the nodes to the result array; if there are no nodes with an in-degree of 0 and the graph G is not empty, it means the initial nodes are not selected properly, return to step c2 to select new nodes with an in-degree of 0 again. If there are no nodes with an in-degree of 0 and the graph G is empty, it means a feasible assembly order is found, and enter step c4;

[0093] c4. Read the component IDs in the Result array sequentially and return the results;

[0094] S4. Select a tour plan: Generate a viewing sequence of the collections in the virtual exhibition hall of the ancient building based on the improved A* algorithm, and the user selects a suitable tour plan according to their own needs;

[0095] Use the improved A* algorithm to find path points, and use the Hausdorff distance in the collection sequence as the cost function to improve the A* algorithm, so that it can better reflect the shortest path estimate between the target node and the current node. The cost function of the improved A* algorithm is:

[0096] F i =G i +H i #

[0097]

[0098] Among them, F i is the final cost, G i is the movement cost from the starting point to the current position, and the Manhattan distance from the starting point to the current position is used. H iis the estimated movement cost from the current position to the termination point. μ and ω are dynamically changing parameters, μ = 1.0, ω = 2.0, which enhance the influence of the Hausdorff distance on the loss cost. MDist() is a function for calculating the Manhattan distance between point P i and P s , Dist() is a function for calculating the Euclidean distance between point P i and P s , Haus() is a function for calculating the Hausdorff distance between point P i and P s . P s is the initial point being currently calculated, P i is the termination point being currently calculated, and MDist max represents the maximum distance generated during the calculation process;

[0099] MDist(P i , P s ) = |x i - x s | + |y i - y s | #

[0100]

[0101] Haus(P i , P s ) = max(h(P i , P s ), h(P s , P i )) #

[0102]

[0103] where x i and y i are the abscissa and ordinate of point P i , x s and y s are the abscissa and ordinate of point P s , h(P i , P s ) calculates the forward distance, h(P s , P i ) calculates the backward distance, and Haus(P i , P s ) calculates the bidirectional Hausdorff distance.

[0104] The working principle of the present invention is as follows:

[0105] When the automatic assembly method of a hard - mountain building based on semantic tag rules in this embodiment is in use, the steps include: S1 Design the semantic tags of the hard - mountain building and store and retrieve the attribute information associated with the semantic tags of the hard - mountain building; S2 Construct a component rule library: Use the collected point - cloud data and attribute information of the hard - mountain building for the procedural generation of ancient building components. The procedural generation of ancient building components is divided into the generation of simple components and the generation of complex components, and then construct the component rule library; S3 Complete the assembly of the entire hard - mountain building: First, retrieve the component model and assembly rules from the generated component rule library, and use the component assembly algorithm to generate the component assembly sequence L. Finally, generate the ancient building component models one by one in the virtual space according to the sequence L and move them to the correct positions; S4 Select a tour plan: Generate the viewing sequence of the collections in the ancient building virtual exhibition hall based on the improved A* algorithm, and the user selects a suitable tour plan according to their own needs. The present invention conducts high - precision digital acquisition and modeling of ancient buildings and uses semantic tag rules to automate the construction of ancient buildings, which can not only improve the construction efficiency, but also ensure the accuracy and consistency of the construction, solving the problems of the huge ancient building system, difficult acquisition of three - dimensional data, difficult semantic understanding, non - standard standards, and high modeling costs. At the same time, it can also spread and promote ancient buildings through various channels and platforms, enabling more people to understand and pay attention to the protection and inheritance of ancient buildings.

[0106] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above - mentioned embodiments. The above - mentioned embodiments and descriptions in the specification are only preferred examples of the present invention and are not used to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. An automatic assembly method for hard mountain buildings based on semantic labeling rules, characterized by: This automatic assembly method specifically comprises the following steps: S1. Designing a semantic label for a hard mountain building, and accessing attribute information associated with the semantic label for a hard mountain building; S2. Build component rule library: Use the collected hard mountain building point cloud data and attribute information to programmatically generate ancient building components. The programmatic generation of ancient building components is divided into the generation of simple components and the generation of complex components, and then build the component rule library; S3, complete the assembly of the entire hard mountain building: first, take out the component model and assembly rules from the generated component rule library, and use the component assembly algorithm to generate the component assembly sequence L, and finally generate the ancient building component models one by one in the virtual space according to the sequence L and move them to the correct position; S4. Select a tour plan: Generate a viewing sequence for the collections in the virtual exhibition hall of the ancient building based on the improved A* algorithm, and the user can choose a suitable tour plan according to his or her needs.

2. The automatic assembly method of hard rock building based on semantic labeling rules according to claim 1 is characterized by: The attribute information in step S1 is divided into invariant attribute information and variable attribute information. The invariant attribute information includes component ID, length, width, height, thickness, diameter and storage path, and the variable attribute information includes the position, rotation and scaling of the component in three-dimensional space.

3. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 1 is characterized by: The step S1 specifically includes the following steps: a1. The initial anchor point of the component model is set at the center of the object; a2. The initial positive direction of the component model is set to the +X direction in the left-hand coordinate system, and the initial upward direction is the +Z direction; a3. Ensure that the model state is consistent with the actual display state of the entity. For models with large horizontal surfaces, make them perpendicular to the coordinate axis; for models with axis features, make them parallel to the coordinate axis; a4. The scaling ratio of component models is uniformly set to 1:1:1; a5. The basic unit of component model size is meter, and the model size corresponds to the physical size of the ancient building.

4. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 1 is characterized by: The step S2 specifically includes the following steps: b1. Vertex position calculation: Let N i , T i , B i are the normal vector, tangent vector, and bitangent vector of each spline node i, i∈[1,n]. The outline of the pipeline mesh is defined by the user; the outline is transformed into the vector defined by T i and point P i Defined plane i, with each contour node j∈[1,m] is the starting point, Direction of ray emission for The intersection point with the i+1 plane is calculated as follows: Where n is the number of nodes of the user-defined spline curve, m is the number of nodes contained in the user-defined contour, represents the jth node of the i-th plane, P i represents any point on the i-th plane; Indicates that the jth node on the i-th plane is along The rays emitted in the direction, yes The direction vector is calculated as: Where d is a vector The module length; b2. Position offset calculation: The displacement curve is a custom function y(x), x∈[0,1]; along Direction to any vertex of the pipeline mesh Perform displacement and obtain the displaced vertices: Where φ is a user-defined value used to scale the function y(x), n is the number of summaries of the spline, is the point after position shifting, is a direction vector, starting from point p i , the end point is point p i represents a point defined in the i-th plane, represents the jth point in the i-th plane; b3. Direction constraint calculation: Constrained results Calculate as follows: Where α is the vector B i and The angle, B i is the bitangent vector of node i, and δ is the user-defined constraint threshold.

5. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 1 is characterized by: In step S3, L={S0, S1, S2, ... S m-1 ,S m }.

6. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 1 is characterized by: The step S3 specifically comprises the following steps: c1. Initialization phase: load configuration files, generate corresponding data structures, and load semantic rules; c2. Read the assembly rules one by one, generate the assembly sequence graph G, find one or more nodes with in-degree 0, and return the component ID information contained in the node; c3. Perform topological sorting on graph G, continuously delete nodes with in-degree 0, and add the component IDs in the nodes to the result array; if there is no in-degree 0 node and graph G is not empty, the initial node selection is inappropriate, return to step c2 to reselect a new in-degree 0 node; if there is no in-degree 0 node and graph G is empty, it means that a feasible assembly sequence is found, and go to step c4; c4. Read the component IDs in the Result array sequentially and return the results.

7. The automatic assembly method of hard-top buildings based on semantic labeling rules according to claim 1 is characterized by: The step S4 specifically includes: The improved A* algorithm is used to search for path points, and the Hausdorff distance in the collection sequence is used as the cost function to improve the A* algorithm. The cost function of the improved A* algorithm is: F i =G i +H i # Among them, F i is the final price, G i is the moving cost from the starting point to the current position, using the Manhattan distance from the starting point to the current position, H i is the estimated cost of moving from the current position to the end point, μ and ω are dynamically changing parameters; MDist() is the calculation point P i With P s The function of Manhattan distance between points P and D is Dist(). i With P s The Euclidean distance function between points P and Haus() is used to calculate the distance between points P and Haus(). i With P s The function of the Hausdorff distance between s is the initial point of the current calculation, P i is the end point of the current calculation, MDist max Indicates the maximum distance generated during the calculation process; MDist(P i ,P s )=|x i -x s |+|y i -y s |# Haus(P i ,P s )=max(h(P i ,P s ),h(P s ,P i ))# Among them, x i and i It's point P i The horizontal and vertical coordinates, x s and s It's point P s The horizontal and vertical coordinates, h(P i ,P s ) calculates the forward distance, h(P s ,P i ) calculates the backward distance, Haus(P i ,P s ) calculates the bidirectional Hausdorff distance.

8. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 4 is characterized by: In the step b2, The value is set to [0,1].

9. The automatic assembly method of hard-mountain building based on semantic labeling rules according to claim 4 is characterized by: In step b3, the threshold δ value is set to 10. The automatic assembly method of hard rock building based on semantic labeling rules according to claim 7 is characterized by: Set μ=1.0, ω=2.0.