Multi-radiation source space electromagnetic field solving method and terminal based on space structure reconstruction

By analyzing and reconstructing the mesh model of the three-dimensional electromagnetic propagation scene, generating a sequence of triangular facets, constructing a BVH scene tree, and optimizing the electromagnetic ray traversal path, the problem of low computational efficiency in large-scale electromagnetic simulation is solved, and efficient electromagnetic simulation results are achieved.

CN122021060BActive Publication Date: 2026-06-26HEBEI UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEBEI UNIV OF SCI & TECH
Filing Date
2026-04-02
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

As the scale of electromagnetic simulation scenarios increases, the amount of computation increases significantly, resulting in excessively long simulation times, huge resource consumption, and difficulty in ensuring real-time performance.

Method used

A multi-radiation-source spatial electromagnetic field solution method based on spatial structure reconstruction is adopted. By analyzing and reconstructing the mesh model of the three-dimensional electromagnetic propagation scene, a sequence of triangular facets is generated, a BVH scene tree is constructed, the traversal path of electromagnetic rays is optimized, non-intersecting triangular facets are eliminated, and the traversal efficiency is improved by combining direction weight and area weighting methods.

Benefits of technology

The electromagnetic propagation path was optimized, the calculation time was shortened, the simulation accuracy and path coverage were improved, and the efficiency and robustness of electromagnetic simulation were enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021060B_ABST
    Figure CN122021060B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of electromagnetic simulation calculation, and provides a multi-radiation-source space electromagnetic field solving method and a terminal based on space structure reconstruction. The method comprises the following steps: analyzing a grid model of a three-dimensional electromagnetic propagation scene and converting the grid model into a triangular facet element set used for electromagnetic ray tracing; generating a one-dimensional triangular facet element sequence of the triangular facet element set according to the Morton coding of the center vector of each triangular facet element; clustering the triangular facet elements according to the geometric connection relationship between the triangular facet elements and reconstructing the order of the triangular facet elements in each cluster; constructing a BVH scene tree according to the reconstructed triangular facet element sequence, determining the triangular facet elements intersecting with the electromagnetic rays in the grid model according to the BVH scene tree, eliminating the triangular facet elements not intersecting with the electromagnetic rays, and determining the propagation path of the electromagnetic rays in the grid model and the electromagnetic field distribution. The application is more in line with the electromagnetic propagation direction characteristics, optimizes the traversal path, improves the traversal efficiency, and shortens the calculation time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electromagnetic simulation calculation technology, specifically to a method and terminal for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction. Background Technology

[0002] In electromagnetic simulation, ray tracing is widely used for tasks such as indoor and outdoor wireless communication coverage assessment, millimeter-wave link planning, electromagnetic environment prediction, and electromagnetic situation simulation because it can simulate complex electromagnetic effects such as multipath propagation, reflection, diffraction, and scattering. However, as the scale of the simulation scenario increases (such as high-density building complexes, complex indoor structures, mountainous and terrain environments, etc.), the computational load increases significantly, resulting in excessively long simulation times, huge resource consumption, and difficulty in guaranteeing real-time performance. Summary of the Invention

[0003] In view of this, the embodiments of this application provide a method and terminal for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction, which is more in line with the characteristics of electromagnetic propagation direction, optimizes the traversal path, improves traversal efficiency, and shortens the calculation time.

[0004] To achieve the above objectives, this application adopts the following technical solution:

[0005] Firstly, this application provides a method for solving the electromagnetic field of a multi-radiation source space based on spatial structure reconstruction, including:

[0006] The mesh model of the three-dimensional electromagnetic propagation scene is analyzed and converted into a set of triangular facets for electromagnetic ray tracing. The spatial position, normal vector and material properties of each triangular facet in the set are determined.

[0007] A one-dimensional sequence of triangles is generated based on the Morton code of the center vector of each triangle in the triangle set.

[0008] The triangular facets are clustered based on the geometric connections between them, and the order of the triangular facets within each cluster is reconstructed.

[0009] A BVH scene tree is constructed based on the reconstructed triangular element sequence. Based on the BVH scene tree, triangular elements that intersect with electromagnetic rays in the mesh model are determined, and triangular elements that do not intersect with electromagnetic rays are removed, thereby determining the propagation path of electromagnetic rays in the mesh model.

[0010] Based on the first aspect, in some embodiments, generating a one-dimensional sequence of triangular facets from the triangular facet set according to the Morton encoding of the center vector of each triangular facet in the triangular facet set includes:

[0011] For each triangular facet, calculate the geometric center c = (v1 + v2 + v3) / 3 and the area A = 1 / 2 × (v2 - v1) × (v3 - v2) ║ based on the three vertices v1, v2 and v3 of the triangular facet.

[0012] Calculate the product of the geometric center c and the area A of each triangular element in the triangular element set to obtain the center vector of each triangular element in the triangular element set;

[0013] The center vector of each triangle in the set of triangles is normalized and mapped to [0,1]. 3 The space is used to encode the normalized center vector using Morton coding to obtain the triangular element sequence of the triangular element set.

[0014] Based on the first aspect, in some embodiments, the step of clustering the triangular facets according to the geometric connection relationships between them and reconstructing the order of the triangular facets within each cluster includes:

[0015] Step 1: Determine the shared edge relationships and adjacency relationships between the triangular face elements;

[0016] Step 2: Randomly select a triangular facet from the triangular facet sequence as the starting triangular facet. Within the clustering window centered on the starting triangular facet, determine the target triangular facet that shares edge relationships and adjacency relationships with the starting triangular facet. Then, within the clustering window centered on the target triangular facet, determine the next target triangular facet that shares edge relationships and adjacency relationships with the target triangular facet, until no target triangular facets exist.

[0017] Step 3: Select unprocessed triangular facets from the triangular facet sequence as new starting triangular facets, and repeat Step 2 until all triangular facets in the triangular facet sequence have been clustered and reconstructed.

[0018] Based on the first aspect, in some embodiments, after clustering the triangular facets according to the geometric connection relationships between them and reconstructing the order of the triangular facets within each cluster, the method further includes:

[0019] The orientation weight of each triangular element is determined based on the normal vector between the main lobe direction of the electromagnetic ray emission source or receiving point and each triangular element.

[0020] The order of the reconstructed triangular facets is adjusted according to the directional weights of each triangular facet.

[0021] Based on the first aspect, in some embodiments, the orientation weight of the triangular facet element is: , Let represent the unit direction vector pointing from the emission source position to the center position of the i-th triangular element. This represents the main radiation direction vector of the emission source.

[0022] Based on the first aspect, in some embodiments, adjusting the order of the reconstructed triangular facets according to the orientation weights of each triangular facet includes:

[0023] Within each clustering window, the order of triangular facets with larger directional weights is adjusted forward, while the order of triangular facets with smaller directional weights is adjusted backward.

[0024] Based on the first aspect, in some embodiments, the step of constructing a BVH scene tree based on the reconstructed triangular element sequence includes:

[0025] Step 1: Calculate the surface area A' of the parent node's bounding box;

