Roof photovoltaic visual design method and system and medium

Through multi-source data fusion and three-dimensional scene model construction, the problem of difficult to accurately calculate shadow paths in the design of photovoltaic systems for small and medium-sized commercial buildings was solved, the optimized layout of photovoltaic components and efficient power generation were achieved, and the roof space utilization and design efficiency were improved.

CN120633015AActive Publication Date: 2025-09-12SUZHOU HIGH SPEED RAILWAY ZHONGYIFENG CONSTR GRP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511133910.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-09-12
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

In the design of photovoltaic systems on flat roofs of small and medium-sized commercial buildings, existing tools make it difficult to intuitively present the precise projection paths of shadows in different seasons and time periods. This causes designers to rely on empirical estimates, resulting in conservative roof space utilization or unexpected attenuation of power generation in local areas.

Method used

Through multi-source data fusion and spatial registration, a complete three-dimensional scene model is constructed, solar trajectory analysis and ray tracing are performed, shadow calculation and photovoltaic module layout optimization are achieved, and three-dimensional rendering technology is combined to perform real-time shadow rendering and interactive visualization.

Benefits of technology

It improves the accuracy of photovoltaic module layout and roof space utilization, reduces the impact of shadow blocking on power generation, reduces design and construction costs, and improves design flexibility and customer satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633015A_ABST
    Figure CN120633015A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of building photovoltaic simulation, in particular to a roof photovoltaic visual design method and system and a medium. The method comprises the following steps: identifying a boundary corresponding relation of a roof to obtain roof boundary corresponding relation data; performing spatial data registration based on the roof boundary corresponding relation data to obtain unified coordinate system roof spatial data; voxelization processing is carried out on the unified coordinate system roof space data to obtain roof voxel occupancy state data; constructing a complete roof three-dimensional scene model based on the roof voxel occupancy state data; acquiring geographic position coordinates of the project; and performing sun trajectory analysis and ray tracing initialization according to the geographic position coordinates of the project to obtain scene ray tracing parameters. According to the method, the problems of low efficiency and visual errors in traditional roof photovoltaic design are effectively solved, and the design efficiency and accuracy are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building photovoltaic simulation, and in particular to a rooftop photovoltaic visualization design method, system and medium. Background Art

[0002] Currently, during the design phase of flat-roof photovoltaic systems for small and medium-sized commercial buildings, designers typically rely on CAD software combined with photovoltaic simulation tools to perform floor plans and power generation simulations. However, the roofs of these buildings often have dense equipment and complex structures. For example, permanent obstacles such as ventilation ducts, cooling towers, and fire protection facilities crisscross each other. Structural details such as the direction of roof load-bearing beams and varying parapet heights pose key constraints on module layout. In the traditional design process, engineers need to repeatedly compare two-dimensional drawings with on-site photos and manually mark obstruction areas. This approach is not only inefficient but also prone to overlooking critical obstructions due to visual errors. Existing tools are particularly difficult to intuitively display the precise projection path of shadows on the module array in different seasons and time periods. Designers often rely on experience to estimate safe distances, resulting in conservative roof space utilization or unexpected power generation reduction in local areas. Summary of the Invention

[0003] Based on this, it is necessary for the present invention to provide a rooftop photovoltaic visualization design method, system and medium to solve at least one of the above technical problems.

[0004] To achieve the above objectives, a rooftop photovoltaic visualization design method includes the following steps: Step S1: Identify the boundary correspondence of the roof and obtain roof boundary correspondence data; perform spatial data registration based on the roof boundary correspondence data to obtain unified coordinate system roof space data; Step S2: voxelizing the unified coordinate system roof space data to obtain roof voxel occupancy status data; and constructing a complete roof 3D scene model based on the roof voxel occupancy status data. Step S3: Obtain the project's geographic location coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic location coordinates to obtain scene ray tracing parameters; perform ray tracing and shadow calculation based on the scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; Step S4: performing layout constraint analysis based on the complete rooftop three-dimensional scene model to obtain complete layout constraint condition data; performing photovoltaic module layout based on the complete layout constraint condition data to obtain an optimal photovoltaic module layout solution; Step S5: Construct a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

[0005] This invention successfully integrates heterogeneous data sources, including building structure drawings, equipment installation diagrams, and site survey point clouds, through multi-source data fusion and spatial registration. This eliminates coordinate system deviations between different data sources, ensures data consistency and accuracy during the design process, and avoids construction-phase modifications caused by inaccurate data alignment in traditional methods, thereby significantly reducing design and construction costs. By utilizing voxelization to construct a complete 3D scene model, complex roof structures and equipment layouts can be intuitively presented, allowing designers to clearly identify obstructions and structural details, avoiding layout errors caused by visual errors. Compared to traditional 2D design methods, 3D scene models provide a more comprehensive perspective, enabling designers to more accurately plan layouts within a virtual environment. By analyzing the project's geographic coordinates for sun trajectory and ray tracing, this invention accurately calculates shadow paths across different seasons and time periods, providing a scientific basis for photovoltaic panel layout and minimizing the impact of shadow obstruction on power generation. Compared to existing tools, this invention's shadow calculation is more accurate and can dynamically visualize shadow changes, thereby optimizing photovoltaic panel layout and improving power generation efficiency. The layout constraint analysis based on the three-dimensional model fully considers practical factors such as roof load-bearing capacity, fire escape routes, and electrical constraints, and designs an optimal component layout plan, significantly improving roof space utilization and avoiding power generation losses due to empirical estimates. The present invention can automatically adjust the component layout to ensure that the layout plan maximizes power generation efficiency while meeting all constraints. By constructing a roof rendering shader for real-time shadow rendering and interactive visualization, the design results are made more intuitive and easy to understand, facilitating communication between designers and clients and reducing the cost of design modifications. Compared with traditional design methods, interactive visualization allows users to adjust and view design effects in real time, improving design flexibility and customer satisfaction.

[0006] Preferably, step S1 includes the following steps: Step S11: Obtain a CAD drawing of a building structure; extract vector data from the CAD drawing of the building structure to obtain roof structure vector data; Step S12: Obtain equipment installation technical drawings; perform CAD entity recognition and analysis on the equipment installation technical drawings to obtain rooftop equipment layout vector data; Step S13: Obtaining roof laser point cloud scanning data; performing density uniform sampling on the roof laser point cloud scanning data to obtain standard density roof point cloud data; Step S14: extracting geometric features from the standard density roof point cloud data to obtain roof point cloud geometric feature data; Step S15: performing boundary line matching on the roof point cloud geometric feature data according to the roof structure vector data to obtain roof boundary correspondence data; Step S16: performing spatial data registration based on the rooftop equipment layout vector data and the rooftop boundary correspondence data to obtain unified coordinate system rooftop spatial data.

[0007] Preferably, the voxelization processing of the unified coordinate system roof space data in step S2 includes: Calculate the spatial bounding box of the roof space data in the unified coordinate system to obtain the roof space range parameters; Adaptive voxel size calculation is performed based on the roof space range parameters to obtain the roof multi-level voxel parameters; Evaluate the equipment density of the roof space data in the unified coordinate system to obtain the roof equipment density distribution data; According to the roof equipment density distribution data, the roof multi-level voxel parameters are adjusted locally to obtain the roof voxel size distribution data; Based on the roof voxel size distribution data, the roof space data of the unified coordinate system is discretized into three-dimensional space to obtain the roof space voxel grid; Mark the occupancy status of the roof space voxel grid to obtain the roof voxel occupancy status data; Construct a complete rooftop 3D scene model based on rooftop voxel occupancy status data.

[0008] Preferably, constructing a complete rooftop three-dimensional scene model based on rooftop voxel occupancy status data in step S2 includes: The octree data structure is used to construct a hierarchical index for the roof voxel occupancy status data to obtain the octree spatial index data; Perform isosurface extraction on the roof voxel occupancy status data to obtain the equipment surface triangular mesh; perform mesh smoothing on the equipment surface triangular mesh to obtain a smoothed equipment surface mesh; The smooth device surface mesh is spatially grouped according to the octree spatial index data to obtain device object segmentation data; The device object segmentation data is classified into device types to obtain device type annotation data; a multi-resolution model is generated for the device type annotation data to obtain a multi-level precision device model; Perform surface texture processing on the multi-level precision device model to obtain a texture mapping device model. The surface texture processing includes assigning a standard material texture to each device type. Metal devices use a metal material with a reflection coefficient of 0.3, and concrete structures use a rough material with a diffuse reflection coefficient of 0.8. Verify the position accuracy of the texture mapping device model to obtain a position correction device model; collect rendering performance requirements for the position correction device model to obtain rendering performance optimization requirement data; The data structure of the position correction device model is encapsulated according to the rendering performance optimization requirement data to obtain a complete roof three-dimensional scene model.

