User interface generation system for completely expanding tree nodes
By dividing nodes into visual nodes and virtual nodes, and loading corresponding node information according to the relationship between nodes and visual area, the problem of long-term expansion and generation of hierarchical tree structures is solved, and the efficiency of user interface generation is improved.
Patent Information
- Application Number
- CN202411988653.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In chip design and verification scenarios, the complete expansion generation of the hierarchical tree structure takes a long time, resulting in poor user interface generation efficiency.
By dividing the node into a visual node and a virtual node, only the detailed first node information is loaded for the visual node, the second node information that occupies a place for the virtual node, and the sliding bar ratio is determined based on the number of virtual nodes and visual nodes, and the user interface is generated.
It effectively reduces the time-consuming loading of node information, improves the efficiency of user interface generation, and ensures that users can determine the scale of fully expanded tree nodes based on the sliding bar ratio.
Smart Images

Figure CN119781889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of user interface generation, and in particular to a user interface generation system for fully expanding a tree node. Background Art
[0002] In the chip design and verification scenario, the debugging tools for chip design and verification will generate a hierarchical tree structure when reading the compiled data information. Usually, only the highest-level tree nodes are generated initially. When the user wants to view the approximate scale of the hierarchical tree or wants to expand and view certain nodes of interest, the user will need to use the function of fully expanding the hierarchical tree.
[0003] However, when the number of hierarchical tree structures is large, it will take a long time to fully expand and generate the entire hierarchical tree, resulting in poor efficiency in user interface generation. Therefore, how to improve the efficiency of user interface generation when the tree nodes are fully expanded has become an urgent problem to be solved. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is:
[0005] A user interface generation system for fully expanding a tree node, the system comprising: a processor and a memory storing a computer program, wherein the memory also includes a target tree structure, and when the computer program is executed by the processor, the following steps are implemented:
[0006] S101, initialize node number i=1.
[0007] S102, determining the i-th node of the target tree structure in a fully expanded mode.
[0008] S103, if the i-th node is within the preset visible area, take the i-th node as a visible node, load the first node information corresponding to the visible node, and execute step S104; otherwise, execute step S105.
[0009] S104, update i=i+1, and return to execute steps S102 to S103.
[0010] S105 , taking the i-th node to the last node in the target tree structure as virtual nodes, loading the second node information corresponding to each virtual node, and determining the number j of all virtual nodes.
[0011] S106, determining the total number of nodes according to i and j.
[0012] S107: Determine the sliding bar ratio according to the total number of nodes and i.
[0013] S108, generating a sliding bar according to the sliding bar ratio, and generating a user interface according to the sliding bar, each visible node and its first node information, each virtual node and its second node information.
[0014] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the user interface generation system for fully expanding tree nodes provided by the present invention can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:
[0015] The present invention provides a user interface generation system for fully expanding a tree node, the system comprising: a processor and a memory storing a computer program, wherein the memory also comprises a target tree structure, and when the computer program is executed by the processor, the following steps are implemented: S101, initializing a node sequence number i=1, S102, determining the i-th node of the target tree structure in a fully expanded mode, S103, if the i-th node is within a preset visible area, taking the i-th node as a visible node, loading the first node information corresponding to the visible node, and executing step S104, otherwise, executing step S105. 105, S104, update i=i+1, return to execute step S102 to step S103, S105, take the i-th node to the last node in the target tree structure as virtual nodes, load the second node information corresponding to each virtual node, and determine the number j of all virtual nodes, S106, determine the total number of nodes according to i and j, S107, determine the sliding bar ratio according to the total number of nodes and i, S108, generate a sliding bar according to the sliding bar ratio, and generate a user interface according to the sliding bar, each visible node and its first node information, each virtual node and its second node information.
[0016] It can be seen that the nodes are divided into visible nodes and virtual nodes according to the relationship between the nodes and the visible area, and only relatively detailed first node information is loaded for the visible nodes, and second node information used for placeholder is loaded for the virtual nodes, so that the time consumption of loading node information is effectively reduced when the target tree structure is fully expanded, and the slider ratio corresponding to the slider in the user interface is determined according to the number of virtual nodes and visible nodes, thereby ensuring that the user can determine the scale of the fully expanded tree node according to the slider ratio, and effectively improving the efficiency of user interface generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flowchart diagram of a computer program executed by a processor in a user interface generation system for fully expanding a tree node provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] This embodiment provides a user interface generation system for fully expanding a tree node, the system comprising: a processor and a memory storing a computer program, wherein the memory also includes a target tree structure, see Figure 1 , is a flow chart of a computer program executed by a processor in a user interface generation system for fully expanding a tree node provided by an embodiment of the present invention. When the computer program is executed by the processor, the following steps are implemented:
[0021] S101, initializing node number i=1;
[0022] S102, determining the i-th node of the target tree structure in a fully expanded mode;
[0023] S103, if the i-th node is within the preset visible area, take the i-th node as a visible node, load the first node information corresponding to the visible node, and execute step S104; otherwise, execute step S105;
[0024] S104, update i=i+1, and return to execute steps S102 to S103;
[0025] S105, taking the i-th node to the last node in the target tree structure as virtual nodes, loading the second node information corresponding to each virtual node, and determining the number j of all virtual nodes;
[0026] S106, determining the total number of nodes according to i and j;
[0027] S107, determining a sliding bar ratio according to the total number of nodes and i;
[0028] S108, generating a sliding bar according to the sliding bar ratio, and generating a user interface according to the sliding bar, each visible node and its first node information, each virtual node and its second node information.
[0029] Among them, the target tree structure contains several nodes, and the nodes can correspond to information such as instances, sub-ranges, and sub-folders. The full expansion method can refer to expanding the target tree structure from left to right and from top to bottom. If the current node contains child nodes, its child nodes are traversed from left to right. If the current node does not contain child nodes or all child nodes have been traversed, its parent node is returned.
[0030] The preset visible area may refer to the area in the user interface that the user can directly view. The first node information is more specific than the second node information. The first node information may be used to determine the display result of the corresponding node in the user interface, and the second node information may be used to determine the position of the corresponding node in the user interface.
[0031] The total number of nodes can be obtained by adding i and j, and the slider ratio can be the ratio of i to the total number of nodes.
[0032] In a specific implementation, the area height corresponding to the preset visible area is h, and the node height corresponding to the node is d;
[0033] If the i-th node is within a preset visible area, taking the i-th node as a visible node includes:
[0034] If i×d≤h, it is determined that the i-th node is within a preset visible area, and the i-th node is used as the visible node.
[0035] The area height h corresponding to the preset visible area may refer to the distance between the bottom edge of the preset visible area and the starting edge of the user interface. In this embodiment, it is assumed that the heights corresponding to the various nodes are consistent, which are all d.
[0036] In a specific implementation, when the slide bar moves during use of the user interface, h is updated and step S104 is executed.
[0037] When using the user interface, the user can drag the slide bar to adjust the position of the visible area. At this time, only h needs to be adjusted, and then the visible node is re-determined to load the first node information corresponding to the newly added visible node.
[0038] In a specific implementation, the first node information at least includes icon information.
[0039] The first node information may also include color information, extension information, and the like.
[0040] In a specific implementation, the second node information includes at least parent node information and child node quantity information.
[0041] Among them, when the parent node information and the number of child nodes are known, the position information of the current virtual node can be determined to occupy the place.
[0042] In a specific implementation, step S105 further includes the following steps:
[0043] S1061, initializing virtual identifier k=1, statistical value p=0;
[0044] S1062, if the k-th virtual node does not correspond to the instance, load the second node information corresponding to the k-th virtual node, update p=p+1, and execute step S1064;
[0045] S1063, if the kth virtual node corresponds to the instance, determine the number q of child nodes corresponding to the kth virtual node according to the preset cache area, load the second node information corresponding to the kth virtual node to the k+qth virtual node respectively, update p=p+q+1, and execute step S1065;
[0046] S1064, update k=k+1, return to execute step S1062 to step S1063, until there is no k-th virtual node, and use p as j;
[0047] S1065, update k=k+q+1, return to execute steps S1062 to S1064, until the kth virtual node does not exist, and use p as j.
[0048] The cache area is used to store the number of child nodes corresponding to the virtual node. The cache area can effectively shorten the time consumed in traversing the virtual nodes, thereby further improving the efficiency of user interface generation.
[0049] In a specific implementation, when loading a node of any corresponding instance, the module information of the node of the corresponding instance is obtained. If the cache area does not contain the module information, the module information and the number of child nodes corresponding to the node are saved in the cache area.
[0050] In this embodiment, it is assumed that the sub-ranges corresponding to the various module information are consistent, so the expansion efficiency of the virtual node can be improved through the correspondence between the module information stored in the cache area and the number of sub-nodes.
[0051] In a specific implementation, the cache area is cleared after the user interface is generated.
[0052] In this embodiment, nodes are divided into visible nodes and virtual nodes according to the relationship between nodes and visible areas, and only relatively detailed first node information is loaded for visible nodes, and second node information used for placeholder is loaded for virtual nodes, so that the time consumption of loading node information is effectively reduced when the target tree structure is fully expanded, and the slider ratio corresponding to the slider in the user interface is determined according to the number of virtual nodes and visible nodes, thereby ensuring that the user can determine the scale of the fully expanded tree node according to the slider ratio, and effectively improving the efficiency of user interface generation.
[0053] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A user interface generation system for fully expanding a tree node, characterized in that: The system comprises: a processor and a memory storing a computer program, wherein the memory also includes a target tree structure, and when the computer program is executed by the processor, the following steps are implemented: S101, initializing node number i=1; S102, determining the i-th node of the target tree structure in a fully expanded mode; S103, if the i-th node is within the preset visible area, take the i-th node as a visible node, load the first node information corresponding to the visible node, and execute step S104; otherwise, execute step S105; S104, update i=i+1, and return to execute steps S102 to S103; S105, taking the i-th node to the last node in the target tree structure as virtual nodes, loading the second node information corresponding to each virtual node, and determining the number j of all virtual nodes; S106, determining the total number of nodes according to i and j; S107, determining a sliding bar ratio according to the total number of nodes and i; S108, generating a sliding bar according to the sliding bar ratio, and generating a user interface according to the sliding bar, each visible node and its first node information, each virtual node and its second node information.
2. The user interface generation system for fully expanding a tree node according to claim 1, characterized in that: The area height corresponding to the preset visible area is h, and the node height corresponding to the node is d; If the i-th node is within a preset visible area, taking the i-th node as a visible node includes: If i×d≤h, it is determined that the i-th node is within a preset visible area, and the i-th node is used as the visible node.
3. The user interface generation system for fully expanding a tree node according to claim 2, characterized in that: When the slide bar moves during use of the user interface, h is updated and step S104 is executed.
4. The user interface generation system for fully expanding a tree node according to claim 1, characterized in that: The first node information at least includes icon information.
5. The user interface generation system for fully expanding a tree node according to claim 1, characterized in that: The second node information includes at least parent node information and child node quantity information.
6. The user interface generation system for fully expanding a tree node according to claim 1, characterized in that: Step S105 also includes the following steps: S1061, initializing virtual identifier k=1, statistical value p=0; S1062, if the k-th virtual node does not correspond to the instance, load the second node information corresponding to the k-th virtual node, update p=p+1, and execute step S1064; S1063, if the kth virtual node corresponds to the instance, determine the number q of child nodes corresponding to the kth virtual node according to the preset cache area, load the second node information corresponding to the kth virtual node to the k+qth virtual node respectively, update p=p+q+1, and execute step S1065; S1064, update k=k+1, return to execute step S1062 to step S1063, until there is no k-th virtual node, and use p as j; S1065, update k=k+q+1, return to execute steps S1062 to S1064, until the kth virtual node does not exist, and use p as j.
7. The user interface generation system for fully expanding a tree node according to claim 5, characterized in that: When loading a node of any corresponding instance, the module information of the node of the corresponding instance is obtained. If the cache does not contain the module information, the module information and the number of child nodes corresponding to the node are saved in the cache.
8. The user interface generation system for fully expanding a tree node according to claim 6, characterized in that: The buffer area is cleared after the user interface is generated.
Citation Information
Patent Citations
Tree structure display method, device and system, electronic device and storage medium
CN113867880A
Large scale integrated circuit hierarchy tree display system
CN115455871A
Tree data virtual scrolling processing method and device
CN116719598A
Rendering display method and device, electronic equipment and storage medium
CN117648153A
Data processing apparatus and method for rendering a tree structure
US20170371505A1