[0026] Step 2: Determine multiple partitioning positions based on the reconstructed triangular element sequence. Each partitioning position can divide all triangular elements into a first branch and a second branch. Calculate the surface area A1 of the bounding boxes of all triangular elements in the first branch and the surface area A2 of the bounding boxes of all triangular elements in the second branch. Calculate the partitioning cost C=C at each partitioning position. trav +(A1×N1+A2×N2) / A', the cost of finding the intersection of the triangles is 1, and C is the total cost of visiting the parent node and continuing to enter its child nodes for intersection testing. trav The cost of traversing the current parent node is given by N1, where N1 is the number of triangular facets in the first branch and N2 is the number of triangular facets in the second branch.

[0027] Step 3: Select the partitioning position with the minimum partitioning cost to divide all triangular elements into a first branch subset and a second branch subset, and construct child nodes;

[0028] Step 4: Repeat steps 1 to 3 until the number of triangular facets corresponding to the child nodes is less than the threshold.

[0029] Based on the first aspect, in some embodiments, determining the propagation path of electromagnetic rays in the mesh model includes:

[0030] Electromagnetic rays are emitted into the mesh model;

[0031] Starting from the root node of the BVH scene tree, perform a level-wise traversal. If the electromagnetic ray intersects the bounding box of a node in the BVH scene tree, recursively visit the child nodes of that node until a leaf node is reached and the triangular facets within the bounding box of that leaf node that intersect with the electromagnetic ray are calculated. If the electromagnetic ray does not intersect the bounding box of a node in the BVH scene tree, remove the triangular facets contained in that node and its child nodes. Repeat the process of determining whether the electromagnetic ray intersects the bounding box of a node in the BVH scene tree until the electromagnetic ray terminates or its energy decays below a threshold.

[0032] The geometry intersecting the electromagnetic ray in the mesh model is determined based on the triangular facets within the bounding box of the leaf node that intersect the electromagnetic ray, and the propagation path of the electromagnetic ray in the mesh model is determined based on the geometry intersecting the electromagnetic ray in the mesh model.

[0033] Based on the first aspect, in some embodiments, determining the electromagnetic field distribution of electromagnetic rays in the mesh model includes:

[0034] Discrete sampling points are obtained by dividing the space of the mesh model into grids.

[0035] For intersecting triangular elements, the interaction between the incident direction and the material interface is calculated based on the Fresnel effect to obtain multipath components including reflection, refraction and transmission, and the field strength contribution of electromagnetic rays propagating to each discrete sampling node is recorded in space.

[0036] The energy changes of multipath signals are accumulated and corrected, and the energy attenuation of rays during propagation is simulated by combining the propagation loss model to obtain the electromagnetic field distribution at each location.

[0037] Secondly, embodiments of this application provide a terminal, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the multi-radiation source spatial electromagnetic field calculation method based on spatial structure reconstruction as described in any of the first aspects above.

[0038] The beneficial effects of the embodiments of this application compared with the prior art include:

[0039] (1) The area weighting method is used to represent the center vector of the triangular element. The area weighted center vector is constructed. Unlike the traditional method that directly uses the geometric center, this processing can enhance the weight of triangular elements with larger areas in sorting and clustering. The triangular elements are encoded by Morton to generate a one-dimensional triangular element sequence. Triangular elements with spatially adjacent positions usually maintain a close order relationship in the Morton sequence, which is beneficial to the spatial clustering and hierarchical division in the subsequent BVH scene tree construction, so that the triangular elements present a good direction and positional continuous distribution after sorting.

[0040] (2) After Morton sorting, geometrically connected triangular facets are clustered together so that triangular facets sharing edges or vertices are arranged adjacently in the sequence. When constructing the BVH scene tree later, triangular facets in the same geometric region are more likely to fall into the same leaf node, making the bounding box of the node more compact. After the electromagnetic beam hits the bounding box, multiple intersection tests can be completed at once.

[0041] (3) Based on the main lobe direction of the transmitting source or receiving point, directional weights are introduced. The triangular element sequence is weighted and adjusted according to the degree of deviation of the triangular elements from the propagation direction. The optimized triangular element sequence is used in the BVH scene tree construction stage. A recursive partitioning strategy based on surface area heuristic (SAH) is adopted. By minimizing the node partitioning cost, the BVH scene tree is constructed layer by layer until the leaf nodes meet the preset termination conditions. While maintaining the SAH construction principle, this method makes the BVH structure more consistent with the spatial distribution characteristics under the main propagation direction of electromagnetic waves, thereby effectively improving the ray traversal efficiency and multipath coverage capability.

[0042] (4) Compared with the prior art, this application is more in line with the characteristics of electromagnetic propagation direction, optimizes the traversal path of BVH, improves traversal efficiency, and shortens the calculation time. In the four types of scenarios tested, this application has achieved performance improvement over the prior art, and can maintain good performance and robustness, and improves the accuracy and path coverage of electromagnetic simulation. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating the multi-radiation source space electromagnetic field calculation method based on spatial structure reconstruction provided in this application embodiment;

[0045] Figure 2 This is a schematic diagram of the BVH traversal principle provided in the embodiments of this application;

[0046] Figure 3a This is a schematic diagram of the cubic mesh model segmentation process provided in the embodiments of this application;

[0047] Figure 3b This is a schematic diagram of the cylindrical mesh model segmentation process provided in the embodiments of this application;

[0048] Figure 4aThis is a visualization of the classroom model provided in the embodiments of this application;

[0049] Figure 4b This is a visualization of a residential area model provided in an embodiment of this application;

[0050] Figure 4c This is a visualization of the school model provided in the embodiments of this application;

[0051] Figure 4d This is a visualization of the mountainous area model provided in the embodiments of this application;

[0052] Figure 5 This is an example diagram of triangular facet clustering construction provided in the embodiments of this application;

[0053] Figure 6a This is the electromagnetic ray bouncing tracking process in a school setting provided in the embodiments of this application;

[0054] Figure 6b This is the electromagnetic ray bouncing tracking process in a residential area scenario provided in the embodiments of this application;

[0055] Figure 7 These are classroom field strength coverage heat maps provided in the embodiments of this application. (a) is the field strength coverage heat map of BVH, and (b) is the field strength coverage heat map of this application.

[0056] Figure 8 These are the field strength coverage heat maps of residential areas provided in the embodiments of this application. (a) is the field strength coverage heat map of BVH, and (b) is the field strength coverage heat map of this application.

[0057] Figure 9 These are the school field strength coverage maps provided in the embodiments of this application. (a) is the field strength coverage heat map of BVH, and (b) is the field strength coverage heat map of this application.

[0058] Figure 10 These are field strength coverage maps of mountainous areas provided in the embodiments of this application. (a) is a field strength coverage heat map of BVH, and (b) is a field strength coverage heat map of this application.

[0059] Figure 11 This is a structural block diagram of the terminal provided in the embodiments of this application. Detailed Implementation

[0060] The present application will be described more clearly below with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the function of the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.

[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0062] See Figure 1 The multi-radiation source space electromagnetic field calculation method based on space structure reconstruction provided in this application includes the following steps:

[0063] Step 101: Analyze the mesh model of the three-dimensional electromagnetic propagation scene and convert it into a set of triangular facets for electromagnetic ray tracing.

[0064] Specifically, a three-dimensional electromagnetic propagation environment can be constructed, such as building complexes, indoor environments, and mountains, with the scene existing in the form of a mesh model. This mesh model is parsed and converted into a set of triangular facets for electromagnetic ray tracing. The spatial position, normal vector, and material properties of each triangular facet are calculated. The spatial position is used to construct the global bounding box and for spatial partitioning and cost evaluation in the subsequent BVH scene tree construction stage; please refer to the relevant content in step 104. The normal vector is used to determine the reflection, refraction, and scattering directions after the electromagnetic ray intersects with the triangular facet, and serves as an important feature in the direction-related BVH ranking and weighting strategy; please refer to the relevant content in step 103. The material properties are used to calculate the reflection coefficient, transmission coefficient, and energy attenuation parameters under different medium conditions after the electromagnetic ray hits the triangular facet, for constructing the subsequent BVH scene tree.

[0065] Step 102: Generate a one-dimensional sequence of triangles in the triangle set based on the Morton encoding of the center vector of each triangle in the triangle set.

[0066] In some embodiments, step 102 may include: for each triangular element, calculating the geometric center c = (v1 + v2 + v3) / 3 and the area A = 1 / 2 × (v2 - v1) × (v3 - v2) × 1 / 2 for the three vertices v1, v2, and v3 of the triangular element; calculating the product of the geometric center c and the area A for each triangular element in the set of triangular elements to obtain the center vector of each triangular element in the set of triangular elements; and normalizing and mapping the center vector of each triangular element in the set of triangular elements to [0,1]. 3 The space is used to encode the normalized center vector using Morton coding to obtain the triangular element sequence of the triangular element set.

[0067] This application uses an area-weighted method to represent the center vector of triangular facets, constructing an area-weighted center vector. Unlike traditional methods that directly use the geometric center, this process can enhance the weight of triangular facets with larger areas in sorting and clustering.

[0068] The global bounding box of the triangular element set is calculated as follows: the minimum and maximum values ​​of the center points of all triangular elements are counted along the three coordinate axes, and a minimum axis-aligned bounding box (AABB) is constructed based on the maximum and minimum values ​​to describe the extent of the entire scene in three-dimensional space.

[0069] Based on this, the center vectors of all triangular facets are normalized and mapped to... The space is then encoded using 64-bit Morton coding. Morton coding maps three-dimensional spatial coordinates to a one-dimensional integer sequence by interleaving the binary bits of each dimension, thus preserving as much of the original three-dimensional spatial proximity as possible in the one-dimensional sorting result. During bit quantization, each dimension of the coordinates is mapped to the interval [0, 2]. b -1] and round down to obtain integer coordinates. For example, suppose the center point of a triangular element has normalized spatial coordinates of (x, y, z) = (0.625, 0.25, 0.75). Quantizing it into 3-bit integer coordinates yields: x = 1002, y = 0012, z = 1012. By interleaving the binary bits of each dimension (x2y2z2x1y1z1x0y0z0), a corresponding one-dimensional Morton code can be generated: Morton(x,y,z) = 1010000112, thus mapping the triangular element to a position in a one-dimensional integer sequence. Under this encoding method, spatially adjacent triangular elements usually maintain a close order in the Morton sequence, which is beneficial for spatial clustering and hierarchical partitioning in subsequent BVH scene tree construction, ensuring that the triangular elements exhibit good directional and positional continuity after sorting.

[0070] Step 103: Cluster the triangular facets according to the geometric connection relationship between them, and reconstruct the order of the triangular facets within each cluster.

[0071] In the previous steps, although Morton encoding was used to encode the center vectors of triangular facets, ensuring that spatially adjacent triangular facets in the mesh model maintained a close order in the Morton sequence, it might result in geometrically connected triangular facets (e.g., sharing edges or vertices) not being adjacent in the Morton sequence. Therefore, after Morton sorting, geometrically connected triangular facets need to be clustered together, ensuring that triangular facets sharing edges or vertices are arranged consecutively in the sequence. This makes it more likely that triangular facets from the same geometric region will fall into the same leaf node when constructing the BVH scene tree, resulting in a tighter bounding box for the nodes. This allows multiple intersection tests to be completed simultaneously after an electromagnetic beam hits the bounding box.

[0072] In some embodiments, step 103 may include:

[0073] Step 1: Determine the shared edge relationships and adjacency relationships between the triangular face elements;

[0074] Step 2: Randomly select a triangular facet from the triangular facet sequence as the starting triangular facet. Within the clustering window centered on the starting triangular facet, determine the target triangular facet that shares edge relationships and adjacency relationships with the starting triangular facet. Then, within the clustering window centered on the target triangular facet, determine the next target triangular facet that shares edge relationships and adjacency relationships with the target triangular facet, until no target triangular facets exist.

[0075] Step 3: Select unprocessed triangular facets from the triangular facet sequence as new starting triangular facets, and repeat Step 2 until all triangular facets in the triangular facet sequence have been clustered and reconstructed.

[0076] Specifically, the shared edge relationships and adjacency relationships between triangular facets are determined as follows: for any two triangular facets, if one of their three edges consists of two identical vertices, then the two triangular facets are considered to have a shared edge relationship; if two triangular facets share at least one vertex, or their spatial distance is less than a preset threshold, then they are considered to have an adjacency relationship. Based on the above shared edge relationships and adjacency relationships, an adjacency graph structure of triangular facets is constructed, where nodes represent triangular facets and edges represent the geometric connections between facets.

[0077] The aforementioned preset threshold is the distance tolerance for triangular facet adjacency determination, used to supplement the identification of triangular facets that, due to sampling errors, modeling errors, or local minor gaps, do not form strict shared edge or shared vertex relationships but are still spatially closely adjacent. In this embodiment, the preset threshold is preferably 3% of the average side length of the triangular mesh. This is based on the fact that a threshold that is too small will miss actual adjacent facets, while a threshold that is too large will mistakenly connect non-adjacent facets. Therefore, a proportional threshold related to the average side length is used, allowing it to adaptively change with the mesh scale, thereby improving the robustness and accuracy of adjacency determination.

[0078] Based on the shared edge or adjacency relationships between triangular facets, spatially closely connected triangular facets are locally clustered. Within each cluster, the order of the triangular facets is reconstructed. Specifically, a fixed-size window is set, and one unselected triangular facet is selected as the starting facet to be added to the current cluster. Within the window, triangular facets with shared edge or adjacency relationships are recursively added to the same cluster until the expansion condition is no longer met, thus forming a cluster unit composed of spatially closely connected triangular facets. Multiple cluster units are obtained through the above method so that triangular facets with direct geometric relationships are arranged adjacently in the sequence, thereby reducing the bounding box slackness of BVH leaf nodes and intermediate nodes and improving structural compactness.