[0009] Preferably, in step S3, obtaining the project's geographical location coordinates; and performing sun trajectory analysis and ray tracing initialization according to the project's geographical location coordinates include: Get the project's geographic coordinates; perform latitude and longitude analysis on the project's geographic coordinates to obtain the standard project's geographic coordinates; Calculate the time zone based on the standard project geographic coordinates to obtain the project's local time zone parameters; Calculate the solar declination angle based on the project's local time zone parameters to obtain the solar declination angle data for the entire year; The solar altitude angle is calculated based on the solar declination angle data throughout the year and the standard project geographic coordinates to obtain the solar altitude angle time series data throughout the year; The azimuth angle is supplemented for the annual solar altitude angle time series data to obtain the complete solar trajectory angle data; Calculate the unit vector of the sun vector based on the complete sun trajectory angle data to obtain the sun ray direction vector data; Ray tracing is initialized based on the sunlight direction vector data and the complete roof 3D scene model to obtain the scene ray tracing parameters.

[0010] Preferably, performing ray tracing and shadow calculation based on scene ray tracing parameters in step S3 includes: The preset BVH acceleration structure is used to optimize the spatial index of the scene ray tracing parameters to obtain the accelerated ray tracing data structure. The spatial index optimization includes constructing a BVH structure in the form of a binary tree, where each leaf node contains no more than 10 triangles, reducing the time complexity of the ray-triangle intersection test from O(n) to O(n). n); Performing shadow generation on the accelerated ray tracing data structure to obtain roof shadow projection data, wherein the shadow generation includes performing a scene intersection test on each ray and recording the intersection point coordinates and intersection patch information; Perform depth sorting on the roof shadow projection data to obtain roof shadow depth buffer data; perform shadow boundary recognition on the roof shadow depth buffer data to obtain roof shadow outline boundary data; Expand the time dimension of the roof shadow outline boundary data to obtain shadow outline time series data; The shadow profile time series data are spatially and temporally fused to obtain the four-dimensional roof shadow impact domain data. The spatial-temporal fusion includes constructing a four-dimensional array of X, Y, Z, and T. Each array element records the shadow intensity value of the corresponding spatial position at a specific time. The impact domain resolution is 0.1 m × 0.1 m × 0.1 m × 15 minutes. Conduct annual shadow statistics on the four-dimensional roof shadow impact domain data to obtain annual shadow cumulative distribution data; Obtain the installation height parameters of photovoltaic modules; perform height correction on the annual shadow cumulative distribution data based on the installation height parameters of photovoltaic modules to obtain the spatiotemporal constraint data of roof shadows.

[0011] Preferably, step S4 includes the following steps: Step S41: identifying the boundary of the available area based on the complete three-dimensional roof scene model to obtain the boundary data of the available area of ​​the roof; Step S42: performing load-bearing partitioning on the roof available area boundary data to obtain roof load-bearing partition data; Step S43: performing uniform grid division on the roof load-bearing partition data to obtain the roof load-bearing partition basic grid; Step S44: collecting specification parameters of photovoltaic module products to obtain photovoltaic module specification parameters; performing module occupancy grid calculation on the roof load-bearing partition basic grid based on the photovoltaic module specification parameters to obtain module occupancy grid mapping data; Step S45: performing shadow occupancy filtering on the component occupancy grid mapping data according to the roof shadow spatiotemporal constraint data to obtain a roof effective layout grid; Step S46: performing series grouping constraint modeling on the effective rooftop layout grid to obtain electrical constraint parameters of the photovoltaic system; Step S47: Supplement the fire channel constraint with the electrical constraint parameters of the photovoltaic system to obtain complete layout constraint condition data; Step S48: Layout the photovoltaic modules based on the complete layout constraint data to obtain an optimal photovoltaic module layout solution.

[0012] Preferably, step S5 includes the following steps: Step S51: Initializing a three-dimensional rendering environment for the optimal photovoltaic module layout solution based on a preset WebGL graphics library to obtain WebGL rendering context data; Step S52: performing GPU data transmission on the complete rooftop 3D scene model to obtain rooftop scene GPU buffer data; Step S53: performing rendering pipeline configuration on the roof scene GPU buffer data using a preset shader to obtain a roof rendering shader; Step S54: performing batch rendering of component models for the optimal photovoltaic component layout solution to obtain photovoltaic component rendering instance data; Step S55: performing real-time shadow rendering on the roof shadow spatiotemporal constraint data based on the roof rendering shader to obtain roof dynamic shadow rendering data; Step S56: performing visual material configuration on the photovoltaic component rendering instance data according to the roof dynamic shadow rendering data to obtain photovoltaic system material rendering data; Step S57: Perform interactive visual rendering based on the photovoltaic system material rendering data to obtain a rooftop photovoltaic visual design solution.

[0013] Preferably, the present invention provides a rooftop photovoltaic visualization design system for executing the above-mentioned rooftop photovoltaic visualization design method, the rooftop photovoltaic visualization design system comprising: The data registration module is used to identify the boundary correspondence of the roof and obtain the roof boundary correspondence data; based on the roof boundary correspondence data, spatial data registration is performed to obtain the unified coordinate system roof space data; The 3D modeling module is used to voxelize the roof space data in the unified coordinate system to obtain the roof voxel occupancy status data; based on the roof voxel occupancy status data, a complete roof 3D scene model is constructed; The shadow analysis module is used to obtain the project's geographic coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic coordinates to obtain scene ray tracing parameters; perform ray tracing and shadow calculation based on the scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; The layout planning module is used to perform layout constraint analysis based on the complete roof 3D scene model to obtain complete layout constraint data; based on the complete layout constraint data, the PV module layout is performed to obtain the optimal PV module layout solution; The visualization rendering module is used to build a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; and perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

[0014] In this invention, the data registration module effectively integrates multi-source heterogeneous data, eliminating coordinate system deviations between building structure drawings, equipment installation drawings, and site survey point clouds. This provides accurate and unified roof space data for subsequent design, avoiding construction-phase modifications caused by data alignment issues in traditional designs. The 3D modeling module intuitively presents complex roof structures and equipment layouts through voxel processing and 3D scene construction of roof space data, enabling designers to clearly identify obstructions and structural details, reducing layout errors caused by visual errors. The shadow analysis module utilizes sun trajectory analysis and ray tracing technology to accurately calculate shadow projection paths in different seasons and time periods, providing a scientific basis for photovoltaic module layout and minimizing the impact of shadow obstruction on power generation. The layout planning module combines the 3D model with layout constraint analysis, fully considering the actual factors of roof load-bearing capacity, fire escape routes, and electrical constraints to design the optimal module layout, significantly improving roof space utilization and avoiding power generation losses caused by empirical estimation. The visualization rendering module uses real-time shadow rendering and interactive visualization to make design results more intuitive and easy to understand, facilitating communication between designers and clients and reducing design modification costs.

[0015] Preferably, the present invention further provides a computer-readable medium storing a program that can be loaded by a processor and execute the above-mentioned rooftop photovoltaic visualization design method. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Other features, objects and advantages of the present invention will become more apparent from reading the detailed description with reference to the following drawings: Figure 1 A schematic flow chart of the steps of a rooftop photovoltaic visualization design method according to an embodiment is shown.

[0017] Figure 2 A detailed flowchart of step S4 of an embodiment is shown.

[0018] Figure 3 A detailed flowchart of step S5 of an embodiment is shown. DETAILED DESCRIPTION

[0019] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.

[0020] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.

[0021] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.

[0022] To achieve this, please refer to Figures 1 to 3 The present invention provides a rooftop photovoltaic visualization design method, comprising the following steps: Step S1: Identify the boundary correspondence of the roof and obtain roof boundary correspondence data; perform spatial data registration based on the roof boundary correspondence data to obtain unified coordinate system roof space data; Step S2: voxelizing the unified coordinate system roof space data to obtain roof voxel occupancy status data; and constructing a complete roof 3D scene model based on the roof voxel occupancy status data. Step S3: Obtain the project's geographic location coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic location coordinates to obtain scene ray tracing parameters; perform ray tracing and shadow calculation based on the scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; Step S4: performing layout constraint analysis based on the complete rooftop three-dimensional scene model to obtain complete layout constraint condition data; performing photovoltaic module layout based on the complete layout constraint condition data to obtain an optimal photovoltaic module layout solution; Step S5: Construct a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

