A method, device, equipment and medium for drawing a data node map

By obtaining and processing the dependency table, dividing and assigning node coordinates, the problem of complexity and low efficiency of data node map drawing is solved, and more efficient data node map drawing is achieved.

CN118410123BActive Publication Date: 2024-09-17TAIPING FINANCIAL SERVICE CENT (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410881710.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-17
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

The existing data node map drawing method is complex and has low accuracy and efficiency. Especially when the number of nodes is large and the hierarchical relationship changes dynamically, the drawing effect is poor.

Method used

By obtaining the source node to be queried, the dependency table is queried and divided into the first subtree and the second subtree. After assigning node coordinates, the coordinates of the parent node and other nodes at each level are determined according to the hierarchical position relationship, and a data node map is drawn.

Benefits of technology

It improves the accuracy and efficiency of drawing data node maps, adapts to dynamic changes in the number of nodes and hierarchical relationships, and improves the drawing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410123B
    Figure CN118410123B
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for drawing a data node map. The method comprises: obtaining a source node to be queried, and querying a dependency table according to the source node to obtain a dependency tree corresponding to the source node; wherein the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node; after assigning the node coordinates of the source node to standard coordinates, the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree; according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn. Through the technical solution of the present invention, the drawing of the data node map can be realized, and the accuracy and efficiency of the data node map drawing work are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics drawing, and in particular to a method, device, equipment and medium for a data node map. Background Art

[0002] With the popularization and deepening of big data applications, a large number of tasks have complex dependencies, and there are more and more tasks in daily management such as task operation monitoring, retrieval, and analysis. Data maps use graphics to intuitively display task operations and dependencies between tasks. Since the number of task nodes that need to be displayed in a data map is not fixed, and the relative hierarchical and directional relationship attributes will also change dynamically, high requirements are placed on the algorithm for generating positions.

[0003] At present, there are two common generation logics: 1. All nodes are displayed by default, instead of only displaying related tasks according to query needs. The disadvantage of this approach is that when the number of nodes is large, it will cause slow page loading and unclear target tasks. At the same time, in this display method, the node position distribution hierarchy is not obvious, the parent-child relationship lines are of different lengths, and the page is complicated, resulting in poor drawing effect and low accuracy; 2. Fixed route display in advance, determine the relative position of the nodes, and achieve the display effect by controlling the visibility of the line. Because the number and level of big data task nodes will increase, decrease and change at any time. This method of setting the position of the graphics in advance is too changeable for development, resulting in low efficiency in drawing work.

[0004] In summary, the existing data node map drawing methods have the problems of complex drawing methods and low accuracy and efficiency of drawing work. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for data node mapping, which can solve the problems of the existing data node mapping method, that is, the drawing method is complicated, and the accuracy and efficiency of the drawing work are low.

[0006] In a first aspect, an embodiment of the present invention provides a method for drawing a data node map, the method comprising:

[0007] Obtain a source node to be queried, and query a dependency table according to the source node to obtain a dependency tree corresponding to the source node;

[0008] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node;

[0009] After assigning the node coordinates of the source node to the standard coordinates, the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree;

[0010] According to the node coordinates of the source node, parent nodes at each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn.

[0011] In a second aspect, an embodiment of the present invention provides a device for drawing a data node map, the device comprising:

[0012] A dependency tree acquisition module, used to acquire a source node to be queried, and query a dependency table according to the source node to acquire a dependency tree corresponding to the source node;

[0013] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node;

[0014] A node coordinate confirmation module, used to determine the node coordinates of the parent nodes of each level and other nodes in the second subtree according to the hierarchical position relationship between the nodes in the first subtree and the second subtree after assigning the node coordinates of the source node to the standard coordinates;

[0015] A map drawing module is used to draw a data node map corresponding to the source node according to the node coordinates of the source node, parent nodes at each level and other nodes in the second subtree.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for drawing a data node map as described in any embodiment of the present invention.

[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for drawing a data node map as described in any embodiment of the present invention when executed.

[0021] The technical solution of the embodiment of the present invention first obtains the source node to be queried, and queries the dependency table according to the source node to obtain the dependency tree corresponding to the source node, then assigns the node coordinates of the source node to the standard coordinates, and then determines the node coordinates of the parent nodes of each level and other nodes in the second subtree according to the hierarchical position relationship between the nodes in the first subtree and the second subtree. Finally, according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn, which solves the problems of the existing data node map drawing method being complicated and the low accuracy and efficiency of the drawing work, realizes the drawing of the data node map, and improves the accuracy and efficiency of the data node map drawing work.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1a is a flow chart of a method for drawing a data node map provided according to the first embodiment of the present invention;

[0025] Figure 1b This is an example diagram of a data node map obtained by the method provided in Embodiment 1 of the present invention;

[0026] Figure 2 is a flow chart of a method for drawing a data node map provided according to Embodiment 2 of the present invention;

[0027] Figure 3 This is a schematic diagram of the structure of a device for drawing a data node map according to Embodiment 3 of the present invention;

[0028] Figure 4 It is a structural schematic diagram of an electronic device for implementing a method for drawing a data node map according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1a A flowchart of a method for drawing a data node map provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where a data node map is drawn. The method can be executed by a device for drawing a data node map. The device for drawing a data node map can be implemented in the form of hardware and / or software. The device for drawing a data node map can be configured in a terminal or server having a data node map drawing function.

[0033] like Figure 1a As shown, the method includes:

[0034] S110: Obtain a source node to be queried, and query a dependency table according to the source node to obtain a dependency tree corresponding to the source node.

[0035] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node.

[0036] Specifically, the dependency table can be obtained through a built-in database provided by the prior art; illustratively, a source node A to be queried is set, and all data directly or indirectly related to the source node A is queried through the database, and all the data are sorted according to the attributes such as node affiliation and dependency of the data, using the data structure definition instruction Map <String, List <taskmapnode>> childNodeMap processes all data into a dependency table; further, the dependency table includes: the node name of the source node, the node name of each node that has a direct or indirect correlation with the source node, and the relevant information of each node; illustratively, as shown in Table 1, an example of a dependency table with a source node name of 0 is shown. As shown in the figure, source node 0 has a direct dependency with node 123, and in the dependency tree, source node 0 is the parent node of node 123; node 123 has a direct dependency with node 136, that is, source node 0 has an indirect dependency with node 136, and in the dependency tree, node 136 is a double child node of source node 0. Similarly, node 136 has a dependency with nodes 148, 171 and 153, that is, it has an indirect dependency with source node 0, which is not elaborated in this embodiment.

[0037] Table 1: Dependency table

[0038]

[0039] Those skilled in the art should know that the technology of querying the dependency table in the built-in database according to the source node is a mature existing technology, and this embodiment does not limit the specific method of obtaining the dependency table.

[0040] In this embodiment, the first subtree and the second subtree can be divided based on the source node, that is, among all nodes, the nodes that are directly or indirectly the parent nodes of the source node are the nodes in the first subtree, and the nodes that are directly or indirectly the child nodes of the source node are the nodes in the second subtree.

[0041] S120: After assigning the node coordinates of the source node to standard coordinates, determine the node coordinates of the parent nodes of each level and other nodes in the second subtree according to the hierarchical position relationship between the nodes in the first subtree and the second subtree.

[0042] Among them, the node coordinates of the parent nodes of each level are determined according to the hierarchical position relationship between each node in the first subtree, including: determining the level of the parent nodes of each level according to the dependency level of the source node on the parent nodes of each level; determining the horizontal coordinate of each level's parent node according to the level of the parent nodes of each level and the preset standard node interval, and after determining the vertical coordinate of the source node as the vertical coordinate of each level's parent node, the node coordinates of the parent nodes of each level are obtained.

[0043] Furthermore, the level of the parent nodes of each level is determined according to the dependency level of the source node on the parent nodes of each level, including: starting from the first level, in order of the dependency level from small to large, the levels of the parent nodes of each level are numbered incrementally to obtain the level of the parent nodes of each level.

[0044] Specifically, first, starting from level 1, we number the parent nodes of each level in ascending order of dependency levels, that is, the order from the root node of the first subtree to the end of the subtree. This process can be implemented recursively, starting from the parent node at the bottom layer, and numbering upwards in ascending order until the parent node at the top layer. In this way, we get the level of the parent node at each level.

[0045] Further, according to the level of the parent node of each level and the preset standard node interval, the horizontal coordinate of the parent node of each level is determined, including: according to the formula: x i =x i-1 -m, determine the horizontal coordinate x of the parent node of the i-th level i ; Among them, when i>1, is the horizontal coordinate of the parent node at the i-1th level. When i=0, is the horizontal coordinate of the source node, and m is the preset standard node interval.

[0046] S130: Draw a data node map corresponding to the source node according to the node coordinates of the source node, parent nodes at each level, and other nodes in the second subtree.

[0047] Based on the above steps, the node coordinates of all nodes involved in the dependency table can be obtained, and all nodes are plotted in a coordinate system with the source node as the origin according to their coordinates to obtain a data node map corresponding to the source node, such as Figure 1b The data node map matching Table 1 obtained by the method described in the present application is shown, wherein nodes with dependencies are connected by arrows, and the direction of the arrows is from the parent node to the child node.

[0048] The technical solution of the embodiment of the present invention first obtains the source node to be queried, and queries the dependency table according to the source node to obtain the dependency tree corresponding to the source node. After that, the node coordinates of the source node are assigned to standard coordinates, and the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree. Finally, according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn, thereby realizing the drawing of the data node map and improving the accuracy and efficiency of the data node map drawing work.

[0049] Embodiment 2

[0050] Figure 2 A flowchart of a method for drawing a data node map provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. In this embodiment, the method for determining the node coordinates of other nodes in the second subtree according to the hierarchical position relationship between the nodes in the second subtree is specifically refined.

[0051] like Figure 2 As shown, the method includes:

[0052] S210: Obtain a source node to be queried, and query a dependency table according to the source node to obtain a dependency tree corresponding to the source node.

[0053] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node;

[0054] S220 , after assigning the node coordinates of the source node as standard coordinates, determine the node coordinates of the parent nodes of each level according to the hierarchical position relationship between the first subtrees.

[0055] S230. According to a preset traversal order, sequentially obtain a current processing node whose node coordinates have been determined in the second subtree.

[0056] The current processing node is initialized as the source node.

[0057] The preset traversal order may be the display order of nodes at the same level in the dependency table.

[0058] S240: In the second subtree, obtain all child nodes corresponding to the current processing node, and determine a target horizontal axis spacing according to the number value of each of the child nodes.

[0059] In this embodiment, in order to avoid display congestion caused by an excessive number of child nodes corresponding to a currently processed node, the target horizontal axis spacing is determined by the number of child nodes, that is, the more child nodes there are, the larger the target horizontal axis spacing is, so as to avoid display congestion. Specifically, it can be set that for every increase of a child nodes, the spacing increases by b, so as to avoid the problem of node display congestion caused by too many child nodes. wherein a and b are two natural numbers, which can be set by the user according to the actual implementation scenario.

[0060] S250 , determining the horizontal coordinate of each of the child nodes according to the horizontal coordinate of the current processing node and the target horizontal axis spacing.

[0061] Specifically, determining the horizontal coordinate of each of the child nodes according to the horizontal coordinate of the current processing node and the target horizontal axis spacing includes:

[0062] According to the formula: x i = x i − 1 + ( [ ( c i − 1 − 1 ) / n ] + 1 ) * m Calculate the horizontal coordinate of each child node; where, is the horizontal coordinate of the current processing node, is the number of child nodes corresponding to the current processing node, m is the preset standard node spacing, and n is the target horizontal axis spacing.

[0063] S260: After determining the vertical coordinate of each of the child nodes according to the arrangement order of each of the child nodes in the second subtree and a preset standard node interval, obtain the node coordinate of each of the child nodes.

[0064] Specifically, according to the arrangement order of each of the child nodes in the second subtree and the preset standard node interval, the vertical coordinate of each of the child nodes is determined, including: in the second subtree, judging whether the vertical coordinate of the currently processed node is equal to 0; if it is equal to 0, then based on the formula y i = ( − 1 ) ( i m o d 2 ) * [ ( i / 2 ) ] * m Calculate the vertical coordinate of the child node; where m is the preset standard node interval, i is the level of the child node; if it is not equal to 0, and the vertical coordinate of the current processing node is greater than 0, based on the formula Calculate the ordinate of the current processing node; where, is the ordinate of the current processing node; if it is not equal to 0, and the ordinate of the current processing node is less than 0, based on the formula Calculate the ordinate of the current processing node; where, The vertical coordinate of the current processing node.

[0065] S270, returning to execute the operation of sequentially acquiring a currently processed node whose node coordinates have been determined in the second subtree according to a preset traversal order, until the node coordinates of all other nodes in the second subtree are determined.

[0066] S280: Draw a data node map corresponding to the source node according to the node coordinates of the source node, parent nodes at each level, and other nodes in the second subtree.

[0067] The technical solution of the embodiment of the present invention first obtains the source node to be queried, and queries the dependency table according to the source node to obtain the dependency tree corresponding to the source node, and then assigns the node coordinates of the source node to the standard coordinates, and then determines the node coordinates of the parent nodes of each level according to the hierarchical position relationship between the first subtrees, and obtains a current processing node with determined node coordinates in the second subtree in turn according to a preset traversal order, and then obtains all the child nodes corresponding to the current processing node in the second subtree, and determines the target horizontal axis spacing according to the number value of each child node, and determines the horizontal coordinate of the current processing node and the target horizontal axis spacing according to the horizontal coordinate of the current processing node. The horizontal coordinate of each child node is determined, and then the vertical coordinate of each child node is determined according to the arrangement order of each child node in the second subtree and the preset standard node interval, and the node coordinate of each child node is obtained. Then, the operation of obtaining a current processing node with a determined node coordinate in the second subtree in turn according to the preset traversal order is executed until the node coordinates of all other nodes in the second subtree are determined. Finally, according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree, the data node map corresponding to the source node is drawn, thereby realizing the drawing of the data node map and improving the accuracy and efficiency of the data node map drawing work.

[0068] Embodiment 3

[0069] Figure 3 A schematic diagram of the structure of a device for drawing a data node map provided in Embodiment 3 of the present invention.

[0070] like Figure 3 As shown, the device comprises:

[0071] A dependency tree acquisition module 310 is used to acquire a source node to be queried, and query a dependency table according to the source node to acquire a dependency tree corresponding to the source node;

[0072] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node;

[0073] A node coordinate confirmation module 320 is used to determine the node coordinates of the parent nodes of each level and other nodes in the second subtree according to the hierarchical position relationship between the nodes in the first subtree and the second subtree after assigning the node coordinates of the source node to the standard coordinates;

[0074] The map drawing module 330 is used to draw a data node map corresponding to the source node according to the node coordinates of the source node, parent nodes at each level and other nodes in the second subtree.

[0075] The technical solution of the embodiment of the present invention first obtains the source node to be queried, and queries the dependency table according to the source node to obtain the dependency tree corresponding to the source node. After that, the node coordinates of the source node are assigned to standard coordinates, and the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree. Finally, according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn, thereby realizing the drawing of the data node map and improving the accuracy and efficiency of the data node map drawing work.

[0076] Based on the above embodiment, the node coordinate confirmation module 320 includes:

[0077] A parent node level confirmation unit, used to determine the level of the parent nodes at each level according to the dependency level of the source node on the parent nodes at each level;

[0078] The parent node coordinate confirmation unit is used to determine the horizontal coordinate of the parent node of each level according to the level of the parent node of each level and the preset standard node interval, and after determining the vertical coordinate of the source node as the vertical coordinate of each parent node of the level, obtain the node coordinates of the parent nodes of each level.

[0079] Based on the above embodiment, the parent node level confirmation unit includes:

[0080] The numbering unit is used to number the levels of the parent nodes of each level in ascending order of the dependent levels, starting from the first level, to obtain the level of the parent nodes of each level.

[0081] Based on the above embodiment, the parent node coordinate confirmation unit includes:

[0082] The parent node horizontal coordinate confirmation unit is used according to the formula: i =x i-1 -m, determine the horizontal coordinate x of the parent node of the i-th level i ;

[0083] Among them, when i>1, is the horizontal coordinate of the parent node at the i-1th level. When i=0, is the horizontal coordinate of the source node, and m is the preset standard node interval.

[0084] Based on the above embodiment, the node coordinate confirmation module 320 further includes:

[0085] a current processing node determining unit, configured to sequentially obtain a current processing node whose node coordinates have been determined in the second subtree according to a preset traversal order, wherein the current processing node is initialized as the source node;

[0086] a target horizontal axis spacing determination unit, configured to obtain, in the second subtree, all child nodes corresponding to the currently processed node, and determine a target horizontal axis spacing according to a quantity value of each of the child nodes;

[0087] A sub-node horizontal coordinate confirmation unit, used to determine the horizontal coordinate of each sub-node according to the horizontal coordinate of the current processing node and the target horizontal axis spacing;

[0088] A sub-node node coordinate determination unit, configured to obtain the node coordinates of each sub-node after determining the ordinate of each sub-node according to the arrangement order of each sub-node in the second sub-tree and a preset standard node interval;

[0089] The return execution unit is used to return to execute the operation of sequentially acquiring a current processing node whose node coordinates have been determined in the second subtree according to a preset traversal order until the node coordinates of all other nodes in the second subtree are determined.

[0090] Based on the above embodiment, the subnode horizontal coordinate confirmation unit is further used for:

[0091] According to the formula: x i = x i − 1 + ( [ ( c i − 1 − 1 ) / n ] + 1 ) * m Calculate the horizontal coordinate of each child node; where, is the horizontal coordinate of the current processing node, is the number of child nodes corresponding to the current processing node, m is the preset standard node spacing, and n is the target horizontal axis spacing.

[0092] Based on the above embodiment, the subnode horizontal coordinate confirmation unit includes:

[0093] A judging unit, configured to judge whether the vertical coordinate of the currently processed node is equal to 0 in the second subtree;

[0094] The first judgment unit is used to determine if it is equal to 0, based on the formula y i = ( − 1 ) ( i m o d 2 ) * [ ( i / 2 ) ] * m Calculate and obtain the ordinate of the subnode; wherein m is a preset standard node interval, and i is the level of the subnode;

[0095] The second judgment unit is used to determine if the value is not equal to 0 and the ordinate of the current processing node is greater than 0 based on the formula Calculate the ordinate of the current processing node; where, is the vertical coordinate of the current processing node;

[0096] The third judgment unit is used to determine if the value is not equal to 0 and the ordinate of the current processing node is less than 0 based on the formula Calculate the ordinate of the current processing node; where, The vertical coordinate of the current processing node.

[0097] A data node map drawing device provided in an embodiment of the present invention can execute a data node map drawing method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0098] Embodiment 4

[0099] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0100] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0101] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for drawing a data node map.

[0103] Accordingly, the method comprises:

[0104] Obtain a source node to be queried, and query a dependency table according to the source node to obtain a dependency tree corresponding to the source node;

[0105] The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node;

[0106] After assigning the node coordinates of the source node to the standard coordinates, the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree;

[0107] According to the node coordinates of the source node, parent nodes at each level and other nodes in the second subtree, a data node map corresponding to the source node is drawn.

[0108] In some embodiments, a method for drawing a data node map may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for drawing a data node map described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a method for drawing a data node map in any other appropriate manner (e.g., by means of firmware).

[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.< / taskmapnode>

Claims

1. A method for drawing a data node map, characterized in that: include: Obtain a source node to be queried, and query a dependency table according to the source node to obtain a dependency tree corresponding to the source node; The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node; After assigning the node coordinates of the source node to the standard coordinates, the node coordinates of the parent nodes of each level and other nodes in the second subtree are determined according to the hierarchical position relationship between the nodes in the first subtree and the second subtree; Draw a data node map corresponding to the source node according to the node coordinates of the source node, parent nodes at each level, and other nodes in the second subtree; Among them, according to the hierarchical position relationship between each node in the second subtree, the node coordinates of other nodes in the second subtree are determined, including: according to the preset traversal order, a current processing node with determined node coordinates is obtained in turn in the second subtree, wherein the current processing node is initialized as the source node; in the second subtree, all child nodes corresponding to the current processing node are obtained, and the target horizontal axis spacing is determined according to the number value of each child node; according to the horizontal coordinate of the current processing node and the target horizontal axis spacing, the horizontal coordinate of each child node is determined; according to the arrangement order of each child node in the second subtree and the preset standard node spacing, the vertical coordinate of each child node is determined, and the node coordinates of each child node are obtained; return to execute the operation of obtaining a current processing node with determined node coordinates in turn in the second subtree according to the preset traversal order, until the node coordinates of all other nodes in the second subtree are determined.

2. The method according to claim 1, characterized in that According to the hierarchical position relationship between the nodes in the first subtree, the node coordinates of the parent nodes at each level are determined, including: Determine the level of parent nodes at each level according to the dependency level of the source node on the parent nodes at each level; According to the levels of the parent nodes of each level and the preset standard node interval, the horizontal coordinate of the parent node of each level is determined, and the vertical coordinate of the source node is determined as the vertical coordinate of each parent node of the level, so as to obtain the node coordinates of the parent nodes of each level.

3. The method according to claim 2, characterized in that According to the dependency level of the source node on the parent nodes at each level, the level of the parent nodes at each level is determined, including: Starting from the first level, in the order of the dependency level from small to large, the levels of the parent nodes of each level are numbered incrementally to obtain the level of the parent nodes of each level.

4. The method according to claim 2, characterized in that: According to the level of the parent node of each level and the preset standard node interval, the horizontal coordinate of the parent node of each level is determined, including: According to the formula: i =x i-1 -m, determine the horizontal coordinate x of the parent node of the i-th level i ; Among them, when i>1, is the horizontal coordinate of the parent node at the i-1th level. When i=1, is the horizontal coordinate of the source node, and m is the preset standard node interval.

5. The method according to claim 1, characterized in that: Determining the horizontal coordinate of each of the child nodes according to the horizontal coordinate of the current processing node and the target horizontal axis spacing includes: According to the formula: Calculate the horizontal coordinate of each child node; where, is the horizontal coordinate of the current processing node, is the number of child nodes corresponding to the current processing node, m is the preset standard node spacing, and n is the target horizontal axis spacing.

6. The method according to claim 1, characterized in that Determining the ordinate of each of the sub-nodes according to the arrangement order of each of the sub-nodes in the second sub-tree and a preset standard node interval includes: In the second subtree, determining whether the vertical coordinate of the currently processed node is equal to 0; If it is equal to 0, then based on the formula Calculate and obtain the ordinate of the subnode; wherein m is a preset standard node interval, and i is the level of the subnode; If it is not equal to 0, and the ordinate of the current processing node is greater than 0, based on the formula Calculate the ordinate of the current processing node; where, is the vertical coordinate of the current processing node; If it is not equal to 0, and the ordinate of the current processing node is less than 0, based on the formula Calculate the ordinate of the current processing node; where, The vertical coordinate of the current processing node.

7. A device for drawing a data node map, characterized in that: include: A dependency tree acquisition module, used to acquire a source node to be queried, and query a dependency table according to the source node to acquire a dependency tree corresponding to the source node; The dependency tree is divided into a first subtree and a second subtree through the source node, the first subtree is a branchless structure including at least one hierarchical parent node of the source node, and the second subtree is a standard tree structure with the source node as the root node; A node coordinate confirmation module, used to determine the node coordinates of the parent nodes of each level and other nodes in the second subtree according to the hierarchical position relationship between the nodes in the first subtree and the second subtree after assigning the node coordinates of the source node to the standard coordinates; A map drawing module, used for drawing a data node map corresponding to the source node according to the node coordinates of the source node, the parent nodes of each level and other nodes in the second subtree; Among them, the node coordinate confirmation module includes: a current processing node determination unit, which is used to obtain a current processing node with determined node coordinates in the second subtree in sequence according to a preset traversal order, wherein the current processing node is initialized as the source node; a target horizontal axis spacing determination unit, which is used to obtain all child nodes corresponding to the current processing node in the second subtree, and determine the target horizontal axis spacing according to the number value of each child node; a child node horizontal coordinate confirmation unit, which is used to determine the horizontal coordinate of each child node according to the horizontal coordinate of the current processing node and the target horizontal axis spacing; a child node coordinate determination unit, which is used to determine the vertical coordinate of each child node according to the arrangement order of each child node in the second subtree and the preset standard node spacing, and then obtain the node coordinates of each child node; a return execution unit, which is used to return to execute the operation of obtaining a current processing node with determined node coordinates in sequence in the second subtree in accordance with a preset traversal order, until the node coordinates of all other nodes in the second subtree are determined.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for drawing a data node map as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for drawing a data node map according to any one of claims 1 to 6 when executed.