[0079] For example, suppose that after Morton sorting, the sequence of ten triangular facets is [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]. Select an unclustered triangular facet from the sequence as the starting facet, let's say T0, with a window size of 5. Based on the adjacency graph structure of the triangular facets, determine whether other triangular facets (T1 and T2) within the window centered on T0 share edges or are adjacent to the starting facet T0. For instance, if triangular facet T2 shares edges or is adjacent to the starting facet T0, then add triangular facet T2 to the cluster corresponding to the starting facet T0. Then, using the newly added triangular facet T2 as a reference, determine whether other triangular facets within the window centered on T2 share edges or are adjacent to triangular facet T2. For example, if triangle T4 and triangle T2 share an edge or are adjacent, then triangle T4 is added to the cluster corresponding to the starting triangle T0. This process is repeated until no connectable triangles are found within the window. For example, the current cluster will eventually be [T0, T2, T4].

[0080] Next, select an unclustered triangular element from the triangular element sequence as the starting element, such as T1, and repeat the previous step to perform a new clustering, assuming the final clustering is [T1, T3].

[0081] Next, select an unclustered triangular element from the triangular element sequence as the starting element, such as T5, and repeat the previous step to perform a new clustering, assuming the final clustering is [T5, T6, T8].

[0082] Next, select an unclustered triangular element from the triangular element sequence as the starting element, such as T7, and repeat the previous step to perform a new clustering, assuming the final clustering is [T7, T9].

[0083] Finally, the reconstructed sequence of the triangular facets is [T0, T2, T4, T1, T3, T5, T6, T8, T7, T9].

[0084] In some embodiments, after step 103, the method may further include: determining the orientation weight of each triangular element based on the normal vector between the main lobe direction of the electromagnetic ray emitting source or receiving point and each triangular element; adjusting the order of the reconstructed triangular elements according to the orientation weight of each triangular element; and using the adjusted triangular element sequence in step 104.

[0085] The directional weights of the triangular facets can be... , Let represent the unit direction vector pointing from the emission source position to the center position of the i-th triangular element. This represents the main radiation direction vector of the emission source. This value measures the alignment between the triangular element orientation and the main lobe orientation of the emission source. A smaller value indicates a more significant deviation between the triangular element orientation and the main lobe orientation. The order of the reconstructed triangular elements is adjusted according to their orientation weights, prioritizing elements with higher weights in the BVH construction. This ensures that ray traversal first visits regions that contribute more to propagation, thereby improving path coverage and overall tracking efficiency.

[0086] For example, the order of the reconstructed triangular facets can be adjusted according to the directional weights of each triangular facet. Specifically, within each clustering window, the order of triangular facets with larger directional weights is adjusted forward, and the order of triangular facets with smaller directional weights is adjusted backward.

[0087] For example, the reconstructed triangular facet order [T0, T2, T4, T1, T3, T5, T6, T8, T7, T9] can be divided into cluster 1: [T0, T2, T4], cluster 2: [T1, T3, T5], and cluster 3: [T6, T8, T7, T9]. Then, within each cluster, the order of the triangular facets is fine-tuned based on their directional weights. For instance, if the directional weight of T4 in cluster 1 is greater than that of T2, then cluster 1 is adjusted to [T0, T4, T2], without swapping triangular facets across clusters, ensuring that the order between clusters remains unchanged. If T2 and T4 are not in the same cluster, then even if the directional weight of T4 is greater than that of T2, they are not swapped. Finally, the fine-tuned orders within each cluster are merged to obtain a facet sequence that prioritizes directional weights while maintaining the original spatial adjacency order.

[0088] Step 104: Construct a BVH scene tree based on the reconstructed triangular element sequence; determine the triangular elements in the mesh model that intersect with the electromagnetic ray based on the BVH scene tree; remove the triangular elements that do not intersect with the electromagnetic ray; and determine the propagation path of the electromagnetic ray in the mesh model.

[0089] In some embodiments, constructing a BVH scene tree based on the reconstructed triangular element sequence may include:

[0090] Step 1: Calculate the surface area A' of the parent node's bounding box;

[0091] Step 2: Determine multiple partitioning positions based on the reconstructed triangular element sequence. Each partitioning position can divide all triangular elements into a first branch and a second branch. Calculate the surface area A1 of the bounding boxes of all triangular elements in the first branch and the surface area A2 of the bounding boxes of all triangular elements in the second branch. Calculate the partitioning cost C=C at each partitioning position. trav +(A1×N1+A2×N2) / A', assuming the cost of finding the intersection of the triangles is 1, C is the total cost of visiting the parent node and continuing to its child nodes for intersection testing. trav The cost of traversing the current parent node is given by N1, where N1 is the number of triangular facets in the first branch and N2 is the number of triangular facets in the second branch.

[0092] Step 3: Select the partitioning position with the minimum partitioning cost to divide all triangular elements into a first branch subset and a second branch subset, and construct child nodes;

[0093] Step 4: Repeat steps 1 to 3 until the number of triangular facets corresponding to the child nodes is less than the threshold.

[0094] Among them, C trav This only describes the basic overhead required for bounding box intersection detection when a ray visits the node, while C is the additional cost of geometric intersection calculations that may occur after the ray enters a child node.

[0095] For example, see Figure 2 Let's take a triangular element geometry consisting of six triangular elements, T1 to T6, as an example. Traverse these six triangular elements and find their minimum and maximum values ​​along the X, Y, and Z axes, forming a large axis-aligned bounding box. This bounding box is the root node. Calculate its surface area A' based on the length, width, and height of this bounding box.

[0096] Now, divide these six triangular facets into two groups, and determine the partitioning positions and partitioning axes (X, Y, Z axes) using the partitioning cost C. For the triangular facet sequence [T1, T2, T3, T4, T5, T6], candidate partitioning positions are usually placed between two adjacent triangular facets. Therefore, there are five candidate partitioning positions for each of the X, Y, and Z axes. Taking the X-axis as an example, sort the X-axis coordinates of each triangular facet in the sequence from smallest to largest, and then set five partitioning positions between two adjacent triangular facets. For example, the second partitioning position divides the six triangular facets into a left subset and a right subset, N. left =2, N right =4, calculate the surface area A of the bounding box formed by the two triangular elements in the left subset. left And the surface area A of the bounding box formed by the four triangular facets in the right subset. right . Put A, A left A right N left N right Substituting the values ​​into the formula for the partitioning cost C, we can obtain the partitioning cost. We then calculate the partitioning costs for the five candidate partitioning positions on the X-axis, Y-axis, and Z-axis. Based on the partitioning position with the minimum cost and the partitioning axis, we partition the triangular element sequence to obtain the left and right child nodes. For example, the partitioning position is between T2 and T3, and the partitioning axis is the X-axis.

[0097] If the number of triangular facets in a child node is less than a threshold, the child node is not further divided and is marked as a leaf node; otherwise, the child node is further divided according to the previous section until the number of triangular facets is less than the threshold. Finally, based on the triangular facet sequence [T1, T2, T3, T4, T5, T6], the following is generated: Figure 2 The BVH scene tree shown on the left. The threshold mentioned above is used to determine the stopping condition for leaf nodes in the BVH scene tree. When the number of triangular elements in a child node is already small, continuing to divide it, while potentially further reducing the surface area of ​​the child node's bounding box, also increases the level depth of the BVH tree and the traversal overhead of internal nodes. Stopping the division, however, only requires performing intersection tests on a small number of triangular elements within the leaf node. Therefore, this threshold strikes a balance between the "bounding box shrinkage benefit of continued division" and the "increased traversal overhead."