[0023] Preferably, step S1 includes the following steps: Step S11: Obtain a CAD drawing of a building structure; extract vector data from the CAD drawing of the building structure to obtain roof structure vector data; Step S12: Obtain equipment installation technical drawings; perform CAD entity recognition and analysis on the equipment installation technical drawings to obtain rooftop equipment layout vector data; Step S13: Obtaining roof laser point cloud scanning data; performing density uniform sampling on the roof laser point cloud scanning data to obtain standard density roof point cloud data; Step S14: extracting geometric features from the standard density roof point cloud data to obtain roof point cloud geometric feature data; Step S15: performing boundary line matching on the roof point cloud geometric feature data according to the roof structure vector data to obtain roof boundary correspondence data; Step S16: performing spatial data registration based on the rooftop equipment layout vector data and the rooftop boundary correspondence data to obtain unified coordinate system rooftop spatial data.

[0024] In this example, AutoCAD software was used to open a CAD drawing of a building structure. The software's built-in "Object Selection" tool was used to select the roof portion of the drawing. The "Export" function was used to export the relevant data of the roof structure in DXF format. The DXF file was then read using the Python ezdxf library to extract the vector data of the roof structure, including information such as the roof outline, the location and size of the beams, and the direction and height of the parapets, thereby obtaining the roof structure vector data. The equipment installation technical drawing was opened using AutoCAD software, and the "CAD Entity Recognition" function was selected from the "Tools" menu. Each device on the drawing was identified and analyzed, such as the shape, size, location information, and connection relationships of equipment such as ventilation ducts and cooling towers. This information was exported in JSON format and read using the Python json library to obtain the roof equipment layout vector data, recording key parameters such as the device type, coordinate position, and size. A FARO laser scanner was used to perform a laser point cloud scan of the roof, with the resolution parameter set to 0.05 meters, to obtain the raw laser point cloud data of the roof. The scanned point cloud data was imported into Cloud Compare software. Using its "Uniform Sampling" function and setting the sampling interval to 0.1 meters, the raw point cloud data was subjected to density uniform sampling, resulting in standard-density roof point cloud data. Within Cloud Compare, the "Geometric Feature Extraction" tool was applied to the standard-density roof point cloud data to extract geometric features, such as curvature and normal direction. Curvature is used to identify surface irregularities, and normal direction is used to determine surface orientation. These geometric features were appended to the raw point cloud data as point cloud attributes to generate roof point cloud geometric feature data. The extracted roof structure vector data was imported into Arc GIS software, and the roof point cloud data with geometric features was also imported into the software in LAS format. Within Arc GIS, the "Boundary Matching" tool was used with a matching threshold of 0.5 meters to match the vector information, such as the roof structure vector data's contour lines, with the geometric features of the point cloud data. By calculating the distance and direction between the vector boundary and the point cloud, the corresponding roof boundary position in the point cloud data was determined, ultimately generating roof boundary correspondence data. For the detailed implementation process of step S16, please refer to the sub-steps of step S16.

[0025] It is particularly important that step S16 further includes the following steps: Step S161: extract key feature points from the roof structure vector data to obtain roof structure feature control points; extract equipment corner feature points from the roof equipment layout vector data to obtain equipment feature control points; Step S162: performing spatial feature encoding on the standard density roof point cloud data to obtain roof point cloud spatial feature description data; merging feature point sets based on the roof structure feature control points and the equipment feature control points to obtain a CAD feature control point set; Step S163: establishing a correspondence between the CAD feature control point set and the roof point cloud spatial feature description data to obtain CAD-point cloud feature point corresponding matching data; Step S164: performing abnormal matching elimination on the CAD-point cloud feature point matching data to obtain reliable CAD-point cloud feature matching data; Step S165: Calculating rigid body transformation parameters for reliable CAD-point cloud feature matching data to obtain a CAD-point cloud rigid body transformation parameter set; Step S166: performing a unified coordinate transformation on the roof structure vector data and the roof equipment layout vector data according to the CAD-point cloud rigid body transformation parameter set to obtain unified coordinate system roof space data.

[0026] In this example, AutoCAD software was used to open a roof structure vector data file. Using its "Feature Extraction" tool, the "Key Feature Point Extraction" function was selected, with an extraction accuracy of 0.1 meters. Key feature points of the roof structure, such as the inflection points of the roof edge and the endpoints of the beams, were extracted. These points served as feature control points for the roof structure. A rooftop equipment layout vector data file was opened, and AutoCAD's "Corner Point Recognition" function was used to automatically detect the corner locations of the equipment, such as the corner points of the ventilation duct and the four corners of the cooling tower, and extract the feature control points of the equipment. Standard density roof point cloud data was imported into CloudCompare software. Using its "Spatial Feature Encoding" function, the "Principal Component Analysis (PCA)" method was selected to perform feature encoding on each point cloud. A local neighborhood radius of 0.5 meters was set to extract the shape and orientation features of the point cloud, generating spatial feature description data for the roof point cloud. The previously extracted roof structure feature control points and equipment feature control points were imported into Arc GIS software, and the "Data Merge" tool was used to merge these two sets of feature points into a single set of CAD feature control points. In Arc GIS software, the "Nearest Neighbor Matching" function in the "Spatial Analysis" module was used to match the CAD feature control point set with the spatial feature description data of the roof point cloud. A matching threshold of 0.3 meters was set. By calculating the spatial distance and feature similarity between the feature points and the point cloud, a correspondence between the two was established, resulting in CAD-point cloud feature point matching data. This process generates a matching relationship table, recording the matching information between each CAD feature point and the nearest point cloud feature point. The CAD-point cloud feature point matching data was analyzed using MATLAB software. The matching relationship table was loaded and the "Anomaly Detection" function was used. The "Statistical-Based Anomaly Detection" method was selected, and a confidence interval of 95% was set to detect and eliminate anomalous matching point pairs that did not conform to the overall matching trend. For example, if a feature point's matching distance was much greater than that of other matching points, or its feature similarity was extremely low, it was marked as an anomaly and eliminated, thus obtaining reliable CAD-point cloud feature matching data. In MATLAB software, using the "Rigid Body Transformation Parameter Calculation" function in the "Geometric Transformation" toolbox, reliable CAD-point cloud feature matching data was input and the "Least Squares Method" was selected for parameter estimation. The translation vector and rotation matrix from the CAD coordinate system to the point cloud coordinate system were calculated to obtain the CAD-point cloud rigid body transformation parameter set. Based on this calculated CAD-point cloud rigid body transformation parameter set, the "Coordinate Transformation" function in AutoCAD software was used to perform a unified coordinate transformation on the roof structure vector data and the roof equipment layout vector data. All data was transformed into the same coordinate system as the roof point cloud data, resulting in the roof space data in the unified coordinate system.

[0027] Preferably, the voxelization processing of the unified coordinate system roof space data in step S2 includes: Calculate the spatial bounding box of the roof space data in the unified coordinate system to obtain the roof space range parameters; Adaptive voxel size calculation is performed based on the roof space range parameters to obtain the roof multi-level voxel parameters; Evaluate the equipment density of the roof space data in the unified coordinate system to obtain the roof equipment density distribution data; According to the roof equipment density distribution data, the roof multi-level voxel parameters are adjusted locally to obtain the roof voxel size distribution data; Based on the roof voxel size distribution data, the roof space data of the unified coordinate system is discretized into three-dimensional space to obtain the roof space voxel grid; Mark the occupancy status of the roof space voxel grid to obtain the roof voxel occupancy status data; Construct a complete rooftop 3D scene model based on rooftop voxel occupancy status data.

