A method and system for optimizing virtual environment view layout
By using an adaptive region partitioning and hybrid optimization framework, the occlusion problem of view layout in virtual reality environments is solved, enabling efficient view layout optimization in complex scenes and improving user experience and visual coherence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI QIUSHI INST OF ADVANCED STUDIES
- Filing Date
- 2026-02-11
- Publication Date
- 2026-04-21
AI Technical Summary
In virtual reality and augmented reality environments, traditional two-dimensional layout methods are difficult to adapt to the dynamic changes of complex three-dimensional scenes, leading to visual confusion and information overload. Existing occlusion management interaction technologies have limitations, and how to avoid occlusion between views during the view layout stage is an important issue.
An adaptive region division mechanism is adopted, which integrates key information in the virtual scene through graph structure and divides it into sparse and dense regions. The force-oriented model of physical simulation and numerical optimization technology are used to optimize them respectively. Combined with dynamic adjustment layout strategy, the view position changes are monitored in real time to ensure that the layout conforms to the visual transition design of human cognitive psychology.
It achieves balanced resource consumption in complex scenarios, improves the layout quality of local areas, reduces user attention distraction, optimizes user experience, and ensures the real-time nature and visual consistency of view layout.
Smart Images

Figure CN121723876B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of view layout optimization, and specifically relates to a method and system for optimizing the view layout of a virtual environment. Background Technology
[0002] In virtual reality (VR) and augmented reality (AR) environments, information visualization is one of the core factors influencing user experience. The human visual system boasts the strongest signal processing capability among all sensory organs, with over 50% of the human brain's function dedicated to visual information processing, making it the primary channel for information acquisition. However, human visual processing memory is limited, often requiring external aids to enhance cognitive efficiency. Over the past two centuries, graphics and images have become crucial tools for human understanding and communication. Visualization technologies help users understand complex information more efficiently by constructing cognitive maps, and with the increasing scale, dimensionality, and dynamism of data, visual analytics is gradually becoming an important method for addressing the challenges of big data.
[0003] Virtual reality (VR) is a technology that uses computer simulation systems to simulate the external environment, providing users with a multi-information, three-dimensional, dynamic, and interactive simulation experience. Relying on hardware and sensing technologies, it uses real-time rendering to create a more immersive and realistic virtual experience. The development of virtual reality technology is a rapidly changing field, with new advancements and innovations constantly emerging.
[0004] Immersive visualization aims to leverage human perception and operational capabilities through the immersive and engaging experience provided by interactive interfaces, supporting data analysis, reasoning, and decision-making. Currently, immersive visualization technology is widely used in various fields such as gaming, education, healthcare, and the military. In immersive visual analysis, the user's visualization environment transforms from a two-dimensional space to a three-dimensional space. How to effectively display the vast amounts of information in three dimensions becomes a crucial problem to be solved. Traditional two-dimensional layout methods often have significant limitations and shortcomings when applied to three-dimensional space, thus necessitating new view layout strategies to enhance the sense of context and improve the user's visual analysis experience. Traditional methods typically employ fixed positions or simple avoidance strategies, which struggle to adapt to the dynamic changes in complex three-dimensional scenes, easily leading to visual confusion and information overload. Especially in professional fields such as medical visualization, industrial maintenance guidance, and geographic information systems, efficient view management is paramount. While existing occlusion management interaction technologies have made some progress, they still have limitations. Therefore, how to consider avoiding occlusion between views during the view layout stage is a new research hotspot. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a virtual environment view layout optimization method and system to solve the technical problems in the prior art.
[0006] In a first aspect, the present invention provides the following technical solution: a method for optimizing the layout of a virtual environment view, comprising:
[0007] Collect key information from all views in the virtual scene and integrate the key information into a graph structure;
[0008] Based on the graph structure, the virtual scene is divided into several feature regions, which include sparse regions and dense regions.
[0009] The sparse region is optimized using a force-guided model based on physical simulation to output the target position of the view;
[0010] An objective function is constructed for the dense region and iteratively solved based on numerical optimization techniques to output the target position of the view;
[0011] The system monitors changes in the target position of a view in a virtual scene in real time and dynamically adjusts the layout strategy. It iterates and repeats the layout optimization process by replacing the key information of the view with the target position of the view and combining the layout strategy to output the final layout scheme.
[0012] Compared to existing technologies, the beneficial effects of this invention are as follows: This invention adopts an adaptive region partitioning mechanism, which can dynamically adjust the allocation of computing resources according to the complexity of the scene, making the algorithm applicable to scenes of various scales while still balancing resource consumption. At the same time, it uses a hybrid optimization framework to improve the layout quality of local areas while ensuring real-time performance, enabling the algorithm to still have excellent performance in complex scenes. Furthermore, it conforms to the visual transition design of cognitive psychology, reducing user attention distraction caused by view jumps and optimizing user experience. Specifically, this invention firstly analyzes the spatial distribution characteristics of the view in real time through dynamic scene perception technology, automatically identifying high-conflict areas and low-density areas; secondly, it adopts a partitioning optimization strategy, using a lightweight physical simulation algorithm to quickly arrange sparse areas, and applying precise numerical optimization methods to solve complex occlusion problems in dense areas; finally, it introduces a visual coherence maintenance mechanism, ensuring that layout changes conform to human cognitive expectations through smooth transition animations and dynamic priority adjustments.
[0013] Preferably, the step of collecting key information from all views in the virtual scene and integrating the key information into a graph structure includes:
[0014] By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes, ;
[0015] Record the display width of the view. and height And determine the hierarchy parameters of the view. ;
[0016] The center coordinates, display width, height, and layer parameters are normalized, and a five-dimensional feature vector is constructed. ;
[0017] Based on the five-dimensional feature vectors, an axially aligned bounding box is constructed for each view, and a bidirectional mapping table between vertex indices and view objects is established;
[0018] For each view, based on the bidirectional mapping table. Execute range query and determine neighboring views Based on the neighboring view Determine edge weights :
[0019] ;
[0020] ;
[0021] ;
[0022] In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient.
[0023] Each view is treated as a vertex, and the intersection of the axially aligned bounding boxes between views is used as an edge. Spatial indexing and graph structure construction based on vertices, edges, and edge weights.
[0024] Preferably, the step of dividing the virtual scene into several feature regions based on the graph structure, wherein the feature regions include sparse regions and dense regions, includes:
[0025] Statistical analysis of each view node in the graph structure The number of nodes in the neighborhood is used as a density coefficient. And determine the degree centrality of each view node. Betweenness centrality ;
[0026] Based on the density coefficient Degree centrality Betweenness centrality Determine the set of views with topological features;
[0027] The virtual scene is divided using Delaunay triangulation to obtain several sub-regions;
[0028] If the average density coefficient of the sub-region Less than the density threshold If the average density coefficient of the subregion is sparse, then the subregion is a sparse region. Not less than the density threshold If so, then the sub-region is a dense region.
[0029] Preferably, the step of optimizing the sparse region using a physically simulated force-guided model to output the target position of the view includes:
[0030] Calculate the sum of the repulsive forces between the view within the sparse region and other views. :
[0031] ;
[0032] In the formula, The repulsion coefficient is... For this view to the The distance between views;
[0033] Calculate the gravitational pull between the view within the sparse region and the corresponding 3D model reference point. :
[0034] ;
[0035] In the formula, The gravitational coefficient, This is the distance between the view and the corresponding 3D model reference point.
[0036] Sum of the repulsive forces With the gravity We will perform weighted fusion to obtain a combined force. :
[0037] ;
[0038] In the formula, As the first weight, As the second weight;
[0039] use The algorithm iterates based on the current layout and the combined force until the average displacement of all views is less than a preset threshold or the maximum number of iterations is reached. Then, the current layout state is output to obtain the target position of the view.
[0040] Preferably, the step of constructing an objective function for the dense region and iteratively solving it based on numerical optimization techniques to output the target position of the view includes:
[0041] Construct the objective function based on the view of the dense region:
[0042] ;
[0043] In the formula, , , They are the first factor, the second factor, and the third factor, respectively. The pixel-level overlap area between the current view and other surrounding views. For changes in direction angle, Penalize the Euclidean distance between the view and the original position;
[0044] The nonlinear occlusion and angle constraints in the objective function are transformed into a sequential quadratic programming subproblem. At each iteration point... The constraints are linearized to generate a locally quadratic approximation objective, which is then solved by solving the QP subproblem. Determine the search direction ,in, This is a quasi-Newton approximation of the Hessian matrix. The gradient vector;
[0045] Determine the iteration step size :
[0046] ;
[0047] In the formula, The initial step size, This is the rate adjustment coefficient. This represents the number of iterations.
[0048] Based on the local quadratic approximation target and search direction and the iteration step size The objective function is solved iteratively until the iteration stopping condition is met, and the solution of the objective function is output as the target position of the view.
[0049] Preferably, the step of real-time monitoring of changes in the target position of the view in the virtual scene and dynamically adjusting the layout strategy includes:
[0050] An animation controller is built and an animation trajectory recorder is established for each view. The coordinates of the target position of the view before and after adjustment are accurately stored. A double buffering mechanism is adopted and the animation duration is automatically shortened when a drastic change in view is detected to ensure response speed.
[0051] A smooth transition for the view is achieved based on physical laws. The view displacement of each frame is calculated through nonlinear interpolation smoothing motion, and the interpolation speed is adjusted according to the view movement distance and the speed of view change.
[0052] Implement a dynamic optimization mechanism for the view based on user attention, establish a heatmap to record the heat value of each screen area, and adjust the refresh rate according to the heat value.
[0053] Secondly, the present invention provides the following technical solution: a virtual environment view layout optimization system, the system comprising:
[0054] The integration module is used to collect key information from all views in the virtual scene and integrate the key information into a graph structure.
[0055] A segmentation module is used to divide the virtual scene into several feature regions based on the graph structure, wherein the feature regions include sparse regions and dense regions.
[0056] The first optimization module is used to optimize the sparse region using a force-guided model based on physical simulation, so as to output the target position of the view.
[0057] The second optimization module is used to construct an objective function for the dense region and iteratively solve it based on numerical optimization techniques to output the target position of the view.
[0058] The output module is used to monitor changes in the target position of the view in the virtual scene in real time and dynamically adjust the layout strategy. It iteratively repeats the layout optimization process by replacing the target position of the view with the key information of the view and combining the layout strategy to output the final layout scheme.
[0059] Specifically, the integration module is used for:
[0060] By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes, ;
[0061] Record the display width of the view. and height And determine the hierarchy parameters of the view. ;
[0062] The center coordinates, display width, height, and layer parameters are normalized, and a five-dimensional feature vector is constructed. ;
[0063] Based on the five-dimensional feature vectors, an axially aligned bounding box is constructed for each view, and a bidirectional mapping table between vertex indices and view objects is established;
[0064] For each view, based on the bidirectional mapping table. Execute range query and determine neighboring views Based on the neighboring view Determine edge weights :
[0065] ;
[0066] ;
[0067] ;
[0068] In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient.
[0069] Each view is treated as a vertex, and the intersection of the axially aligned bounding boxes between views is used as an edge. Spatial indexing and graph structure construction based on vertices, edges, and edge weights.
[0070] Thirdly, the present invention provides the following technical solution: a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the virtual environment view layout optimization method as described above.
[0071] Fourthly, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the virtual environment view layout optimization method as described above. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1 A flowchart of the virtual environment view layout optimization method provided in Embodiment 1 of the present invention;
[0074] Figure 2 This is a comparison diagram of the layout optimization before and after the optimization provided in Embodiment 1 of the present invention;
[0075] Figure 3 This is a structural block diagram of the virtual environment view layout optimization system provided in Embodiment 2 of the present invention;
[0076] Figure 4 This is a schematic diagram of the hardware structure of a computer provided for another embodiment of the present invention.
[0077] The embodiments of the present invention will be further described below with reference to the accompanying drawings. Detailed Implementation
[0078] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.
[0079] Example 1
[0080] In Embodiment 1 of the present invention, as Figure 1 As shown, a virtual environment view layout optimization method includes:
[0081] S1. Collect key information from all views in the virtual scene and integrate the key information into a graph structure;
[0082] Step S1 includes:
[0083] S11. By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes. ;
[0084] Specifically, the process of extracting key information involves building a view space attribute matrix. Using a structured data representation method, the geometric attributes of all visualized views are first obtained through a scene traversal algorithm. For each view object... Accurately extract the center coordinates of its two-dimensional projection plane. The coordinates are calculated through a viewpoint matrix transformation to ensure spatial consistency under different viewing angles.
[0085] S12. Record the display width of the view. and height And determine the hierarchy parameters of the view. ;
[0086] Specifically, record the display width of the view. and height These size information, after DPI adaptation and visual importance weighting, reflect the actual display requirements of the view in the current view, and the hierarchy parameters. The dynamic priority calculation model is used to determine the priority, taking into account factors such as the semantic importance of the view, the user interaction status, and the business logic weight.
[0087] S13. Normalize the center coordinates, display width, height, and layer parameters, and construct a five-dimensional feature vector. ;
[0088] Specifically, after the basic attributes are normalized, they are processed according to... The sequence is constructed into a five-dimensional feature vector, where the coordinates and size parameters are represented by relative values in view space (range [0,1]) to adapt to display devices with different resolutions.
[0089] S14. Construct an axially aligned bounding box for each view based on the five-dimensional feature vector, and establish a bidirectional mapping table between vertex indices and view objects.
[0090] S15. For each view, according to the bidirectional mapping table... Execute range query and determine neighboring views Based on the neighboring view Determine edge weights :
[0091] ;
[0092] ;
[0093] ;
[0094] In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient.
[0095] Among them, based on view feature vectors The spatial coordinates and dimensions of the data are used to construct a precise axially aligned bounding box for each view, establish a bidirectional mapping table, and maintain the real-time correspondence between vertex indices and view objects for each view. Execute a range query to find its neighboring views. Each neighboring view retrieved is paired with... Calculate the Euclidean distance between the center points of the two views. Calculate the size-normalized distance, while considering The axis hierarchy influences the result, and then the edge weight of each edge can be determined.
[0096] S16. Using each view as a vertex and the intersection of the axially aligned bounding boxes between views as edges, a process is adopted. Spatial indexing and graph structure construction based on vertices, edges, and edge weights;
[0097] Specifically, the graph structure here is a collision detection graph, using... Spatial indexing establishes view adjacency graph , where vertex set edge set The edge weights are determined by judging the intersection relationship of the bounding boxes.
[0098] S2. Based on the graph structure, the virtual scene is divided into several feature regions, including sparse regions and dense regions;
[0099] Step S2 includes:
[0100] S21. Calculate the statistics of each view node in the graph structure. The number of nodes in the neighborhood is used as a density coefficient. And determine the degree centrality of each view node. Betweenness centrality ;
[0101] For each view node Statistics The number of nodes in the neighborhood is used as a density coefficient. , and mark The region is a high-conflict area, generating a topological feature descriptor based on the graph. Calculate the degree centrality and betweenness centrality indices of each node to form tuples. As the basis for region division, namely the view set, among which, , It is the number of views within the k-hop domain. It is the spatial coverage area of the k-hop neighborhood.
[0102] S22, Based on the density coefficient Degree centrality Betweenness centrality Determine the set of views with topological features.
[0103] S23. The virtual scene is divided into several sub-regions using Delaunay triangulation.
[0104] The entire scene is used as the initial region. The density variance of the current region is calculated iteratively. If the variance > Select the optimal segmentation surface and apply Delaunay triangulation for segmentation. During segmentation, it is necessary to ensure that the density variance within a single region is less than a threshold. .
[0105] S24. If the average density coefficient of the subregion Less than the density threshold If the average density coefficient of the subregion is sparse, then the subregion is a sparse region. Not less than the density threshold If so, then the sub-region is a dense region;
[0106] Specifically, a scheduling priority queue is then established, and the processing order is arranged in descending order according to the total overlapping area of the regions to ensure that high-conflict areas are processed first. At the same time, flexible constraints are established on the boundary views of adjacent regions to ensure the spatial continuity of the processing results of different algorithms.
[0107] S3. Optimize the sparse region using a force-guided model based on physical simulation to output the target position of the view;
[0108] Step S3 includes:
[0109] S31. Calculate the sum of the repulsive forces between the views within the sparse region and other views. :
[0110] ;
[0111] In the formula, The repulsion coefficient is... For this view to the The distance between views;
[0112] This involves defining force-direction rules, such as repulsive forces between views and attractive forces between a view and a reference point, and calculating the resultant force on each view. The force between views is defined as the sum of the repulsive forces between a view and other views, denoted as... .
[0113] S32. Calculate the gravitational pull between the view and the corresponding 3D model reference point within the sparse region. :
[0114] ;
[0115] In the formula, The gravitational coefficient, This is the distance between the view and the corresponding 3D model reference point.
[0116] Among them, the view-reference point force is defined as the gravitational force between a view and its reference point, denoted as... .
[0117] S33, sum the repulsive forces With the gravity We will perform weighted fusion to obtain a combined force. :
[0118] ;
[0119] In the formula, As the first weight, As the second weight;
[0120] Among them, the force ratio refers to two forces acting on the same view. Maintaining a fixed proportion ensures that the view achieves mechanical equilibrium under various forces. It represents the weights of the two forces, and this ratio is also used to calculate the weighted sum to obtain the resultant force.
[0121] S34, Adopt The algorithm iterates cyclically based on the current layout and the combined force until the average displacement of all views is less than a preset threshold or the maximum number of iterations is reached. Then, the current layout state is output to obtain the target position of the view.
[0122] Specifically, it is designed to adjust in real time based on regional density. ,current This achieves enhanced repulsion in high-density areas, thereby quickly eliminating overlapping states. Simultaneously, in force-directed layout models, traditional... The complexity of force calculation is This cannot meet the needs of real-time interaction. The algorithm reduces the complexity to zero through spatial hierarchical decomposition. Its core idea is to use approximate calculations for distant view groups, maintain accurate force calculations for nearby views, and quickly filter interaction pairs through spatial data structures.
[0123] Next, iterative layout is performed, with loop iterations from 1 to the maximum number of iterations. Based on the current layout, the resultant force on the current view is calculated. The force-guided component is used to calculate the new state. If the average displacement of all views is less than a preset threshold at this time... If the number of iterations reaches the maximum, the current state will be output as the final view layout of this area, i.e., the target position will be output.
[0124] S4. Construct an objective function for the dense region and iteratively solve it based on numerical optimization techniques to output the target position of the view;
[0125] Step S4 includes:
[0126] S41. Construct an objective function based on the view of the dense region:
[0127] ;
[0128] In the formula, , , They are the first factor, the second factor, and the third factor, respectively. The pixel-level overlap area between the current view and other surrounding views. For changes in direction angle, Penalize the Euclidean distance between the view and the original position;
[0129] The objective function aims to minimize the occlusion area while maintaining visual continuity.
[0130] S42. The nonlinear occlusion constraints and angle constraints in the objective function are transformed into a sequential quadratic programming subproblem. At each iteration point... The constraints are linearized to generate a locally quadratic approximation objective, which is then solved by solving the QP subproblem. Determine the search direction ,in, This is a quasi-Newton approximation of the Hessian matrix. The gradient vector;
[0131] S43. Determine the iteration step size :
[0132] ;
[0133] In the formula, The initial step size, This is the rate adjustment coefficient. This represents the number of iterations.
[0134] in, It is obtained based on the view density adaptive setting. This is to control the adjustment rate, which is usually set to the range of 1 / 3 to 1 / 2 of the total number of iterations; when Freeze the step size to prevent numerical instability.
[0135] S44. Based on the local quadratic approximation target and search direction and the iteration step size The objective function is solved iteratively until the iteration stopping condition is met, and the solution of the objective function is output as the target position of the view.
[0136] The iteration continues until the convergence condition or the maximum number of iterations is reached. The result is used as the output layout of the current region. The iteration terminates when one of the following conditions is met: the relative rate of change of the objective function is lower than a threshold. Maximum number of iterations To prevent infinite loops.
[0137] S5. Monitor the changes in the target position of the view in the virtual scene in real time and dynamically adjust the layout strategy. Replace the key information of the view with the target position of the view and iteratively repeat the layout optimization process, and combine the layout strategy to output the final layout scheme.
[0138] Step S5 includes:
[0139] S51. Construct an animation controller and create an animation trajectory recorder for each view to accurately store the coordinates of the target position of the view before and after adjustment. Employ a double buffering mechanism and automatically shorten the animation duration to ensure response speed when a drastic change in perspective is detected.
[0140] Specifically, a smooth transition of view positions is achieved by constructing an animation controller. An animation trajectory recorder is established for each view to accurately store the current position coordinates and the optimized target position coordinates. A double buffering mechanism is adopted to ensure that the current display effect is not affected when calculating the new layout. When a drastic change in perspective is detected, the animation duration is automatically shortened to ensure response speed.
[0141] S52. Implement a smooth transition of the view based on physical laws. Calculate the view displacement of each frame through nonlinear interpolation smooth motion, and adjust the interpolation speed according to the view movement distance and the speed of view change.
[0142] Specifically, the view achieves a smooth transition based on physical laws. When calculating the view displacement in each frame, non-linear interpolation is used to smooth the motion, avoiding mechanical uniform motion. The interpolation speed is automatically adjusted according to the view movement distance and the speed of view change.
[0143] S53. Implement a dynamic optimization mechanism for the view based on user attention, establish a heatmap to record the heat value of each screen area, and adjust the refresh rate according to the heat value;
[0144] This includes implementing a dynamic optimization mechanism based on user attention and establishing a heatmap to record each screen area. The refresh rate is increased for key areas that users are interested in.
[0145] Meanwhile, by continuously monitoring scene changes (including dynamic factors such as viewpoint movement and the addition of new views), the algorithm combination and parameter configuration are adjusted in real time to ensure that the output layout completely eliminates occlusion while maintaining visual continuity through smooth and natural displacement animation, providing users with a clear and comfortable visual presentation for their roaming experience in the virtual environment. The algorithm adopts a cyclic execution mechanism, running repeatedly from step S1 to S5. After each round of calculation, the system uses the view center coordinates obtained in the current round as the initial input coordinates for the next round's S1 step, thereby achieving continuous iterative updates for layout optimization.
[0146] Specifically, such as Figure 2 (a) and Figure 2 As shown in (b) in the figure, Figure 2 (a) in the diagram is a structural diagram of the feature region division of the virtual city scene, with blue corresponding to sparse regions and red corresponding to dense regions. Figure 2 (b) shows the final effect obtained after applying different layout methods to two different feature regions in the scene. The blue region uses the layout optimization method provided in step S3, and the red region uses the layout optimization method provided in step S4. In the virtual city scene, the view group initially presents a chaotic distribution. First, the features of the view group (such as density, distribution pattern, etc.) are calculated, and the scene is dynamically divided into different regions based on these features. Then, a differentiated layout strategy is adopted for different feature regions. This divide-and-conquer strategy ultimately improves the view layout quality in each region while ensuring global visual coherence. It avoids the convergence difficulty of the force-directed algorithm in high-density regions and overcomes the computational redundancy problem of numerical optimization methods in large-scale loose scenes.
[0147] The virtual environment view layout optimization method provided in Embodiment 1 of this invention employs an adaptive region partitioning mechanism, which dynamically adjusts the allocation of computing resources according to scene complexity. This allows the algorithm to be applicable to scenes of various scales while maintaining a balance in resource consumption. Simultaneously, a hybrid optimization framework is used to improve the layout quality of local areas while ensuring real-time performance. This enables the algorithm to maintain excellent performance even in complex scenes and conforms to the visual transition design principles of cognitive psychology, reducing user attention distraction caused by view jumps and optimizing user experience. Specifically, this invention firstly analyzes the spatial distribution characteristics of the view in real time through dynamic scene perception technology, automatically identifying high-conflict and low-density areas. Secondly, a partitioning optimization strategy is adopted, using a lightweight physical simulation algorithm for rapid arrangement in sparse areas and applying precise numerical optimization methods to solve complex occlusion problems in dense areas. Finally, a visual coherence maintenance mechanism is introduced, ensuring that layout changes conform to human cognitive expectations through smooth transition animations and dynamic priority adjustments.
[0148] Example 2
[0149] like Figure 3 As shown, in Embodiment 2 of the present invention, a virtual environment view layout optimization system is provided, the system comprising:
[0150] Integration module 1 is used to collect key information from all views in the virtual scene and integrate the key information into a graph structure;
[0151] The segmentation module 2 is used to divide the virtual scene into several feature regions based on the graph structure, wherein the feature regions include sparse regions and dense regions.
[0152] The first optimization module 3 is used to optimize the sparse region using a force-guided model based on physical simulation, so as to output the target position of the view.
[0153] The second optimization module 4 is used to construct an objective function for the dense region and iteratively solve it based on numerical optimization techniques to output the target position of the view.
[0154] Output module 5 is used to monitor changes in the target position of the view in the virtual scene in real time and dynamically adjust the layout strategy. It iteratively repeats the layout optimization process by replacing the key information of the view with the target position of the view and combining it with the layout strategy to output the final layout scheme.
[0155] Specifically, the integration module 1 is used for:
[0156] By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes, ;
[0157] Record the display width of the view. and height And determine the hierarchy parameters of the view. ;
[0158] The center coordinates, display width, height, and layer parameters are normalized, and a five-dimensional feature vector is constructed. ;
[0159] Based on the five-dimensional feature vectors, an axially aligned bounding box is constructed for each view, and a bidirectional mapping table between vertex indices and view objects is established;
[0160] For each view, based on the bidirectional mapping table. Execute range query and determine neighboring views Based on the neighboring view Determine edge weights :
[0161] ;
[0162] ;
[0163] ;
[0164] In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient.
[0165] Each view is treated as a vertex, and the intersection of the axially aligned bounding boxes between views is used as an edge. Spatial indexing and graph structure construction based on vertices, edges, and edge weights.
[0166] Specifically, the partitioning module 2 is used for:
[0167] Statistical analysis of each view node in the graph structure The number of nodes in the neighborhood is used as a density coefficient. And determine the degree centrality of each view node. Betweenness centrality ;
[0168] Based on the density coefficient Degree centrality Betweenness centrality Determine the set of views with topological features;
[0169] The virtual scene is divided using Delaunay triangulation to obtain several sub-regions;
[0170] If the average density coefficient of the sub-region Less than the density threshold If the average density coefficient of the subregion is sparse, then the subregion is a sparse region. Not less than the density threshold If so, then the sub-region is a dense region.
[0171] Wherein, the first optimization module 3 is used for:
[0172] Calculate the sum of the repulsive forces between the view within the sparse region and other views. :
[0173] ;
[0174] In the formula, The repulsion coefficient is... For this view to the The distance between views;
[0175] Calculate the gravitational pull between the view within the sparse region and the corresponding 3D model reference point. :
[0176] ;
[0177] In the formula, The gravitational coefficient, This is the distance between the view and the corresponding 3D model reference point.
[0178] Sum of the repulsive forces With the gravity We will perform weighted fusion to obtain a combined force. :
[0179] ;
[0180] In the formula, As the first weight, As the second weight;
[0181] use The algorithm iterates based on the current layout and the combined force until the average displacement of all views is less than a preset threshold or the maximum number of iterations is reached. Then, the current layout state is output to obtain the target position of the view.
[0182] Specifically, the second optimization module 4 is used for:
[0183] Construct the objective function based on the view of the dense region:
[0184] ;
[0185] In the formula, , , They are the first factor, the second factor, and the third factor, respectively. The pixel-level overlap area between the current view and other surrounding views. For changes in direction angle, Penalize the Euclidean distance between the view and the original position;
[0186] The nonlinear occlusion and angle constraints in the objective function are transformed into a sequential quadratic programming subproblem. At each iteration point... The constraints are linearized to generate a locally quadratic approximation objective, which is then solved by solving the QP subproblem. Determine the search direction ,in, This is a quasi-Newton approximation of the Hessian matrix. The gradient vector;
[0187] Determine the iteration step size :
[0188] ;
[0189] In the formula, The initial step size, This is the rate adjustment coefficient. This represents the number of iterations.
[0190] Based on the local quadratic approximation target and search direction and the iteration step size The objective function is solved iteratively until the iteration stopping condition is met, and the solution of the objective function is output as the target position of the view.
[0191] Specifically, the output module 5 is used for:
[0192] An animation controller is built and an animation trajectory recorder is established for each view. The coordinates of the target position of the view before and after adjustment are accurately stored. A double buffering mechanism is adopted and the animation duration is automatically shortened when a drastic change in view is detected to ensure response speed.
[0193] A smooth transition for the view is achieved based on physical laws. The view displacement of each frame is calculated through nonlinear interpolation smoothing motion, and the interpolation speed is adjusted according to the view movement distance and the speed of view change.
[0194] Implement a dynamic optimization mechanism for the view based on user attention, establish a heatmap to record the heat value of each screen area, and adjust the refresh rate according to the heat value.
[0195] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored on the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the virtual environment view layout optimization method as described above.
[0196] Specifically, the processor 101 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0197] The memory 102 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include removable or non-removable (or fixed) media. Where appropriate, the memory 102 may be internal or external to a data processing device. In a particular embodiment, the memory 102 is non-volatile memory. In a particular embodiment, the memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0198] The memory 102 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101.
[0199] The processor 101 implements the virtual environment view layout optimization method described above by reading and executing computer program instructions stored in the memory 102.
[0200] In some embodiments, the computer may further include a communication interface 103 and a bus 100. For example, Figure 4 As shown, the processor 101, memory 102, and communication interface 103 are connected through bus 100 and complete communication with each other.
[0201] The communication interface 103 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0202] Bus 100 includes hardware, software, or both, that couples components of a computer device together. Bus 100 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.
[0203] The computer can execute the virtual environment view layout optimization method of the present invention based on the virtual environment view layout optimization system, thereby realizing virtual environment view layout optimization.
[0204] In some further embodiments of the present invention, in conjunction with the above-described virtual environment view layout optimization method, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described virtual environment view layout optimization method.
[0205] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0206] More specific examples of readable media (a non-exhaustive list) include: electrical connections (electronic devices) with one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0207] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0208] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0209] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for optimizing the layout of a virtual environment view, characterized in that, include: Collect key information from all views in the virtual scene and integrate the key information into a graph structure; Based on the graph structure, the virtual scene is divided into several feature regions, which include sparse regions and dense regions. The sparse region is optimized using a force-guided model based on physical simulation to output the target position of the view; An objective function is constructed for the dense region and iteratively solved based on numerical optimization techniques to output the target position of the view; The system monitors changes in the target position of a view in a virtual scene in real time and dynamically adjusts the layout strategy. It iterates and repeats the layout optimization process by replacing the key information of the view with the target position of the view and combining the layout strategy to output the final layout scheme. The step of optimizing the sparse region using a physically simulated force-guided model to output the target position of the view includes: Calculate the sum of the repulsive forces between the view within the sparse region and other views. : ; In the formula, The repulsion coefficient is... For the view within the sparse region to the first The distance between views; Calculate the gravitational pull between the view within the sparse region and the corresponding 3D model reference point. : ; In the formula, The gravitational coefficient, This is the distance between the view within the sparse region and the corresponding 3D model reference point. Sum of the repulsive forces With the gravity We will perform weighted fusion to obtain a combined force. : ; In the formula, As the first weight, As the second weight; use The algorithm iterates cyclically based on the current layout and the combined force until the average displacement of all views is less than a preset threshold or the maximum number of iterations is reached. Then, the current layout state is output to obtain the target position of the view. The steps of constructing the objective function for the dense region and iteratively solving it based on numerical optimization techniques to output the target position of the view include: Construct the objective function based on the view of the dense region: ; In the formula, , , They are the first factor, the second factor, and the third factor, respectively. The pixel-level overlap area between the current view and other surrounding views. For changes in direction angle, Penalize the Euclidean distance between the view and the original position; The nonlinear occlusion and angle constraints in the objective function are transformed into a sequential quadratic programming subproblem. At each iteration point... The constraints are linearized to generate a locally quadratic approximation objective, which is then solved by solving the QP subproblem. Determine the search direction ,in, This is a quasi-Newton approximation of the Hessian matrix. The gradient vector; Determine the iteration step size : ; In the formula, The initial step size, This is the rate adjustment coefficient. This represents the number of iterations. Based on the local quadratic approximation target and search direction and the iteration step size The objective function is solved iteratively until the iteration stopping condition is met, and the solution of the objective function is output as the target position of the view.
2. The virtual environment view layout optimization method according to claim 1, characterized in that, The step of collecting key information from all views in the virtual scene and integrating the key information into a graph structure includes: By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes, ; Record the display width of the view. and height And determine the hierarchy parameters of the view. ; The center coordinates, display width, height, and layer parameters are normalized, and a five-dimensional feature vector is constructed. ; Based on the five-dimensional feature vectors, an axially aligned bounding box is constructed for each view, and a bidirectional mapping table between vertex indices and view objects is established; For each view, the bidirectional mapping table is used in accordance with the bidirectional mapping table. Execute range query and determine neighboring views Based on the neighboring view Determine edge weights : ; ; ; In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient. Each view is treated as a vertex, and the intersection of the axially aligned bounding boxes between views is used as an edge. Spatial indexing and graph structure construction based on vertices, edges, and edge weights.
3. The virtual environment view layout optimization method according to claim 1, characterized in that, The step of dividing the virtual scene into several feature regions based on the graph structure, wherein the feature regions include sparse regions and dense regions, includes: Statistical analysis of each view node in the graph structure The number of nodes in the neighborhood is used as a density coefficient. And determine the degree centrality of each view node. Betweenness centrality ; Based on the density coefficient Degree centrality Betweenness centrality Determine the set of views with topological features; The virtual scene is divided using Delaunay triangulation to obtain several sub-regions; If the average density coefficient of the sub-region Less than the density threshold If the average density coefficient of the subregion is sparse, then the subregion is a sparse region. Not less than the density threshold If so, then the sub-region is a dense region.
4. The virtual environment view layout optimization method according to claim 1, characterized in that, The steps of real-time monitoring of changes in the target position of the view in the virtual scene and dynamically adjusting the layout strategy include: An animation controller is built and an animation trajectory recorder is established for each view. The coordinates of the target position of the view before and after adjustment are accurately stored. A double buffering mechanism is adopted and the animation duration is automatically shortened when a drastic change in view is detected to ensure response speed. A smooth transition for the view is achieved based on physical laws. The view displacement of each frame is calculated through nonlinear interpolation smoothing motion, and the interpolation speed is adjusted according to the view movement distance and the speed of view change. Implement a dynamic optimization mechanism for the view based on user attention, establish a heatmap to record the heat value of each screen area, and adjust the refresh rate according to the heat value.
5. A virtual environment view layout optimization system, wherein the system employs the virtual environment view layout optimization method as described in claim 1, characterized in that, The system includes: The integration module is used to collect key information from all views in the virtual scene and integrate the key information into a graph structure. A segmentation module is used to divide the virtual scene into several feature regions based on the graph structure, wherein the feature regions include sparse regions and dense regions. The first optimization module is used to optimize the sparse region using a force-guided model based on physical simulation, so as to output the target position of the view. The second optimization module is used to construct an objective function for the dense region and iteratively solve it based on numerical optimization techniques to output the target position of the view. The output module is used to monitor changes in the target position of the view in the virtual scene in real time and dynamically adjust the layout strategy. It iteratively repeats the layout optimization process by replacing the key information of the view with the target position of the view and combining it with the layout strategy to output the final layout scheme.
6. The virtual environment view layout optimization system according to claim 5, characterized in that, The integration module is specifically used for: By traversing the geometric attributes of all views in the virtual scene, and extracting the center coordinates of the two-dimensional projection plane for each view object based on the geometric attributes, ; Record the display width of the view. and height And determine the hierarchy parameters of the view. ; The center coordinates, display width, height, and layer parameters are normalized, and a five-dimensional feature vector is constructed. ; Based on the five-dimensional feature vectors, an axially aligned bounding box is constructed for each view, and a bidirectional mapping table between vertex indices and view objects is established; For each view, the bidirectional mapping table is used in accordance with the bidirectional mapping table. Execute range query and determine neighboring views Based on the neighboring view Determine edge weights : ; ; ; In the formula, For size-normalized distance, for Axis hierarchy influence, , Views Display width and height, Neighboring views Display width and height, For view With neighboring views The Euclidean distance between the center points, , Views Nearby View The hierarchy parameters, This represents the hierarchical influence coefficient. Each view is treated as a vertex, and the intersection of the axially aligned bounding boxes between views is used as an edge. Spatial indexing and graph structure construction based on vertices, edges, and edge weights.
7. A computer comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the virtual environment view layout optimization method as described in any one of claims 1 to 4.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the virtual environment view layout optimization method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Scenic spot recommendation system adopting virtual reality technology
CN120296219A
Classroom simulation method for virtual reality
CN120762539A