[0098] In this embodiment, the threshold is preferably set to 4, meaning that when the number of triangular facets in a child node is less than or equal to 4, further partitioning is stopped. When the number of triangular facets in a node is already small, the bounding box shrinkage benefit from further partitioning is limited, while the traversal overhead of the newly added internal nodes increases the overall cost. Conversely, when no more than 4 triangular facets are retained in a leaf node, the cost of intersection testing within the leaf node is low, which can better balance the depth of the BVH tree and the efficiency of intersection testing.

[0099] In some embodiments, the process of determining the triangular facets intersecting with electromagnetic rays in the mesh model based on the BVH scene tree, and removing triangular facets that do not intersect with electromagnetic rays, to determine the propagation path of electromagnetic rays in the mesh model, may include:

[0100] Electromagnetic rays are emitted into the mesh model;

[0101] Starting from the root node of the BVH scene tree, perform a level-wise traversal. If the electromagnetic ray intersects the bounding box of a node in the BVH scene tree, recursively visit the child nodes of that node until a leaf node is reached and the triangular facets within the bounding box of that leaf node that intersect with the electromagnetic ray are calculated. If the electromagnetic ray does not intersect the bounding box of a node in the BVH scene tree, remove the triangular facets contained in that node and its child nodes. Repeat the process of determining whether the electromagnetic ray intersects the bounding box of a node in the BVH scene tree until the electromagnetic ray terminates or its energy decays below a threshold.

[0102] The geometry intersecting the electromagnetic ray in the mesh model is determined based on the triangular facets intersecting the electromagnetic ray within the bounding box of the leaf node, and the propagation path of the electromagnetic ray in the mesh model is determined based on the geometry intersecting the electromagnetic ray in the mesh model.

[0103] Discrete sampling points are obtained by dividing the space of the mesh model into grids.

[0104] For intersecting triangular facets, the interaction between the incident direction and the material interface is calculated based on the Fresnel effect to obtain multipath components including reflection, refraction and transmission, and the field strength contribution of electromagnetic rays propagating to each discrete sampling node is recorded in space.

[0105] The energy changes of multipath signals are accumulated and corrected, and the energy attenuation of rays during propagation is simulated by combining the propagation loss model to obtain the electromagnetic field distribution at each location.

[0106] Specifically, the electromagnetic ray is first initialized and then emitted into the mesh model. Initialization includes energy distribution and configuration of electromagnetic parameters related to scene materials. The simulation frequency is set to 2.4 GHz. At the same time, the termination conditions of ray tracing are initialized, including setting the maximum reflection recursion depth k (i.e., the maximum number of reflections) and the minimum energy cutoff threshold.

[0107] The maximum reflection recursion depth k is used to limit the maximum number of reflections of a single electromagnetic ray in the scene. As the number of reflections increases, the propagation path of the electromagnetic ray grows continuously, and each reflection introduces additional reflection losses, thus gradually reducing the energy contribution of higher-order reflection paths. Simultaneously, higher-order reflections significantly increase the overhead of BVH scene tree traversal, triangular element intersection, and path calculation. Therefore, the maximum reflection recursion depth k is used to balance the accuracy of multipath propagation modeling with computational efficiency.

[0108] In this embodiment, the maximum reflection recursion depth k can be set to 2 to 5, preferably 3. In the 2.4GHz electromagnetic propagation scenario, the direct path and low-order reflection paths usually constitute the main energy contribution, while the higher-order reflection paths beyond the third order have a relatively small impact on the field strength distribution due to the accumulation of propagation loss and reflection loss. Therefore, setting k to 3 can better balance simulation accuracy and computational complexity.

[0109] The aforementioned minimum energy cutoff threshold is used to limit the continued propagation of electromagnetic rays with excessively low remaining energy during ray tracing. As electromagnetic rays attenuate during propagation, reflection, and material absorption, if their remaining energy falls below the preset threshold, it indicates that the ray's contribution to the final electromagnetic field distribution is minimal, and tracing its subsequent path can be terminated to reduce invalid calculations.

[0110] In this embodiment, the minimum energy cutoff threshold is preferably set to 10 to the power of negative cube of the initial ray energy. When the remaining energy of the ray decays to one-thousandth or less of the initial energy, its influence on the cumulative field strength at the receiving point is usually weak. However, the computational overhead of continuing BVH traversal, surface intersection, and reflection recursion calculation is relatively large. Therefore, setting the threshold to 10 to the power of negative cube of the initial ray energy can better balance the accuracy of the simulation results and the computational efficiency.

[0111] Secondly, a level-wise traversal is performed starting from the root node of the BVH scene tree. If the electromagnetic ray intersects the bounding box of a node in the BVH scene tree, the child nodes of that node are recursively visited until a leaf node is reached, and the triangular facets within the bounding box of that leaf node that intersect with the electromagnetic ray are calculated. If the electromagnetic ray does not intersect the bounding box of a node in the BVH scene tree, the triangular facets contained in that node and its child nodes are removed. Figure 2As shown. Repeatedly determine whether the bounding box of the electromagnetic ray intersects with the node of the BVH scene tree until the electromagnetic ray terminates or the electromagnetic ray energy decays below the threshold.

[0112] Next, discrete sampling points are obtained by meshing the scene according to its spatial size. These points are used to calculate and record the field strength of the ray propagating at the discrete sampling points. The discrete sampling points can be divided according to the spatial size of the mesh model to ensure that the field strength distribution can be captured completely and clearly. During the traversal of the BVH scene tree, when a ray intersects a triangular element, ray reflection, refraction, and transmission occur based on the Fresnel effect of the incident direction and the material interface, generating multiple new ray paths. At this time, the interaction between the incident direction and the material interface can be calculated based on the Fresnel effect to obtain multipath components including reflection, refraction, and transmission. The multipath components refer to each possible propagation path formed by the electromagnetic ray after encountering the geometry and its field strength. The field strength contribution of the electromagnetic ray propagating to each discrete sampling node is recorded in space. Each multipath component contributes a certain electromagnetic field strength to each discrete sampling point in space. By superimposing all components, the total field strength distribution at each point in space can be obtained.

[0113] Then, based on the laws of geometric optics, the new propagation direction of the secondary ray is calculated. A reflected or transmitted ray is generated starting from the current intersection point, and a recursive termination judgment is executed: if the current number of reflections is less than a preset value k and the reflected energy / transmitted energy is greater than the minimum energy cutoff threshold, the secondary ray continues to be tracked; otherwise, the path tracking is considered to have ended. There is a one-to-one correspondence between the triangular facets in the BVH scene tree and the geometry in the mesh model.

[0114] Finally, the energy changes of the multipath signal are accumulated and corrected, and the energy attenuation of the ray during propagation is simulated using a propagation loss model to obtain the electromagnetic field distribution at each location. The energy of the multipath signal is the total energy of the multipath components accumulated at the receiving point.

[0115] When a ray interacts with a geometric object, multiple multipath components are generated based on the material's reflectivity, transmittance, and refractive index. Each component travels along its propagation path to pre-defined discrete sampling nodes in space, contributing field strength to these nodes. If multiple paths reach the same discrete sampling point, the field strength at that point is superimposed in vector form. During the correction of the energy variation of the multipath signal, the field strength contribution of each path is adjusted based on free-space attenuation over the propagation distance, reflection / transmission loss, and material absorption, resulting in the corrected actual field strength. By performing the above accumulation and correction on all rays and multipath components, the electromagnetic field distribution of each sampling node in the entire space is finally obtained, and the energy accumulation of the multipath components reflects the intensity of the multipath signal.

[0116] During the propagation of electromagnetic rays, the attenuation of ray energy can be calculated step-by-step using a propagation loss model. First, as the ray propagates through space, its energy decreases with increasing propagation distance; a distance-dependent path loss model (e.g., attenuation proportional to the square of the distance) can be used to update the ray energy. Second, when the ray is reflected or transmitted through geometry in the scene, the ray energy is corrected based on the corresponding reflection or transmission coefficient. This coefficient is typically related to the angle of incidence and material electrical parameters (e.g., dielectric constant, conductivity).

[0117] During ray propagation, the energy of the current ray is updated through cumulative multiplication after each propagation or interaction, resulting in the energy attenuation along that path. For multi-path propagation, the electromagnetic field intensity distribution at that location is obtained by accumulating the energy of all effective ray paths reaching the same spatial location.

[0118] In this embodiment, to determine whether an electromagnetic ray intersects with the bounding box of a node, an existing ray bounding box intersection detection method can be used. Specifically, the electromagnetic ray is represented in parametric form as R(t) = O + tD, where O is the ray origin, D is the ray direction vector, and t is the ray propagation parameter. The bounding box of a BVH node is usually represented by an axis-aligned bounding box. By calculating the parameter range of the intersection points of the ray with the minimum and maximum boundary planes of the bounding box in the x, y, and z coordinate axes, the entry and exit parameter intervals of the ray on each axis are obtained. If the parameter intervals in the three coordinate axes overlap, it indicates that the ray passes through the bounding box in space, thus determining that the electromagnetic ray intersects with the bounding box of the node; otherwise, it is considered that the ray does not intersect with the bounding box. Since a leaf node may contain multiple triangular facets, it is necessary to sequentially perform intersection detection on all triangular facets in the node and record the intersection distances that meet the conditions. Finally, the triangular facet closest to the ray origin is selected as the actual intersection facet of the electromagnetic ray. During BVH traversal, child nodes or internal triangular elements are visited only when the ray intersects the current node's bounding box; otherwise, the node is skipped, thus reducing unnecessary geometric intersection calculations.

[0119] It should be noted that the propagation and multipath generation of electromagnetic rays do not occur within the BVH scene tree, but are determined by the interaction between the electromagnetic rays and specific triangular elements and their material models in the mesh model. The BVH scene tree serves only as a geometric hierarchy and computational acceleration structure, used to efficiently locate potential intersecting elements during electromagnetic ray propagation.

[0120] During electromagnetic ray propagation, whenever it's necessary to determine whether an electromagnetic ray intersects with geometry in the mesh model, the ray first undergoes a hierarchical traversal starting from the root node of the BVH (Bounding Volume Hierarchy). If the ray does not intersect the bounding box of a BVH node, all triangular facets contained in that node and its child nodes are directly discarded; if an intersection occurs, its child nodes are recursively visited until a leaf node is reached, where a precise ray-triangle intersection calculation is performed on the triangular facets. However, the BVH is only used to quickly determine the set of triangular facets that may intersect; the actual intersection determination and subsequent reflection, transmission, and diffraction behaviors are all based on physical calculations of the electromagnetic ray and specific facets and their electromagnetic material models. The purpose of the BVH scene tree is to reduce time complexity, but it does not participate in the electromagnetic propagation mechanism or multipath physical modeling process.

[0121] Based on the above scheme, this application embodiment also constructs multiple sets of comparative experiments to verify the method proposed in this application embodiment. Uniform and controllable electromagnetic material parameters are assigned to different types of scene structures to simulate the reflection, transmission, and absorption behavior of electromagnetic waves in a real environment. The refractive index, reflectivity, transmittance, and absorptivity of various materials are shown in Table 1.

[0122] Table 1 Electromagnetic Coefficient of Materials

[0123]

[0124] First, preconstruct network models for various scenarios. Four scenarios were selected: classroom, residential area, school, and mountainous area. Then, the network model was segmented into a triangular facet structure. The segmentation methods were as follows: First, by defining 8 vertices of a cube, each of the 6 rectangular faces was divided into 2 triangular faces, generating a total of 12 fixed faces. Second, a subdivision scheme was implemented using a meshing function to cut each facet along the XYZ axes with a custom number of segments. Each small rectangular unit was further divided into two triangular faces. The larger the number of segments, the finer the surface mesh. A specific subdivision example is provided. Figure 3a As shown; the cylinder is constructed with the center point as the reference, and the upper and lower bases are built at a height of h / 2. The coordinates of the corresponding vertices in the upper and lower circumferential directions are calculated based on the user-defined number of circumferential segments. The sidewall surface is discretized into multiple rectangular regions, and each region is further divided into two triangular facets along the diagonal to achieve the closure and smooth approximation of the sidewall. A specific example of the division is shown below. Figure 3b As shown.

[0125] After the partitioning was completed, the pyvista library in Python was used to visualize the classroom, residential area, school, and mountain scenes respectively, as shown in the following figures. Figures 4a to 4d As shown, see Table 2 for specific information about the scenario.

[0126] Table 2. Specific information on classroom, residential area, school, and mountainous scenes.

[0127]

[0128] In this embodiment, a globally axis-aligned bounding box is first constructed based on the position of the triangular facets, and the area of ​​the facets is calculated. Based on this, an area-weighted center vector is constructed as a spatial representation, and the facet centers are normalized and mapped to [0,1]. 3 The space is mapped from three-dimensional spatial locations to a one-dimensional sequence using 64-bit Morton coding. Based on this, a local clustering mechanism based on shared edges and adjacency relationships is introduced to reconstruct the Morton-sorted facet sequence, ensuring that spatially connected facets are arranged adjacently in the sequence. This reduces the relaxation of the BVH node bounding box and improves structural compactness, such as... Figure 5 The diagram illustrates triangular facet clustering. Further, direction-aware weights are introduced based on the main radiation direction of the emission source. The sequence is weighted and adjusted according to the degree of deviation of the facets from the propagation direction. The optimized facet sequence is input into the BVH construction stage. A recursive partitioning strategy based on surface area heuristic (SAH) is adopted. By minimizing the node partitioning cost, the BVH scene tree is constructed layer by layer until the leaf nodes meet the preset termination condition. This method, while maintaining the SAH construction principle, makes the BVH structure more consistent with the spatial distribution characteristics under the main propagation direction of electromagnetic rays, thereby effectively improving ray traversal efficiency and multipath coverage capability.