[0028] In this example, Blender software was used to open a roof space data file in a unified coordinate system (for example, imported in OBJ format). In Blender, select the "Bounding Box" tool in the "Object" menu. This tool automatically calculates the minimum bounding box that encompasses the entire roof space. By viewing the bounding box parameters, the roof space's extent parameters, including minimum and maximum coordinate values ​​(e.g., X_min, Y_min, Z_min, and X_max, Y_max, Z_max), can be obtained. In MATLAB, the "Adaptive Voxel Size Calculation" function was used based on the roof space's extent parameters. The length, width, and height of the roof space were entered, and the target resolution parameters for voxelization were set, such as a minimum side length of 0.5 meters. MATLAB automatically generated multi-level voxel parameters based on the space dimensions and target resolution, including the voxel sizes and corresponding numbers for each level. For example, for larger spatial areas, the voxel size was 1 meter, while for areas with high detail, the voxel size was 0.5 meters. The roof space data in the unified coordinate system was imported into QGIS software. In QGIS, use the "Density Analysis" tool, select the rooftop device vector data layer, set the analysis scope to the entire roof space, select the "Kernel Density Estimation" method, and set a search radius of 2 meters. The tool calculates the device density value for each location on the roof and generates a device density distribution map. By extracting the numerical data from the device density distribution map, the rooftop device density distribution data is obtained. In MATLAB, load the multi-level voxel parameters and device density distribution data. Use the "Local Density Adjustment" function to set density threshold parameters. For example, when the device density exceeds 10 devices / square meter, the voxel size is reduced to 0.8 times the original size. Based on the device density distribution data, locally adjust the multi-level voxel parameters to generate the final rooftop voxel size distribution data. This adjusted rooftop voxel size distribution data is imported into VTK (Visualization Toolkit). In VTK, use the "3D Spatial Discretization" tool to divide the rooftop space into voxel units based on the voxel size distribution data. The size of each voxel unit is determined by the voxel size at its location, thus generating a voxel grid of the rooftop space. In VTK, use the "Occupancy Status Marking" tool to traverse the generated voxel grid. For each voxel unit, check whether it has an intersection with the geometric model of the roof structure or equipment. If there is an intersection, it is marked as "occupied"; otherwise, it is marked as "idle". Through the above steps, the roof voxel occupancy status data is obtained. The roof voxel occupancy status data is imported into Blender software. In Blender, use the "Voxel Grid Modeling" tool to generate a three-dimensional model of the roof based on the voxel occupancy status data. For voxels in the "occupied" state, the corresponding geometry is generated; for voxels in the "idle" state, no geometry is generated.By adjusting the model's materials and textures to make it closer to the actual roof structure and equipment appearance, a complete three-dimensional roof scene model is finally constructed.

[0029] Preferably, constructing a complete rooftop three-dimensional scene model based on rooftop voxel occupancy status data in step S2 includes: The octree data structure is used to construct a hierarchical index for the roof voxel occupancy status data to obtain the octree spatial index data; Perform isosurface extraction on the roof voxel occupancy status data to obtain the equipment surface triangular mesh; perform mesh smoothing on the equipment surface triangular mesh to obtain a smoothed equipment surface mesh; The smooth device surface mesh is spatially grouped according to the octree spatial index data to obtain device object segmentation data; The device object segmentation data is classified into device types to obtain device type annotation data; a multi-resolution model is generated for the device type annotation data to obtain a multi-level precision device model; Perform surface texture processing on the multi-level precision device model to obtain a texture mapping device model. The surface texture processing includes assigning a standard material texture to each device type. Metal devices use a metal material with a reflection coefficient of 0.3, and concrete structures use a rough material with a diffuse reflection coefficient of 0.8. Verify the position accuracy of the texture mapping device model to obtain a position correction device model; collect rendering performance requirements for the position correction device model to obtain rendering performance optimization requirement data; The data structure of the position correction device model is encapsulated according to the rendering performance optimization requirement data to obtain a complete roof three-dimensional scene model.

[0030] In this example, VTK (Visualization Toolkit) software was used to import rooftop voxel occupancy data. In VTK, the "Octtree Build" module was selected and the voxel occupancy data was used as input. The initial octree resolution parameters were set to 1 meter and the maximum depth to 5 levels. Based on the voxel data, VTK recursively partitioned the space into octree nodes, each containing a number of voxel units, until the maximum depth was reached or the required resolution was met. This generated the octree spatial index data. In VTK, the "Isosurface Extraction" tool was used, selecting the rooftop voxel occupancy data as input and setting the isosurface threshold to 0.5 (indicating the probability of a voxel being occupied). VTK extracted a triangular mesh of the device surface based on the voxel data. Using the "Mesh Smoothing" function, the "Laplacian Smoothing" algorithm was selected, with 10 iterations and a smoothing factor of 0.1. This algorithm adjusts the positions of mesh vertices to reduce sharp edges and irregular shapes, resulting in a smoothed device surface mesh. The smoothed device surface mesh and octree spatial index data were imported into Blender. In Blender, the "Spatial Grouping" tool was used to divide the device surface mesh into distinct spatial regions based on octree index data. Each region corresponded to a device object. By setting the grouping threshold to 0.2 meters (the maximum spatial distance between devices), adjacent mesh segments were merged into a complete device object, generating device object segmentation data. In Blender, the "Equipment Type Classification" tool was used to classify the segmented device objects. By setting classification rules (for example, based on device shape, size, and location), the devices were categorized into types such as "ventilation duct," "cooling tower," and "photovoltaic panel." The "Multi-resolution Model Generation" feature was used to generate multi-resolution models for each device type. For example, the ventilation duct model was set to three levels of resolution: low (LOD1), medium (LOD2), and high (LOD3), corresponding to different mesh densities and levels of detail. The resulting multi-resolution device model was then textured in Blender. Standard material textures were assigned to different device types using the "Material Assignment" tool. For example, for metal equipment, select a metal material texture with a reflectance of 0.3; for concrete structures, select a rough material texture with a diffuse reflectance of 0.8. By adjusting the texture mapping method (such as planar mapping or spherical mapping) and parameters (such as texture resolution and number of repetitions), a texture-mapped device model is obtained. Use Blender's "Position Accuracy Verification" function to perform position correction on the texture-mapped device model. By setting the verification accuracy to 0.05 meters, check whether the model's geometric position is consistent with the actual measurement data. For models with large position deviations, manually adjust their position or use the "Auto Align" tool to correct them to obtain a position-corrected device model.Use the "Rendering Performance Requirements Capture" tool to set the resolution parameters of the rendering scene to 1920×1080 pixels and the frame rate parameters to 30fps. This tool will generate rendering performance optimization requirement data based on the complexity of the model and the rendering settings, including shadow quality, reflection effects, and texture filtering parameters. In Blender, the position correction device model is encapsulated in a data structure based on the rendering performance optimization requirement data. Use the "Optimize Rendering Settings" function to adjust the model's rendering parameters according to performance requirements, such as reducing shadow quality to increase rendering speed, or optimizing texture filtering to reduce memory usage. Finally, all optimized device models and the roof structure model are combined to generate a complete roof 3D scene model.

[0031] Preferably, in step S3, obtaining the project's geographical location coordinates; and performing sun trajectory analysis and ray tracing initialization according to the project's geographical location coordinates include: Get the project's geographic coordinates; perform latitude and longitude analysis on the project's geographic coordinates to obtain the standard project's geographic coordinates; Calculate the time zone based on the standard project geographic coordinates to obtain the project's local time zone parameters; Calculate the solar declination angle based on the project's local time zone parameters to obtain the solar declination angle data for the entire year; The solar altitude angle is calculated based on the solar declination angle data throughout the year and the standard project geographic coordinates to obtain the solar altitude angle time series data throughout the year; The azimuth angle is supplemented for the annual solar altitude angle time series data to obtain the complete solar trajectory angle data; Calculate the unit vector of the sun vector based on the complete sun trajectory angle data to obtain the sun ray direction vector data; Ray tracing is initialized based on the sunlight direction vector data and the complete roof 3D scene model to obtain the scene ray tracing parameters.

