A data visualization method and apparatus
Patent Information
- Application Number
- CN202611230623.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-23
AI Technical Summary
其中,二维树或层级布局能够体现节点的继承层级,但在节点数量较多时容易出现节点拥挤;力导图通常依据节点间的连接关系进行布局,布局结果易受初始状态影响而发生变化,且难以针对本体的层级结构进行空间划分;通用三维图谱则通常将本体视为普通图结构的可读性较差
[0015]上述数据可视化装置、电子设备及存储介质的有益效果参见上述数据可视化方法的说明,此处不再赘述。
Smart Images

Figure CN122964332A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a data visualization method and apparatus. Background Technology
[0002] Existing ontology data visualization technologies typically employ 2D trees, 2D force-guided graphs, or general 3D graphs to display class nodes and their hierarchical relationships within an ontology. While 2D trees or hierarchical layouts can effectively represent node inheritance, they are prone to congestion when the number of nodes is large. Force-guided graphs, usually based on the connections between nodes, are susceptible to changes influenced by the initial state and struggle to spatially partition the ontology's hierarchical structure. General 3D graphs, on the other hand, often treat the ontology as a simple graph structure, resulting in poor readability. Therefore, when dealing with large-scale or complex ontology data, existing technologies are prone to uneven node distribution, excessive congestion in localized areas, and poor readability, impacting the visualization of the ontology structure and the user's understanding of the ontology data. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide at least one data visualization method, apparatus, electronic device, and storage medium, which can adapt the spatial distribution of nodes to the hierarchical structure and subtree size of the ontology data itself, thereby reducing node congestion and improving the balance of the three-dimensional layout. In addition, the readability of the data visualization results can also be improved by using the node importance coefficient.
[0004] In a first aspect, embodiments of the present invention provide a data visualization method, including: Determine the node hierarchy of each type of node in the data to be processed, and determine the node importance coefficient of each type of node based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node. The level radius of each node level is determined based on the number of child nodes in the node level and the weight of the subtree corresponding to the parent node. Based on the subtree weights corresponding to the parent node, the angle sector of each parent node in its respective node level is determined, and the node angle corresponding to each child node is determined within the angle sector according to the subtree weights of each child node under the parent node. Based on the node level, level radius, angle sector and node angle, the node position of each type of node in three-dimensional space is determined, and the node display size of each type of node is determined according to the node importance coefficient, so as to obtain the visualization result corresponding to the data to be processed.
[0005] Optionally, the node hierarchy of various types of nodes in the data to be processed is determined, including: Read the parent class field of each type of node, and take the class node whose parent class field is empty or does not point to a valid class node in the data to be processed as the top-level class node; Create a virtual root node, use the virtual root node as the parent node of each top-level class node, and generate the initial inheritance tree corresponding to the data to be processed based on the parent and child class fields of other class nodes in each class, excluding the top-level class node. The node hierarchy of each type of node is determined based on the initial inheritance tree; The initial inheritance tree is checked for completeness. If there are any missing class nodes in the initial inheritance tree, the node level of the missing class nodes is determined to be the preset level to obtain the target inheritance tree.
[0006] Optionally, the level radius corresponding to each node level is determined based on the number of child nodes in the node level and the subtree weight corresponding to the parent node, including: Based on the number of child nodes in the node hierarchy and the weight of the subtree corresponding to the parent node, the distribution density of child nodes in the node hierarchy is determined, and the first candidate radius corresponding to the node hierarchy is determined based on the distribution density. The second candidate radius corresponding to the node level is determined based on the number of child nodes in the node level. The third candidate radius corresponding to the node level is determined based on the level radius of the previous level and the preset inter-level spacing. The maximum value among the first, second, and third candidate radii is determined as the level radius corresponding to the node level.
[0007] Optionally, determine the node angle corresponding to each child node, including: Deterministic hashing is performed on the node identifiers corresponding to each type of node to obtain the position perturbation values corresponding to each type of node. The initial positions of various types of nodes are slightly offset based on the position perturbation value to obtain the corresponding node positions. The position perturbation value corresponding to the same node identifier remains the same. The initial position is determined based on the node level and node angle.
[0008] Optionally, the visualization results corresponding to the data to be processed are obtained, including: Based on the business domain information corresponding to each type of node, determine the node display color for each type of node; among them, nodes belonging to the same business domain have the same node display color, while nodes belonging to different business domains have different node display colors. Based on the attribute information of various types of nodes, determine the semantic identity tags of various types of nodes, and determine the node display shape of various types of nodes based on the semantic identity tags; Based on node position, node display size, node display color, and node display shape, the visualization results of the data to be processed are obtained.
[0009] Optionally, after obtaining the visualization results of the data to be processed, the following may also be included: In response to the existence of a new preview node, retrieve the preview node and group the preview nodes according to the associated node identifiers of the preview nodes; For each group of preview nodes, determine the parent node corresponding to the associated node identifier, and determine the node position of each preview node with the node position corresponding to the parent node as the center. Based on the node position of each preview node, the preview nodes are added to the visualization results of the data to be processed; wherein, the preview nodes are different from the various types of nodes in the visualization results in at least one dimension of node display size, node display color, and node display shape.
[0010] Secondly, embodiments of the present invention provide a data visualization device, comprising: The hierarchy determination module is used to determine the node hierarchy of various types of nodes in the data to be processed, and to determine the node importance coefficient of various types of nodes based on the number of child nodes, the number of relationships and the number of attributes corresponding to each type of node. The radius determination module is used to determine the level radius corresponding to each node level based on the number of child nodes in the node level and the subtree weight corresponding to the parent node. The angle determination module is used to determine the angle sector of each parent node in its respective node level based on the subtree weight of the parent node, and to determine the node angle of each child node within the angle sector according to the subtree weight of each child node under the parent node. The visualization module is used to determine the node positions of various types of nodes in three-dimensional space based on node level, level radius, angle sector and node angle, and to determine the node display size of various types of nodes based on node importance coefficient, so as to obtain the visualization results corresponding to the data to be processed.
[0011] Thirdly, embodiments of the present invention also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the first aspect or any optional implementation of the first aspect are performed.
[0012] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the first aspect or any optional implementation thereof.
[0013] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0014] In any of the above aspects or any implementation of any aspect, the node hierarchy of various types of nodes is determined based on the parent-child relationships between various types of nodes in the data to be processed, so that nodes with inheritance relationships are distributed in different spatial regions according to the hierarchy; at the same time, the node importance coefficient is determined based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node, so that the importance of the node can be quantified. Then, the hierarchy radius is determined based on the number of child nodes in each node hierarchy and the subtree weight corresponding to the parent node, where the subtree weight is used to characterize the size of the subtree associated downward by the parent node. Parent nodes with larger subtree sizes correspond to a larger number of child nodes and have greater space requirements, so a larger hierarchy radius is configured for the corresponding node hierarchy. After determining the hierarchy radius, angle sectors are allocated to different parent nodes based on the subtree weight corresponding to the parent node, so that parent nodes with larger subtree weights obtain a larger spatial range, and further, node angles are allocated in the corresponding angle sectors according to the subtree weights of each child node under the parent node, so that child nodes with larger subtree sizes obtain a larger angle space. Therefore, the three-dimensional spatial positions of various nodes are determined based on node level, level radius, angular sector, and node angle. This allows the spatial distribution of nodes to adaptively adjust with the ontology's hierarchical structure and subtree size, reducing node congestion between different subtrees and within the same subtree, and improving the balance of the three-dimensional layout. Simultaneously, the node display size is determined based on the node importance coefficient, enabling nodes with a large number of relationships, attributes, or child nodes to be displayed at a more prominent size. This highlights important nodes in the ontology, enhances the visual differentiation between nodes, and improves the overall readability of the visualization results.
[0015] The beneficial effects of the aforementioned data visualization device, electronic device, and storage medium are described in the description of the aforementioned data visualization method, and will not be repeated here. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to the present invention and, together with the specification, serve to explain the technical solutions of the present invention. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart of a data visualization method provided by an embodiment of the present invention is shown; Figure 2 A flowchart illustrating a data visualization method provided by an embodiment of the present invention is shown; Figure 3This diagram illustrates the structural relationship between the ontology and intermediate data provided in an embodiment of the present invention. Figure 4 This diagram illustrates the browser-side rendering structure provided in an embodiment of the present invention. Figure 5 A schematic diagram illustrating the visualization results provided by an embodiment of the present invention is shown; Figure 6 A schematic diagram of a data visualization device provided in an embodiment of the present invention is shown; Figure 7 An exemplary system architecture in which embodiments of the present invention can be applied is shown; Figure 8 A schematic diagram of the structure of a computer system used to implement embodiments of the present invention is shown. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0019] It should be noted that the collection, use, storage, sharing and transfer of user personal information involved in the technical solution of the present invention all comply with the provisions of relevant laws and regulations, and require notification to users and obtaining their consent or authorization. When applicable, user personal information is subjected to de-identification and / or anonymization and / or encryption technical processing.
[0020] The above problems and solutions are the result of the inventor's practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be considered as the inventor's contribution to the invention.
[0021] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0022] To facilitate understanding of this embodiment, a detailed description of the data visualization method disclosed in this invention will be provided first. The execution entity of the data visualization method provided in this invention is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, this data visualization method can be implemented by a processor calling computer-readable instructions stored in memory.
[0023] See Figure 1 The diagram shows a flowchart of a data visualization method provided in an embodiment of the present invention. The method includes steps S101 to S104, wherein: S101: Determine the node hierarchy of each type of node in the data to be processed, and determine the node importance coefficient of each type of node based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node.
[0024] In this embodiment of the invention, the data to be processed is ontology data. An ontology can be understood as a data model that formally describes the concepts, entities, and their relationships in a specific business domain. It is used to describe in a structured manner what objects exist in the business domain, what characteristics the objects have, and what relationships exist between different objects. For example, in the logistics fulfillment domain, an ontology can be used to describe business objects such as waybills, orders, merchants, outlets, transportation trajectories, abnormal events, and claims, as well as the inheritance and association relationships between these business objects. Ontology data is the data set used to describe the above ontology, which may include a set of classes, a set of relationships, a set of attributes, etc., and various types of data are associated with each other through corresponding identifiers, thereby forming a data organization form that can reflect the knowledge structure of the business domain.
[0025] In this context, a class node can be understood as a node in the ontology that represents a class of objects with common characteristics or semantics. For example, "waybill," "order," and "claims" can all be considered class nodes. Class nodes can have parent-child relationships. A class node that is directly or indirectly derived from, inherited from, or belongs to a certain class node is called a child node of that class node. For example, "logistics object" can be a parent node, and "waybill" and "order" can be its child nodes. The number of child nodes indicates the number of directly related next-level child nodes of the current class node, reflecting to some extent the structural scale of the current class node's downward extension. Relationships describe the semantic connections between different class nodes in the ontology, representing the business relationships between the objects corresponding to different class nodes. For example, they can represent the relationship between "waybill" and "transportation trajectory," or between "claims" and "abnormal events." The number of relationships can characterize the degree of association between the current class node and other class nodes. Attributes are used to describe the characteristics, status, or data fields of the object corresponding to the class node. For example, a "waybill" can have attributes such as waybill number, shipping time, destination, and transportation status, while a "claims form" can have attributes such as claim amount and claim status. The number of attributes can be used to reflect the richness of the feature information contained or associated with the current class node.
[0026] In embodiments of the present invention, such as Figure 2 As shown, after obtaining the data to be processed, the node level of each class node can be determined by constructing an inheritance tree. Specifically, determining the node level of each type of node in the data to be processed includes: reading the parent class field of each type of node, and taking the class node whose parent class field is empty or does not point to a valid class node in the data to be processed as the top-level class node; creating a virtual root node, taking the virtual root node as the parent node of each top-level class node, and generating an initial inheritance tree corresponding to the data to be processed based on the parent class field and child class field of other class nodes in each type of node besides the top-level class node; determining the node level of each type of node based on the initial inheritance tree; performing an integrity check on the initial inheritance tree, and in response to the existence of missing class nodes in each type of node that are not included in the initial inheritance tree, determining the node level of the missing class nodes as the preset level to obtain the target inheritance tree.
[0027] In practical implementation, when determining the node hierarchy of various types of nodes in the data to be processed, the parent class field corresponding to each type of node can be read first. The parent class field is used to record the parent class node that the current class node inherits from, derives from, or belongs to. For any type of node, if its parent class field is empty or missing, or if the class node pointed to by the parent class field does not exist in the valid set of class nodes in the data to be processed, then this type of node can be determined as the top-level class node. For example, if the data to be processed includes class nodes such as "Logistics Object", "Waybill", "Order", and "Claim Form", if the parent class field of "Logistics Object" is empty, while the parent class fields of "Waybill" and "Order" both point to "Logistics Object", then "Logistics Object" can be determined as the top-level class node, and "Waybill" and "Order" can be treated as child nodes under "Logistics Object". Furthermore, if multiple top-level classes exist, a virtual root node can be created, and each determined top-level class node can be set as a child node of this virtual root node. The virtual root node can be considered an auxiliary node; it does not change the original class nodes and their inheritance relationships in the data to be processed, but only serves to provide a unified starting node for subsequent hierarchical calculations. Based on this, a correspondence between parent and child nodes can be established according to the parent class fields of various types of nodes, thus forming an initial inheritance tree. For example, the child nodes of "Logistics Object" can include "Waybill" and "Order," and the child nodes of "Waybill" can further include "International Waybill" and "Cold Chain Waybill," thereby forming an initial inheritance tree with multiple levels. Then, the initial inheritance tree can be traversed starting from the virtual root node. The node level of each type of node is determined based on the inheritance hierarchy between the class node and the virtual root node. For example, the level of the virtual root node is determined as level 0, its direct children as level 1, the children of level 1 nodes as level 2, and so on. This ensures that class nodes with direct or indirect inheritance relationships have a clear hierarchical relationship in the 3D visualization space. To avoid some class nodes being excluded from the initial inheritance tree due to missing data, incorrect associations, or abnormal inheritance relationships in the ontology data, an integrity check can be performed on the initial inheritance tree. All class nodes in the data to be processed are matched with the class nodes already included in the initial inheritance tree. If there are any missing class nodes not covered by the initial inheritance tree, their node level can be determined as a preset level, such as level 1, and then these missing class nodes are added to the target inheritance tree used for visualization processing. The preset hierarchy here is primarily used to ensure that missing class nodes can participate in subsequent 3D spatial layout and visualization. It is not used to modify the actual parent class relationship of these nodes in the data to be processed, nor does it change the semantic structure of the ontology data itself. Therefore, while preserving the original inheritance relationship, ontology data with multiple top-level class nodes or those exhibiting anomalies or missing inheritance relationships can be uniformly converted into a complete target inheritance tree, providing a complete and stable hierarchical foundation for subsequent 3D spatial layout based on node hierarchy.
[0028] In this embodiment of the invention, the node importance coefficient can be used to characterize the structural complexity and correlation of various types of nodes in the ontology structure corresponding to the data to be processed, and to subsequently determine the node display size of various types of nodes. Specifically, for various types of nodes in the data to be processed, the subtrees corresponding to various types of nodes can be determined first according to the inheritance relationship between various types of nodes, and the subtrees can be recursively traversed to count the total number of descendant nodes associated downwards by the current type of node, thus obtaining the number of child nodes corresponding to various types of nodes. Here, a subtree refers to a tree-like hierarchical structure composed of one or more child nodes and their descendant nodes associated downwards by the current type of node through inheritance relationship. The number of child nodes includes not only the child nodes directly associated with the current type of node, but also the child nodes further associated downwards by the child nodes, thereby characterizing the scale of the inheritance subtree corresponding to the current type of node. Then, the number of non-inheritance relationships between various types of nodes and other types of nodes can be counted to obtain the number of relationships corresponding to various types of nodes. Non-inheritance relationships can include relationships such as association, trigger, and reference used to describe business connections between different types of nodes, but do not include parent-child relationships used to construct inheritance hierarchy. Simultaneously, the number of attributes corresponding to each type of node can be counted, representing the richness of attribute information contained in the object described by the current type of node. After obtaining the number of child nodes, the number of relationships, and the number of attributes, corresponding weights can be configured for the above three parameters, and calculated according to the following formula:
[0029] Where D represents the number of child nodes; R represents the number of relations; A represents the number of attributes; and a, b, and c represent weight coefficients corresponding to the number of child nodes, relations, and attributes, respectively. Specifically, a adjusts the impact of the size of the inherited subtree on the importance of a node, b adjusts the impact of the number of non-inherited relations on the importance of a node, and c adjusts the impact of the number of attributes on the importance of a node. The specific values can be configured according to the business characteristics or visualization requirements of the data to be processed. Therefore, when a class node has many descendant nodes, many non-inherited relations, or many attributes, its corresponding... The corresponding increase reflects the higher importance of this type of node in the ontology structure. Furthermore, to ensure that the node importance corresponding to different scales of data to be processed can be mapped to a unified numerical range suitable for 3D visualization processing, the importance of each type of node can be adjusted accordingly. Normalization is performed to obtain the node importance coefficients corresponding to various types of nodes. These node importance coefficients are then used as the basis for determining the display size of nodes, enabling different nodes to be visualized at different sizes based on their structural scale, degree of association, and richness of attributes.
[0030] S102: Determine the level radius corresponding to each node level based on the number of child nodes in the node level and the subtree weight corresponding to the parent node.
[0031] In this embodiment of the invention, after obtaining the node levels to which various types of nodes belong, in order to ensure that the class nodes in different node levels can maintain an appropriate distribution spacing in three-dimensional space, a corresponding level radius can be determined for each node level. Specifically, the level radius corresponding to each node level is determined based on the number of child nodes in the node level and the subtree weight corresponding to the parent node, including: determining the distribution density of child nodes in the node level based on the number of child nodes in the node level and the subtree weight corresponding to the parent node, and determining a first candidate radius corresponding to the node level based on the distribution density; determining a second candidate radius corresponding to the node level based on the number of child nodes in the node level; determining a third candidate radius corresponding to the node level based on the level radius of the previous level corresponding to the node level and a preset layer spacing; and determining the maximum value among the first candidate radius, the second candidate radius, and the third candidate radius as the level radius corresponding to the node level.
[0032] In practical implementation, the distribution density of each child node in the current node level can be determined first based on the number of child nodes and the subtree weights corresponding to each parent node. The subtree weight characterizes the size of the subtree corresponding to the parent node; the larger the subtree size, the more space its child nodes typically require. Therefore, the spatial requirements of nodes in the current node level can be quantified by combining the subtree weights and the number of child nodes, and a first candidate radius can be determined accordingly. This first candidate radius should satisfy the spatial distribution requirements of child nodes from different parent nodes in the current node level according to their respective subtree sizes. Based on this, a second candidate radius can be determined based on the number of child nodes in the current node level. The second candidate radius characterizes the basic spatial range required when all child nodes in the current node level need to be circumferentially distributed. That is, as the number of child nodes increases, increasing the second candidate radius ensures sufficient spacing between adjacent child nodes, reducing overlap or excessive clustering between nodes. Simultaneously, the layer radius corresponding to the previous layer of the current node can be obtained, and a third candidate radius can be determined by combining it with the preset layer spacing. This involves adding the layer radius of the previous layer to the preset layer spacing to obtain the minimum radial distance that the current node layer needs to achieve, thus maintaining a certain spatial interval between adjacent node layers and preventing nodes of different layers from being squeezed in three-dimensional space. Then, the first, second, and third candidate radii can be compared, and the maximum value is determined as the layer radius corresponding to the current node layer. Therefore, the determined layer radius simultaneously considers the local space requirements generated by the size of the subtree in the current node layer, the overall space requirements generated by the number of child nodes, and the spacing requirements between adjacent node layers. This allows node layers with a large number of child nodes or a large subtree size to obtain more layout space, thereby reducing node crowding and overlap, and maintaining a balanced three-dimensional spatial distribution between different node layers.
[0033] For example, in the logistics fulfillment ontology, suppose a certain node level includes three parent nodes: "Waybill," "Order," and "Product." The next level has 4, 2, and 1 child nodes respectively. The subtree corresponding to "Waybill" contains more lower-level nodes, therefore its subtree weight is higher than that of "Order" and "Product." The system can determine that the node distribution in the area corresponding to "Waybill" at this level is relatively dense based on the subtree weights of each parent node and the corresponding number of child nodes, thus calculating a first candidate radius that can accommodate the aforementioned child node distribution. Simultaneously, based on the fact that this level contains a total of 7 child nodes, a second candidate radius is calculated to ensure that all child nodes are evenly distributed. If the level radius of the previous level is 100 and the preset inter-level spacing is 30, then a third candidate radius of 130 can be obtained. Assuming the calculated first candidate radius is 150, the second candidate radius is 120, and the third candidate radius is 130, then the maximum value of the three, 150, is taken as the level radius corresponding to this node level.
[0034] S103: Based on the subtree weights corresponding to the parent node, determine the angle sector of each parent node in its respective node level, and determine the node angle corresponding to each child node within the angle sector according to the subtree weights of each child node under the parent node.
[0035] In this embodiment of the invention, the subtree weights corresponding to each parent node can be determined first. The subtree weights characterize the size of the subtrees extending downwards from the corresponding parent node. They can be calculated recursively from bottom to top; for example, the sum of the basic weight of a node and the subtree weights of all its child nodes can be used as the subtree weight of that node. Within the same node level, the allocatable angle of the complete circumference can be determined based on the sum of the subtree weights of each parent node. Then, according to the proportion of each parent node's subtree weight in the complete circumference, a corresponding angle sector is assigned to each parent node. That is, the angle sector corresponding to a certain parent node can be determined based on the ratio of the parent node's subtree weight to the sum of the subtree weights of all parent nodes in the same node level, and this ratio is multiplied by the complete circumference angle 2π. Therefore, parent nodes with larger subtree sizes have larger subtree weights, thus obtaining larger angle sectors and providing more ample circumferential space for their subordinate child nodes; parent nodes with smaller subtree sizes correspond to smaller angle sectors. Furthermore, after determining the angle sectors corresponding to each parent node, for each parent node, its angle sector can be used as the allocatable angle range for all its child nodes. The angle sectors are further divided according to the subtree weights of each child node under that parent node, thus determining the node angles corresponding to each child node. For example, if a parent node has three child nodes with subtree weights of 1, 2, and 3 respectively, the angle sector corresponding to the parent node can be divided into three sub-sectors in a 1:2:3 ratio, maximizing the angle range for the child node with a subtree weight of 3. The center angle or preset position of each sub-sector is then used as the node angle of the corresponding child node. Then, by combining the node level, level radius, and determined node angles of each type of node, the nodes can be mapped to three-dimensional space, thus determining the three-dimensional node positions of each type of node in the final visualization result. The specific mapping method is explained in S104 and will not be elaborated here. This allows parent nodes with larger subtree sizes and their child nodes to have a larger angular space, while the subtrees corresponding to different parent nodes can be distributed relatively independently within their respective angular sectors, thereby reducing node overlap and space contention between different subtrees, and enabling the 3D visualization results to more intuitively reflect the hierarchical structure and subtree size of the ontology.
[0036] For example, assuming there are three parent nodes at the same node level: "Waybill," "Order," and "Product," with subtree weights of 6, 3, and 1 respectively, the total subtree weights of the three parent nodes are 10. The system can divide the 360° of the complete circle into a 6:3:1 ratio. Therefore, the angle sector corresponding to "Waybill" is 216°, the angle sector corresponding to "Order" is 108°, and the angle sector corresponding to "Product" is 36°. It is evident that "Waybill," due to its larger subtree size, can obtain a larger angle space. Further, assuming "Waybill" has three child nodes: "Domestic Waybill," "International Waybill," and "Cold Chain Waybill," with subtree weights of 3, 2, and 1 respectively, the 216° angle sector corresponding to "Waybill" can be further divided into a 3:2:1 ratio, giving the three child nodes sub-sectors of 108°, 72°, and 36° respectively. The center angle of each sub-sector is then used as the node angle of the corresponding child node. Then, based on the level radius corresponding to the level of the node, each child node is arranged within the same circular area according to its corresponding node angle. In this way, "Waybill" and its subordinate nodes can obtain more space due to their larger subtree size, while nodes with smaller subtree size, such as "Goods", occupy less space, thus enabling the overall 3D layout to be rationally allocated according to the actual hierarchical structure and subtree size of the main body.
[0037] S104: Based on the node level, level radius, angle sector and node angle, determine the node position of each type of node in three-dimensional space, and determine the node display size of each type of node based on the node importance coefficient, so as to obtain the visualization result corresponding to the data to be processed.
[0038] In this embodiment of the invention, after determining the level radius corresponding to each node level and the node angle corresponding to each type of node, the nodes can be further mapped to three-dimensional space to determine the node positions corresponding to each type of node. Specifically, the node level can be used as the height dimension of the node in three-dimensional space, the level radius can be used as the radial distance of the node relative to the center position of the three-dimensional space, and the node angle can be used as the circumferential position of the node in the horizontal plane, thereby using the node level, level radius, and node angle to jointly determine the three-dimensional coordinates of the node. For any type of node, the level radius corresponding to the node level of that type of node can be determined as r, the node angle corresponding to that type of node can be determined as angle, the node level corresponding to that type of node can be determined as level, and the position of that type of node in the height direction can be determined according to the preset level height interval heightStep. Then, the node position of the type of node in three-dimensional space can be calculated by the following formula:
[0039] In this system, the x and z coordinates determine the node's position in the horizontal plane; a larger r indicates the node is farther from the center of the 3D space. The angle determines the node's specific direction in the horizontal plane; different nodes with different angles can be distributed along different directions. The y coordinate reflects the node's hierarchy; higher or lower hierarchy levels can be defined by a preset heightStep, creating corresponding hierarchical intervals in the height direction. This allows nodes of the same hierarchy to be primarily distributed at the same spatial height, expanding circumferentially along the horizontal plane based on their corresponding hierarchy radius and node angle. Different node hierarchies are distinguished by intervals in the height direction. For example, assuming a node hierarchy radius of 100, a node angle of 60°, a node hierarchy of 2, and a preset hierarchy height interval of 50, the node's 3D coordinates can be determined using the above formula: x=50, z≈86.6, y=100. This means the node is located approximately 100 units from the center of the 3D space and is at the corresponding height of the 2nd layer. For other nodes at the same level, different x and z coordinates can be determined based on their respective node angles, causing these nodes to be distributed along the corresponding circumferential regions. For nodes at other levels, different y coordinates are used to create height intervals with the current level. In this way, the previously determined node levels, level radii, angular sectors, and node angles can be transformed into actual three-dimensional spatial positions, so that the final spatial distribution of nodes can simultaneously reflect the hierarchical structure of the ontology and the distribution relationship of different subtrees in the circumferential space, thus forming a three-dimensional visualization result with clear hierarchy and spatial structure.
[0040] In this embodiment of the invention, to avoid overlapping or partial overlap of multiple types of nodes determined according to node hierarchy and node angle in spatial location, and to ensure consistent layout results when the same data to be processed is visualized multiple times, a small positional perturbation can be applied to the initial positions of each type of node after determining the initial positions according to node hierarchy and node angle. Specifically, determining the node angle corresponding to each child node includes: performing a deterministic hash operation based on the node identifier corresponding to each type of node to obtain the positional perturbation value corresponding to each type of node; slightly offsetting the initial positions of each type of node according to the positional perturbation value to obtain the node positions corresponding to each type of node, wherein the positional perturbation value corresponding to the same node identifier remains the same; the initial position is determined based on node hierarchy and node angle.
[0041] In practical implementation, node identifiers corresponding to various types of nodes can be obtained. These identifiers are unique identifiers for each node type within the data to be processed, such as node IDs or unique codes. A pre-defined deterministic hash operation is performed on each node identifier to convert it into a corresponding hash value. Then, the hash value is mapped according to a pre-defined rule to obtain the position perturbation value. The position perturbation value can include offsets in different coordinate directions in three-dimensional space, such as X-axis and Z-axis offsets, and may further include Y-axis offsets. Simultaneously, a pre-defined range can be set for the position perturbation value, ensuring that it only slightly adjusts the initial position of the node without changing the node's hierarchy or overall angular sector layout. After obtaining the position perturbation value, it can be superimposed onto the initial position determined based on the node hierarchy and node angle to obtain the node positions corresponding to each type of node. When determining the position perturbation value, the node display size can also be considered to avoid partial overlap of nodes after perturbation. For example, two child nodes may have the same or similar node angles, resulting in identical or close initial positions. In this case, deterministic hashing can be performed on each child node's identifier to obtain different positional perturbation values. Within a preset range, their initial positions can be shifted in different directions or by different magnitudes, thus reducing the possibility of complete or partial overlap. Since the input to the deterministic hashing operation is the node identifier, the same hash result can be obtained for the same node identifier if the hash algorithm and related parameters remain unchanged. Therefore, the positional perturbation value corresponding to the same node identifier also remains the same. This ensures that when the same data is reloaded, the layout calculation is re-executed, or the visualization interface is reopened, the corresponding nodes will still obtain the same positional perturbation, preventing irregular changes in node positions due to random number variations. Thus, while resolving the node position overlap problem through small-amplitude perturbations, the stability and reproducibility of the 3D visualization layout can be maintained.
[0042] In this embodiment of the invention, after determining the node positions and display sizes corresponding to various types of nodes, the visual representation of each type of node in the visualization result can be further determined based on the business domain information, attribute information, and node importance coefficient of each type of node. This ensures that the 3D visualization result not only reflects the spatial hierarchy of various types of nodes but also embodies the business semantics corresponding to different types of nodes. Specifically, obtaining the visualization result corresponding to the data to be processed includes: determining the node display color of each type of node based on the business domain information corresponding to each type of node; wherein, nodes belonging to the same business domain have the same node display color, and nodes belonging to different business domains have different node display colors; determining the semantic identity label of each type of node based on the attribute information of each type of node, and determining the node display shape of each type of node based on the semantic identity label; and obtaining the visualization result of the data to be processed based on the node position, node display size, node display color, and node display shape.
[0043] In practical implementation, the business domain information corresponding to various nodes can be obtained first, such as the waybill domain, order domain, trajectory domain, exception domain, and claims domain in the logistics fulfillment ontology. Then, corresponding node display colors are assigned to various nodes based on the business domain information. In one implementation, if the attribute information of a class node already has a color field configured to specify the display color, that color can be used as the node display color for that class node. If no color field is configured, a color can be assigned to the business domain from a preset color set based on the business domain information corresponding to the class node, and all nodes under that business domain can be set to the same node display color. Different business domains correspond to different node display colors. This allows class nodes belonging to the same business domain to form a node set with consistent visual characteristics in three-dimensional space, facilitating users to quickly identify the boundaries between different business domains and the relationships between them based on color. Furthermore, semantic identity tags can be determined based on the attribute information of various nodes. These semantic identity tags characterize the semantic type or model role of a node within the ontology structure. For example, based on attributes such as `identityType`, `isAbstract`, `mixins`, and `parent`, a node can be identified as a root class, abstract class, mixin class, ordinary class, or other preset semantic types. Specifically, `isAbstract` indicates whether a node is an abstract class, `mixins` indicates whether a node has mixed-in or reused structural features, `parent` helps determine the inheritance hierarchy and parent class relationship of a node, and `identityType` directly characterizes the identity type of the node. After determining the semantic identity tags, different node display shapes can be configured for nodes with different semantic identities based on the pre-established mapping relationship between semantic identity tags and node display shapes. For example, a root class can be mapped to a sphere, an abstract class to a triangle or octahedron, a mixin class or composite class to a rectangle or rhombus, and an ordinary class to a sphere or other preset geometric shape. For newly added semantic identities, corresponding node display shapes can be added by expanding the mapping relationship. Therefore, nodes with different semantic identities can be distinguished by their geometric shapes, allowing users to initially determine the role of a node in the ontology structure without viewing detailed node information. Furthermore, the display size of each type of node can be determined based on the aforementioned node importance coefficients. For example, a base size and allowable size variation range for the node display size can be preset, and the base size can be scaled according to the node importance coefficient, so that nodes with higher importance coefficients have larger display sizes, while nodes with lower importance coefficients have smaller display sizes.The node importance coefficient reflects factors such as the size of the subtree, the number of non-inheritance relationships, and the number of attributes corresponding to a node class. Therefore, when a node class has many descendant nodes, many business relationships, or many attributes, its node display size can be increased accordingly, making it easier to identify in a large-scale ontology. Conversely, for nodes with smaller structural scale and lower degree of association, a relatively smaller node display size can be used to reduce visual congestion caused by displaying a large number of nodes simultaneously. For example, in a logistics fulfillment ontology, a "waybill" node may have multiple subordinate nodes and be related to multiple nodes such as trajectory events, receipt events, and claims verification, while also possessing multiple business attributes. Therefore, it can be displayed as a larger node based on its higher node importance coefficient. Conversely, a common class containing only a few attributes and no subordinate nodes can use a smaller node display size. Finally, the node positions, node display sizes, node display colors, and node display shapes corresponding to various types of nodes can be combined, and corresponding node display objects can be constructed in three-dimensional space based on the combined display parameters to obtain the visualization results corresponding to the data to be processed. Therefore, node position is used to express the hierarchy and spatial distribution of the ontology, node display size is used to highlight class nodes with high structural scale and degree of association, node display color is used to distinguish business domains, and node display shape is used to express the semantic identity of class nodes. This allows the structural and semantic information in the ontology data to be expressed in different visual dimensions, improving the overall readability of the 3D visualization results.
[0044] In this embodiment of the invention, after obtaining the visualization result corresponding to the data to be processed, preview nodes can be set for newly generated but not yet formally incorporated ontology nodes in the data to be processed, so as to display and review the newly added ontology structure without changing the original visualization result. Specifically, after obtaining the visualization result of the data to be processed, the method further includes: in response to the existence of newly added preview nodes, obtaining the preview nodes and grouping the preview nodes according to the associated node identifiers corresponding to the preview nodes; for each group of preview nodes, determining the parent node corresponding to the associated node identifier, and determining the node position of each preview node with the node position corresponding to the parent node as the center; adding the preview nodes to the visualization result of the data to be processed based on the node positions of each preview node; wherein, the preview nodes are different from the various types of nodes in the visualization result in at least one dimension of node display size, node display color, and node display shape.
[0045] In practical implementation, when a new preview node is detected, the data corresponding to the preview node can be obtained, and the associated node identifiers of each preview node can be read. The associated node identifier represents the existing class node corresponding to the preview node. For example, it can be the node identifier of the parent node to which the preview node is to be attached, or it can be the associated class node identifier assigned to the preview node during intelligent modeling or manual editing. Then, the preview nodes can be grouped according to the associated node identifier, so that multiple preview nodes with the same associated node identifier belong to the same preview node group, thus organizing preview nodes belonging to the same new scheme or to be attached to the same existing class node together. For any preview node group, the parent node corresponding to the associated node identifier can be found among the various nodes of the data to be processed based on the associated node identifier of the preview nodes in that group, and the node position of the parent node in the existing visualization results can be obtained. Using the node position of the parent node as the spatial layout center of the preview node group, corresponding node positions are assigned to the preview nodes in that group around the parent node. For example, each preview node can be arranged in the annular area corresponding to the next layer below the parent node, so that the preview node forms an intuitive correspondence with its intended associated parent node in spatial position. When multiple preview nodes correspond to the same parent node, they can be arranged according to their task type, semantic type, or preset sorting rules, and their specific positions in the circular area can be determined sequentially, thus avoiding multiple preview nodes clustered in the same location. After determining the node positions of each preview node, the preview nodes can be overlaid as new display objects into the original visualization results without modifying or regenerating the existing class nodes and their spatial positions in the data to be processed. This allows users to directly observe the semantic position of the new solution based on the original ontology structure. For example, in the logistics fulfillment ontology, there is already a "waybill" class node. The intelligent modeling agent generates candidate nodes such as "high-value claims verification strategy" and "high-value commodity identification rules" according to business needs, and sets their associated node identifiers to the node identifier of "waybill". Then, the above candidate nodes can be divided into the same preview node group, and with the position of the "waybill" node as the center, two preview nodes can be arranged around the "waybill" node, so that business personnel can intuitively judge the spatial and semantic relationship between the new node and the "waybill". To prevent users from mistaking unreleased preview nodes for existing on-the-ground nodes, preview nodes can be differentiated in at least one of the following dimensions: node display size, node display color, and node display shape. For example, preview nodes can be given a special color or halo that distinguishes them from released nodes, their display size can be set differently from that of regular nodes, or a specific display shape can be adopted based on the task type corresponding to the preview node. Furthermore, a preview identifier can be added to the preview node's tag to further indicate that the node is new content awaiting review.This allows for the spatial organization of newly added preview nodes according to their associated nodes while retaining the original ontology visualization structure. These nodes are then identified by visual features that distinguish them from existing nodes, enabling them to be directly overlaid into the original 3D visualization results before formal submission or release. This facilitates business personnel in intuitively reviewing the spatial location, semantic affiliation, and relationship with the existing ontology structure of the newly added nodes.
[0046] In embodiments of the present invention, such as Figure 3 As shown, after calculating the hierarchy, position, display size, display color, and display shape of class nodes, the calculation results can be converted into an intermediate data structure suitable for browser-side 3D rendering. The intermediate data structure can include HoloNode and HoloLink; HoloNode can be used to describe the 3D visualization object corresponding to the class node, and can at least include information such as node identifier, node name, class definition, node importance coefficient, node display shape, node hierarchy, node display color, 3D node position, set of associated node identifiers, and default label transparency; HoloLink can be used to describe the relationship object between class nodes, and can at least include information such as source node, target node, whether it is an inheritance relationship identifier, relationship name, and relationship definition. By constructing the intermediate data structure, the semantic information and layout calculation results in the ontology data can be associated with the data required for browser-side 3D rendering, thus facilitating the subsequent unified construction of node objects and relationship objects.
[0047] After constructing the intermediate data, a container can be created to manage browser-side GPU resources. This container can include resource registration and resource release interfaces. When creating objects that require GPU resources, the newly created resources can be registered in the container through the resource registration interface, forming a unified resource management set for various GPU resources. When events such as ontology data updates, 3D atlas reconstruction, or unloading of current page components occur, the original 3D objects can be removed, and the resource release interface can be called to traverse the registered resources and release the GPU storage space occupied by each resource. For example, when a user switches to a new ontology dataset, the container corresponding to the old atlas can be removed first, the GPU resources used by the old atlas can be released uniformly, and then a new atlas can be created, thereby reducing the continuous resource occupation caused by repeatedly creating rendering resources.
[0048] like Figure 4As shown, to reduce redundant resources generated when rendering a large number of class nodes simultaneously, a shared geometry pool can be established. Specifically, multiple display geometries can be pre-created based on different semantic identities, such as geometries for the root class, for Mixin classes, for abstract classes, and for ordinary classes. These geometries can then be shared resources for multiple nodes to reuse. Simultaneously, corresponding hit geometries can be created for different node types. Hit geometries can be used for mouse ray detection and do not need to be actually displayed in the 3D scene; therefore, relatively simple geometric structures such as low-subdivision spheres can be used and hidden using invisible materials. This avoids creating complex geometries for each class node separately and expands the mouse's pickable range without changing the actual display size of the nodes.
[0049] When constructing node objects, the intermediate node data can be traversed, and the corresponding shared display geometry can be selected based on the node display shape of each type of node. The node display size can then be determined based on the node importance coefficient. For example, a preset base size can be used as a reference, and the scaling ratio of the display mesh object can be adjusted according to the node importance coefficient, so that nodes of higher importance have a larger display size. The display mesh object is rendered using the node display color determined by the business domain color and is set at the 3D coordinate position of the node's intermediate data record. Simultaneously, corresponding hit mesh objects can be attached to the display mesh object. The hit mesh objects use invisible materials and do not participate in the actual visual display, but they can participate in mouse ray detection, thereby expanding the actual clickable area while keeping the node appearance small and refined. Halo objects and text label objects can also be overlaid on the nodes, allowing the nodes to simultaneously have visual emphasis and name identification.
[0050] For halo effects, a singleton halo texture can be used to reduce the number of texture resources created. When creating the halo material for the first time, a pixel buffer determined by the texture width, texture height, and the number of channels per pixel can be allocated. For example, a pixel buffer with a width of N, a height of N, and 4 channels per pixel can be allocated, i.e., N×N×4 bytes of storage space. Each pixel in the texture can be mapped to normalized coordinates with the texture center as the origin, and the squared distance between the pixel position and the texture center can be calculated. Then, the transparency value of the corresponding pixel is determined according to a preset radial decay function, and the RGB channels are set to preset values, thereby generating a data texture with a gradually decaying effect from the center to the edge. The generated data texture can be cached, and subsequent halo objects of different node types can reuse the same data texture, setting the halo color and transparency of different nodes only through the material's color and transparency attributes. Thus, it is not necessary to repeatedly generate halo textures for each node, which can reduce the number of texture objects and the resource overhead of texture creation.
[0051] For class node names, text label textures can also be generated using an off-screen canvas. Specifically, the canvas drawing area can be determined based on the class node name, and the physical pixel size of the canvas can be enlarged according to a preset text scaling ratio to improve the clarity of the text in a scaled 3D scene. When drawing the text, multiple shadow layers with different parameters can be used first. For example, the blur level and transparency of the shadows can be set layer by layer, and a transparent fill style can be used to draw the text, allowing the transparency of multiple shadow layers to gradually overlap while avoiding the shadow color directly covering the text. After completing the shadow drawing, the text itself can be drawn using the color corresponding to the node, and the canvas can be converted into a canvas texture. Then, a material can be constructed based on this canvas texture, and depth testing and depth writing can be disabled to ensure that the text label remains facing the observer, reducing the problem of the label being unreadable due to occlusion in 3D space. This ensures that class node names still have good legibility against dark 3D backgrounds or at different viewing distances.
[0052] When constructing relation objects, HoloLink can be traversed, and different spatial curves can be used to represent them according to the relation type. When the inheritance relation identifier in HoloLink indicates that the current relation is an inheritance relation, the 3D coordinates of the source node and the target node can be obtained, and a 3D straight line curve can be constructed based on the connection path between the two nodes. Then, a tubular geometry can be generated based on the 3D straight line curve. Since inheritance relations are usually used to represent the main hierarchical structure in the ontology, a relatively simple straight line structure and a low number of curve segments can be used. When the intermediate data of the relation represents a cross-domain relation, the 3D coordinates of the source node and the target node can be obtained, and control points can be constructed near the midpoint of the two node positions. A quadratic Bézier curve can be generated based on the control points, the source node, and the target node. Then, a tubular geometry can be generated based on the quadratic Bézier curve, so that the cross-domain relation connects the two nodes with an arc structure. Compared with the straight line representation of inheritance relations, the arc representation of cross-domain relations can form different visual features and reduce the user's recognition burden between the two types of relations. The color, transparency, and radius of the tubular structure of the relation object can also be adjusted according to the relation type or whether it belongs to the preview relation. At the same time as constructing relation objects, a corresponding relation hit object can also be created for each relation. Specifically, in addition to the actually displayed tubular geometry, larger-radius hit tubular objects can be generated based on the same source and target nodes and the same curved path, and these hit tubular objects are added to the interactive picking object set. The displayed tubular objects can have ray detection disabled or be set not to participate in picking, allowing them to primarily handle visual display; the hit tubular objects use an invisible material and are only used to receive mouse rays. Because the spatial range of the hit tubular objects is larger than the actually displayed relationship lines, relationship selection can still be achieved by hitting the tubular objects even if the user does not accurately click on the finer displayed relationship lines. For example, when the radius of the actually displayed relationship lines is small, the user only needs to click on a larger area near the relationship lines to trigger the picking of the corresponding relationship, thereby improving the interactive fault tolerance while maintaining the visual refinement of the relationship lines.
[0053] When users filter the 3D graph according to business domains, they can first determine the class nodes to be retained based on the business domain color or field in the intermediate data of the nodes. Then, they can filter out class nodes belonging to the hidden business domain from all the intermediate data of the nodes, and construct a set of visible node identifiers based on the node identifiers of the remaining class nodes. Afterwards, they can traverse HoloLink and retain only relationship objects where both the source and target nodes exist in the set of visible node identifiers. In this way, after hiding a certain business domain, relationships related to nodes in that business domain that still exist at the other end will not directly form dangling relationship lines, thus ensuring that the filtered 3D graph has complete visual connectivity.
[0054] When the set of visible nodes changes due to the initial loading of the 3D map or business domain filtering, adaptive camera positioning can be performed based on the 3D coordinates of the currently visible nodes. Specifically, the 3D coordinates of all visible nodes can be traversed, and the minimum and maximum values in each coordinate direction can be determined. This constructs an axis-aligned bounding box that covers all visible nodes, and the center point and maximum size of the map body are calculated based on the bounding box. The maximum size can be multiplied by a preset safety factor to obtain the target distance between the camera and the map body. The camera position is then set based on the center point, and the camera orientation is controlled to point the camera towards the center of the map body. Thus, regardless of the number of class nodes contained in the current ontology or the size of the node distribution range, the main map content can be automatically placed within the camera's field of view upon first page entry, reducing the need for users to manually adjust the camera position.
[0055] During the 3D atlas operation, the visual effects can be adjusted in real time based on the status of class nodes. For example, when a preview node is in a pending confirmation state, the transparency or scaling of its halo object can be periodically adjusted to create a pulse effect, thus highlighting the difference between the node and published class nodes. The transparency can also be dynamically adjusted for selected, associated, or interactive nodes and relationships. When users operate with the mouse, they can perform ray detection by hitting mesh objects or tubular objects. After detecting the corresponding object, the selected class node or relationship is determined, and relevant data from the node's intermediate data or relationship's intermediate data is further obtained. Information such as class definition, attributes, and relationship definition is displayed in the details area.
[0056] When ontology data changes, users modify business domain filtering conditions, or 3D graph components are unloaded, the object group and its sub-objects corresponding to the current graph can be removed from the 3D scene first. Then, resources recorded in the GPU resource management container are uniformly released, and existing temporary objects such as nodes, relationships, halos, and labels are cleaned up. The 3D graph can then be reconstructed based on the updated intermediate node and relationship data. By combining 3D object construction, interactive picking, camera positioning, and GPU resource lifecycle management, continuous updates of ontology 3D visualization results can be achieved on the browser side. This reduces the risk of GPU resource leakage caused by repeatedly creating geometry, materials, and textures, while also ensuring rendering performance and interactive experience under large-scale ontology data.
[0057] The final visualization results can be referenced. Figure 5 In this system, the virtual root node is centered; the display shape of abstract class nodes is a triangle, the display shape of Mixin or composite class nodes is a rhombus, and the display shape of ordinary entity class nodes is a sphere, which is used to distinguish semantic identities; nodes in the same business domain are clustered in the same color; inheritance relationships are represented by light-colored straight lines, and cross-domain relationships are represented by arcs.
[0058] According to a second aspect of the embodiments of the present invention, such as Figure 6 As shown, a data visualization device 600 is provided, comprising: The hierarchy determination module 601 is used to determine the node hierarchy of various types of nodes in the data to be processed, and to determine the node importance coefficient of various types of nodes based on the number of child nodes, the number of relationships and the number of attributes corresponding to each type of node. The radius determination module 602 is used to determine the level radius corresponding to each node level based on the number of child nodes in the node level and the subtree weight corresponding to the parent node. Angle determination module 603 is used to determine the angle sector of each parent node in its respective node level based on the subtree weight of the parent node, and to determine the node angle of each child node within the angle sector according to the subtree weight of each child node under the parent node. The visualization module 604 is used to determine the node positions of various types of nodes in three-dimensional space based on node level, level radius, angle sector and node angle, and to determine the node display size of various types of nodes based on node importance coefficient, so as to obtain the visualization results corresponding to the data to be processed.
[0059] Optionally, the hierarchy determination module 601 is specifically used for: Read the parent class field of each type of node, and take the class node whose parent class field is empty or does not point to a valid class node in the data to be processed as the top-level class node; Create a virtual root node, use the virtual root node as the parent node of each top-level class node, and generate the initial inheritance tree corresponding to the data to be processed based on the parent and child class fields of other class nodes in each class, excluding the top-level class node. The node hierarchy of each type of node is determined based on the initial inheritance tree; The initial inheritance tree is checked for completeness. If there are any missing class nodes in the initial inheritance tree, the node level of the missing class nodes is determined to be the preset level to obtain the target inheritance tree.
[0060] Optionally, the radius determination module 602 is specifically used for: Based on the number of child nodes in the node hierarchy and the weight of the subtree corresponding to the parent node, the distribution density of child nodes in the node hierarchy is determined, and the first candidate radius corresponding to the node hierarchy is determined based on the distribution density. The second candidate radius corresponding to the node level is determined based on the number of child nodes in the node level. The third candidate radius corresponding to the node level is determined based on the level radius of the previous level and the preset inter-level spacing. The maximum value among the first, second, and third candidate radii is determined as the level radius corresponding to the node level.
[0061] Optionally, the angle determination module 603 is specifically used for: Deterministic hashing is performed on the node identifiers corresponding to each type of node to obtain the position perturbation values corresponding to each type of node. The initial positions of various types of nodes are slightly offset based on the position perturbation value to obtain the corresponding node positions. The position perturbation value corresponding to the same node identifier remains the same. The initial position is determined based on the node level and node angle.
[0062] Optionally, the visualization module 604 is specifically used for: Based on the business domain information corresponding to each type of node, determine the node display color for each type of node; among them, nodes belonging to the same business domain have the same node display color, while nodes belonging to different business domains have different node display colors. Based on the attribute information of various types of nodes, determine the semantic identity tags of various types of nodes, and determine the node display shape of various types of nodes based on the semantic identity tags; Based on node position, node display size, node display color, and node display shape, the visualization results of the data to be processed are obtained.
[0063] Optionally, the visualization module 604 is also used for: In response to the existence of a new preview node, retrieve the preview node and group the preview nodes according to the associated node identifiers of the preview nodes; For each group of preview nodes, determine the parent node corresponding to the associated node identifier, and determine the node position of each preview node with the node position corresponding to the parent node as the center. Based on the node position of each preview node, the preview nodes are added to the visualization results of the data to be processed; wherein, the preview nodes are different from the various types of nodes in the visualization results in at least one dimension of node display size, node display color, and node display shape.
[0064] According to a third aspect of the present invention, an electronic device for data visualization is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the present invention.
[0065] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the present invention.
[0066] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0067] Figure 7 An exemplary system architecture 700 is shown that can be applied to the data visualization method or data visualization apparatus implemented in this invention.
[0068] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0069] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0070] Terminal devices 701, 702, and 703 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0071] Server 705 can be a server providing various services, such as a backend management server supporting shopping websites browsed by users using terminal devices 701, 702, and 703 (for example only). The backend management server can process received data visualization requests and feed back the processing results (for example only) to the terminal devices.
[0072] It should be noted that the data visualization method provided in this embodiment of the invention is generally executed by server 705, and correspondingly, the data visualization device is generally located in server 705. The data visualization method provided in this embodiment of the invention can also be executed by terminal devices 701, 702, and 703, and correspondingly, the data visualization device can be located in terminal devices 701, 702, and 703.
[0073] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0074] The following is for reference. Figure 8It shows a schematic diagram of the structure of a computer system 800 suitable for implementing a terminal device of the present invention. Figure 8 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0075] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0076] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0077] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this invention.
[0078] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0080] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor. For example, a processor may include a hierarchy determination module, a radius determination module, an angle determination module, and a visualization module. The names of these modules do not necessarily limit the module itself. For instance, the hierarchy determination module can also be described as "a module that determines the node hierarchy of various types of nodes in the data to be processed, and determines the node importance coefficient of various types of nodes based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node."
[0081] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device implements the following method: determining the node hierarchy of various types of nodes in the data to be processed, and determining the node importance coefficient of each type of node based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node; determining the hierarchy radius corresponding to each node hierarchy based on the number of child nodes in the node hierarchy and the subtree weight corresponding to the parent node; determining the angle sector of each parent node in its respective node hierarchy based on the subtree weight corresponding to the parent node, and determining the node angle corresponding to each child node within the angle sector based on the subtree weight of each child node under the parent node; determining the node position of each type of node in three-dimensional space based on the node hierarchy, hierarchy radius, angle sector, and node angle, and determining the node display size of each type of node based on the node importance coefficient, so as to obtain the visualization result corresponding to the data to be processed.
[0082] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data visualization method, characterized in that, include: Determine the node hierarchy of each type of node in the data to be processed, and determine the node importance coefficient of each type of node based on the number of child nodes, the number of relationships, and the number of attributes corresponding to each type of node. The level radius of each node level is determined based on the number of child nodes in the node level and the weight of the subtree corresponding to the parent node. Based on the subtree weights corresponding to the parent node, the angle sector of each parent node in its respective node level is determined, and the node angle corresponding to each child node is determined within the angle sector according to the subtree weights of each child node under the parent node. Based on the node level, level radius, angle sector and node angle, the node position of each type of node in three-dimensional space is determined, and the node display size of each type of node is determined based on the node importance coefficient, so as to obtain the visualization result corresponding to the data to be processed.
2. The method according to claim 1, characterized in that, Determine the node hierarchy of various types of nodes in the data to be processed, including: Read the parent class field of each type of node, and take the class node whose parent class field is empty or does not point to a valid class node in the data to be processed as the top-level class node; Create a virtual root node, use the virtual root node as the parent node of each top-level class node, and generate an initial inheritance tree corresponding to the data to be processed based on the parent and child class fields of other class nodes besides the top-level class node. The node hierarchy of each type of node is determined based on the initial inheritance tree; The initial inheritance tree is subjected to integrity verification. In response to the presence of missing class nodes that are not included in the initial inheritance tree, the node level of the missing class nodes is determined as a preset level to obtain the target inheritance tree.
3. The method according to claim 1, characterized in that, Based on the number of child nodes in a node hierarchy and the subtree weight corresponding to the parent node, determine the hierarchy radius for each node hierarchy, including: Based on the number of child nodes in the node level and the subtree weight corresponding to the parent node, the distribution density of child nodes in the node level is determined, and the first candidate radius corresponding to the node level is determined based on the distribution density. The second candidate radius corresponding to the node level is determined based on the number of child nodes in the node level. The third candidate radius corresponding to the node level is determined based on the level radius of the previous level and the preset inter-level spacing. The maximum value among the first candidate radius, the second candidate radius, and the third candidate radius is determined as the level radius corresponding to the node level.
4. The method according to claim 1, characterized in that, Determine the node angle corresponding to each child node, including: Deterministic hashing is performed on the node identifiers corresponding to each type of node to obtain the position perturbation values corresponding to each type of node. The initial positions of various types of nodes are slightly offset based on the position disturbance value to obtain the node positions corresponding to each type of node. The position disturbance value corresponding to the same node identifier remains the same. The initial position is determined based on the node level and node angle.
5. The method according to claim 1, characterized in that, The visualization results corresponding to the data to be processed are obtained, including: Based on the business domain information corresponding to each type of node, determine the node display color for each type of node; among them, nodes belonging to the same business domain have the same node display color, while nodes belonging to different business domains have different node display colors. Based on the attribute information of various types of nodes, determine the semantic identity tags of various types of nodes, and determine the node display shape of various types of nodes based on the semantic identity tags; Based on the node position, node display size, node display color, and node display shape, the visualization result of the data to be processed is obtained.
6. The method according to claim 1, characterized in that, After obtaining the visualization result of the data to be processed, the process also includes: In response to the existence of a newly added preview node, the preview node is obtained, and the preview nodes are grouped according to the associated node identifier corresponding to the preview node; For each group of preview nodes, determine the parent node corresponding to the associated node identifier, and determine the node position of each preview node with the node position corresponding to the parent node as the center. Based on the node position of each preview node, the preview node is added to the visualization result of the data to be processed; wherein the preview node is different from the various types of nodes in the visualization result in at least one dimension of node display size, node display color, and node display shape.
7. A data visualization device, characterized in that, include: The hierarchy determination module is used to determine the node hierarchy of various types of nodes in the data to be processed, and to determine the node importance coefficient of various types of nodes based on the number of child nodes, the number of relationships and the number of attributes corresponding to each type of node. The radius determination module is used to determine the level radius corresponding to each node level based on the number of child nodes in the node level and the subtree weight corresponding to the parent node. An angle determination module is used to determine the angle sector of each parent node in its respective node level based on the subtree weight corresponding to the parent node, and to determine the node angle corresponding to each child node within the angle sector according to the subtree weight of each child node under the parent node. The visualization module is used to determine the node positions of various types of nodes in three-dimensional space based on the node level, level radius, angle sector and node angle, and to determine the node display size of various types of nodes based on the node importance coefficient, so as to obtain the visualization results corresponding to the data to be processed.
8. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.