[0129] During the electromagnetic tracing phase, electromagnetic rays propagate as rays within the constructed 3D propagation scene. After originating from the emission source, the electromagnetic ray first performs a hierarchical traversal of the BVH scene tree to quickly locate potential intersecting surface elements. Once an intersection occurs, based on the material's electromagnetic parameters and incident conditions at the intersection point, and using Fresnel's formula and geometrical optics laws, it calculates multipath components such as reflection and transmission, and generates corresponding secondary rays, such as... Figure 2 As shown.

[0130] For secondary rays generated by reflection or transmission, the same tracking process is continued recursively. Each intersection is considered a "bounce," and the ray's propagation distance and energy attenuation are accumulated simultaneously. When the ray's recursion depth reaches the preset maximum number of reflections, or its energy attenuation falls below the minimum cutoff threshold, the current ray path is determined to terminate and no longer participates in subsequent tracking. Finally, by superimposing the field strength contributions of all valid ray paths that met the termination condition at discrete sampling points, the electromagnetic field distribution results at each location in the scene are obtained. Figure 6a and Figure 6b The electromagnetic ray bouncing tracking process was demonstrated in two scenarios: a school and a residential area.

[0131] In each scenario, taking the emission of 1000 electromagnetic rays as an example, the number of bounding box intersections, the number of triangular facet intersections, and the total tracking time were statistically recorded and compared with previous algorithms. Experimental results show that in all four scenarios, the embodiments of this application achieve better numerical performance in the above indicators, reducing the number of bounding box intersections and triangular facet intersections, and shortening the ray tracing time. Data comparison is shown in Table 3.

[0132] Table 3 Comparative Experimental Results

[0133]

[0134] Furthermore, to verify the stability and scalability of the invention under different ray scales, multiple sets of tests were conducted with the number of rays gradually increased from several thousand to tens of thousands. Reference indicators are statistically presented in the form of total time consumption; Tables 4 to 7 show the changes in simulation time as the number of rays increases under different scenarios.

[0135] Table 4. Simulation time variation with increasing number of ray bars in classroom scenario

[0136]

[0137] Table 5. Simulation time variation with increasing number of ray lines in residential area scenarios.

[0138]

[0139] Table 6. Simulation time variation with increasing number of ray lines in school scenario

[0140]

[0141] Table 7. Simulation time variation with increasing number of ray lines in mountainous scenes.

[0142]

[0143] The above data shows that, as the number of rays increases, the simulation time of this embodiment is always lower than that of the BinnedBVH algorithm and the SAH-BVH algorithm; and even when the scene scale changes, this embodiment can still achieve a shorter simulation time.

[0144] To evaluate the impact of scene structure and model size on algorithm performance, models with different numbers of triangle elements and spatial layouts were constructed under the same scene type for testing. The test results are shown in Tables 8 and 9.

[0145] Table 8 Comparison of test results for different numbers of triangles and spatial layouts in a classroom setting.

[0146]

[0147] Table 9 Comparison of test results for different numbers of triangles and spatial layouts in a school setting.

[0148]

[0149] Experimental results show that even with increased model size or more complex geometric distribution, the embodiments of this application can still maintain a low number of intersections and a short tracking time.

[0150] Finally, all experimental results were verified for consistency and validity, as shown in the error analysis data in Table 10. Figures 7 to 10 The image shows a partial electromagnetic coverage heatmap.

[0151] Table 10 Field Intensity Numerical Analysis Table

[0152]

[0153] Finally, the consistency and validity of the experimental results were verified. Each scene was divided into grids, and the field strength coverage of each sampling point was measured as follows: Figures 7 to 10 As shown, (a) is the field strength coverage heatmap of BVH, and (b) is the field strength coverage heatmap of this application. Figures 7 to 9 In the middle, the field strength changes from strong to weak, and the color gradually transitions from red to light purple. The field strength distribution of the two algorithms remains consistent. Figure 10 In the simulation, the field strength decreases from strong to weak, and the color gradually transitions from yellow to light. The field strength distributions of the two algorithms remain consistent. This demonstrates that the field strength distribution generated by the embodiments of this application is highly consistent with the field strength distribution of the theoretical model, verifying the consistency between the ray intersection determination results and the physical laws of electromagnetic propagation. It also proves that the embodiments of this application improve computational efficiency without affecting the correctness and reliability of the simulation results.

[0154] The embodiments of this application can be applied to wireless environment simulation in radar and microwave sensing simulation systems, smart city and digital twin platforms, and metaverse scenarios. Radar and microwave sensing simulation systems are used for multiple scattering path modeling, ground object echo prediction, and scene visualization simulation, significantly reducing computational overhead in large-scale terrain and city models. Smart city and digital twin platforms perform wireless coverage and channel simulation in city-level 3D models, providing an accelerated ray propagation module for digital twin environments. Wireless environment simulation in metaverse scenarios simulates real wireless propagation in virtual space, improving the consistency of the virtual experience and providing support for communication modeling of AR / VR devices.

[0155] The above-mentioned method for solving the electromagnetic field of a multi-radiation source based on spatial structure reconstruction has the following beneficial effects:

[0156] (1) The area weighting method is used to represent the center vector of the triangular element. The area weighted center vector is constructed. Unlike the traditional method that directly uses the geometric center, this processing can enhance the weight of triangular elements with larger areas in sorting and clustering. The triangular elements are encoded by Morton to generate a one-dimensional triangular element sequence. Triangular elements with spatially adjacent positions usually maintain a close order relationship in the Morton sequence, which is beneficial to the spatial clustering and hierarchical division in the subsequent BVH scene tree construction, so that the triangular elements present a good direction and positional continuous distribution after sorting.

[0157] (2) After Morton sorting, geometrically connected triangular facets are clustered together so that triangular facets sharing edges or vertices are arranged adjacently in the sequence. When constructing the BVH scene tree later, triangular facets in the same geometric region are more likely to fall into the same leaf node, making the bounding box of the node more compact. After the electromagnetic beam hits the bounding box, multiple intersection tests can be completed at once.

[0158] (3) Based on the main lobe direction of the transmitting source or receiving point, directional weights are introduced. The triangular element sequence is weighted and adjusted according to the degree of deviation of the triangular elements from the propagation direction. The optimized triangular element sequence is used in the BVH scene tree construction stage. A recursive partitioning strategy based on surface area heuristic (SAH) is adopted. By minimizing the node partitioning cost, the BVH scene tree is constructed layer by layer until the leaf nodes meet the preset termination conditions. While maintaining the SAH construction principle, this method makes the BVH structure more consistent with the spatial distribution characteristics under the main propagation direction of electromagnetic waves, thereby effectively improving the ray traversal efficiency and multipath coverage capability.

[0159] (3) Compared with the prior art, this application is more in line with the characteristics of electromagnetic propagation direction, optimizes the traversal path of BVH, improves traversal efficiency, and shortens the calculation time. In the four types of scenarios tested, this application has achieved performance improvement over the prior art, and can maintain good performance and robustness, and improves the accuracy and path coverage of electromagnetic simulation.