[0032] In this embodiment, Google Earth Pro software is used to locate the geographical location of the project. In the software, the address or longitude and latitude information of the project is entered through the search function, such as "39.9042°N, 116.4074°E" (assuming the project is located in Beijing). The software will automatically display the longitude and latitude coordinates of the location in the interface, and the user can record them as the geographical coordinates of the project. The obtained longitude and latitude coordinates are entered into the QGIS software. In QGIS, the "Coordinate Conversion" tool is used to convert the original longitude and latitude coordinates (such as "39.9042°N, 116.4074°E") into a standard geographical coordinate format (such as the WGS84 coordinate system). This tool will automatically parse the longitude and latitude information and convert it into a unified geographical coordinate format. In QGIS, the "Time Zone Calculation" plug-in is used to enter the standard project geographical coordinates. The plug-in will automatically calculate the local time zone parameters of the project location based on the geographical coordinates. For example, for the geographical coordinates of Beijing, the calculated local time zone parameters are UTC+8. The solar declination angle is calculated using MATLAB software. In MATLAB, load the local time zone parameters and call the "Calculate Solar Declination" function. This function calculates the solar declination data for each day of the year based on the input time zone parameters and date range (e.g., a 365-day year). The calculation results are output in a table format, including the date and the corresponding solar declination value. In MATLAB, use the "Calculate Solar Altitude" function to input the solar declination data for the entire year and the standard project geographic coordinates from step S3.2. This function calculates a time series of solar altitude data for each day and hour of the year based on the solar declination, geographic latitude, and time. In MATLAB, supplement the solar altitude data with azimuth. Use the "Calculate Solar Azimuth" function to calculate the corresponding solar azimuth based on the solar altitude and geographic coordinates. Combining the solar altitude and azimuth data yields complete solar path angle data, including both daily and hourly solar altitude and azimuth information. In MATLAB, use the "Calculate Solar Vector" function to calculate the unit vector in the direction of the sun's rays based on the complete solar path angle data. This function represents the direction of sunlight as a unit vector in three-dimensional space based on the sun's altitude and azimuth. The calculation results are stored in a matrix, with each row corresponding to a unit vector for the sun at a specific time point. Import the sunlight direction vector data into Blender. In Blender, use the "Ray Tracing Initialization" tool to combine the sunlight direction vector data with the previously constructed complete 3D roof scene model. Set ray tracing parameters, such as ray resolution and maximum number of reflections. After initialization, obtain the scene ray tracing parameters.

[0033] Preferably, performing ray tracing and shadow calculation based on scene ray tracing parameters in step S3 includes: The preset BVH acceleration structure is used to optimize the spatial index of the scene ray tracing parameters to obtain the accelerated ray tracing data structure. The spatial index optimization includes constructing a BVH structure in the form of a binary tree, where each leaf node contains no more than 10 triangles, reducing the time complexity of the ray-triangle intersection test from O(n) to O(n). n); Performing shadow generation on the accelerated ray tracing data structure to obtain roof shadow projection data, wherein the shadow generation includes performing a scene intersection test on each ray and recording the intersection point coordinates and intersection patch information; Perform depth sorting on the roof shadow projection data to obtain roof shadow depth buffer data; perform shadow boundary recognition on the roof shadow depth buffer data to obtain roof shadow outline boundary data; Expand the time dimension of the roof shadow outline boundary data to obtain shadow outline time series data; The shadow profile time series data are spatially and temporally fused to obtain the four-dimensional roof shadow impact domain data. The spatial-temporal fusion includes constructing a four-dimensional array of X, Y, Z, and T. Each array element records the shadow intensity value of the corresponding spatial position at a specific time. The impact domain resolution is 0.1 m × 0.1 m × 0.1 m × 15 minutes. Conduct annual shadow statistics on the four-dimensional roof shadow impact domain data to obtain annual shadow cumulative distribution data; Obtain the installation height parameters of photovoltaic modules; perform height correction on the annual shadow cumulative distribution data based on the installation height parameters of photovoltaic modules to obtain the spatiotemporal constraint data of roof shadows.

[0034] In this embodiment, the Cycles rendering engine of Blender software is used to import the roof 3D scene model and scene ray tracing parameters. In the rendering settings of Blender, the "BVH acceleration structure" option is enabled. Blender will automatically build a BVH (Bounding Volume Hierarchy) structure in the form of a binary tree to optimize the efficiency of ray tracing. Set the parameters of BVH, for example, the number of triangles contained in each leaf node does not exceed 10. Through the above steps, the time complexity of the intersection test between the ray and the triangle is reduced from O(n) to O(n). n). In Blender's Cycles rendering engine, the "Shadow Generation" function is used. This function performs a scene intersection test on each ray, recording the coordinates of the intersection points and intersection patches between the ray and the scene objects. Based on this intersection information, Blender generates roof shadow casting data and stores it as a shadow casting map. The shadow casting map records the shadow state of each pixel, including shadow depth and position information. In Blender, the generated shadow casting data is depth-sorted. The "Depth Buffer" function is used to sort each pixel in the shadow casting map by depth value, generating the roof shadow depth buffer data. The "Shadow Boundary Identification" tool is used to identify shadow outline boundaries. This tool detects discontinuities in the depth buffer data, extracts shadow outline boundaries, and generates shadow outline boundary data. In MATLAB, the shadow outline boundary data is time-extended. The shadow outline boundary data is combined with time information to generate shadow outline time series data. For example, at each time point (e.g., every hour), the shape and position of the shadow outline boundary are recorded. Through these steps, the shadow changes at different times of the day can be analyzed. In MATLAB, spatial-temporal fusion is performed on the shadow profile time series data. A four-dimensional array (X, Y, Z, T) is constructed, where X, Y, and Z represent spatial coordinates and T represents time. The impact domain resolution is set to 0.1 m × 0.1 m × 0.1 m × 15 minutes. Each array element records the shadow intensity value at the corresponding spatial location at a specific time (for example, 0 represents no shadow, and 1 represents complete shadow). Through these steps, four-dimensional roof shadow impact domain data is obtained. In MATLAB, annual shadow statistics are performed on the four-dimensional roof shadow impact domain data. Shadow intensity values ​​are counted for each day and time point throughout the year to generate annual shadow cumulative distribution data. This data records the cumulative shadow duration at each spatial location over the course of a year. For example, a location can have a cumulative shadow duration of 2000 hours throughout the year. In MATLAB, the installation height parameters of the photovoltaic modules are obtained (for example, the photovoltaic modules are installed 1 meter above the roof). Based on the installation height parameters, the annual shadow cumulative distribution data is height-corrected. By adjusting the height dimension of the shadow impact domain data, the shadow calculation results are consistent with the actual installation height of the photovoltaic modules. Ultimately, the spatiotemporal constraint data for roof shadows is obtained.

[0035] Preferably, step S4 includes the following steps: Step S41: identifying the boundary of the available area based on the complete three-dimensional roof scene model to obtain the boundary data of the available area of ​​the roof; Step S42: performing load-bearing partitioning on the roof available area boundary data to obtain roof load-bearing partition data; Step S43: performing uniform grid division on the roof load-bearing partition data to obtain the roof load-bearing partition basic grid; Step S44: collecting specification parameters of photovoltaic module products to obtain photovoltaic module specification parameters; performing module occupancy grid calculation on the roof load-bearing partition basic grid based on the photovoltaic module specification parameters to obtain module occupancy grid mapping data; Step S45: performing shadow occupancy filtering on the component occupancy grid mapping data according to the roof shadow spatiotemporal constraint data to obtain a roof effective layout grid; Step S46: performing series grouping constraint modeling on the effective rooftop layout grid to obtain electrical constraint parameters of the photovoltaic system; Step S47: Supplement the fire channel constraint with the electrical constraint parameters of the photovoltaic system to obtain complete layout constraint condition data; Step S48: Layout the photovoltaic modules based on the complete layout constraint data to obtain an optimal photovoltaic module layout solution.

