A hierarchical and block model display method, device, electronic device, and storage medium
By deeply traversing the root nodes of the hierarchical chunking model, obtaining and controlling the loading, coordinates and cache information of the target hierarchical chunking model, the problem of unsmooth display of the hierarchical chunking model is solved, and efficient display on different devices is achieved, improving user experience.
Patent Information
- Application Number
- CN202310946992.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-07-31
AI Technical Summary
In the prior art, the hierarchical blocking model is not smooth during overall display, resulting in poor user experience and the inability to adaptively adjust the cache level according to device performance, resulting in good results on high-performance devices and lag or crash on low-performance devices.
By loading all the root nodes of the hierarchical block model, deeply traverse the lower nodes of each root node, determine the target hierarchy nodes, and obtain loading information, coordinate information and cache information according to a fixed frequency, control the target hierarchy nodes for display, and adaptively adjust the cache level to optimize the display effect.
The loading efficiency and display effect of the hierarchical chunking model are improved, ensuring smooth display on different devices, reducing user waiting time and improving user experience.
Smart Images

Figure CN116861116B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hierarchical and block model processing, and particularly to a method, device, electronic device, and storage medium for displaying a hierarchical and block model. Background Art
[0002] Currently, there are two techniques for displaying oblique photography models on the market: One is not to maintain the overall contour of the oblique photography model, but only to load and display the visible part on the screen. The disadvantage of this method is that when quickly zooming out the view or panning the view, the oblique photography models outside the original field of view on the screen are all in an unloaded state and need to be reloaded. During the loading period, there are no models to display in these parts of the screen, which seriously affects the user experience. The other is the display method that maintains the overall contour of the oblique photography model. Currently, the display technology on the market is that the oblique photography models outside the screen display the lowest-level models. This results in that after the models in the field of view are loaded, when panning the view to another place, the models in the original field of view will be replaced by the lowest-level models, and when the view is moved back, the models in the original field of view need to be reloaded again, which also seriously affects the user experience.
[0003] Other products on the market that support the display of oblique photography models also cannot adaptively adjust the cache level according to the software and hardware performance of the display device. In this way, good display effects can be obtained on some high-performance devices, but the display effects are very poor on other devices with average performance and devices with relatively poor performance. The display will be relatively laggy or even the program will crash directly.
[0004] Currently, for the problem that the hierarchical and block models are not smooth in overall display in the related art, no effective solution has been proposed. Summary of the Invention
[0005] Embodiments of the present application provide a method, device, electronic device, and storage medium for displaying a hierarchical and block model, so as to at least solve the problem that the hierarchical and block models are not smooth in overall display in the related art.
[0006] In a first aspect, embodiments of the present application provide a method for displaying a hierarchical and block model.
[0007] In some of the embodiments, the method includes the following steps:
[0008] Load all root nodes of the hierarchical and block model, and depth-first traverse the lower-level nodes of each root node to determine target-level nodes;
[0009] Obtain the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency;
[0010] Controlling the display of the target hierarchical node according to at least one of the loading information, the coordinate information, and the cache information.
[0011] In some embodiments, the controlling the display of the target hierarchical node according to at least one of the loading information, the coordinate information, and the cache information includes:
[0012] When the loading information indicates that the loading of the target hierarchical node is completed and the cache information indicates that the data caching is completed, displaying the target hierarchical node.
[0013] In some embodiments, the controlling the display of the target hierarchical node according to at least one of the loading information, the coordinate information, and the cache information includes:
[0014] When the coordinate information indicates that the target hierarchical node is in the viewport and the loading information indicates that the target hierarchical node has not been loaded, loading the target hierarchical node.
[0015] In some embodiments, the controlling the display of the target hierarchical node according to at least one of the loading information, the coordinate information, and the cache information includes:
[0016] When the coordinate information indicates that the target hierarchical node is not in the viewport and the cache information indicates that the upper parent node of the target hierarchical node has not been cached, determining the topmost parent node of the target hierarchical node that does not overlap and conflict with other displayed nodes;
[0017] Loading the topmost parent node.
[0018] In some embodiments, after loading the topmost parent node, it includes:
[0019] Determining the cached upper parent node of the target hierarchical node;
[0020] When the target hierarchical node is not in the viewport and there is a cached upper parent node, or when the target hierarchical node is in the viewport, there is a cached upper parent node, and the hierarchical difference between the target hierarchical node and the nearest cached upper parent node is less than a preset hierarchical difference threshold, displaying the nearest cached upper parent node to the target hierarchical node;
[0021] Determining the lower child node group of the target hierarchical node, and when the lower child node group is cached and can cover the range of the target hierarchical node, displaying the lower child node group.
[0022] In some embodiments, the method further includes:
[0023] Obtain the cache threshold of model data and the cache threshold of texture data;
[0024] After traversing all the root nodes, obtain the amount of model data and the amount of texture data;
[0025] When the amount of model data is greater than the cache threshold of model data, or when the amount of texture data is greater than the cache threshold of texture data, determine the target node data and delete the target node data.
[0026] In some embodiments, the method further includes:
[0027] After traversing all the root nodes, determine all the current nodes to be displayed, and set the most recent active time of the nodes to be displayed as the first time;
[0028] Traverse all the cached historical nodes at a second fixed frequency, and determine the most recent update time of each historical node;
[0029] When the time difference between the most recent update time corresponding to the historical node and the current time exceeds a preset time threshold, delete the historical node.
[0030] In a second aspect, an embodiment of the present application provides a hierarchical and block model display device.
[0031] In some embodiments, the device includes a target node determination module, a node information acquisition module, and a node display control module:
[0032] The target node determination module is configured to load all the root nodes of the hierarchical and block model, and depth-traverse the lower-level nodes of each root node to determine the target-level nodes;
[0033] The node information acquisition module is configured to acquire the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency;
[0034] The node display control module is configured to control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the hierarchical and block model display method described in the first aspect above is implemented.
[0036] Fourthly, an embodiment of the present application provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the hierarchical and block model display method as described in the first aspect above.
[0037] Compared with the related art, the hierarchical and block model display method, device, electronic device and storage medium provided by the embodiments of the present application load all root nodes of the hierarchical and block model, deeply traverse the lower-level nodes of each root node to determine the target-level nodes, and obtain the loading information, coordinate information and cache information of the target-level nodes at a first fixed frequency. According to at least one of the loading information, coordinate information and cache information, the display of the target-level nodes is controlled, which solves the problem of unsmooth overall display of the hierarchical and block model in the related art and improves the loading efficiency and display effect of the hierarchical and block model.
[0038] Details of one or more embodiments of the present application are set forth in the following drawings and description, so that other features, objects and advantages of the present application will become more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0040] Figure 1 is a hardware structure block diagram of a terminal for the hierarchical and block model display method according to an embodiment of the present application;
[0041] Figure 2 is a flowchart of the hierarchical and block model display method according to an embodiment of the present application;
[0042] Figure 3 is a flowchart of the hierarchical and block model display method according to a preferred embodiment of the present application;
[0043] Figure 4 is a structure block diagram of the hierarchical and block model display device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the following describes and explains the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts belong to the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0045] The mention of "embodiment" in the present application means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application may be combined with other embodiments without conflict.
[0046] Unless otherwise defined, the technical terms or scientific terms involved in the present application shall have the ordinary meaning understood by those of ordinary skill in the technical field to which the present application belongs. The terms "a", "an", "one kind", "the" and the like involved in the present application do not indicate a quantity limitation and may represent a single or plural number. The terms "including", "comprising", "having" and any variations thereof involved in the present application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The terms "connected", "coupled" and the like involved in the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" involved in the present application means greater than or equal to two. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0047] The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. Taking running on a terminal as an example,Figure 1 It is a hardware structure block diagram of a terminal for the hierarchical and block model display method according to an embodiment of the present invention. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only illustrative and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown.
[0048] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the hierarchical and block model display method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.
[0050] This embodiment provides a hierarchical and block model display method. Figure 2 It is a flowchart of the hierarchical and block model display method according to an embodiment of the present application. As Figure 2 shown, the process includes the following steps:
[0051] Step S201: Load all the root nodes of the hierarchical and segmented model, and traverse the lower-level nodes of each root node in depth to determine the target-level nodes.
[0052] Load all the root nodes of the hierarchical and segmented model and display them. Starting from each root node of the hierarchical and segmented model, traverse the lower-level child nodes in depth to find the level nodes suitable for display in the current perspective, and determine the level nodes suitable for display in the current perspective as the target-level nodes. After determining the level nodes suitable for display in the current perspective, stop traversing the child nodes of the level nodes suitable for display in the current perspective.
[0053] Step S202: Obtain the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency.
[0054] For each level node suitable for display in the current perspective (target-level node), the node processing process is periodically executed at a first fixed frequency. The processing process includes obtaining the loading information, coordinate information, and cache information of the target-level nodes.
[0055] Step S203: Control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information.
[0056] The processing process further includes controlling the display of the target-level nodes according to at least one of the obtained loading information, coordinate information, and cache information.
[0057] Through the above steps, the embodiments of the present application periodically obtain the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency. The loading information, coordinate information, and cache information can support maintaining the overall outline of the model during the real-time display of the hierarchical and segmented model, and the recently loaded high-level model data will be used as the outline cache when maintaining the overall outline of the model. Therefore, while maintaining the overall outline of the oblique photography model, the loading speed can be increased, the user waiting time can be reduced, the problem that the hierarchical and segmented model is not smooth during the overall display in the related art is solved, the loading efficiency of the hierarchical and segmented model is improved, and the display effect on different devices is enhanced.
[0058] In some embodiments, Step S203 includes:
[0059] Step S2031: Display the target-level nodes when the loading information indicates that the loading of the target-level nodes is completed and the cache information indicates that the data caching is completed.
[0060] If the target-level nodes have been loaded and the data is in the cache, directly display the target-level nodes, which improves the display efficiency and enhances the fluency during the model browsing.
[0061] In some of these embodiments, step S203 includes:
[0062] Step S2032, when the coordinate information indicates that the target hierarchical node is in the viewport and the loading information indicates that the target hierarchical node has not been loaded, load the target hierarchical node.
[0063] If the target hierarchical node is in the viewport and has not been loaded yet, start loading the target hierarchical node. Before the target hierarchical node is loaded completely, use the parent node data or child node data to fill this area to avoid a hole in this area.
[0064] In some of these embodiments, step S203 includes:
[0065] Step S2033, when the coordinate information indicates that the target hierarchical node is not in the viewport and the cache information indicates that the upper parent node of the target hierarchical node has not been cached, determine the uppermost parent node of the target hierarchical node that does not overlap and conflict with other displayed nodes.
[0066] Step S2034, load the uppermost parent node.
[0067] If the target hierarchical node is not in the viewport and there is no cached upper parent node of the target hierarchical node, start loading the uppermost parent node of the target hierarchical node that does not overlap and conflict with other displayed nodes. When the target hierarchical node is not in the viewport, there is no need to load the target hierarchical node, and use the upper parent node to replace the display to fill this area that needs to be displayed. When there is no cached upper parent node data that can replace the display, a cached upper parent node data that can replace the display needs to be loaded. To reduce the size of the cached data, select the uppermost parent node that can be loaded for loading, that is, the uppermost parent node that does not overlap with the currently displayed nodes, to avoid a hole.
[0068] In some of these embodiments, after step S2034 includes:
[0069] Step S2035, determine the cached upper parent node of the target hierarchical node.
[0070] Step S2036, when the target hierarchical node is not in the viewport and there is the cached upper parent node, or when the target hierarchical node is in the viewport and there is the cached upper parent node and the hierarchical difference between the target hierarchical node and the nearest cached upper parent node is less than the preset hierarchical difference threshold, display the nearest cached upper parent node to the target hierarchical node.
[0071] If the target hierarchical node is not in the viewport and there is an upper parent node of the cached target hierarchical node, then display the upper parent node of the cached target hierarchical node that is closest to the target hierarchical node. If the target hierarchical node is in the viewport and there is an upper parent node of the cached target hierarchical node and the hierarchical difference between the target hierarchical node and the closest cached upper node is less than the set threshold (preset hierarchical difference threshold), then display the upper parent node of the cached target hierarchical node that is closest to the target hierarchical node.
[0072] Step S2037, determine the lower child node group of the target hierarchical node, and display the lower child node group when the lower child node group is cached and can cover the range of the target hierarchical node.
[0073] If the target hierarchical node has a cached lower child node group that can cover the range of the target hierarchical node, then display this lower child node group. Fill the current target hierarchical node area with cached data that has a higher precision than the target hierarchical node. If there is only cached data of the lower child node group with a higher precision in the current target hierarchical node area, use the data of the lower child node group to fill this area, which can avoid leaving a hole in this area.
[0074] It is worth mentioning that if none of the above situations are satisfied and there is an upper parent node of the cached target hierarchical node, then display the upper parent node of the cached target hierarchical node that is closest to the target hierarchical node.
[0075] The embodiments of the present application will be described and illustrated below through preferred embodiments. Figure 3 is a preferred flowchart of the hierarchical and block model display method according to the embodiments of the present application, as Figure 3 shown, the hierarchical and block model display method includes the following steps:
[0076] Step S301, load all root nodes of the hierarchical and block model, and depth-traverse the lower nodes of each root node to determine the target hierarchical node.
[0077] Step S302, obtain the loading information, coordinate information, and caching information of the target hierarchical node at a first fixed frequency.
[0078] Step S303, display the target hierarchical node when the loading information indicates that the target hierarchical node is loaded and the caching information indicates that the data caching is completed.
[0079] Step S304, load the target hierarchical node when the coordinate information indicates that the target hierarchical node is in the viewport and the loading information indicates that the target hierarchical node is not loaded.
[0080] Step S305: When the coordinate information indicates that the target hierarchical node is not in the viewport and the cache information indicates that the upper parent node of the target hierarchical node has not been cached, determine the topmost parent node of the target hierarchical node that does not overlap or conflict with other displayed nodes.
[0081] Step S306: Load the topmost parent node and determine the cached upper parent node of the target hierarchical node.
[0082] Step S307: When the target hierarchical node is not in the viewport and there is a cached upper parent node, or when the target hierarchical node is in the viewport, there is a cached upper parent node, and the hierarchical difference between the target hierarchical node and the nearest cached upper parent node is less than a preset hierarchical difference threshold, display the nearest cached upper parent node to the target hierarchical node.
[0083] Step S308: Determine the lower child node group of the target hierarchical node. When the lower child node group is cached and can cover the range of the target hierarchical node, display the lower child node group.
[0084] In addition, if none of the above conditions are met and there is a cached upper parent node of the target hierarchical node, display the nearest cached upper parent node of the target hierarchical node to the target hierarchical node.
[0085] The embodiment of the present application also provides a hierarchical and block model display method, and the method process includes the following steps:
[0086] Step S401: Obtain the model data cache threshold and texture data cache threshold.
[0087] Obtain the model data cache threshold MBuffMaxSize and texture data cache threshold TBuffMaxSize according to the software and hardware environment of the device for displaying the current hierarchical and block model.
[0088] Step S402: After traversing all the root nodes, obtain the model data volume and texture data volume.
[0089] Statistically analyze all cached node data and node data being loaded.
[0090] Step S403: When the model data volume is greater than the model data cache threshold, or when the texture data volume is greater than the texture data cache threshold, determine the target node data and delete the target node data.
[0091] If the model data volume is greater than the model data cache threshold MBuffMaxSize or the texture data volume is greater than the texture data cache threshold TBuffMaxSize, then part of the node data not within the current display range is destroyed according to the priority until the model data volume and the texture data volume are less than or equal to the thresholds.
[0092] In addition, if the model data volume or the texture data volume is still greater than the threshold after all the node data not within the current display range in the cached node data is deleted, then the extra target nodes outside each current viewport are processed, and the topmost parent nodes of the extra target nodes that do not overlap and conflict with the nodes within other viewports are started to be loaded.
[0093] Through the above steps, the embodiments of the present application adaptively adjust the cached contour model levels according to the software and hardware performance of the display device when maintaining the overall contour of the model, so that the hierarchical and block model can achieve the optimal display effect on all devices.
[0094] The embodiments of the present application also provide a method for displaying a hierarchical and block model, and the process of this method includes the following steps:
[0095] Step S501, after traversing all the root nodes, determine all the current nodes to be displayed, and set the most recent active moment of the nodes to be displayed as the first moment;
[0096] After traversing all the root nodes, determine all the current nodes to be displayed, and set the most recent active time point of the nodes to be displayed as the current time point (the first moment).
[0097] Step S502, traverse all the cached historical nodes at a second fixed frequency, and determine the most recent update moment of each historical node;
[0098] Set the most recent update moment of the nodes to be displayed as the moment when the last display process for the node is completed, and cache it as a historical node. Traverse all the cached historical nodes at a second fixed frequency, and determine the most recent update moment of each historical node.
[0099] Step S503, delete the historical node if the time difference between the most recent update moment corresponding to the historical node and the current moment exceeds a preset time threshold.
[0100] If the time difference between the most recent active time point (the most recent update moment) of the cached historical node data and the moment (the current time) when the corresponding historical node is traversed exceeds the set time threshold, then delete this historical node data.
[0101] Through the above steps, in the display process of the embodiments of the present application, when maintaining the overall outline of the hierarchical and block model, the most recently loaded high-level model data is used as the outline cache, so as to support maintaining the overall outline of the hierarchical and block model during real-time display.
[0102] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0103] This embodiment also provides a hierarchical and block model display device, which is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0104] Figure 4 is a structural block diagram of a hierarchical and block model display device according to an embodiment of the present application, as Figure 4 shown, the device includes a target node determination module 10, a node information acquisition module 20, and a node display control module 30:
[0105] The target node determination module 10 is configured to load all root nodes of the hierarchical and block model, and depth-traverse the lower-level nodes of each root node to determine target-level nodes;
[0106] The node information acquisition module 20 is configured to acquire the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency;
[0107] The node display control module 30 is configured to control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information.
[0108] It should be noted that the above-mentioned each module can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned each module can be located in the same processor; or the above-mentioned each module can also be located in different processors in any combined form.
[0109] This embodiment also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0110] Optionally, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0111] Optionally, in this embodiment, the above processor may be configured to perform the following steps by a computer program:
[0112] Load all root nodes of the hierarchical and block model, and depth-first traverse the lower-level nodes of each root node to determine the target-level nodes;
[0113] Obtain the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency;
[0114] Control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information.
[0115] It should be noted that the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.
[0116] In addition, in combination with the hierarchical and block model display method in the above embodiments, an embodiment of the present application can be implemented by providing a storage medium. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the hierarchical and block model display methods in the above embodiments is implemented.
[0117] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0118] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties.
[0119] The above embodiments only represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A hierarchical and block model display method, characterized in that, It includes the following steps: Load all root nodes of the hierarchical and block model, and depth-first traverse the lower-level nodes of each root node to determine target-level nodes; Obtain the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency; Control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information; The controlling the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information includes: When the coordinate information indicates that the target-level node is not in the viewport and the cache information indicates that the upper parent node of the target-level node is not cached, determine the topmost parent node of the target-level node that does not overlap and conflict with other displayed nodes; Load the topmost parent node.
2. The method for displaying a hierarchical and block model according to claim 1, wherein The controlling the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information includes: When the loading information indicates that the loading of the target-level node is completed and the cache information indicates that the data caching is completed, display the target-level node.
3. The method for displaying a hierarchical and block model according to claim 2, wherein The controlling the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information includes: When the coordinate information indicates that the target-level node is in the viewport and the loading information indicates that the target-level node is not loaded, load the target-level node.
4. The method for displaying a hierarchical and block model according to claim 1, wherein After the loading of the topmost parent node, it includes: Determine the cached upper parent node of the target-level node; When the target-level node is not in the viewport and there is a cached upper parent node, or when the target-level node is in the viewport, there is a cached upper parent node, and the level difference between the target-level node and the nearest cached upper parent node is less than a preset level difference threshold, display the nearest cached upper parent node to the target-level node; Determine the lower-level child node group of the target-level node, and when the lower-level child node group is cached and can cover the range of the target-level node, display the lower-level child node group.
5. The method for displaying a hierarchical and block model according to claim 4, wherein The method further includes: Obtain the model data cache threshold and the texture data cache threshold; After traversing all the root nodes, obtain the model data volume and the texture data volume; When the model data volume is greater than the model data cache threshold, or when the texture data volume is greater than the texture data cache threshold, determine the target node data and delete the target node data.
6. The method for displaying a hierarchical and block model according to claim 5, wherein The method further includes: After traversing all the root nodes, determine all the currently to-be-displayed nodes, and set the most recent active time of the to-be-displayed nodes as the first time; Traverse all the cached historical nodes at a second fixed frequency, and determine the most recent update time of each historical node; Delete the historical node if the time difference between the most recent update time corresponding to the historical node and the current time exceeds a preset time threshold.
7. A hierarchical and block model display device, characterized in that it includes a target node determination module, a node information acquisition module, and a node display control module: The target node determination module is configured to load all the root nodes of the hierarchical and block model, and depth-traverse the lower-level nodes of each root node to determine the target-level nodes; The node information acquisition module is configured to acquire the loading information, coordinate information, and cache information of the target-level nodes at a first fixed frequency; The node display control module is configured to control the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information; The controlling the display of the target-level nodes according to at least one of the loading information, the coordinate information, and the cache information includes: When the coordinate information indicates that the target-level node is not in the viewport and the cache information indicates that the upper parent node of the target-level node is not cached, determine the uppermost parent node of the target-level node that does not overlap and conflict with other already-displayed nodes; Load the uppermost parent node.
8. An electronic device, including a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the hierarchical and block model display method according to any one of claims 1 to 6.
9. A storage medium, characterized in that a computer program is stored in the storage medium, wherein the computer program is configured to execute the hierarchical and block model display method according to any one of claims 1 to 6 when running.
Citation Information
Patent Citations
3D model rendering display method and system
CN106296779A
Three-dimensional model display method and device and electronic equipment
CN115984457A