Arrangement method and system for two-stage scanning sites of building scene
By employing a two-stage scanning site deployment method, which combines grid discretization, greedy set coverage algorithm, and CMA-ES optimization algorithm, the problems of incomplete coverage and redundant sites in scanning site deployment in complex building scenes are solved, achieving efficient and low-cost scanning site deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- POWERCHINA RAILWAY CONSTR
- Filing Date
- 2026-03-03
- Publication Date
- 2026-04-24
AI Technical Summary
Existing scanning site deployment technologies struggle to achieve complete coverage, optimized deployment efficiency and cost in complex building scenarios, and lack accurate modeling of obstacles, leading to decreased coverage accuracy and redundant site issues.
A two-stage scanning site layout method is adopted. First, an initial site set is generated through grid discretization and greedy set coverage algorithm. Then, the spatial layout is optimized using CMA-ES optimization algorithm. Redundant sites are identified and deleted through marginal loss calculation to ensure that the coverage threshold is met.
It achieves the goal of minimizing the number of scanning sites while ensuring coverage accuracy, reducing equipment investment and labor costs, improving data collection efficiency, and adapting to building scenarios of different structures and sizes.
Smart Images

Figure CN121920238A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scanning site deployment technology, specifically to the intelligent and automated deployment of scanning sites in architectural settings and spatial data processing technology. Background Technology
[0002] In scenarios such as building construction, 3D modeling, and equipment installation and commissioning, it is often necessary to collect comprehensive data on the interior space of a building using scanning equipment (such as 3D laser scanners and vision sensors). The rationality of the layout of scanning stations directly determines the completeness, efficiency, and cost of data collection. Traditional scanning station layout relies heavily on manual experience. Technicians need to manually plan the station locations based on the building structure, which is not only time-consuming and labor-intensive but also prone to coverage blind spots or station redundancy due to subjective judgment biases. Some key areas may not be effectively scanned, or excessive station placement may lead to wasted equipment resources and low work efficiency. Especially in complex building scenarios, problems such as obstacle obstruction and irregular spatial structures further amplify the limitations of manual planning, making it difficult to balance coverage effectiveness and deployment costs.
[0003] With the increasing demand for building digitization, automated scanning site layout algorithms have become a research hotspot. Among existing technologies, greedy algorithms are widely used for initial site generation due to their simple principle and high computational efficiency. However, these algorithms are prone to getting trapped in local optima, resulting in scattered site layouts and high overlap rates, failing to achieve efficient utilization of spatial resources. While simple intelligent optimization algorithms (such as genetic algorithms and particle swarm optimization) can optimize site locations, their direct application suffers from the curse of dimensionality, requiring numerous iterative calculations to converge. Furthermore, they lack reasonable initial solutions, easily leading to optimization results that deviate from actual needs, making them unsuitable for rapid deployment in large-scale building scenarios.
[0004] Furthermore, existing scanning site deployment technologies largely focus on the single goal of full coverage, neglecting the core requirement in practical applications: minimizing the number of sites to reduce deployment costs while meeting preset coverage accuracy. Most algorithms lack effective site redundancy assessment mechanisms, failing to accurately identify sites contributing minimally to coverage, resulting in numerous redundant sites even after optimization. Simultaneously, some algorithms lack accurate modeling of obstacles in building scenarios, determining site coverage solely through simple distance judgments, which easily leads to decreased coverage accuracy due to occlusion issues, failing to meet the demands of high-precision data acquisition. The current construction industry places higher demands on the efficiency, accuracy, and cost control of scanning data acquisition; traditional manual planning methods and existing algorithms are no longer adequate for the actual needs of complex building scenarios.
[0005] Therefore, there is an urgent need for a scanning site deployment technology that balances coverage integrity, deployment efficiency, and cost optimization. Through scientific scenario modeling and phased optimization strategies, redundant sites can be reduced while ensuring coverage accuracy, thereby achieving intelligent and efficient deployment of scanning sites and providing reliable technical support for building digitization. Summary of the Invention
[0006] Based on the aforementioned technical problems, this application discloses a method and system for arranging two-stage scanning sites in an architectural scene. The method for arranging two-stage scanning sites in an architectural scene specifically includes:
[0007] The two-dimensional working area of the building is discretized by a grid, dividing it into obstacle grids and free grids, and determining the feasible area and the set of free grid units.
[0008] An initial set of scanning stations is generated based on a greedy set coverage algorithm, wherein each station in the initial set of scanning stations is located within the feasible area and has a preset maximum measurement radius;
[0009] Using the initial set of scanning sites as the initial solution, the CMA-ES optimization algorithm is used to optimize the spatial layout of a fixed number of scanning sites to obtain the finely tuned set of sites.
[0010] Calculate the marginal loss of each site in the fine-tuned site set, delete the site with the smallest marginal loss and repeat the optimization process until the preset coverage threshold is met, and output the final scanning site layout scheme.
[0011] Preferably, the grid discretization processing of the two-dimensional working area of the building includes:
[0012] Set raster resolution In the two-dimensional working area of the building Construct a regular mesh ;
[0013] Define obstacle indication function ,in , For grid The center coordinates, A collection of obstacles;
[0014] The set of free grid cells is determined based on the obstacle indication function. .
[0015] Preferably, the initial scan site set is generated based on the greedy set coverage algorithm. ,include:
[0016] Within the feasible area, a set of candidate sites is obtained by downsampling at a preset step size. and target coverage grid set ;
[0017] Initialize empty site set and uncovered sets Iterative selection of covered and uncovered sets Most candidate sites ,in , Candidate sites The set of visible free grid cells;
[0018] Update site collection Uncovered set and remove selected candidate sites. until Or there may be no new coverage.
[0019] Preferably, the visible free grid set The methods for determining this include:
[0020] Set the number of rays and maximum grid steps ,in This is the floor function. The maximum measurement radius of the scanning station, and the corresponding angle for each ray. ;
[0021] Along each ray by step Calculate Discrete Raster Index ,in Candidate sites The raster index;
[0022] If the raster index is out of bounds or the corresponding obstacle indicator function is... If the ray iteration fails, the iteration is terminated; otherwise, the corresponding raster is marked as visible.
[0023] Visible mask function Determine the set of visible free grid cells .
[0024] Preferably, the spatial layout optimization of a fixed number of scanning stations using the CMA-ES optimization algorithm includes:
[0025] Construct decision vector ,in This represents the current number of stations. Given a 2N-dimensional real space, constrain each station. and ;
[0026] Define the objective function ,in To make the decision vector Decoding to a site function, As a penalty item, It is a constant. For indicator functions;
[0027] With the initial set of sites For the initial solution Set the initial step size The process iteratively generates candidate solutions, calculates the objective value, and updates the mean, covariance matrix, and step size parameters until convergence or the maximum number of iterations is reached.
[0028] Preferably, the indicator function satisfy: ,in For logical judgment statements, when When the judgment result is true, =1; when When the judgment result is false, =0.
[0029] Preferably, the coverage The calculation method is as follows: ,in For global coverage mask, For the first The visibility mask function for each site.
[0030] Preferably, the preset coverage threshold , The minimum acceptable coverage set for users;
[0031] In each iteration, the fine-tuned set of sites is calculated. coverage ,in This refers to the current iteration round;
[0032] like Then record the corresponding optimal site set. And it was selected as a final candidate.
[0033] Preferably, the expression for calculating the marginal loss is as follows: ,in For the fine-tuned site collection The Middle Sites marginal loss, For the fine-tuned site collection coverage, To delete the first Sites Coverage of the remaining site set For free grid cell set The number of elements; if the coverage threshold is not met in all iterations. The set of sites with the highest coverage will be output as the final layout scheme.
[0034] The two-stage scanning site layout system for an architectural scene, as described above, includes:
[0035] The spatial modeling unit performs grid discretization on the two-dimensional working area of the building, divides it into obstacle grids and free grids, and determines the feasible area and the set of free grid units.
[0036] The initial site generation unit generates an initial set of scanned sites based on a greedy set coverage algorithm.
[0037] The layout optimization unit uses the initial set of scanned sites as the initial solution and optimizes the spatial layout of a fixed number of scanned sites using the CMA-ES optimization algorithm to obtain the finely tuned set of sites.
[0038] The iterative pruning unit calculates the marginal loss of each site in the fine-tuned site set, deletes the site with the smallest marginal loss and triggers the layout optimization unit to repeat the optimization until the preset coverage threshold is met, and outputs the final scan site layout scheme.
[0039] The parameter storage unit stores preset parameters such as grid resolution, maximum measurement radius, coverage threshold, and number of rays, as well as site data and coverage data for each stage.
[0040] Compared with the prior art, the technical solution of this application has the following technical effects:
[0041] This invention uses grid discretization and obstacle indication functions to accurately model building scenes, and combines ray discretization to construct a single-station visible field model. This effectively avoids the impact of obstacle occlusion on scanning coverage, ensures the accuracy of coverage calculation, significantly reduces the probability of coverage blind spots, and provides reliable scene data support for subsequent site deployment.
[0042] This invention employs a two-stage strategy combining a greedy set coverage algorithm and a CMA-ES optimization algorithm. The greedy algorithm quickly generates an initial set of sites that meets basic coverage requirements, while the CMA-ES algorithm precisely optimizes the spatial layout of the sites. This avoids the limitations of a single algorithm and achieves a dual improvement in coverage performance and layout rationality.
[0043] This invention identifies and removes redundant sites through marginal loss calculation, and dynamically adjusts the number of sites through iterative optimization. Under the premise of meeting the preset coverage threshold, it minimizes the number of scanning sites deployed, reduces equipment investment and labor costs, and improves data collection efficiency, thus adapting to the actual application needs of building scenarios.
[0044] This invention, through standardized modeling processes, optimized logic, and iterative mechanisms, eliminates reliance on human experience, enabling intelligent and automated deployment of scanning sites. It significantly improves the consistency and reliability of deployment schemes, can flexibly adapt to building scenarios of different structures and scales, and has strong versatility and practicality.
[0045] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.
[0046] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0048] Based on the description of the figures and their corresponding technical content in the document, the titles of the figures are as follows:
[0049] Figure 1 A flowchart illustrating the steps of a two-stage scanning site layout method for an architectural scene;
[0050] Figure 2 A schematic diagram showing the distribution of initial scanning sites within the working area of the architectural scene;
[0051] Figure 3 Schematic diagram of the distribution of scanning sites within the working area after architectural scene optimization.
[0052] Figure 4 : Schematic diagram of the unit architecture of the two-stage scanning site layout system for architectural scenes. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.
[0054] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0055] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.
[0056] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.
[0057] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0058] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.
[0059] Example 1
[0060] This embodiment mainly describes a two-stage scanning site layout method for architectural scenes, such as... Figure 1 As shown, it specifically includes:
[0061] The two-dimensional working area of the building is discretized by a grid, dividing it into obstacle grids and free grids, and determining the feasible area and the set of free grid units.
[0062] An initial set of scanning stations is generated based on a greedy set coverage algorithm, wherein each station in the initial set of scanning stations is located within the feasible area and has a preset maximum measurement radius;
[0063] Using the initial set of scanning sites as the initial solution, the CMA-ES optimization algorithm is used to optimize the spatial layout of a fixed number of scanning sites to obtain the finely tuned set of sites.
[0064] Calculate the marginal loss of each site in the fine-tuned site set, delete the site with the smallest marginal loss and repeat the optimization process until the preset coverage threshold is met, and output the final scanning site layout scheme.
[0065] Furthermore, the grid discretization of the two-dimensional architectural working area is performed, and the two-dimensional architectural working area is defined as a continuous space. ,in Represents a two-dimensional real number space. This refers to the complete planar area within the architectural scene where scanning data needs to be collected. The set of obstacles is denoted as... Each obstacle For physical areas such as interior walls, columns, and large equipment that cannot be scanned and would obstruct the scanning view, the feasible area (free space) is... This refers to the remaining space in the work area after deducting all obstacles.
[0066] Raster discretization is achieved by setting the raster resolution. accomplish, The side length of a single square grid is used to discretize a continuous feasible region into a regular grid. ,in The total number of rows in the grid. The total number of columns in the grid. Represents the first in the grid Line number The grid cells of a column. Each grid cell The center coordinates are These coordinates are used to accurately locate the position of the grid in a two-dimensional plane.
[0067] Define obstacle indication function The formula used to distinguish raster types is:
[0068]
[0069] When grid unit The center coordinates fall on any obstacle When within the range, This grid is an obstacle grid; when the center coordinates do not fall within the range of any obstacle, This is a free grid. Based on the obstacle indicator function, the set of free grid cells... That is, the set of all grid cells in a regular grid whose obstacle indicator function value is 0. This represents the total number of free grid cells, used for subsequent coverage calculations.
[0070] Furthermore, an initial set of scan sites is generated based on a greedy set coverage algorithm. The initial set of scan sites is generated based on feasible regions within a free grid cell set. Downsampling is performed within a preset step size to obtain a set of candidate sites. and target coverage grid set Candidate site set The set of all potential candidate locations for scanning sites within the feasible area, and the target coverage raster set. For key grid areas that require full coverage through scanning sites, ensure that there are no coverage blind spots in the core areas.
[0071] The generation process initializes the empty site set. and uncovered sets ,in This is the initial set of scan sites for the final output. This is used to record in real time the subset of rasters in the target coverage raster set that have not yet been covered by any candidate sites. During the iteration process, each time from the candidate site set... Select the overwrite and uncovered sets Most candidate sites Its selection criteria are expressed by formula Confirmed, among which This represents selecting the variable that maximizes the objective function value. Candidate sites target coverage grid set The covering set, Candidate sites The visible free grid set, Indicates candidate sites Covered set and uncovered set The number of intersection elements, i.e. the number of uncovered rasters that the candidate site can add coverage to.
[0072] Each time a candidate site is selected Then, update the site collection. ,Will Add to the initial scan site set; update the uncovered set. Removed from the never-covered set Covered grid; simultaneously from candidate site set Delete selected candidate sites ,Right now This avoids duplicate selections. The iteration process continues until no set is covered. (If the target coverage raster is completely covered) or there are no candidate sites that can be added to cover the uncovered set U (there are uncoverable blind spots), then the initial raster-level site set is obtained. The raster coordinates are then mapped back to continuous coordinates to form the final initial scan site set. Furthermore, each station is located within a feasible area and has a preset maximum measurement radius. .
[0073] Among them, candidate sites The set of visible free grid cells V(c) is determined by single-station view area modeling: setting the number of rays L and the maximum number of grid steps. , This is the floor function. This indicates the maximum number of grid cells that a scanning station can cover along each ray direction; the corresponding angle for each ray. , Pi The rays are evenly distributed within a 360-degree range to ensure that there are no blind spots in the field of view of the scanning station.
[0074] Along each ray by step Calculate the discrete raster index: , ,in Candidate sites The index of the raster cell. For angle The sine value, For angle The cosine value is used to calculate the raster offset corresponding to each step size along the ray direction using trigonometric functions, thus obtaining the discrete raster index. If the calculated raster index... Beyond the regular grid The scope (i.e.) or or or ), or the obstacle indicator function of the corresponding grid. If the ray fails to reach its maximum range, its subsequent step iterations will be terminated, as it cannot continue to cover the area due to being out of range or obstructed by obstacles; otherwise, the grid will be marked as a candidate site. The visible grid.
[0075] Define the visibility mask function When grid cells Accessed during ray scanning and is a free grid. hour, This indicates that the grid is a candidate site. Visible grid; otherwise Based on the visibility mask function, candidate sites Visible free grid set That is, the set of all free grids whose visible mask function value is 1.
[0076] Furthermore, the spatial layout optimization of scanning sites is based on the CMA-ES optimization algorithm, using the initial set of scanning sites. This is the initial solution, for a fixed number of... The scanning sites are fine-tuned to improve coverage efficiency; a decision vector is constructed. ,in For the first Continuous coordinates of each scanning station , This represents the transpose operation of a vector. for 3D real space, decision vector It comprehensively characterizes the spatial location of all scanning sites.
[0077] Optimization process constraints: for each scanning station Must meet and This means that the site coordinates must fall within the two-dimensional working area of the building and cannot fall within any obstacle range to ensure the feasibility of the site location.
[0078] Define the objective function ,in To make the decision vector Decoding is the function that converts the 2N-dimensional decision vector into a set of scanned sites. A set of coordinates for each station; This represents the coverage of the decoded site set, used to evaluate coverage effectiveness. The penalty term is used to constrain the feasibility of the site location, and its expression is: ,in This is a constant value used to amplify the penalty for crossing the boundary or landing within an obstacle. For indicator functions, satisfying , This is a logical conditional statement, when the site... Crossing the boundary ( or fall into an obstacle ( When the value is 1, the corresponding indicator function is 1, triggering the stacking of penalty terms; otherwise, the indicator function is 0, and no penalty is generated.
[0079] Optimize initialization with initial site set For the initial solution Set the initial step size During the iteration process: a batch of candidate solutions are generated based on the current mean and covariance matrix. Then calculate the objective function value corresponding to each candidate solution. Finally, the mean, covariance matrix, and step size parameters are updated according to the CMA-ES algorithm rules to continuously optimize the quality of candidate solutions. Iteration continues until the maximum number of iterations or the convergence criterion is met, at which point the optimal solution is output. Through the decoding function After fine-tuning, the site collection was obtained. Among them, coverage The calculation method is as follows , For any set of scanned sites, Represents a set of free grid cells Summing all raster cells in, For a global overlay mask, its expression is: , For the first Sites The visibility mask function, when the free grid cell Site collection When the visibility mask function of at least one station is marked as 1, =1 indicates that the grid cell is covered; otherwise... =0 indicates that it has not been overwritten; For free grid cell set The number of elements, coverage The value range is [0,1], and the larger the value, the better the coverage effect.
[0080] Furthermore, based on iterative pruning with marginal loss, the final solution is output. The iterative pruning process uses the finely tuned set of sites. Based on this, the core principle is to identify and remove redundant sites through marginal loss calculation, minimizing the number of sites while meeting a preset coverage threshold. Setting a preset coverage threshold... , Set the minimum acceptable coverage rate for users based on their actual needs to ensure that the coverage effect meets the application requirements.
[0081] The formula for calculating marginal loss is: ,in For the fine-tuned site collection The Middle Sites marginal loss, For the fine-tuned site collection coverage, To delete the first Sites Coverage of the remaining site set is the number of elements in the free grid cell set F; marginal loss reflects the decrease in coverage after deleting a site. The smaller the value, the smaller the contribution of the site to the overall coverage and the higher the redundancy.
[0082] In each iteration, the fine-tuned set of sites is calculated. Find the index of the site with the minimum marginal loss for each site. Deleting this site will result in a new set of sites. If the number of elements in the site collection is reduced after deletion If this happens, deleting more points will no longer have practical coverage significance, and the iteration will terminate.
[0083] After deleting sites, repeat the CMA-ES optimization process to fine-tune the spatial layout of the new site set, obtain a new fine-tuned site set, and calculate its coverage. .like ≥ If so, then the set of sites is recorded as the optimal candidate set. ;like < If the outer iteration fails, the iteration will stop, as further deletion of points will make it difficult to meet the coverage requirement. If no coverage meets the threshold in all iterations... If the coverage rate of a certain iteration meets the threshold, then the set of sites with the highest coverage rate in all iterations will be output as the final layout scheme. If the coverage rate of a certain iteration meets the threshold, then the corresponding optimal candidate set will be output as the final scanning site layout scheme.
[0084] This implementation details how to accurately model building scenes using grid discretization and obstacle indicator functions, combine ray discretization to ensure the accuracy of single-station view area calculation, and employ a two-stage strategy using a greedy set coverage algorithm and a CMA-ES optimization algorithm to quickly generate an initial set of stations that meets basic coverage requirements and achieve precise optimization of station spatial layout. Furthermore, redundant stations are dynamically deleted and iteratively optimized through marginal loss calculation to minimize the number of scanning stations and improve the consistency, reliability, and versatility of the layout scheme.
[0085] Based on Example 1, this implementation details an application scenario using a rectangular building floor. The building's two-dimensional planar working area is 800 units long and 800 units wide, and includes obstacles such as walls and columns. Efficient coverage of the feasible area needs to be achieved through the deployment of scanning stations, with a preset maximum measurement radius. Unit, raster resolution Unit, number of rays L=720, initial step size of CMA-ES optimization algorithm Unit, preset coverage threshold =95%, the site planning was completed using the two-stage scanning site layout method of this application. The specific process is as follows:
[0086] The two-dimensional planar working area of the building is discretized using a raster, with a raster resolution of Δ=1 unit, resulting in a continuous working area of 800×800 units. Construct a regular grid of 800×800. Each grid cell The center coordinates are Based on the actual building structure, the grids containing obstacles such as walls and columns are marked. An obstacle indicator function is defined to distinguish between obstacle grids and free grids, ultimately resulting in a set F of free grid cells. The total number of free grid cells is then counted. =50,000, the feasible area is the remaining space after deducting obstacles from the working area. Simultaneously, the maximum measurement radius of the scanning station is set to R=50 units, and the number of rays L=720 to ensure 360-degree coverage without blind spots. The initial step size of the CMA-ES optimization algorithm is also set. =5 units, preset coverage threshold =95%, providing basic parameters for subsequent site deployment.
[0087] Within the feasible area, downsampling is performed at a step size of 5 units to obtain the candidate site set. and target coverage grid set The candidate site set C contains 1200 potential site locations, and the target coverage raster set T covers all free raster cells. Initialize an empty site set. Given an uncovered set U=T, iteratively select the candidate site from the candidate site set C that covers the uncovered set U the most. Update the site collection after each selection. Uncovered set and remove selected candidate sites. This iterative process continues until no set is covered. All target coverage gratings are covered, resulting in a raster-level initial set of sites. After mapping their raster coordinates back to continuous coordinates, an initial scan site set is formed. It contains a total of 36 sites. For example... Figure 2 As shown, 36 initial stations are evenly distributed in the feasible area. The visible free grid set of each station is calculated by the ray discretization method, and finally, full coverage of all free grids is achieved, with a coverage rate of 100% and no coverage blind spots.
[0088] The 36 initial sites obtained in Phase 1 are used as the initial solution. For this fixed number of sites, spatial layout optimization is performed. A decision vector is constructed. Constrain each site All objects are located within work area B and do not fall on any obstacles. Define the objective function. Among them, the penalty items Used to constrain the feasibility of site locations The threshold is set to 1000 to ensure that stations that cross the boundary or fall within obstacles are severely penalized. Candidate solutions are generated iteratively, the objective function value is calculated, and the mean, covariance matrix, and step size parameters are updated. After 50 iterations, the algorithm converges, yielding a finely tuned set of stations. The optimized 36 stations are positioned more rationally, with reduced overlapping coverage areas. Some stations have been relocated to critical locations such as obstacle edges, significantly improving coverage efficiency while maintaining 100% coverage.
[0089] The marginal loss of the 36 stations after fine-tuning was calculated using the formula. The marginal loss value of each site was calculated. Six sites had the smallest marginal loss value, all around 0.008, meaning that removing these sites would only decrease coverage by 0.8%. Removing these six sites with the smallest marginal loss yielded a new set of 30 sites. Using these 30 sites as the initial solution, the CMA-ES optimization algorithm was executed again. After 40 iterations, the finely tuned set of sites was obtained. Calculate its coverage. =99.7%, this coverage rate is higher than the preset threshold. =95%, record this set of sites as the optimal candidate set. The corresponding coverage At this point, the layout of the 30 sites was further optimized, and the coverage overlap rate was significantly reduced. While reducing the number of sites, it still maintained a very high coverage effect.
[0090] The iterative pruning process continues. In each iteration, the marginal loss of each site in the current site set is calculated. After removing the site with the smallest marginal loss, the layout is fine-tuned using the CMA-ES algorithm, and the coverage rate is calculated. In the second iteration, four sites with the smallest marginal losses are removed, reducing the number of sites to 26, and the optimized coverage rate is 98.5%. In the third iteration, three sites are removed, reducing the number of sites to 23, and the optimized coverage rate is 97.3%. In the fourth iteration, three sites are removed, reducing the number of sites to 20, and the CMA-ES optimization algorithm is executed again. After 35 iterations, the process converges, resulting in the finely tuned site set. .like Figure 3 As shown, the 20 optimized stations are concentrated in key locations within the feasible area, avoiding obstacle areas. By rationally planning the location of each station, the visible free grid set is ensured to maximize coverage of the target area. Finally, the coverage rate of this station set is calculated. It is still higher than the preset 95% coverage threshold.
[0091] After four rounds of iterative pruning and optimization, the number of sites was reduced from the initial 36 to 20, and the coverage rate decreased from 100% to 96.5%, still meeting the preset 95% coverage threshold. At this point, the marginal loss was evaluated; the marginal loss values for all 20 sites were above 0.01. If any site were removed, the coverage rate was expected to drop below 95%, failing to meet the threshold requirement. Therefore, the iterative pruning process was stopped, and the current optimal candidate set S_best, the final deployment scheme containing 20 sites, was output. This scheme significantly reduced the number of sites while meeting the coverage requirement, decreasing by 16 sites compared to the initial 36, a reduction of 44.4%, effectively lowering equipment investment and deployment costs.
[0092] To verify the algorithm's handling logic when the threshold is not met, we assume the preset coverage threshold is increased to 98%, and the above iterative process is re-executed. Phase 1 still generates 36 sites, achieving 100% coverage; Phase 2 optimization maintains 36 sites, achieving 100% coverage; after the first round of pruning, the number of sites decreases to 30, with a coverage of 99.7%, meeting the 98% threshold; after the second round of pruning, the number of sites is 26, with a coverage of 98.5%, still meeting the threshold; after the third round of pruning, the number of sites is 23, with a coverage of 97.3%, below the 98% threshold. At this point, the outer iteration is stopped. Since multiple iterations meet the threshold requirement, the optimal record after the second iteration, containing 26 sites, is output. Its coverage of 98.5% is the highest among all solutions that meet the threshold, and the number of sites is relatively small, achieving a balance between coverage effect and cost.
[0093] This embodiment verifies the effectiveness of the two-stage scanning site deployment method of this application through two scenarios. With a preset coverage threshold of 95%, a coverage rate of 96.5% was achieved with 20 sites, significantly reducing redundant sites compared to the initial 36 sites. With a threshold of 98%, a coverage rate of 98.5% was achieved with 26 sites, meeting higher coverage requirements. (Appendix) Figure 1 The distribution of the 36 initial sites and the 100% coverage effect are clearly shown, with attached... Figure 2 The results show the layout of 20 optimized sites and a coverage rate of 96.5%. In both cases, the site layout avoided obstacles, achieving reasonable coverage without significant blind spots. The implementation process demonstrates that this method, through a two-stage strategy of greedy algorithm initialization, CMA-ES optimization, and iterative pruning, can minimize the number of scanning sites and improve deployment efficiency while meeting the preset coverage threshold, thus adapting to the practical application needs of building scenarios.
[0094] Example 2 describes in detail a two-stage scanning site layout system for an architectural scene, such as... Figure 4 As shown, it includes spatial modeling units, initial site generation units, layout optimization units, iterative pruning units, and parameter storage units, specifically:
[0095] The spatial modeling unit performs grid discretization on the two-dimensional working area of the building, sets the grid resolution and constructs a regular grid, distinguishes between obstacle grids and free grids through the obstacle indicator function, clarifies the spatial range of the obstacle set, accurately determines the feasible area and the set of free grid units, and outputs spatial data such as the coordinates and quantity of free grid units.
[0096] The initial site generation unit performs downsampling within the feasible area at a preset step size to generate a candidate site set and a target coverage raster set. Based on the greedy set coverage algorithm, iteratively selects the candidate site with the most covered and uncovered rasters, updates the site set and uncovered set, deletes the selected candidate sites, until all target coverage rasters are covered or there is no new coverage, and outputs the raster-level initial site set and maps it to continuous coordinates.
[0097] The layout optimization unit takes the initial set of sites as the initial solution, constructs a decision vector containing the coordinates of all sites, sets site location constraints, defines an objective function containing coverage and penalty terms, iteratively generates candidate solutions, calculates the objective function value, updates the mean, covariance matrix and step size parameters through the CMA-ES optimization algorithm until the algorithm converges or reaches the maximum number of iterations, and outputs the finely tuned set of sites.
[0098] The iterative pruning unit calculates the marginal loss of each site in the fine-tuned site set, filters out the redundant sites with the smallest marginal loss and deletes them, triggers the layout optimization unit to perform spatial layout optimization on the remaining sites again, calculates the coverage of the optimized site set and compares it with the preset coverage threshold. If the threshold is met, the optimal site set is recorded; otherwise, the iteration stops and the final scanning site layout scheme that meets the requirements is output.
[0099] The parameter storage unit stores preset parameters such as raster resolution, maximum measurement radius, number of rays, initial step size of CMA-ES algorithm, and preset coverage threshold. It also synchronously stores intermediate data such as raster data, station coordinates, coverage data, and iteration logs at each stage, providing support for data retrieval and result traceability for each unit.
[0100] Furthermore, the initial site generation unit also includes a visible field calculation subunit, which is used to determine the set of visible free grids for candidate sites. The visible field calculation subunit sets the number of rays and the maximum number of grid steps, calculates the angle corresponding to each ray, iteratively calculates the discrete grid index along each ray by step size, determines whether the grid index is out of bounds or corresponds to an obstacle grid, terminates the ray iteration corresponding to the out-of-bounds or obstacle grid, marks the remaining grids as visible, and filters the visible free grids through a visible mask function to form the set of visible free grids for candidate sites, providing coverage data support for the iterative filtering of initial sites.
[0101] Furthermore, it also includes a result verification unit, which is used to verify the coverage effect of the final scanning site layout scheme. The result verification unit calls the free grid cell set and the final site set data stored in the parameter storage unit, calculates the global coverage mask and actual coverage of the final site set, compares the actual coverage with the preset coverage threshold, and outputs a coverage compliance report. If the actual coverage does not reach the preset threshold, the iterative pruning unit is triggered to fall back to the previous round of optimal site set, and the optimization and pruning process is re-executed until a site layout scheme with compliance is output, ensuring that the coverage effect of the final scheme meets the application requirements.
[0102] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter changes made to these embodiments within the spirit and principles of the present invention, without departing from the principles and spirit of the present invention, through conventional substitutions or to achieve the same function, fall within the scope of protection of the present invention.
Claims
1. A two-stage scanning site layout method for an architectural scene, characterized in that, include: The two-dimensional working area of the building is discretized by a grid, dividing it into obstacle grids and free grids, and determining the feasible area and the set of free grid units. An initial set of scanning stations is generated based on a greedy set coverage algorithm, wherein each station in the initial set of scanning stations is located within the feasible area and has a preset maximum measurement radius; Using the initial set of scanning sites as the initial solution, the CMA-ES optimization algorithm is used to optimize the spatial layout of a fixed number of scanning sites to obtain the finely tuned set of sites. Calculate the marginal loss of each site in the fine-tuned site set, delete the site with the smallest marginal loss and repeat the optimization process until the preset coverage threshold is met, and output the scanning site layout scheme.
2. The two-stage scanning site layout method for an architectural scene according to claim 1, characterized in that, The grid discretization process for the two-dimensional working area of the building includes: Set raster resolution In the two-dimensional working area of the building Construct a regular mesh ; Define obstacle indication function ,in , For grid The center coordinates, A collection of obstacles; The set of free grid cells is determined based on the obstacle indication function. .
3. The two-stage scanning site layout method for an architectural scene according to claim 1, characterized in that, The initial scan site set is generated based on the greedy set coverage algorithm. ,include: Within the feasible area, a set of candidate sites is obtained by downsampling at a preset step size. and target coverage grid set ; Initialize empty site set and uncovered sets Iterative selection of covered and uncovered sets Most candidate sites ,in , Candidate sites The set of visible free grid cells; Update site collection Uncovered set and remove selected candidate sites. until Or there may be no new coverage.
4. The two-stage scanning site layout method for a building scene according to claim 3, characterized in that, The visible free grid set The methods for determining this include: Set the number of rays and maximum grid steps ,in This is the floor function. The maximum measurement radius of the scanning station, and the corresponding angle for each ray. ; Along each ray by step Calculate Discrete Raster Index ,in Candidate sites The raster index; If the raster index is out of bounds or the corresponding obstacle indicator function is... If the ray iteration fails, the iteration is terminated; otherwise, the corresponding raster is marked as visible. Visible mask function Determine the set of visible free grid cells. .
5. The two-stage scanning site layout method for an architectural scene according to claim 1, characterized in that, The spatial layout optimization of a fixed number of scanning stations using the CMA-ES optimization algorithm includes: Construct decision vector ,in This represents the current number of stations. Given a 2N-dimensional real space, constrain each station. and ; Define the objective function ,in To make the decision vector Decoding to a site function, As a penalty item, It is a constant. For indicator functions; With the initial set of sites For the initial solution Set the initial step size The process iteratively generates candidate solutions, calculates the objective value, and updates the mean, covariance matrix, and step size parameters until convergence or the maximum number of iterations is reached.
6. The two-stage scanning site layout method for a building scene according to claim 5, characterized in that, The indicator function satisfy: ,in For logical judgment statements, when When the judgment result is true, =1; when When the judgment result is false, =0.
7. The two-stage scanning site layout method for an architectural scene according to claim 1, characterized in that, The coverage The calculation method is as follows: ,in For global coverage mask, For the first The visibility mask function for each site.
8. The two-stage scanning site layout method for a building scene according to claim 1, characterized in that, The preset coverage threshold , The minimum acceptable coverage set for users; In each iteration, the fine-tuned set of sites is calculated. coverage ,in This refers to the current iteration round; like Then record the corresponding optimal site set. And it was selected as a final candidate.
9. The two-stage scanning site layout method for an architectural scene according to claim 1, characterized in that, The formula for calculating the marginal loss is as follows: ,in For the fine-tuned site collection The Middle Sites Marginal loss, For the fine-tuned site collection coverage, To delete the first Sites Coverage of the remaining site set For free grid cell set The number of elements; if the coverage threshold is not met in all iterations. The set of sites with the highest coverage will be output as the final layout scheme.
10. A two-stage scanning site layout system for architectural scenes, characterized in that, include: The spatial modeling unit performs grid discretization on the two-dimensional working area of the building, divides it into obstacle grids and free grids, and determines the feasible area and the set of free grid units. The initial site generation unit generates an initial set of scanned sites based on a greedy set coverage algorithm. The layout optimization unit uses the initial set of scanned sites as the initial solution and optimizes the spatial layout of a fixed number of scanned sites using the CMA-ES optimization algorithm to obtain the finely tuned set of sites. The iterative pruning unit calculates the marginal loss of each site in the fine-tuned site set, deletes the site with the smallest marginal loss and triggers the layout optimization unit to repeat the optimization until the preset coverage threshold is met, and outputs the final scan site layout scheme. The parameter storage unit stores preset parameters such as grid resolution, maximum measurement radius, coverage threshold, and number of rays, as well as site data and coverage data for each stage.