[0036] In this example, a complete 3D roof scene model was opened using Blender. Within Blender, the "Boundary Recognition" plug-in was used, which automatically detects the usable area boundaries of the roof surface. By setting the boundary recognition threshold parameters (for example, setting the boundary recognition threshold for obstacles such as roof edges, parapets, and ventilation ducts to 0.1 meters), the plug-in automatically extracts the roof's usable area boundaries and outputs them as polygons. These polygons represent the roof's usable area boundary data. The roof's usable area boundary data was imported into Revit. Using Revit's "Structural Analysis" function, the roof was partitioned based on the building's structural design drawings and the roof's physical properties (such as the location and dimensions of beams and columns). Load-bearing zone parameters were set, for example, dividing the roof into a light-load zone (load-bearing capacity less than 100 kg / m2), a medium-load zone (100-200 kg / m2), and a heavy-load zone (greater than 200 kg / m2). Based on these parameters, Revit generated a roof load-bearing zone diagram, color-coded to distinguish each load-bearing zone, and output the load-bearing zone data. The roof load-bearing zone data was loaded using MATLAB software. In MATLAB, use the "Meshing" tool to create a uniform mesh for each load-bearing zone. Set the mesh size parameters, for example, each grid cell has a side length of 1 meter. MATLAB automatically generates a uniform mesh based on the load-bearing zone boundaries and size parameters, and assigns the corresponding load-bearing zone attributes to each grid cell. This results in the base mesh data for the roof's load-bearing zones. In PVsyst, import the PV module product specifications, such as module size (1.6 m x 0.98 m), power (300 W), and weight (18 kg). Based on these specifications, use PVsyst's "Module Layout" function to calculate the occupancy of each PV module within the base mesh of the roof's load-bearing zones. Set the minimum module spacing parameters (for example, 0.1 m between modules). PVsyst calculates the grid cells occupied by each module based on the module size and spacing requirements and generates a module occupancy grid map. MATLAB combines this module occupancy grid map with the roof's spatiotemporal shadow constraint data. In MATLAB, use the "Shadow Occlusion Filtering" function to filter the module occupancy grid based on the temporal and spatial distribution of the shadow data. Set filtering parameters, for example, marking a grid cell as unusable if it receives less than four hours of sunlight per day. MATLAB uses these parameters to remove shadowed grid cells, ultimately generating a valid rooftop layout grid. In MATLAB, model the valid rooftop layout grid using series grouping constraints. Use the Electrical Constraint Modeling tool to group valid layout grids based on the PV system's electrical design specifications (e.g., a limit of 20 modules in series and voltage and current ranges for each module group).Set grouping parameters, for example, grouping adjacent modules into groups. The number of modules in each group is adjusted based on the inverter's input requirements. MATLAB generates the electrical constraints for the PV system based on these parameters, including the connection method, voltage, and current ranges for each module group. Import the PV system electrical constraints and the effective roof layout grid into Revit. Using Revit's "Fire Escape Analysis" feature, supplement the layout grid with fire escape constraints based on building design codes and fire protection requirements (for example, a minimum fire escape width of 1.5 meters and prohibiting the placement of PV modules within the escape). Set the location and size parameters for the fire escape. Revit will automatically identify and mark the fire escape area and remove it from the effective layout grid. This results in complete layout constraint data. For detailed implementation of step S48, refer to the substeps of step S48.

[0037] It is particularly important that step S48 further includes the following steps: Step S481: constructing an objective function for the complete layout constraint condition data to obtain a photovoltaic layout optimization objective function; Step S482: configuring a solver for the photovoltaic layout optimization objective function to obtain particle swarm optimization parameters; performing solution space mapping on the particle swarm optimization parameters to obtain particle layout encoding data; Step S483: performing scheme quality evaluation on the particle layout encoding data to obtain particle fitness evaluation data; performing particle swarm evolution on the particle fitness evaluation data to obtain optimized iterative particle data; Step S484: performing a termination condition check on the optimized iterative particle data to obtain algorithm convergence state data; extracting the optimal solution based on the algorithm convergence state data to obtain the optimal component layout coordinates; Step S485: Acquire photovoltaic system electrical design specification data; perform cable path planning on the optimal component layout coordinates according to the photovoltaic system electrical design specification data to obtain an optimal photovoltaic component layout solution.

[0038] In this example, MATLAB software was used to load the complete layout constraint data. In MATLAB, the Symbolic Computation toolbox was used to define the objective function for photovoltaic layout optimization. The objective function includes maximizing the total power generation of photovoltaic modules, minimizing shading between modules, and satisfying constraints such as fire escape routes and load-bearing restrictions. For example, the weight for total power generation was set to 0.7, the weight for minimizing shading was set to 0.2, and the weight for constraint satisfaction was set to 0.1. By configuring these parameters, the photovoltaic layout optimization objective function was constructed. In MATLAB, the Particle Swarm Optimization (PSO) toolbox was used to configure the solver for this constructed photovoltaic layout optimization objective function. The PSO parameters were set, such as the number of particles to 50, the maximum number of iterations to 200, and the learning factor to 1.49445. The PSO parameters were mapped to the solution space, and the position and velocity of each particle were mapped to the effective rooftop layout grid, generating particle layout encoding data. Each particle's position represents a photovoltaic module layout solution, and its velocity indicates the direction and magnitude of the layout adjustment. The particle layout encoding data was then evaluated for solution quality in MATLAB. Use the "Fitness Evaluation" function to calculate the fitness value of each particle based on the PV layout optimization objective function. For example, a higher fitness value indicates a better layout solution. Evolve the particle swarm based on the fitness evaluation data. Set the particle swarm's evolutionary strategy, such as adopting a "global optimal" strategy, so that each particle adjusts its position and velocity based on its own experience and the global optimal experience. Through the above steps, optimize iterative particle data is obtained, gradually approaching the optimal layout solution. In MATLAB, perform termination condition testing on the optimized iterative particle data. Set termination condition parameters, such as when the change in fitness value is less than 0.01 over 20 consecutive iterations, the algorithm is considered converged. Based on the termination condition test results, extract the algorithm convergence status data. When the algorithm converges, select the particle with the highest fitness value from the particle swarm to obtain the optimal panel layout coordinates. These coordinates represent the optimal layout position of the PV panels while satisfying all constraints. Import the optimal panel layout coordinates and the PV system electrical design specification data into the PVsyst software. Using PVsyst's "Electrical Design" module, cable routing is planned for the optimal panel layout coordinates according to electrical design specifications (e.g., a maximum cable voltage drop of 5% and the inverter's input current range). Parameters for cable routing are set, such as the cable routing method (along the roof edge or under the beams) and cable specifications (selecting an appropriate cross-sectional area based on the current). PVsyst then generates the optimal cable routing based on these parameters and, combined with the panel layout, produces the final optimal PV panel layout.

[0039] Preferably, step S5 includes the following steps: Step S51: Initializing a three-dimensional rendering environment for the optimal photovoltaic module layout solution based on a preset WebGL graphics library to obtain WebGL rendering context data; Step S52: performing GPU data transmission on the complete rooftop 3D scene model to obtain rooftop scene GPU buffer data; Step S53: performing rendering pipeline configuration on the roof scene GPU buffer data using a preset shader to obtain a roof rendering shader; Step S54: performing batch rendering of component models for the optimal photovoltaic component layout solution to obtain photovoltaic component rendering instance data; Step S55: performing real-time shadow rendering on the roof shadow spatiotemporal constraint data based on the roof rendering shader to obtain roof dynamic shadow rendering data; Step S56: performing visual material configuration on the photovoltaic component rendering instance data according to the roof dynamic shadow rendering data to obtain photovoltaic system material rendering data; Step S57: Perform interactive visual rendering based on the photovoltaic system material rendering data to obtain a rooftop photovoltaic visual design solution.

[0040] In this embodiment, Three.js (a JavaScript 3D graphics library based on WebGL) is used to initialize the 3D rendering environment. An HTML page is created in the browser and the Three.js library is imported. A WebGL renderer is created by calling the newTHREE.WebGLRenderer() method and its parameters are set, such as antialias:true to enable antialiasing and alpha:true to allow a transparent background. The renderer's size is set to the size of the browser window and added to the page's DOM. Through these operations, the WebGL rendering context data is obtained. In Three.js, a complete roof 3D scene model is loaded (for example, in OBJ or GLTF format). The model file is loaded using THREE.OBJLoader or THREE.GLTFLoader and added to the scene. The renderer.setSize(window.innerWidth, window.innerHeight) method is called. Once the model is loaded, Three.js automatically transfers the model's geometry and material information to the GPU to generate GPU buffer data for the roof scene. In Three.js, a preset shader is used to configure the rendering pipeline for the GPU buffer data of the roof scene. By creating a custom THREE.ShaderMaterial, you define the vertex shader and fragment shader. For example, the vertex shader can be used to calculate vertex position and normal information, while the fragment shader can be used to calculate lighting and material color. These shaders are applied to objects in the scene to generate the roof rendering shader. By configuring shader parameters (such as light intensity and material reflectivity), you can batch render each photovoltaic module model in the optimal photovoltaic module layout in Three.js. Using the THREE.InstancedMesh class, you can instantiate the photovoltaic module models multiple times, setting the position and rotation of each instance based on the coordinate and orientation parameters in the layout. This allows you to efficiently render a large number of identical module models and generate photovoltaic module rendering instance data. This instance data is then rendered along with the roof scene to form a complete photovoltaic system layout. In Three.js, real-time shadow rendering is performed based on the roof's spatiotemporal shadow constraint data using the roof rendering shader. Create a THREE.DirectionalLight or THREE.SpotLight to simulate sunlight. Set the light source's direction based on the sun's directional vector data.Enable shadow mapping by calling renderer.shadowMap.enabled=true and setting the light's castShadow property to true to enable the light to cast shadows. By adjusting shadow mapping parameters (such as shadow map resolution and shadow hardness), high-quality, real-time shadow effects can be achieved, generating dynamic roof shadow rendering data. In Three.js, configure the visual material for the photovoltaic module rendering instance data based on the dynamic roof shadow rendering data. Use THREE.MeshStandardMaterial or THREE.MeshPhongMaterial to assign an appropriate material to the photovoltaic module model. For example, set a metal material (metalness: 0.8, roughness: 0.2) for metal photovoltaic modules and a diffuse material (metalness: 0, roughness: 0.8) for non-metallic modules. By adjusting material parameters such as color, reflectivity, and transparency, combined with shadow effects, realistic photovoltaic system material rendering data can be obtained. For the detailed implementation process of step S57, please refer to the substeps of step S57.

[0041] It is particularly important that step S57 further includes the following steps: Step S571: Perform multi-channel rendering on the photovoltaic system material rendering data to obtain photovoltaic material rendering buffer data; perform time dimension interactive mapping on the roof shadow spatiotemporal constraint data to obtain roof shadow time slider control data; Step S572: updating the shader parameters of the roof shadow time slider control data according to the photovoltaic material rendering buffer data to obtain the real-time lighting calculation data of the roof; Step S573: Obtain annual shadow cumulative distribution data; perform visual mapping on the annual shadow cumulative distribution data to obtain rooftop power generation thermal map data; Step S574: performing transparency mixed rendering on the rooftop power generation heat map data to obtain rooftop superimposed heat map rendering data; performing interactive object recognition on the photovoltaic component rendering instance data to obtain photovoltaic component interactive selection data; Step S575: performing position constraint verification on the photovoltaic module interactive selection data according to the real-time rooftop illumination calculation data to obtain photovoltaic module interactive constraint feedback data; Step S576: Evaluate the power generation of the rooftop superimposed thermal map rendering data based on the photovoltaic module interaction constraint feedback data to obtain photovoltaic system performance evaluation data; Step S577: Obtain the report export format requirement data; generate a report for the photovoltaic system performance evaluation data according to the report export format requirement data to obtain a rooftop photovoltaic visualization design plan.

[0042] In this example, Three.js and dat.GUI (a library for creating interactive controls) are used to implement multi-channel rendering and time-dimensional interaction. Using the render method of Three.js's WebGLRenderer, multi-channel rendering is performed on the photovoltaic system material rendering data, rendering data for the lighting channel, shadow channel, and material channel, respectively, to obtain photovoltaic material rendering buffer data. Using dat.GUI, a time slider control is created to map the time dimension of the roof shadow spatiotemporal constraint data to a slider range (e.g., from 0 to 24 hours). Users can control the shadow display time by dragging the slider, obtaining roof shadow time slider control data. In Three.js, shader parameters are dynamically updated based on the photovoltaic material rendering buffer data and the roof shadow time slider control data. By modifying parameters such as light intensity and shadow intensity in the fragment shader, the lighting effects of the roof at different times are calculated in real time based on the current value of the time slider. For example, when the time slider is at 12 noon, the light intensity reaches its maximum and the shadow is shortest; when it is at dusk, the light intensity decreases and the shadow becomes longer. Through these steps, real-time roof lighting calculation data is obtained, allowing users to visualize the lighting effects at different times in real time. D3.js, a JavaScript-based data visualization library, was used to visualize the annual shadow accumulation distribution data. The data was imported into D3.js, and a color mapping function (for example, longer shadow accumulation time corresponds to darker colors) was defined to map the shadow accumulation time at each spatial location to a color value. Using D3.js's geospatial visualization capabilities, these color values ​​were plotted on a two-dimensional rooftop surface to generate a rooftop power generation heat map. In Three.js, the rooftop power generation heat map data was rendered using blended transparency. By setting the material's transparency parameter (for example, material.opacity), the heat map was semi-transparently overlaid on the three-dimensional roof model, generating the rooftop overlay heat map rendering data. Furthermore, the Three.js Raycaster class was used to perform interactive object recognition on the photovoltaic panel rendered instance data. When the user hovered over or clicked a photovoltaic panel, the Raycaster detected the panel instance that intersected with the mouse position, generating the PV panel interactive selection data. In Three.js, the positional constraints of the PV panel interactive selection data were validated based on the real-time rooftop lighting calculation data. By checking whether the PV module selected by the user is located in a shadowed area (based on illumination calculation data), feedback data on the PV module interaction constraints is obtained. For example, if the user selects a module in the shadows, a prompt indicating that the module's power generation is low is provided, or the user is advised to select a module with better illumination. In Three.js, this feedback data is used to overlay rooftop heat map rendering data to evaluate power generation.By calculating the light intensity and shadowing of the user-selected PV module at different times and combining it with the module's power parameters, the power generation of the module is estimated. The power generation evaluation results are displayed on a heat map, for example by changing the module color or displaying the power generation value next to the module, to obtain PV system performance evaluation data. A report generation page is created using HTML5 and CSS3, incorporating Chart.js (a lightweight charting library) to present PV system performance evaluation data. The evaluation data is displayed on the page in the form of charts (such as bar charts and line charts), and an export function is provided, allowing users to export the report to PDF or image format. Users can select the report format and content using controls on the page. The corresponding report is generated based on the user's selection, resulting in a visual rooftop PV design plan.

[0043] Preferably, the present invention provides a rooftop photovoltaic visualization design system for executing the above-mentioned rooftop photovoltaic visualization design method, the rooftop photovoltaic visualization design system comprising: The data registration module is used to identify the boundary correspondence of the roof and obtain the roof boundary correspondence data; based on the roof boundary correspondence data, spatial data registration is performed to obtain the unified coordinate system roof space data; The 3D modeling module is used to voxelize the roof space data in the unified coordinate system to obtain the roof voxel occupancy status data; based on the roof voxel occupancy status data, a complete roof 3D scene model is constructed; The shadow analysis module is used to obtain the project's geographic coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic coordinates to obtain scene ray tracing parameters; perform ray tracing and shadow calculation based on the scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; The layout planning module is used to perform layout constraint analysis based on the complete roof 3D scene model to obtain complete layout constraint data; based on the complete layout constraint data, the PV module layout is performed to obtain the optimal PV module layout solution; The visualization rendering module is used to build a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; and perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

[0044] Preferably, the present invention further provides a computer-readable medium storing a program that can be loaded by a processor and execute the above-mentioned rooftop photovoltaic visualization design method.

[0045] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.

[0046] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.

Claims

1. A rooftop photovoltaic visualization design method, characterized in that: The following steps are involved: Step S1: Identify the boundary correspondence of the roof and obtain roof boundary correspondence data; Perform spatial data registration based on roof boundary correspondence data to obtain roof space data in a unified coordinate system; Step S2: voxelizing the unified coordinate system roof space data to obtain roof voxel occupancy status data; and constructing a complete roof 3D scene model based on the roof voxel occupancy status data. Step S3: Obtain the project's geographic location coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic location coordinates to obtain scene ray tracing parameters; Perform ray tracing and shadow calculation based on scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; Step S4: performing layout constraint analysis based on the complete rooftop three-dimensional scene model to obtain complete layout constraint condition data; performing photovoltaic module layout based on the complete layout constraint condition data to obtain an optimal photovoltaic module layout solution; Step S5: Construct a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

2. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Obtain a CAD drawing of a building structure; extract vector data from the CAD drawing of the building structure to obtain roof structure vector data; Step S12: Obtain equipment installation technical drawings; perform CAD entity recognition and analysis on the equipment installation technical drawings to obtain rooftop equipment layout vector data; Step S13: Obtaining roof laser point cloud scanning data; performing density uniform sampling on the roof laser point cloud scanning data to obtain standard density roof point cloud data; Step S14: extracting geometric features from the standard density roof point cloud data to obtain roof point cloud geometric feature data; Step S15: performing boundary line matching on the roof point cloud geometric feature data according to the roof structure vector data to obtain roof boundary correspondence data; Step S16: performing spatial data registration based on the rooftop equipment layout vector data and the rooftop boundary correspondence data to obtain unified coordinate system rooftop spatial data.

3. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: The voxelization processing of the unified coordinate system roof space data in step S2 includes: Calculate the spatial bounding box of the roof space data in the unified coordinate system to obtain the roof space range parameters; Adaptive voxel size calculation is performed based on the roof space range parameters to obtain the roof multi-level voxel parameters; Evaluate the equipment density of the roof space data in the unified coordinate system to obtain the roof equipment density distribution data; According to the roof equipment density distribution data, the roof multi-level voxel parameters are adjusted locally to obtain the roof voxel size distribution data; Based on the roof voxel size distribution data, the roof space data of the unified coordinate system is discretized into three-dimensional space to obtain the roof space voxel grid; Mark the occupancy status of the roof space voxel grid to obtain the roof voxel occupancy status data; Construct a complete rooftop 3D scene model based on rooftop voxel occupancy status data.

4. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: Constructing a complete rooftop 3D scene model based on rooftop voxel occupancy status data in step S2 includes: The octree data structure is used to construct a hierarchical index for the roof voxel occupancy status data to obtain the octree spatial index data; Perform isosurface extraction on the roof voxel occupancy status data to obtain the equipment surface triangular mesh; perform mesh smoothing on the equipment surface triangular mesh to obtain a smoothed equipment surface mesh; The smooth device surface mesh is spatially grouped according to the octree spatial index data to obtain device object segmentation data; The device object segmentation data is classified into device types to obtain device type annotation data; a multi-resolution model is generated for the device type annotation data to obtain a multi-level precision device model; Perform surface texture processing on the multi-level precision device model to obtain a texture mapping device model. The surface texture processing includes assigning a standard material texture to each device type. Metal devices use a metal material with a reflection coefficient of 0.3, and concrete structures use a rough material with a diffuse reflection coefficient of 0.

8. Verify the position accuracy of the texture mapping device model to obtain a position correction device model; collect rendering performance requirements for the position correction device model to obtain rendering performance optimization requirement data; The data structure of the position correction device model is encapsulated according to the rendering performance optimization requirement data to obtain a complete roof three-dimensional scene model.

5. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: In step S3, the project's geographic location coordinates are obtained; performing sun trajectory analysis and ray tracing initialization based on the project's geographic location coordinates includes: Get the project's geographic coordinates; perform latitude and longitude analysis on the project's geographic coordinates to obtain the standard project's geographic coordinates; Calculate the time zone based on the standard project geographic coordinates to obtain the project's local time zone parameters; Calculate the solar declination angle based on the project's local time zone parameters to obtain the solar declination angle data for the entire year; The solar altitude angle is calculated based on the solar declination angle data throughout the year and the standard project geographic coordinates to obtain the solar altitude angle time series data throughout the year; The azimuth angle is supplemented for the annual solar altitude angle time series data to obtain the complete solar trajectory angle data; Calculate the unit vector of the sun vector based on the complete sun trajectory angle data to obtain the sun ray direction vector data; Ray tracing is initialized based on the sunlight direction vector data and the complete roof 3D scene model to obtain the scene ray tracing parameters.

6. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: The ray tracing and shadow calculation based on the scene ray tracing parameters in step S3 include: The preset BVH acceleration structure is used to optimize the spatial index of the scene ray tracing parameters to obtain the accelerated ray tracing data structure. The spatial index optimization includes constructing a BVH structure in the form of a binary tree, where each leaf node contains no more than 10 triangles, reducing the time complexity of the ray-triangle intersection test from O(n) to O(n). n); Performing shadow generation on the accelerated ray tracing data structure to obtain roof shadow projection data, wherein the shadow generation includes performing a scene intersection test on each ray and recording the intersection point coordinates and intersection patch information; Perform depth sorting on the roof shadow projection data to obtain roof shadow depth buffer data; perform shadow boundary recognition on the roof shadow depth buffer data to obtain roof shadow outline boundary data; Expand the time dimension of the roof shadow outline boundary data to obtain shadow outline time series data; The shadow profile time series data are spatially and temporally fused to obtain the four-dimensional roof shadow impact domain data. The spatial-temporal fusion includes constructing a four-dimensional array of X, Y, Z, and T. Each array element records the shadow intensity value of the corresponding spatial position at a specific time. The impact domain resolution is 0.1 m × 0.1 m × 0.1 m × 15 minutes. Conduct annual shadow statistics on the four-dimensional roof shadow impact domain data to obtain annual shadow cumulative distribution data; Obtain the installation height parameters of photovoltaic modules; perform height correction on the annual shadow cumulative distribution data based on the installation height parameters of photovoltaic modules to obtain the spatiotemporal constraint data of roof shadows.

7. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: identifying the boundary of the available area based on the complete three-dimensional roof scene model to obtain the boundary data of the available area of ​​the roof; Step S42: performing load-bearing partitioning on the roof available area boundary data to obtain roof load-bearing partition data; Step S43: performing uniform grid division on the roof load-bearing partition data to obtain the roof load-bearing partition basic grid; Step S44: collecting specification parameters of photovoltaic module products to obtain photovoltaic module specification parameters; performing module occupancy grid calculation on the roof load-bearing partition basic grid based on the photovoltaic module specification parameters to obtain module occupancy grid mapping data; Step S45: performing shadow occupancy filtering on the component occupancy grid mapping data according to the roof shadow spatiotemporal constraint data to obtain a roof effective layout grid; Step S46: performing series grouping constraint modeling on the effective rooftop layout grid to obtain electrical constraint parameters of the photovoltaic system; Step S47: Supplement the fire channel constraint with the electrical constraint parameters of the photovoltaic system to obtain complete layout constraint condition data; Step S48: Layout the photovoltaic modules based on the complete layout constraint data to obtain an optimal photovoltaic module layout solution.

8. The rooftop photovoltaic visualization design method according to claim 1, characterized in that: Step S5 includes the following steps: Step S51: Initializing a three-dimensional rendering environment for the optimal photovoltaic module layout solution based on a preset WebGL graphics library to obtain WebGL rendering context data; Step S52: performing GPU data transmission on the complete rooftop 3D scene model to obtain rooftop scene GPU buffer data; Step S53: performing rendering pipeline configuration on the roof scene GPU buffer data using a preset shader to obtain a roof rendering shader; Step S54: performing batch rendering of component models for the optimal photovoltaic component layout solution to obtain photovoltaic component rendering instance data; Step S55: performing real-time shadow rendering on the roof shadow spatiotemporal constraint data based on the roof rendering shader to obtain roof dynamic shadow rendering data; Step S56: performing visual material configuration on the photovoltaic component rendering instance data according to the roof dynamic shadow rendering data to obtain photovoltaic system material rendering data; Step S57: Perform interactive visual rendering based on the photovoltaic system material rendering data to obtain a rooftop photovoltaic visual design solution.

9. A rooftop photovoltaic visualization design system, characterized in that: For executing the rooftop photovoltaic visualization design method according to claim 1, the rooftop photovoltaic visualization design system comprises: The data registration module is used to identify the boundary correspondence of the roof and obtain the roof boundary correspondence data; based on the roof boundary correspondence data, spatial data registration is performed to obtain the unified coordinate system roof space data; The 3D modeling module is used to voxelize the roof space data in the unified coordinate system to obtain the roof voxel occupancy status data; based on the roof voxel occupancy status data, a complete roof 3D scene model is constructed; The shadow analysis module is used to obtain the project's geographic coordinates; perform sun trajectory analysis and ray tracing initialization based on the project's geographic coordinates to obtain scene ray tracing parameters; perform ray tracing and shadow calculation based on the scene ray tracing parameters to obtain roof shadow spatiotemporal constraint data; The layout planning module is used to perform layout constraint analysis based on the complete roof 3D scene model to obtain complete layout constraint data; based on the complete layout constraint data, the PV module layout is performed to obtain the optimal PV module layout solution; The visualization rendering module is used to build a roof rendering shader based on the optimal photovoltaic module layout plan; perform real-time shadow rendering and visual material configuration based on the roof shadow spatiotemporal constraint data and the roof rendering shader to obtain photovoltaic system material rendering data; and perform interactive visualization rendering based on the photovoltaic system material rendering data to obtain a roof photovoltaic visualization design plan.

10. A computer-readable medium, characterized in that The device stores a program that can be loaded by a processor and execute the rooftop photovoltaic visualization design method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Automatic board distribution method and system for photovoltaic power station

    CN114913291A

  • Photovoltaic BIM roof automatic modeling method based on unmanned aerial vehicle oblique photography model

    CN116051771A

  • Automatic exploration method and system based on aerial photography of roof by unmanned aerial vehicle

    CN119002539A

  • Roof photovoltaic power station design stage pre-construction model construction method

    CN120088394A

  • Voxel-based approach for design models

    US20230297734A1