[0160] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0161] Figure 11 This is a schematic diagram of a terminal provided in an embodiment of the present invention. For example... Figure 11As shown, the terminal 300 in this embodiment includes a processor 310 and a memory 320. The memory 320 stores a computer program that can run on the processor 310, such as a multi-source spatial electromagnetic field calculation program based on spatial structure reconstruction. When the processor 310 executes the computer program, it implements the steps in the above-described embodiment of the multi-source spatial electromagnetic field calculation method based on spatial structure reconstruction, for example... Figure 1 As shown in 101 to 104.

[0162] The terminal 300 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal may include, but is not limited to, a processor 310 and a memory 320. Those skilled in the art will understand that... Figure 11 This is merely an example of terminal 300 and does not constitute a limitation on terminal 300. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.

[0163] The processor 310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0164] The memory 320 can be an internal storage unit of the terminal 300, such as a hard disk or memory of the terminal 300. The memory 320 can also be an external storage device of the terminal 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal 300. Furthermore, the memory 320 can include both internal storage units and external storage devices of the terminal 300. The memory 320 is used to store the computer program and other programs and data required by the terminal. The memory 320 can also be used to temporarily store data that has been output or will be output.

[0165] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction, characterized in that, include: The mesh model of the three-dimensional electromagnetic propagation scene is analyzed and converted into a set of triangular facets for electromagnetic ray tracing; A one-dimensional sequence of triangles is generated based on the Morton code of the center vector of each triangle in the triangle set. The triangular facets are clustered based on the geometric connections between them, and the order of the triangular facets within each cluster is reconstructed. A BVH scene tree is constructed based on the reconstructed triangular element sequence. Based on the BVH scene tree, triangular elements that intersect with electromagnetic rays in the mesh model are determined, and triangular elements that do not intersect with electromagnetic rays are removed. The propagation path and electromagnetic field distribution of electromagnetic rays in the mesh model are determined. The step of generating a one-dimensional sequence of triangular facets based on the Morton encoding of the center vector of each triangular facet in the triangular facet set includes: for each triangular facet, calculating the geometric center c = (v1 + v2 + v3) / 3 and the area A = 1 / 2 × (v2 - v1) × (v3 - v2) ║ for the three vertices v1, v2, and v3 of the triangular facet; calculating the product of the geometric center c and the area A for each triangular facet in the triangular facet set to obtain the center vector of each triangular facet in the triangular facet set; and normalizing and mapping the center vector of each triangular facet in the triangular facet set to [0, 1]. 3 The space is used, and Morton coding is used to encode the normalized center vector to obtain the triangular element sequence of the triangular element set; After clustering the triangular facets according to the geometric connection relationship between them and reconstructing the order of the triangular facets within each cluster, the method further includes: determining the orientation weight of each triangular facet based on the normal vector between the main lobe direction of the electromagnetic ray emission source or receiving point and each triangular facet; and adjusting the order of the reconstructed triangular facets according to the orientation weight of each triangular facet.

2. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 1, characterized in that, The step of clustering triangular facets based on their geometric connections and reconstructing the order of the triangular facets within each cluster includes: Step 1: Determine the shared edge relationships and adjacency relationships between the triangular face elements; Step 2: Randomly select a triangular facet from the triangular facet sequence as the starting triangular facet. Within the clustering window centered on the starting triangular facet, determine the target triangular facet that shares edge relationships and adjacency relationships with the starting triangular facet. Then, within the clustering window centered on the target triangular facet, determine the next target triangular facet that shares edge relationships and adjacency relationships with the target triangular facet, until no target triangular facets exist. Step 3: Select unprocessed triangular facets from the triangular facet sequence as new starting triangular facets, and repeat Step 2 until all triangular facets in the triangular facet sequence have been clustered and reconstructed.

3. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 1, characterized in that, The orientation weights of the triangular facets are , Let represent the unit direction vector pointing from the emission source position to the center position of the i-th triangular element. This represents the main radiation direction vector of the emission source.

4. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 3, characterized in that, The step of adjusting the order of the reconstructed triangular facets according to the directional weights of each triangular facet includes: Within each clustering window, the order of triangular facets with larger directional weights is adjusted forward, while the order of triangular facets with smaller directional weights is adjusted backward.

5. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 1, characterized in that, The step of constructing a BVH scene tree based on the reconstructed triangular element sequence includes: Step 1: Calculate the surface area A' of the parent node's bounding box; Step 2: Determine multiple partitioning positions based on the reconstructed triangular element sequence. Each partitioning position can divide all triangular elements into a first branch and a second branch. Calculate the surface area A1 of the bounding boxes of all triangular elements in the first branch and the surface area A2 of the bounding boxes of all triangular elements in the second branch. Calculate the partitioning cost C=C at each partitioning position. trav +(A1×N1+A2×N2) / A', the cost of finding the intersection of the triangles is 1, and C is the total cost of visiting the parent node and continuing to enter its child nodes for intersection testing. trav The cost of traversing the current parent node is given by N1, where N1 is the number of triangular facets in the first branch and N2 is the number of triangular facets in the second branch. Step 3: Select the partitioning position with the minimum partitioning cost to divide all triangular elements into a first branch subset and a second branch subset, and construct child nodes; Step 4: Repeat steps 1 to 3 until the number of triangular facets corresponding to the child nodes is less than the threshold.

6. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 5, characterized in that, Determining the propagation path of electromagnetic rays in the mesh model includes: Electromagnetic rays are emitted into the mesh model; Starting from the root node of the BVH scene tree, perform a level-wise traversal. If the electromagnetic ray intersects the bounding box of a node in the BVH scene tree, recursively visit the child nodes of that node until a leaf node is reached and the triangular facets within the bounding box of that leaf node that intersect with the electromagnetic ray are calculated. If the electromagnetic ray does not intersect the bounding box of a node in the BVH scene tree, remove the triangular facets contained in that node and its child nodes. Repeat the process of determining whether the electromagnetic ray intersects the bounding box of a node in the BVH scene tree until the electromagnetic ray terminates or its energy decays below a threshold. The geometry intersecting the electromagnetic ray in the mesh model is determined based on the triangular facets within the bounding box of the leaf node that intersect the electromagnetic ray, and the propagation path of the electromagnetic ray in the mesh model is determined based on the geometry intersecting the electromagnetic ray in the mesh model.

7. The method for solving the spatial electromagnetic field of multiple radiation sources based on spatial structure reconstruction according to claim 6, characterized in that, Determining the electromagnetic field distribution of electromagnetic rays in the mesh model includes: Discrete sampling points are obtained by dividing the space of the mesh model into grids. For intersecting triangular facets, the interaction between the incident direction and the material interface is calculated based on the Fresnel effect to obtain multipath components including reflection, refraction and transmission, and the field strength contribution of electromagnetic rays propagating to each discrete sampling node is recorded in space. The energy changes of multipath signals are accumulated and corrected, and the energy attenuation of rays during propagation is simulated by combining the propagation loss model to obtain the electromagnetic field distribution at each location.

8. A terminal comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the multi-radiation source space electromagnetic field calculation method based on spatial structure reconstruction as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • CN115205454A

  • CN116310108A