CN112152842B - Traffic topological graph realization method, device, equipment and storage medium - Google Patents
Traffic topological graph realization method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112152842B CN112152842B CN202010921877.XA CN202010921877A CN112152842B CN 112152842 B CN112152842 B CN 112152842B CN 202010921877 A CN202010921877 A CN 202010921877A CN 112152842 B CN112152842 B CN 112152842B
- Authority
- CN
- China
- Prior art keywords
- node
- resource
- determining
- nodes
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for realizing a flow topological graph, wherein the method comprises the following steps: determining the relation between each resource node and each resource node; determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node; and determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group. Therefore, the flow topological graph drawn through the method and the device can meet the requirement that a worker obtains multiple items of information of each resource node in the cloud platform, and is convenient for realizing effective management of the cloud platform.
Description
Technical Field
The present invention relates to the field of traffic management technologies, and in particular, to a method, an apparatus, a device, and a storage medium for implementing a traffic topology map.
Background
In order to learn the topological relation between the cloud management platform (cloud platform) corresponding to each resource node (which may include components, services, etc.), the topological relation can be displayed correspondingly, but a worker can learn the topological relation between each resource node only through the displayed information, which is far from enough for the worker to manage the cloud platform.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for realizing a flow topological graph, which can realize the display of each resource node, the relation among each resource node and the flow among each resource node, and meet the requirement of staff on the acquisition of multiple items of information of each resource node in a cloud platform, thereby being convenient for realizing the effective management of the cloud platform.
In order to achieve the above object, the present invention provides the following technical solutions:
a traffic topology graph implementation method includes:
determining the relation between each resource node and each resource node;
determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node;
and determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group.
Preferably, drawing a corresponding path between different resource nodes based on a relationship between the resource nodes includes:
and determining that any two resource nodes with a relation form a second node group, if one relation exists between the two resource nodes in the second node group, connecting the two resource nodes in the second node group by using a first type of line as a path, otherwise, connecting the two resource nodes in the second node group by using a second type of line as a path.
Preferably, the displaying the determined request response time on a path between two resource nodes in the first node group includes:
and determining the request response time between two resource nodes in the first node group as target response time, determining the speed corresponding to the target response time as target speed according to the principle that the longer the request response time is, the slower the speed is, and controlling a moving point arranged on a path between the two resource nodes in the first node group to move at the target speed.
Preferably, the displaying the determined request frequency on a path between two resource nodes in the first node group includes:
and determining the request frequency between two resource nodes in the first node group as a target frequency, determining the distance corresponding to the target frequency as a target distance according to the principle that the distance is shorter as the request frequency is more, and controlling the distance between every two adjacent mobile points in a plurality of mobile points arranged on a path between the two resource nodes in the first node group to be the target distance.
Preferably, determining the location of each resource node on the canvas comprises:
determining any one of the resource nodes as a current root node;
determining that a resource node which is used as a current root node and has a relation with the current root node is a leaf node of the current root node in other resource nodes except the current root node, determining that any one leaf node of the current root node is the current root node, and returning to the step of executing the step of determining the leaf node of the current root node until the resource node which has a relation with the current root node does not exist;
determining any other resource node which is not used as the current root node, and returning to execute the step of determining the leaf node of the current root node until the resource node which is not used as the current root node does not exist;
determining that a resource node without a root node is located at a first level, and that a resource node belonging to a leaf node of any resource node in an nth level is located at an n+1th level; wherein n is a positive integer not equal to 1;
and determining the abscissa and the ordinate of each resource node on the canvas according to the principle that the abscissas of the resource nodes of different levels are different and the ordinates of the resource nodes of the same level are different.
Preferably, determining the abscissa and the ordinate of each resource node on the canvas includes:
determining any root node as a target root node, wherein each leaf node of the target root node is a target leaf node, and the target root node and the target leaf node are target resource nodes;
calculating the abscissa of each target leaf node and the target root node according to the following formula:
abscissa= (level-1 where target resource node is located) a first preset distance;
and determining the ordinate of the first target leaf node as a preset value, the ordinate of the other target leaf nodes as the sum of the ordinate of the last adjacent target leaf node and a second preset distance, and the ordinate of the target root node as the average value of the ordinate of each target leaf node.
Preferably, the first type of line is a straight line and the second type of line is a curved line.
A traffic topology graph implementation apparatus, comprising:
a determining module for: determining the relation between each resource node and each resource node;
a drawing module for: determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node;
a display module for: and determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group.
A traffic topology graph implementation device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the traffic topology implementation method according to any one of the preceding claims when executing the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the traffic topology implementation method of any of the preceding claims.
The invention provides a method, a device, equipment and a storage medium for realizing a flow topological graph, wherein the method comprises the following steps: determining the relation between each resource node and each resource node; determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node; and determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group. After determining the relation between each resource node and each resource node, arranging each resource node to a position where the resource node should be located in a canvas, and drawing a corresponding path between different resource nodes on the canvas based on the relation between each resource node, so that the request response time and the request frequency which represent the flow between two resource nodes are displayed on the path between the two resource nodes for any two resource nodes with paths. Therefore, through the traffic topological graph drawn by the method, the relationship between each resource node and each resource node can be obtained, the request response time and the request frequency of the traffic between each resource node with the relationship can be obtained, the acquisition of a plurality of items of information of each resource node in the cloud platform by a worker is met, and the effective management of the cloud platform is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for implementing a flow topology according to an embodiment of the present invention;
fig. 2 is an exemplary diagram of connecting corresponding resource nodes with a straight line as a path in a traffic topology graph implementation method according to an embodiment of the present invention;
fig. 3 is an exemplary diagram of a connection between corresponding resource nodes by using a curve as a path in a traffic topology graph implementation method according to an embodiment of the present invention;
fig. 4 is an exemplary diagram of control points of a curve in a flow topology implementation method according to an embodiment of the present invention;
fig. 5 is an exemplary diagram of a first level resource node and a corresponding leaf node in a traffic topology implementation method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a flow topology implementation device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a method for implementing a traffic topology according to an embodiment of the present invention may include:
s11: and determining the relation among the resource nodes.
The execution main body of the flow topological graph implementation method provided by the embodiment of the invention can be a corresponding flow topological graph implementation device. The application may be implemented based on a cloud platform (specifically may be a heterogeneous cloud platform), and the resource nodes may be components, services, etc. in the cloud platform, when there is traffic between the resource nodes, the resource nodes may be considered to have a relationship, specifically, the traffic may refer to the flow of the request, that is, when the first resource node sends the request to the second resource node, and when the second resource node implements feedback based on the request to the first resource node, the first resource node and the second resource node may be considered to have a relationship.
The determining the relationship between each resource node and each resource node may specifically be that a request is sent to a server of the cloud platform to obtain resource information required by the current flow topological graph display (the resource information may include information indicating the resource nodes and information indicating the relationship between the resource nodes), and the resource information is analyzed according to a preset rule to determine all the resource nodes and the relationship between each resource node. The traffic topology realizing device analyzes the resource information according to a preset rule, namely, analyzes the resource information received by the server to obtain information which can be effectively identified by the traffic topology realizing device, and further determines each resource node and the relation among the resource nodes contained in the information.
S12: the method comprises the steps of determining the position of each resource node on a canvas, placing each resource node at a corresponding position, and drawing corresponding paths between different resource nodes based on the relation between each resource node.
After determining the relation between each resource node and each resource node, the position where each resource node should be located on the canvas when the flow topological graph is drawn can be calculated first, and then the resource node is placed at the position where the resource node should be located on the canvas, so that the layout of each resource node in the flow topological graph is realized, and then a path is drawn between any two resource nodes with the relation, so that the relation between each resource node and each resource node in the cloud platform can be obtained through the path between each resource node and each resource node on the canvas. In addition, after determining the position of each resource node on the canvas, when each resource node is placed at a corresponding position, specifically, an icon representing the resource node is placed at a corresponding position, and general icons (the icons can be set according to actual needs, such as hollow circles, hollow squares and the like) are in one-to-one correspondence with the resource nodes, so that the layout of the corresponding resource node on the canvas is realized by replacing the corresponding resource node with the icon, and in addition, all operations performed on the resource node on the canvas can be performed on the icon of the resource node.
S13: any two resource nodes with paths are determined to form a first node group, request response time and request frequency between the two resource nodes in the first node group are determined, and the determined request response time and request frequency are displayed on the paths between the two resource nodes in the first node group.
In order to enable the traffic topology graph to show the traffic state corresponding to each resource node, the application can determine the request response time and the request frequency between two resource nodes in the first node group, and further display the request response time and the request frequency on the path between the two resource nodes in the first node group, so that a worker can realize traffic management on each resource node in the cloud platform based on the traffic state. In addition, the request response time (ResponseTime) represents the time after the request is sent out and the request is responded, for example, a first resource node in a first node group sends a request to a second resource, the second resource responds to the request to feed back corresponding information to the first resource node, and the time from the sending of the request to the receiving of the information fed back by the second resource is the request response time; the request frequency (RPS, requests Per Second) indicates the number of requests that can be handled per second, i.e. the number of requests transmitted between two resource nodes per second, e.g. the number of requests sent by a first resource node to a second resource node within a first node group is the frequency of requests between the two resource nodes. It should be noted that, the request response time and the request frequency between two resource nodes in the first node group determined in the present application may be an average value of all request response times and an average value of all request frequencies in a certain period (for example, 30 seconds, 50 seconds, and 1 minute) before the current time.
After determining the relation between each resource node and each resource node, arranging each resource node to a position where the resource node should be located in a canvas, and drawing a corresponding path between different resource nodes on the canvas based on the relation between each resource node, so that the request response time and the request frequency which represent the flow between two resource nodes are displayed on the path between the two resource nodes for any two resource nodes with paths. Therefore, through the traffic topological graph drawn by the method, the relationship between each resource node and each resource node can be obtained, the request response time and the request frequency of the traffic between each resource node with the relationship can be obtained, the acquisition of a plurality of items of information of each resource node in the cloud platform by a worker is met, and the effective management of the cloud platform is facilitated.
The method for realizing the traffic topology graph, which is provided by the embodiment of the invention, draws corresponding paths among different resource nodes based on the relation among the resource nodes, and can comprise the following steps:
any two resource nodes with a relation are determined to form a second node group, if one relation exists between the two resource nodes in the second node group, the first type of line is used as a path to connect the two resource nodes in the second node group, otherwise, the second type of line is used as a path to connect the two resource nodes in the second node group.
Querying the relation among the resource nodes, and drawing different paths (Path paths, canvas labels and canvas labels for defining connecting line paths) according to the number of the obtained relation; specifically, if there is only one relationship between two resource nodes, the two resource nodes may be connected with a first type of line as a path, and if there is a plurality of relationships between the two resource nodes, the two resource nodes may be connected with a second type of line as a path; therefore, the staff can know whether the two resource nodes have one relation or multiple relations only through the types of the lines used by the paths between the two resource nodes with the relation, and the staff can conveniently and effectively manage the resource nodes.
The relation between the resource nodes can be the type of the transmitted request, if the type of the transmitted request between the two resource nodes is several, the relation between the two resource nodes is several, if the type of the transmitted request between the two resource nodes comprises a TCP request and an ATP request, the two resource nodes are two relations. In addition, the first type of line may be a straight line and the second type of line may be a curved line; specifically, when two resource nodes are connected using a straight line as a Path, the Path can be expressed as: m startx starty L endx endy; when a curve is used as a Path to connect two resource nodes, the Path can be expressed as: m startx starty Q controlx controly endx endy; wherein startx, starty is the coordinates of the starting point of the connecting line, controlx, controly is the coordinates of the control point of the curve; endx, endy are coordinates of the connecting line endpoint; in this application, the starting point of the connection line is a resource node sending a request, the ending point of the connection line is a corresponding resource node receiving the request, an example graph adopting a straight line as a path to connect two resource nodes, an example graph adopting a curve as a path to connect two resource nodes, and an example graph where the control point is located are shown in fig. 2, fig. 3, and fig. 4, respectively. So that the representation of the different paths can be realized simply and conveniently in this way.
The method for implementing the traffic topology graph provided by the embodiment of the invention displays the determined request response time on the path between two resource nodes in the first node group, and can comprise the following steps:
and determining the request response time between two resource nodes in the first node group as target response time, determining the speed corresponding to the target response time as target speed according to the principle that the longer the request response time is, the slower the speed is, and controlling the moving point on the path between the two resource nodes in the first node group to move at the target speed.
In the embodiment of the application, the moving points can be set on paths of two resource nodes, the moving points can be solid dots or solid squares and the like, and the moving points can be specifically set according to actual needs; in addition, the corresponding relation between the request response time and the speed is preset, so that after the request response time between two resource nodes is determined, the corresponding speed can be determined, and further, the moving point on the path between the two resource nodes can move continuously and circularly from the starting point of the path to the end point of the path according to the speed, so that a worker can determine the corresponding request response time only by observing the moving speed of the moving point, and the worker can intuitively and conveniently acquire the required information.
In addition, the correspondence between the request response time and the speed may be set according to actual needs, and in a specific example, the following may be shown:
request response time is 0ms-100ms, corresponding to speed 100px;
the response time of the request is 100ms-400ms and corresponds to the speed of 80px;
the response time of the request is 400ms-800ms and corresponds to the speed of 60px;
the response time of the request is 800ms-2000ms and corresponds to the speed of 50px;
the response time of the request is 2000ms-4000ms corresponding to the speed of 30px;
the request response time is 4000 ms-infinity for a speed of 10px.
And obtaining the moving speed of the moving point on the path according to the corresponding relation, wherein the moving speed represents short request response time, and otherwise, represents long request response time.
The method for implementing the traffic topology graph provided by the embodiment of the invention displays the determined request frequency on the path between two resource nodes in the first node group, and can comprise the following steps:
and determining the request frequency between two resource nodes in the first node group as a target frequency, determining the distance corresponding to the target frequency as a target distance according to the principle that the distance is shorter as the request frequency is larger, and controlling the distance between every two adjacent mobile points in a plurality of mobile points arranged on the path between the two resource nodes in the first node group as the target distance.
In the embodiment of the present application, a plurality of moving points may be set on paths of two resource nodes, where the plurality of moving points all move in a continuous cycle from a start point of the path to an end point of the path according to the determined speed. In addition, the corresponding relation between the request frequency and the distance can be preset, so that after the request frequency between two resource nodes is determined, the corresponding distance can be determined, and the distance between every two adjacent moving points in the plurality of moving points on the path between the two resource nodes is the determined distance, so that a worker can determine the corresponding request frequency as long as observing the distance between the adjacent moving points, and the worker can intuitively and conveniently acquire the required information.
In addition, the correspondence between the request frequency and the interval may be set according to actual needs, and in a specific example, the following may be shown:
request frequencies 0-1 correspond to spacing 80;
request frequencies 1-5 correspond to spacing 60;
request frequencies 5-10 correspond to a spacing 50;
request frequencies 10-20 correspond to spacing 40;
request frequencies 20-50 correspond to spacing 30;
the request frequency 50-infinity corresponds to the spacing 10.
According to the corresponding relation, the distance between two adjacent moving points on the path is obtained, wherein the larger the distance is, the smaller the request frequency is, and the larger the request frequency is.
Therefore, the request response time and the request frequency are reflected through the distance and the speed of the moving points on the path, so that the staff can know the corresponding flow information conveniently based on the request response time and the request frequency, and the effective management of the staff on the cloud platform is further facilitated.
The method for realizing the flow topological graph provided by the embodiment of the invention for determining the position of each resource node on the canvas can comprise the following steps:
determining any one of the resource nodes as a current root node;
determining that a resource node which is used as a current root node and has a relation with the current root node is a leaf node of the current root node in other resource nodes except the current root node, determining that any one leaf node of the current root node is the current root node, and returning to the step of executing the step of determining the leaf node of the current root node until the resource node which has a relation with the current root node does not exist;
determining any other resource node which is not used as the current root node, and returning to execute the step of determining the leaf node of the current root node until the resource node which is not used as the current root node does not exist;
determining that a resource node without a root node is located at a first level, and that a resource node belonging to a leaf node of any resource node in an nth level is located at an n+1th level; wherein n is a positive integer not equal to 1;
and determining the abscissa and the ordinate of each resource node on the canvas according to the principle that the abscissas of the resource nodes of different levels are different and the ordinates of the resource nodes of the same level are different.
In determining the position of each resource node on the canvas, the application can realize hierarchical layout by calculating the position of each resource node, and specifically, the steps can be expressed as follows:
1. traversing that all the resource nodes are root nodes and are resource nodes of a first level;
2. taking out a first resource node (such as O) from the first level node as a source node (the source node is a resource node for sending the request, and the corresponding leaf node is a resource node for receiving the request, so the source node can also be called a root node);
3. finding all the resource nodes pointed by the source node as leaf nodes (such as A1 and A2) according to the relation among the resource nodes; repeatedly executing the steps 2 and 3, and finding all leaf nodes under the resource nodes of the first level, namely all resource nodes of the second level;
4. taking out the first resource node from the resource nodes of the second level as a source node (for example, taking A1 as the source node);
5. finding all the resource nodes pointed by the source node as leaf nodes (such as A11 and A12) according to the relation among the resource nodes; repeatedly executing the steps 4 and 5, and finding all leaf nodes under the resource nodes of the second level, namely all the resource nodes of the third level;
6. the last leaf node is found recursively all the way down through the first through fifth steps. For example, a11, a12 in step 5 are the last leaf nodes.
It should be noted that each resource node has only one location in the canvas, i.e., a resource node is fetched only once to determine where it is located in the canvas. Therefore, the hierarchical layout of the resource nodes is realized in the mode, and the staff can know the relations among different resource nodes conveniently.
The method for implementing the flow topological graph provided by the embodiment of the invention for determining the abscissa and the ordinate of each resource node on the canvas can comprise the following steps:
determining any root node as a target root node, wherein each leaf node of the target root node is a target leaf node, and the target root node and the target leaf node are target resource nodes;
the abscissa of each target leaf node and target root node is calculated according to the following formula:
abscissa= (level-1 where target resource node is located) a first preset distance;
and determining the ordinate of the first target leaf node as a preset value, wherein the ordinate of other target leaf nodes is the sum of the ordinate of the last adjacent target leaf node and the second preset distance, and the ordinate of the target root node is the average value of the ordinate of each target leaf node.
The first preset distance and the second preset distance can be set according to actual needs. When the calculation of the position of each resource node is implemented, the coordinates of the upper left corner of the Dom of the canvas may be defined as the origin coordinates (0, 0), and other settings according to the actual needs are naturally within the scope of the present invention. When the position of each resource node is calculated, the ordinate (y) of the resource nodes in the same level is different, the abscissa (x) is the same, the ordinate of the resource nodes in different levels is the same, and the abscissa is different, so that the layout is more attractive. Taking the resource node of the first level as A in the above example, the resource nodes of the leaf node of the second level as A1 and A2, the first preset distance as 100 and the second preset distance as 80, then
The coordinate of A11 is x (the level of A11 is-1) is 100, and y is 0;
the coordinate of A12 is x (the level at which A11 is positioned-1) is 100, and y is the y coordinate of A11 node +80;
the coordinates of A1 are x (A1 is at the level-1) ×100, and y (A11 y-axis+A12y-axis)/2.
In a specific application scenario, a method for implementing a traffic topology map disclosed in the present application may include the following steps:
1) Sending a request to a server to acquire the resource information required by the current flow topological graph display, and analyzing the resource information according to a preset rule to acquire each resource node and the relation among the resource nodes;
2) And calculating the position of each resource node on the canvas according to the relation between each resource node and each resource node, and realizing hierarchical layout.
1. Defining the coordinates of the upper left corner of the Dom of the drawing canvas as origin coordinates (0, 0);
2. traversing that all the resource nodes are root nodes and are resource nodes of a first level;
3. taking out a first resource node (such as O) from the first level nodes as a source node;
4. finding all the resource nodes pointed by the source node as leaf nodes (such as A1 and A2) according to the relation among the resource nodes, as shown in FIG. 5; repeatedly executing the steps 3 and 4, and finding all leaf nodes under the resource nodes of the first level, namely all resource nodes of the second level;
5. fetching the first resource node from the second level resource node as the source node (e.g. A1 as the source node)
6. Finding all the resource nodes pointed by the source node as leaf nodes (such as A11 and A12) according to the relation among the resource nodes; repeatedly executing the steps 5 and 6, and finding all leaf nodes under the resource nodes of the second level, namely all the resource nodes of the third level;
7. through the above steps, the last leaf node is found recursively all the way down. For example, a11, a12 in step 6 are the last leaf nodes;
8. setting the x-axis spacing between resource nodes as 100 and the y-axis spacing as 80; then define:
the coordinate of A11 is x (the level of A11 is-1) is 100, and y is 0;
the coordinate of A12 is x (the level at which A11 is positioned-1) is 100, and y is the y coordinate of A11 node +80;
the coordinate of A1 is x (the level of A1 is-1) ×100, and y (A11y axis+A12y axis)/2;
9. and (3) reasoning all node coordinates according to the logic in the step 8.
2) And inquiring all the relations between the two resource nodes, and drawing different path paths according to the obtained relation quantity.
The individual relationships may be connected by straight lines. Path Path: m startx starty L endx endy;
multiple relationships may use curvilinear connections. Path Path: m startx starty Q controlx controly endx endy;
startx, starty the coordinates of the start point of the connecting line; control is curve control point coordinates; endx, endy are the coordinates of the connection line endpoint.
3) Defining mapping relations (namely corresponding relations) of request response time and speed of different levels:
request response time is 0ms-100ms, corresponding to speed 100px;
the response time of the request is 100ms-400ms and corresponds to the speed of 80px;
the response time of the request is 400ms-800ms and corresponds to the speed of 60px;
the response time of the request is 800ms-2000ms and corresponds to the speed of 50px;
the response time of the request is 2000ms-4000ms corresponding to the speed of 30px;
request response time 4000 ms-infinity corresponding to a speed of 10px;
and obtaining the moving speed of the moving point on the path according to the corresponding relation, wherein the moving speed represents short request response time, and otherwise, represents long request response time.
Defining mapping relation between request frequencies of different levels and distances between two adjacent mobile points:
request frequencies 0-1 correspond to spacing 80;
request frequencies 1-5 correspond to spacing 60;
request frequencies 5-10 correspond to a spacing 50;
request frequencies 10-20 correspond to spacing 40;
request frequencies 20-50 correspond to spacing 30;
request frequency 50-infinity corresponding to pitch 10;
according to the corresponding relation, the distance between two adjacent moving points on the path is obtained, wherein the larger the distance is, the smaller the request frequency is, and the larger the request frequency is.
And drawing moving points with different moving speeds and different distances on different connecting lines through the speeds and the distances obtained above.
The method comprises the steps of calculating coordinates of resource nodes through the relation between the resource nodes and the resource nodes, and drawing the resource nodes on a canvas; drawing different relation diagrams according to the relation among the resource nodes; the request response time ResponseTime and the request frequency RPS are embodied by a mobile point on the path. The realization device can comprise three parts, namely a resource node renderer, a path renderer and a flow rate and flow quantity renderer, wherein the resource node renderer is responsible for the rendering of resource nodes such as components, services and the like; the path renderer is mainly responsible for the rendering of the relationship between the resource nodes; the flow rate and volume plotter is responsible for the speed and density of moving points on the node relation line. Therefore, the invention can make the display of the flow topological graph more vivid, and the relation between the components and the service is displayed more clearly, so that the staff can directly know the difference of the request response time and the request frequency between the components and the service from the flow topological graph, plays a certain guiding role for the maintenance of the application, and improves the competitiveness of the product.
An embodiment of the present invention provides a traffic topology implementation device, as shown in fig. 6, may include:
a determining module 11, configured to: determining the relation between each resource node and each resource node;
a drawing module 12 for: determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node;
a display module 13 for: any two resource nodes with paths are determined to form a first node group, request response time and request frequency between the two resource nodes in the first node group are determined, and the determined request response time and request frequency are displayed on the paths between the two resource nodes in the first node group.
The device for implementing the flow topological graph provided by the embodiment of the invention, the drawing module can comprise:
a path drawing unit configured to: any two resource nodes with a relation are determined to form a second node group, if one relation exists between the two resource nodes in the second node group, the first type of line is used as a path to connect the two resource nodes in the second node group, otherwise, the second type of line is used as a path to connect the two resource nodes in the second node group.
The flow topological graph implementation device provided by the embodiment of the invention, the display module can comprise:
a first display unit for: and determining the request response time between two resource nodes in the first node group as target response time, determining the speed corresponding to the target response time as target speed according to the principle that the longer the request response time is, the slower the speed is, and controlling the moving point on the path between the two resource nodes in the first node group to move at the target speed.
The flow topological graph implementation device provided by the embodiment of the invention, the display module can comprise:
a second display unit for: and determining the request frequency between two resource nodes in the first node group as a target frequency, determining the distance corresponding to the target frequency as a target distance according to the principle that the distance is shorter as the request frequency is larger, and controlling the distance between every two adjacent mobile points in a plurality of mobile points arranged on the path between the two resource nodes in the first node group as the target distance.
The device for implementing the flow topological graph provided by the embodiment of the invention, the drawing module can comprise:
a position determining unit for: determining any one of the resource nodes as a current root node; determining that a resource node which is used as a current root node and has a relation with the current root node is a leaf node of the current root node in other resource nodes except the current root node, determining that any one leaf node of the current root node is the current root node, and returning to the step of executing the step of determining the leaf node of the current root node until the resource node which has a relation with the current root node does not exist; determining any other resource node which is not used as the current root node, and returning to execute the step of determining the leaf node of the current root node until the resource node which is not used as the current root node does not exist; determining that a resource node without a root node is located at a first level, and that a resource node belonging to a leaf node of any resource node in an nth level is located at an n+1th level; wherein n is a positive integer not equal to 1; and determining the abscissa and the ordinate of each resource node on the canvas according to the principle that the abscissas of the resource nodes of different levels are different and the ordinates of the resource nodes of the same level are different.
The device for implementing the traffic topological graph provided by the embodiment of the invention, the position determining unit may include:
a computing subunit for: determining any root node as a target root node, wherein each leaf node of the target root node is a target leaf node, and the target root node and the target leaf node are target resource nodes; the abscissa of each target leaf node and target root node is calculated according to the following formula:
abscissa= (level-1 where target resource node is located) a first preset distance;
and determining the ordinate of the first target leaf node as a preset value, wherein the ordinate of other target leaf nodes is the sum of the ordinate of the last adjacent target leaf node and the second preset distance, and the ordinate of the target root node is the average value of the ordinate of each target leaf node.
According to the flow topological graph implementation device provided by the embodiment of the invention, the first type of line can be a straight line, and the second type of line can be a curve.
The embodiment of the invention also provides a traffic topological graph realization device, which can comprise:
a memory for storing a computer program;
a processor for implementing the steps of any of the traffic topology implementation methods described above when executing a computer program.
The embodiment of the invention also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the method for realizing the flow topological graph according to any one of the above steps can be realized.
It should be noted that, for the description of the related parts in the device, the device and the storage medium for implementing the flow topological graph provided by the embodiment of the present invention, reference is made to the detailed description of the corresponding parts in the method for implementing the flow topological graph provided by the embodiment of the present invention, which is not repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present invention, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. The method for realizing the flow topological graph is characterized by comprising the following steps of:
determining the relation between each resource node and each resource node;
determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node;
determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group;
determining the location of each resource node on the canvas comprises:
determining any one of the resource nodes as a current root node;
determining that a resource node which is used as a current root node and has a relation with the current root node is a leaf node of the current root node in other resource nodes except the current root node, determining that any one leaf node of the current root node is the current root node, and returning to the step of executing the step of determining the leaf node of the current root node until the resource node which has a relation with the current root node does not exist;
determining any other resource node which is not used as the current root node, and returning to execute the step of determining the leaf node of the current root node until the resource node which is not used as the current root node does not exist;
determining that a resource node without a root node is located at a first level, and that a resource node belonging to a leaf node of any resource node in an nth level is located at an n+1th level; wherein n is a positive integer not equal to 1;
and determining the abscissa and the ordinate of each resource node on the canvas according to the principle that the abscissas of the resource nodes of different levels are different and the ordinates of the resource nodes of the same level are different.
2. The method of claim 1, wherein mapping respective paths between different resource nodes based on relationships between the resource nodes comprises:
and determining that any two resource nodes with a relation form a second node group, if one relation exists between the two resource nodes in the second node group, connecting the two resource nodes in the second node group by using a first type of line as a path, otherwise, connecting the two resource nodes in the second node group by using a second type of line as a path.
3. The method of claim 2, wherein exposing the determined request response time on a path between two resource nodes within the first node group comprises:
and determining the request response time between two resource nodes in the first node group as target response time, determining the speed corresponding to the target response time as target speed according to the principle that the longer the request response time is, the slower the speed is, and controlling a moving point arranged on a path between the two resource nodes in the first node group to move at the target speed.
4. A method according to claim 3, wherein exposing the determined request frequency on a path between two resource nodes within the first node group comprises:
and determining the request frequency between two resource nodes in the first node group as a target frequency, determining the distance corresponding to the target frequency as a target distance according to the principle that the distance is shorter as the request frequency is more, and controlling the distance between every two adjacent mobile points in a plurality of mobile points arranged on a path between the two resource nodes in the first node group to be the target distance.
5. The method of claim 1, wherein determining the abscissa and the ordinate of each resource node on the canvas comprises:
determining any root node as a target root node, wherein each leaf node of the target root node is a target leaf node, and the target root node and the target leaf node are target resource nodes;
calculating the abscissa of each target leaf node and the target root node according to the following formula:
abscissa= (level-1 where target resource node is located) a first preset distance;
and determining the ordinate of the first target leaf node as a preset value, the ordinate of the other target leaf nodes as the sum of the ordinate of the last adjacent target leaf node and a second preset distance, and the ordinate of the target root node as the average value of the ordinate of each target leaf node.
6. The method of claim 5, wherein the first type of line is a straight line and the second type of line is a curved line.
7. A traffic topology graph implementation apparatus, comprising:
a determining module for: determining the relation between each resource node and each resource node;
a drawing module for: determining the position of each resource node on the canvas, placing each resource node at a corresponding position, and drawing a corresponding path between different resource nodes based on the relation between each resource node;
a display module for: determining any two resource nodes with paths to form a first node group, determining request response time and request frequency between the two resource nodes in the first node group, and displaying the determined request response time and request frequency on the paths between the two resource nodes in the first node group;
the drawing module comprises:
a position determining unit for: determining any one of the resource nodes as a current root node; determining that a resource node which is used as a current root node and has a relation with the current root node is a leaf node of the current root node in other resource nodes except the current root node, determining that any one leaf node of the current root node is the current root node, and returning to the step of executing the step of determining the leaf node of the current root node until the resource node which has a relation with the current root node does not exist; determining any other resource node which is not used as the current root node, and returning to execute the step of determining the leaf node of the current root node until the resource node which is not used as the current root node does not exist; determining that a resource node without a root node is located at a first level, and that a resource node belonging to a leaf node of any resource node in an nth level is located at an n+1th level; wherein n is a positive integer not equal to 1; and determining the abscissa and the ordinate of each resource node on the canvas according to the principle that the abscissas of the resource nodes of different levels are different and the ordinates of the resource nodes of the same level are different.
8. A traffic topology realization device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the traffic topology implementation method according to any of claims 1 to 6 when executing said computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the traffic topology implementation method according to any of the claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010921877.XA CN112152842B (en) | 2020-09-04 | 2020-09-04 | Traffic topological graph realization method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010921877.XA CN112152842B (en) | 2020-09-04 | 2020-09-04 | Traffic topological graph realization method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112152842A CN112152842A (en) | 2020-12-29 |
CN112152842B true CN112152842B (en) | 2023-05-26 |
Family
ID=73889788
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010921877.XA Active CN112152842B (en) | 2020-09-04 | 2020-09-04 | Traffic topological graph realization method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112152842B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109039786A (en) * | 2018-09-28 | 2018-12-18 | 山东中创软件商用中间件股份有限公司 | A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104506361A (en) * | 2014-12-26 | 2015-04-08 | 成都科来软件有限公司 | Method and device for monitoring network flow |
CN109726085A (en) * | 2018-12-29 | 2019-05-07 | 云智慧(北京)科技有限公司 | Method and system for tracking performance problem |
CN110968479B (en) * | 2019-11-20 | 2023-05-23 | 北京宝兰德软件股份有限公司 | Service level full-link monitoring method and server for application program |
-
2020
- 2020-09-04 CN CN202010921877.XA patent/CN112152842B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109039786A (en) * | 2018-09-28 | 2018-12-18 | 山东中创软件商用中间件股份有限公司 | A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN112152842A (en) | 2020-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210398237A1 (en) | Robot-based Subarea Logistics Picking Method and Apparatus, Terminal, System and Storage Medium | |
CN106500686A (en) | Navigation interface display packing, logistics air navigation aid and device | |
CN105740133B (en) | A kind of Distributed Application method for monitoring performance based on service call topology | |
CN103853621B (en) | A kind of striding course exchange method and related terminal device | |
CN109284180B (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN111283667A (en) | Robot control method and device and electronic equipment | |
CN110162058B (en) | AGV planning method and device | |
EP3842765A2 (en) | Method and apparatus for displaying point of information of map, device, and readable storage medium | |
CN112152842B (en) | Traffic topological graph realization method, device, equipment and storage medium | |
CN114972594A (en) | Data processing method, device, equipment and medium for meta universe | |
CN110377331B (en) | Monitoring method, device, equipment and storage medium for issuing application program | |
CN114882719A (en) | Control method, device, medium and electronic equipment for intelligent calling vehicle | |
CN109861869B (en) | Configuration file generation method and device | |
CN111707286B (en) | Method and device for planning route | |
CN115691206B (en) | Parking stall recommendation method, device, equipment and storage medium | |
CN111309014A (en) | AGV control method and device | |
CN108255403B (en) | Information annotation system, method, device and storage medium | |
CN115890684A (en) | Robot scheduling method, device, equipment and medium | |
CN113392627B (en) | Management system and method for CFD software multiuser user-defined interactive interface | |
CN111338741B (en) | Task progress display method and device and storage medium | |
CN113689021A (en) | Method and apparatus for outputting information | |
US20170131989A1 (en) | Installation interface presentation method and apparatus | |
CN111581758A (en) | Power grid graph topology modeling method and computer readable storage medium | |
CN116974660A (en) | Activity progress updating method, device, equipment and storage medium | |
CN111832773B (en) | Information display method, information display device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |