Business link view layout method and related equipment
By obtaining the browser width, dependencies between business nodes and node information, it is divided into main chain nodes and branch chain nodes, and the node coordinates are determined based on this information, and finally the business link view is laid out, which solves the lack of business-friendly information in the existing technology. The issue of the layout method of the link view realizes the rapid layout and data visualization of the business link view.
Patent Information
- Application Number
- CN202210297765.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-03-23
AI Technical Summary
In the prior art, there is a lack of layout methods suitable for business link view, and it is difficult to realize data visualization and rapid layout of business links.
A business link view layout method is proposed. By obtaining the browser width, dependencies between business nodes and node information, it is divided into main chain nodes and branch chain nodes, and the node coordinates are determined based on these information, and the business link view is finally laid out.
It realizes the rapid layout, flexible adjustment and flexible expansion of the business link view, enables technicians to clearly know the dependencies of each node in the business link, and solves the problem of the lack of layout method suitable for the business link view in the existing technology. .
Smart Images

Figure CN114879956B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data visualization technology, and in particular to a business link view layout method and related equipment. Background Art
[0002] Data visualization is mainly aimed at conveying and communicating information clearly and effectively through graphical means. The front-end JavaScript libraries for data visualization include D3js, go.js, AntV G6, highcharts, echarts, etc. The layout methods supported by these libraries by default are only applicable to specific scenarios. In the existing technology, there is a lack of layout methods suitable for business chain views. Summary of the invention
[0003] In view of this, the purpose of this application is to propose a service link view layout method and related equipment.
[0004] Based on the above purpose, the present application provides a business chain view layout method, wherein the business chain includes multiple business nodes, and the method includes: obtaining the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes; according to the dependency relationship, dividing the multiple business nodes into multiple main chain nodes and multiple branch nodes; according to the dependency relationship, determining the main chain node coordinates of the main chain node, and the branch node coordinates of the branch node; and laying out the business chain view according to the main chain node coordinates and the branch node coordinates.
[0005] Based on the same inventive concept, the present application also provides a business link view layout device, wherein the business link includes multiple business nodes, and the device includes: an acquisition module, configured to acquire the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes; a node determination module, configured to divide the multiple business nodes into multiple main chain nodes and multiple branch nodes according to the dependency relationship; a coordinate determination module, configured to determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch node according to the dependency relationship, the width of the browser and the node information; a layout module, configured to layout the view of the business link according to the main chain node coordinates and the branch node coordinates.
[0006] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes any one of the service link view layout methods.
[0007] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, characterized in that the computer instructions are used to enable a computer to execute any service link view layout method.
[0008] From the above, it can be seen that the business chain view layout method and related equipment provided by the present application, wherein the method includes: obtaining the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes; according to the dependency relationship, the multiple business nodes are divided into multiple main chain nodes and multiple branch nodes; according to the dependency relationship, the main chain node coordinates of the main chain node, and the branch node coordinates of the branch node, are determined; according to the main chain node coordinates and the branch node coordinates, the business chain view is laid out. The method provided by the present application can be applied to the layout of the business chain view, realizes the data visualization of the business chain, and can realize the rapid layout, flexible adjustment and flexible expansion of the business chain view, so that the technical personnel can clearly know the dependency relationship of each node in the business chain, and solves the problem of the lack of layout methods applicable to the business chain view in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic diagram of a flow chart of a business link view layout method according to an embodiment of the present application;
[0011] Figure 2 This is a schematic diagram of a business link view after the layout is completed in an embodiment of the present application;
[0012] Figure 3 A schematic diagram of the flow chart of a method for laying out a partial service link view according to an embodiment of the present application;
[0013] Figure 4 This is a schematic diagram of the structure of a service link view layout device according to an embodiment of the present application;
[0014] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0015] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0016] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0017] An embodiment of the present application provides a method for configuring a service link view, wherein the service link includes multiple service nodes, such as Figure 1 As shown, the method includes:
[0018] Step S101, obtaining the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes. The dependency relationship includes the order in which the business flows into each of the business nodes and the calling relationship between the business nodes; the node information includes the main chain node height, the main chain node width, the branch node height, the main chain margin parameter, and the branch margin parameter. In a specific embodiment, the main chain node and the branch node are both represented by geometric figures, and the main chain node height, main chain node width and branch node height are all the length or width of the area occupied by the geometric figures, such as the length and width of a square, the diameter of a circle, etc.; the main chain margin parameter represents the gaps between the main chain nodes and the branch nodes with branch margin parameters, and the main chain node height, main chain node width, branch node height, main chain margin parameters and branch margin parameters are all pre-set by technicians; the width of the browser is the width of the browser used to display the business link view, and the above-mentioned browser width, main chain node height, main chain node width, branch node height, main chain margin parameters and branch margin parameters are all in pixels.
[0019] Step S102: divide the multiple business nodes into multiple main chain nodes and multiple branch chain nodes according to the dependency relationship. In specific implementation, the business nodes that have a call relationship with the main function in the business chain are determined as main chain nodes, and the business nodes that have a call relationship with the main chain node function are determined as branch chain nodes.
[0020] Step S103: Determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch node according to the dependency relationship, the width of the browser and the node information. Determine the coordinates of each business node according to the dependency relationship and node information of each business node in the business chain, and realize the data visualization layout suitable for the business chain view.
[0021] Step S104: Layout the service link view according to the main chain node coordinates and the branch chain node coordinates. Layout the service link view according to the coordinates of each service node, so as to realize rapid layout, flexible adjustment and flexible expansion of the service link view.
[0022] The business link view layout method provided by the present application includes: obtaining the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes; according to the dependency relationship, the multiple business nodes are divided into multiple main chain nodes and multiple branch nodes; according to the dependency relationship, the main chain node coordinates of the main chain node and the branch node coordinates of the branch node are determined; according to the main chain node coordinates and the branch node coordinates, the business link view is laid out. The method provided by the present application can be applied to the layout of the business link view, realizes the data visualization of the business link, and can realize the rapid layout, flexible adjustment, flexible expansion, automatic rendering of the link view, and display of dynamic effects and real-time data of the business link view, so that the technicians can clearly know the dependency relationship of each node in the business link according to the visualization information, and solve the problem of the lack of layout methods suitable for business link views in the prior art.
[0023] In some embodiments, the node information includes the main chain node height, the main chain node width, the branch node height, the main chain margin parameter and the branch chain margin parameter, such as Figure 2 As shown, the business link includes a main chain (composed of main chain nodes 1 to 11) and multiple branch chains (for example, branch chain nodes 2-1 to 2-3 constitute a branch chain, and branch chain node 3-1 alone constitutes a branch chain). The main chain includes multiple main chain levels ( Figure 2There are three main chain levels in the network, among which main chain nodes 1 to 4 are located in the first main chain level, main chain nodes 5 to 8 are located in the second main chain level, and main chain nodes 9 to 11 are located in the third main chain level), each of the branch chains includes multiple branch chain levels, each branch chain level has only one branch node, and the branch chain is located between two main chain levels of the main chain; Figure 3 As shown, the step S103 includes:
[0024] Step S201, determine the number of main chain nodes per layer of each main chain level according to the main chain margin parameter, the width of the browser and the width of the main chain node. Considering the width of the browser and the width of the main chain node during layout can ensure that each main chain node has sufficient layout space, and further ensure that the technicians can clearly understand the dependency relationship between each business node in the business chain.
[0025] Step S202: Determine the main chain node serial number of each main chain node according to the dependency relationship, and determine the main chain level serial number of each main chain node according to the main chain node serial number and the number of main chain nodes in each layer. During layout, first preliminarily determine the position information of each main chain node (i.e., the main chain node serial number and the main chain level serial number), and replace the position information with a simple serial number to facilitate the confirmation of the main chain node coordinates in subsequent steps.
[0026] Step S203, determine the branch level sequence number of each branch node according to the dependency relationship, and determine the interval height between two adjacent main chain levels according to the branch margin parameter, the branch level sequence number and the branch node height. Considering the interval height between two adjacent main chain levels during layout can ensure that each branch node has sufficient layout space, and further ensure that the technicians can clearly understand the dependency relationship of each business node in the business link.
[0027] Step S204: Determine the main chain node coordinates of each main chain node according to the main chain margin parameter, the main chain node height, the main chain node sequence number, the number of main chain nodes in each layer, the main chain node width, the main chain level sequence number, and the interval height. In specific implementation, the main chain node coordinates are the coordinates of the center position of the main chain node, and the position coordinates of each main chain node are calculated, which can facilitate the overall layout of the business link view in subsequent steps.
[0028] Step S205, determine the branch node sequence number according to the dependency relationship, and determine the branch node coordinates of each branch node according to the main chain node height, the branch margin parameter, the branch node sequence number, the main chain node width, the main chain node coordinates, the main chain node sequence number, the number of main chain nodes per layer, the branch node height and the branch level sequence number. In specific implementation, the branch node coordinates are the coordinates of the center position of the branch node, and the position coordinates of each branch node are calculated, which can facilitate the overall layout of the business link view in subsequent steps.
[0029] In some embodiments, Figure 2 As shown, the number of the main chain nodes at each main chain level is the same, and the step S201 includes:
[0030] The number of main chain nodes in each layer is determined using the following formula:
[0031]
[0032] Where N is the number of main chain nodes in each layer, W is the width of the browser, a is the width of the main chain node, and α is the main chain margin parameter, which represents the gap between the main chain nodes. When using the above formula to determine the number of main chain nodes in each layer, if only The result is the maximum number of main chain nodes that can be arranged by the browser in a main chain level. The embodiment of the present application adds the main chain margin parameter on this basis, which can ensure that the main chain nodes are not too compact during layout, and leave space on the left and right sides of the business chain view after layout, further ensuring that technical personnel can clearly understand the dependency relationship between each business node in the business chain.
[0033] In some embodiments, the dependency relationship includes the order in which services flow into each of the service nodes; the step S202 includes:
[0034] The main chain node sequence number of each main chain node is determined according to the order in which the business flows into each main chain node, wherein the main chain node sequence number of the main chain node into which the business first flows is 1, and the main chain node sequence numbers of the remaining main chain nodes are incremented according to the order in which the business flows in.
[0035] The main chain level number of each main chain node is determined using the following formula:
[0036]
[0037]
[0038] Wherein, N is the number of main chain nodes in each layer, i is the main chain node serial number, i=1,2,3,…,k, k is the total number of main chain nodes in the service link, and c is The quotient of The remainder, L i is the main chain level number of the main chain node with main chain node number i. Figure 2 As shown, in a specific embodiment, the number of main chain nodes in each layer is 4, the main chain node with main chain node sequence number 1 to 4 has a main chain level sequence number 1, the main chain node with main chain node sequence number 5 to 8 has a main chain level sequence number 2, and the main chain node with main chain node sequence number 9 to 11 has a main chain level sequence number 3.
[0039] In some embodiments, step S203 includes:
[0040] The branch level sequence number of each branch node is determined according to the order in which the business flows into each branch node, wherein the branch level sequence number of the branch node into which the business first flows is 1, and the branch level sequence numbers of the remaining branch nodes are incremented according to the order in which the business flows in. Figure 2 As shown, taking branch node 2-1 as an example, the "1" after the "-" is the branch level sequence number of the branch node.
[0041] The spacing height is determined using the following formula:
[0042] H m,m+1 =n max(m,m+1) ×(b+β)+β
[0043] Among them, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, m is an integer greater than or equal to 1, n max is the branch level number of the branch node with the largest branch level number in the branch between the mth main chain level and the m+1th main chain level, b is the branch node height, β is the branch margin parameter, and the branch margin parameter is the gap between branch nodes and between branch nodes and main chain nodes. Figure 2 As shown, in a specific embodiment, the branch node with the largest branch level sequence number between the 1st and 2nd main chain levels is "branch node 2-3", and the branch node with the largest branch level sequence number between the 2nd and 3rd main chain levels is "branch node 7-2", so the interval height between the 1st and 2nd main chain levels is 3b+4β, and the interval height between the 2nd and 3rd main chain levels is 2b+3β.
[0044] When determining the spacing height using the above formula, if only H is calculated m,m+1 =nmax ×b, the result is the minimum distance between the two main chain levels. The embodiment of the present application adds a branch margin parameter on this basis, which can ensure that the branch nodes will not be too compact during layout, and further ensure that the technical personnel can clearly know the dependency relationship between the business nodes in the business link.
[0045] In some embodiments, the main chain node coordinates include the main chain node x coordinate and the main chain node y coordinate, and step 204 includes:
[0046] Step S301, determine the x-coordinate of the main chain node using the following formula:
[0047]
[0048]
[0049] Among them, T ix is the x-coordinate of the main chain node with main chain node number i, N is the number of main chain nodes in each layer, i is the main chain node number, c is The quotient of The remainder, L i is the main chain level number of the main chain node with main chain node number i, a is the main chain node width, and α is the main chain margin parameter. Figure 2 As shown, for the sake of aesthetic layout, the arrangement direction of the odd-numbered main chain layers is opposite to that of the even-numbered main chain layers. In this embodiment, the odd-numbered main chain layers are arranged from left to right, and the even-numbered main chain layers are arranged from right to left. Therefore, the calculation method of the main chain node x-coordinates for main chain layers with different odd and even numbers in the above formula is slightly different. In another embodiment, the odd-numbered main chain layers can be arranged from right to left, and the even-numbered main chain layers can be arranged from left to right, and the above formula can be adjusted adaptively. Figure 2 In the embodiment shown, the x-coordinate of the main chain node increases from left to right. In specific implementation, the x-coordinate of the main chain node can increase from left to right or from right to left, and can be adaptively adjusted according to actual needs. In addition, the design of the above formula also takes into account the design made in step S201 to prevent the layout of the main chain nodes from being too compact, ensuring that the calculation of the x-coordinate of the main chain node is more accurate and the layout of the main chain node in the business link is accurate. Figure 2 As shown, in a specific embodiment, taking main chain nodes 1, 2, 4, 5, 6, and 8 as an example, the number of main chain nodes in each layer is 4, the main chain level numbers of main chain nodes 1 and 2 are odd numbers, and the remainder after division by 4 is not zero, then the main chain node x coordinate of main chain node 1 is The main chain node x coordinate of main chain node 2 is The main chain node 4's main chain level number is an odd number, and the remainder when divided by 4 is zero, then the main chain node x coordinate of main chain node 4 is The main chain level numbers of main chain nodes 5 and 6 are even numbers, and the remainder when divided by 4 is not zero, then the main chain node x coordinate of main chain node 5 is The x coordinate of the main chain node of chain node 6 is The main chain node 8's main chain level number is an even number, and the remainder when divided by 4 is zero, then the main chain node x coordinate of main chain node 8 is It can be seen from this embodiment that the x-coordinates of the main chain nodes of two adjacent main chain levels are in one-to-one correspondence, which can further ensure that the layout of the business link view is beautiful and clear.
[0050] Step S302: Determine the y coordinate of the main chain node using the following formula:
[0051]
[0052] Among them, T iy is the y coordinate of the main chain node with main chain node number i, L i is the main chain level number of the main chain node with main chain node number i, T 0y is the main chain node y coordinate of the main chain node with the preset main chain level number 1, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, and h is the main chain node height. In a specific embodiment, T 0y =0, in specific implementation, T 0y The value can be adjusted adaptively according to actual needs. Figure 2 In the embodiment shown, the y coordinates of the main chain nodes increase from top to bottom. In specific implementation, the y coordinates of the main chain nodes may increase from top to bottom or from bottom to top, and may be adaptively adjusted according to actual needs. Figure 2 As shown in a specific embodiment, taking the main chain nodes 7 and 10 as examples, the main chain node y coordinate of the main chain node 7 is T 0y +h+3b+4β, the main chain node y coordinate of main chain node 10 is T 0y +2h+5b+7β.
[0053] In some embodiments, the branch node coordinates include the branch node x coordinates and the branch node y coordinates, the dependency relationship also includes the calling relationship between the business nodes, the calling relationship exists between the adjacent branch nodes of the branch, and each branch has the calling relationship with a main chain node; the step S205 includes:
[0054] Step S401: Determine the branch node sequence number according to the calling relationship between the branch nodes and between the branch and the main chain node, such as Figure 2 As shown, the branch node serial numbers of all the branch nodes in the branch are the same and equal to the main chain node serial number of the main chain node that has a calling relationship with the branch.
[0055] Step S402: Determine the x-coordinate of the branch node using the following formula:
[0056]
[0057]
[0058] Wherein, j is the branch node number, F jx is the branch node x coordinate of the branch node with branch node number j, T jx is the main chain node x coordinate of the main chain node that has the calling relationship with the branch chain where the branch chain node is located, N is the number of main chain nodes in each layer, j is the branch chain node sequence number, and e is The quotient of The remainder of , a is the width of the main chain node. If the remainder of the branch node number divided by the number of main chain nodes in each layer is zero, it means that the main chain node with a calling relationship with the branch of the branch node is located at the corner of the business link view, then the branch cannot be directly arranged under the main chain node. After simulation test debugging, the embodiment of the present application makes the x-coordinate of the branch node in the branch of the main chain node at the corner offset in the direction of decreasing x-coordinate by 1 / 3 of the main chain node width. This setting can avoid the overlap of the branch node of the branch of the main chain node at the corner with other business nodes. Figure 2 As shown, in a specific embodiment, taking branch node 2-2 and branch node 4-1 as examples, the branch node x coordinate of branch node 2-2 is the main chain node x coordinate of main chain node 2, that is, The branch node x coordinate of branch node 4-1 is the main chain node x coordinate of main chain node 4, which is offset to the left by 1 / 3 of the main chain node width.
[0059] Step S403: Determine the y coordinate of the branch node using the following formula:
[0060]
[0061] Where n is the branch level number of the branch node, F jny is the branch node y coordinate of the branch node with branch node number j and branch level number n, T jyis the main chain node y coordinate of the main chain node that has the calling relationship with the branch where the branch node is located, is the branch node height, β is the branch margin parameter, the branch margin parameter is the gap between branch nodes and between branch nodes and main chain nodes, and h is the main chain node height. The above formula takes into account the design made in step S203 to prevent the layout of each branch node from being too compact, which can ensure that the calculation of the branch node y coordinate is more accurate and the branch node is accurately laid out in the business chain. Figure 2 As shown in a specific embodiment, taking branch node 4-2 and branch node 7-1 as examples, after calculation by the above formula, the branch node y coordinate of branch node 4-2 is The branch node y coordinate of branch node 7-1 is
[0062] In a specific embodiment, the method also includes: adding a branch switch to the main chain node that has a calling relationship with the branch node to display or hide the branch of the main chain node, so as to facilitate technicians to view the business link view that only includes the main chain node.
[0063] In a specific embodiment, the method further includes: adding a transaction information switch for each of the business nodes to display or hide the transaction information of the business node, so as to facilitate technical personnel to view the business link view that only includes the call relationship between the business nodes.
[0064] In a specific embodiment, the method also includes: adding an alarm reminder for each of the business nodes to display the alarm information of the business node. In response to the existence of the alarm information, the business node presents a flashing effect, so that the technician can clearly know the failed business node, and the specific alarm information can be viewed by hovering the mouse over the business node.
[0065] In a specific embodiment, the method also includes: adding an information change reminder for each business node to display the change information of the business node, so that technical personnel can understand the recent information changes of the business node. The specific change information can be viewed by hovering the mouse over the business node.
[0066] In a specific embodiment, Figure 2 As shown, the method further includes: adding directed arrows between each business node according to the dependency relationship, and setting the arrow flow effect to facilitate technical personnel to view the calling relationship between each business node.
[0067] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0068] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0069] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a service link view layout device.
[0070] refer to Figure 4 , the service link view layout device, wherein the service link includes a plurality of service nodes, and the device includes:
[0071] The acquisition module 10 is configured to acquire the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes;
[0072] The node determination module 20 is configured to divide the plurality of service nodes into a plurality of main chain nodes and a plurality of branch chain nodes according to the dependency relationship;
[0073] A coordinate determination module 30, configured to determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch node according to the dependency relationship, the width of the browser and the node information;
[0074] The layout module 40 is configured to layout the view of the service link according to the main chain node coordinates and the branch chain node coordinates.
[0075] The business link view layout device provided by the present application includes: an acquisition module, configured to acquire the width of the browser, the dependency relationship between the multiple business nodes, and the node information of the multiple business nodes; a node determination module, configured to divide the multiple business nodes into multiple main chain nodes and multiple branch nodes according to the dependency relationship; a coordinate determination module, configured to determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch node according to the dependency relationship, the width of the browser, and the node information; a layout module, configured to layout the view of the business link according to the main chain node coordinates and the branch node coordinates. The device provided by the present application can be applied to the layout of the business link view, realizes the data visualization of the business link, and can realize the rapid layout, flexible adjustment and flexible expansion of the business link view, so that the technicians can clearly know the dependency relationship of each node in the business link according to the visualization information, and solve the problem of the lack of layout methods suitable for business link views in the prior art.
[0076] In some embodiments, the node information includes a main chain margin parameter, a branch chain margin parameter, a main chain node height, a main chain node width, and a branch chain node height, the service link includes a main chain and multiple branches, the main chain includes multiple main chain levels, each branch chain includes multiple branch chain levels, and the branch chain is located between two main chain levels of the main chain; the coordinate determination module includes:
[0077] A main chain node number determination unit at each layer, configured to determine the number of main chain nodes at each layer of each main chain level according to the main chain margin parameter, the width of the browser and the main chain node width;
[0078] A main chain level number determination unit is configured to determine the main chain node number of each of the main chain nodes according to the dependency relationship, and determine the main chain level number of each of the main chain nodes according to the main chain node number and the number of main chain nodes in each layer;
[0079] an interval height determination unit, configured to determine a branch level sequence number of each branch node according to the dependency relationship, and determine an interval height between two adjacent main chain levels according to the branch margin parameter, the branch level sequence number and the branch node height;
[0080] A main chain node coordinate determination unit is configured to determine the main chain node coordinates of each main chain node according to the main chain margin parameter, the main chain node height, the main chain node sequence number, the number of main chain nodes per layer, the main chain node width, the main chain layer sequence number and the interval height;
[0081] The branch node coordinate determination unit is configured to determine the branch node serial number according to the dependency relationship, and determine the branch node coordinates of each branch node according to the main chain node height, the branch margin parameter, the branch node serial number, the main chain node width, the main chain node coordinates, the main chain node serial number, the number of main chain nodes in each layer, the branch node height and the branch level serial number.
[0082] In some embodiments, the unit for determining the number of main chain nodes in each layer is further configured to: determine the number of main chain nodes in each layer using the following formula:
[0083]
[0084] Wherein, N is the number of main chain nodes in each layer, W is the width of the browser, a is the width of the main chain node, and α is the main chain margin parameter.
[0085] In some embodiments, the dependency relationship includes the order in which services flow into each of the service nodes; the main chain level sequence number determination unit is further configured to:
[0086] Determine the main chain node sequence number of each main chain node according to the order in which the business flows into each main chain node;
[0087] The main chain level number of each main chain node is determined using the following formula:
[0088]
[0089]
[0090] Wherein, N is the number of main chain nodes in each layer, i is the main chain node serial number, i=1,2,3,…,k, k is the total number of main chain nodes in the service link, and c is The quotient of The remainder, L i is the main chain level number of the main chain node with the main chain node number i.
[0091] In some embodiments, the interval height determination unit is further configured to:
[0092] Determine the branch level sequence number of each branch node according to the order in which the services flow into each branch node;
[0093] The spacing height is determined using the following formula:
[0094] H m,m+1 =n max(m,m+1) ×(b+β)+β
[0095] Among them, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, m is an integer greater than or equal to 1, n max is the branch level number of the branch node with the largest branch level number in the branch between the mth main chain level and the m+1th main chain level, b is the branch node height, and β is the branch margin parameter.
[0096] In some embodiments, the main chain node coordinates include the main chain node x coordinate and the main chain node y coordinate, and the main chain node coordinate determination unit is further configured to:
[0097] The x-coordinate of the main chain node is determined using the following formula:
[0098]
[0099]
[0100] Among them, T ix is the x-coordinate of the main chain node with main chain node number i, N is the number of main chain nodes in each layer, i is the main chain node number, c is The quotient of The remainder, L i is the main chain level number of the main chain node with the main chain node number i, a is the main chain node width, and α is the main chain margin parameter;
[0101] The y coordinate of the main chain node is determined using the following formula:
[0102]
[0103] Among them, T iy is the y coordinate of the main chain node with main chain node number i, L i is the main chain level number of the main chain node with main chain node number i, T 0y is the main chain node y coordinate of the main chain node with the preset main chain level number 1, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, and h is the main chain node height.
[0104] In some embodiments, the branch node coordinates include branch node x coordinates and branch node y coordinates, the dependency relationship also includes a call relationship between each of the business nodes, the call relationship exists between adjacent branch nodes of the branch, and each branch has a call relationship with a main chain node; the branch node coordinate determination unit is further configured to:
[0105] Determine the branch node sequence number according to the calling relationship between the branch nodes and between the branch and the main chain node, the branch node sequence number of all the branch nodes in the branch being the same and equal to the main chain node sequence number of the main chain node having a calling relationship with the branch;
[0106] The x-coordinate of the branch node is determined using the following formula:
[0107]
[0108]
[0109] Wherein, j is the branch node number, F jx is the branch node x coordinate of the branch node with branch node number j, T jx is the main chain node x coordinate of the main chain node that has the calling relationship with the branch chain where the branch chain node is located, N is the number of main chain nodes in each layer, j is the branch chain node sequence number, and e is The quotient of The remainder of , a is the width of the main chain node;
[0110] The y coordinate of the branch node is determined using the following formula:
[0111]
[0112] Where n is the branch level number of the branch node, F jny is the branch node y coordinate of the branch node with branch node number j and branch level number n, T jy is the main chain node y coordinate of the main chain node that has the calling relationship with the branch where the branch node is located, b is the branch node height, β is the branch margin parameter, and h is the main chain node height.
[0113] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0114] The apparatus of the above embodiment is used to implement the corresponding service link view layout method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0115] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the service link view layout method described in any of the above embodiments is implemented.
[0116] Figure 5 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 510, a memory 520, an input / output interface 530, a communication interface 540, and a bus 550. The processor 510, the memory 520, the input / output interface 530, and the communication interface 540 are connected to each other in communication within the device through the bus 550.
[0117] The processor 510 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0118] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 520 and are called and executed by the processor 510.
[0119] The input / output interface 530 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0120] The communication interface 540 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0121] The bus 550 comprises a pathway that transmits information between the various components of the device (eg, the processor 510 , the memory 520 , the input / output interface 530 , and the communication interface 540 ).
[0122] It should be noted that, although the above device only shows the processor 510, the memory 520, the input / output interface 530, the communication interface 540 and the bus 550, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0123] The electronic device in the above embodiment is used to implement the corresponding service link view layout method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0124] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the service link view layout method described in any of the above embodiments.
[0125] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0126] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the service link view layout method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0127] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0128] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0129] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0130] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for layout of a service link view, characterized in that: The service link includes a plurality of service nodes, and the method includes: Acquire the width of the browser, the dependency relationship between the multiple service nodes, and the node information of the multiple service nodes; According to the dependency relationship, the multiple business nodes are divided into multiple main chain nodes and multiple branch chain nodes; Determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch node according to the dependency relationship, the width of the browser and the node information; Arrange the service link view according to the main chain node coordinates and the branch chain node coordinates; The node information includes a main chain node height, a main chain node width, a branch chain node height, a main chain margin parameter, and a branch chain margin parameter; the business link includes a main chain and multiple branch chains; the main chain includes multiple main chain levels, each branch chain includes multiple branch chain levels, and the branch chain is located between two main chain levels of the main chain; determining the main chain node coordinates of the main chain node and the branch chain node coordinates of the branch chain node according to the dependency relationship, the width of the browser, and the node information, includes: Determine the number of main chain nodes at each layer of each main chain level according to the main chain margin parameter, the width of the browser and the main chain node width; Determine the main chain node sequence number of each main chain node according to the dependency relationship, and determine the main chain level sequence number of each main chain node according to the main chain node sequence number and the number of main chain nodes in each layer; Determine the branch level sequence number of each branch node according to the dependency relationship, and determine the interval height between two adjacent main chain levels according to the branch margin parameter, the branch level sequence number and the branch node height; Determine the main chain node coordinates of each main chain node according to the main chain margin parameter, the main chain node height, the main chain node sequence number, the number of main chain nodes in each layer, the main chain node width, the main chain layer sequence number and the interval height; The branch node number is determined according to the dependency relationship, and the branch node coordinates of each branch node are determined according to the main chain node height, the branch margin parameter, the branch node number, the main chain node width, the main chain node coordinates, the main chain node number, the number of main chain nodes in each layer, the branch node height and the branch level number.
2. The service link view layout method according to claim 1, characterized in that: The number of the main chain nodes of each main chain level is the same, and the number of the main chain nodes of each layer of each main chain level is determined according to the main chain margin parameter, the width of the browser and the width of the main chain node, including: The number of main chain nodes in each layer is determined using the following formula: Wherein, N is the number of main chain nodes in each layer, W is the width of the browser, a is the width of the main chain node, and α is the main chain margin parameter.
3. The service link view layout method according to claim 1, characterized in that: The dependency relationship includes the order in which services flow into each of the service nodes; determining the main chain node sequence number of each of the main chain nodes according to the dependency relationship, and determining the main chain level sequence number of each of the main chain nodes according to the main chain node sequence number and the number of main chain nodes in each layer, including: Determine the main chain node sequence number of each main chain node according to the order in which the business flows into each main chain node; The main chain level number of each main chain node is determined using the following formula: Wherein, N is the number of main chain nodes in each layer, i is the main chain node serial number, i=1,2,3,…,k, k is the total number of main chain nodes in the service link, and c is The quotient of The remainder, L i is the main chain level number of the main chain node with the main chain node number i.
4. The service link view layout method according to claim 3, characterized in that: Determining the branch level sequence number of each branch node according to the dependency relationship, and determining the interval height between two adjacent main chain levels according to the branch margin parameter, the branch level sequence number and the branch node height, includes: Determine the branch level sequence number of each branch node according to the order in which the services flow into each branch node; The spacing height is determined using the following formula: H m,m+1 =n max(m,m+1) ×(b+β)+β Among them, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, m is an integer greater than or equal to 1, n max is the branch level number of the branch node with the largest branch level number in the branch between the mth main chain level and the m+1th main chain level, b is the branch node height, and β is the branch margin parameter.
5. The method for configuring a service link view according to claim 1, characterized in that: The main chain node coordinates include the main chain node x coordinates and the main chain node y coordinates, and the main chain node coordinates of each main chain node are determined according to the main chain margin parameter, the main chain node height, the main chain node sequence number, the number of main chain nodes per layer, the main chain node width, the main chain level sequence number and the interval height, including: The x-coordinate of the main chain node is determined using the following formula: Among them, T ix is the x-coordinate of the main chain node with main chain node number i, N is the number of main chain nodes in each layer, i is the main chain node number, c is The quotient of The remainder, L i is the main chain level number of the main chain node with the main chain node number i, a is the main chain node width, and α is the main chain margin parameter; The y coordinate of the main chain node is determined using the following formula: Among them, T iy is the y coordinate of the main chain node with main chain node number i, L i is the main chain level number of the main chain node with main chain node number i, T 0y is the main chain node y coordinate of the main chain node with the preset main chain level number 1, H m,m+1 is the interval height between the mth main chain level and the m+1th main chain level, and h is the main chain node height.
6. The service link view layout method according to claim 5, characterized in that: The branch node coordinates include the branch node x coordinates and the branch node y coordinates, the dependency relationship also includes the calling relationship between the business nodes, the calling relationship exists between the adjacent branch nodes of the branch, and each branch has the calling relationship with a main chain node; the branch node sequence number is determined according to the dependency relationship, and the branch node coordinates of each branch node are determined according to the main chain node height, the branch margin parameter, the branch node sequence number, the main chain node width, the main chain node coordinates, the main chain node sequence number, the number of main chain nodes in each layer, the branch node height and the branch level sequence number, including: Determine the branch node sequence number according to the calling relationship between the branch nodes and between the branch and the main chain node, the branch node sequence number of all the branch nodes in the branch being the same and equal to the main chain node sequence number of the main chain node having a calling relationship with the branch; The x-coordinate of the branch node is determined using the following formula: Wherein, j is the branch node number, F jx is the branch node x coordinate of the branch node with branch node number j, T jx is the main chain node x coordinate of the main chain node that has the calling relationship with the branch chain where the branch chain node is located, N is the number of main chain nodes in each layer, j is the branch chain node sequence number, and e is The quotient of The remainder of , a is the width of the main chain node; The y coordinate of the branch node is determined using the following formula: Where n is the branch level number of the branch node, F jny is the branch node y coordinate of the branch node with branch node number j and branch level number n, T jy is the main chain node y coordinate of the main chain node that has the calling relationship with the branch where the branch node is located, b is the branch node height, β is the branch margin parameter, and h is the main chain node height.
7. A service link view layout device, characterized in that: The service link includes a plurality of service nodes, and the device includes: An acquisition module is configured to acquire the width of the browser, the dependency relationship between the multiple service nodes, and the node information of the multiple service nodes; A node determination module is configured to divide the plurality of service nodes into a plurality of main chain nodes and a plurality of branch chain nodes according to the dependency relationship; A coordinate determination module, configured to determine the main chain node coordinates of the main chain node and the branch node coordinates of the branch chain node according to the dependency relationship, the width of the browser and the node information; A layout module, configured to layout the view of the service link according to the main chain node coordinates and the branch chain node coordinates; The node information includes a main chain node height, a main chain node width, a branch chain node height, a main chain margin parameter, and a branch chain margin parameter; the business link includes a main chain and multiple branch chains; the main chain includes multiple main chain levels, each branch chain includes multiple branch chain levels, and the branch chain is located between two main chain levels of the main chain; determining the main chain node coordinates of the main chain node and the branch chain node coordinates of the branch chain node according to the dependency relationship, the width of the browser, and the node information, includes: Determine the number of main chain nodes at each layer of each main chain level according to the main chain margin parameter, the width of the browser and the main chain node width; Determine the main chain node sequence number of each main chain node according to the dependency relationship, and determine the main chain level sequence number of each main chain node according to the main chain node sequence number and the number of main chain nodes in each layer; Determine the branch level sequence number of each branch node according to the dependency relationship, and determine the interval height between two adjacent main chain levels according to the branch margin parameter, the branch level sequence number and the branch node height; Determine the main chain node coordinates of each main chain node according to the main chain margin parameter, the main chain node height, the main chain node sequence number, the number of main chain nodes in each layer, the main chain node width, the main chain layer sequence number and the interval height; The branch node number is determined according to the dependency relationship, and the branch node coordinates of each branch node are determined according to the main chain node height, the branch margin parameter, the branch node number, the main chain node width, the main chain node coordinates, the main chain node number, the number of main chain nodes in each layer, the branch node height and the branch level number.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A syntactic dependency tree dynamic visualization method and system
CN109408614A
Link topological graph display method and device, storage medium and equipment
CN110442641A