CN113934341A - Network policy topology display method and device, electronic equipment and storage medium - Google Patents

Network policy topology display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113934341A
CN113934341A CN202111221804.0A CN202111221804A CN113934341A CN 113934341 A CN113934341 A CN 113934341A CN 202111221804 A CN202111221804 A CN 202111221804A CN 113934341 A CN113934341 A CN 113934341A
Authority
CN
China
Prior art keywords
new
frame
graph
coordinate
graphic
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.)
Granted
Application number
CN202111221804.0A
Other languages
Chinese (zh)
Other versions
CN113934341B (en
Inventor
叶勐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202111221804.0A priority Critical patent/CN113934341B/en
Publication of CN113934341A publication Critical patent/CN113934341A/en
Application granted granted Critical
Publication of CN113934341B publication Critical patent/CN113934341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a display method and device of network policy topology, electronic equipment and a storage medium, and belongs to the technical field of network communication. Determining the size of a new graphic frame corresponding to a newly added object; determining an insertion area of a new graphic frame inserted into the existing topological graph, and determining a candidate position of a center point of the new graphic frame in the insertion area; and if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph. According to the method and the device, when a new image frame is inserted, the existing image topology is not restored, but the new image frame is inserted into the existing topological graph, so that the new image frame is not overlapped with the existing graph and is close to the central graph as much as possible, and the image topology manually arranged by a user according to personal habits can be reserved.

Description

Network policy topology display method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of network communication, and particularly relates to a method and a device for displaying a network policy topology, electronic equipment and a storage medium.
Background
The campus network policy refers to a Control policy for Access rights between networks, including two types between network segments and terminals, and is generally applied to network planning of companies or enterprises by controlling the intercommunication relationship between networks in a manner of issuing an Access Control List (ACL). When there is no topology display, the network policy presentation is not intuitive, but only presents a list of access right information from an IP (Internet Protocol) address to an IP address. When the list data is many, the access authority of the concerned network segment and other network segments can not be intuitively felt. It is therefore desirable to design a topology rendering scheme.
In the current topology presentation scheme, a layered surround presentation mode is generally adopted to present the topology, and the main implementation principle is as follows: the method comprises the steps of firstly determining the number of key graphs and the size of the key graphs, then determining the display number of each layer according to the size of the key graphs and determining the display layer number according to the key graph number, wherein the graphs are sequentially arranged on each layer clockwise, and the next layer is arranged when one layer is full. The main graph concerned is displayed in the center of the topological graph, and other graphs related to the main graph are layered and surrounded around the main body, so that the arrangement of all the graphs is close to the central graph as much as possible and are not overlapped with each other. When the new graph is added, the algorithm can be automatically rearranged according to all the graphs in the mode, and a new topology is presented. If the user manually arranges according to personal habits, and inserts a new graph next time, the position dragged by the user can be automatically restored, and the graph is arranged again according to the method to present a new topology.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method and an apparatus for displaying a network policy topology, an electronic device, and a storage medium, so as to solve the problem that in the existing method, after a new graph is inserted, an image topology manually arranged by a user according to personal habits is automatically restored and rearranged.
The embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for displaying a network policy topology, including: determining the size of a new graphic frame corresponding to the newly added object; determining an insertion area of the new graphic frame inserted into the existing topological graph, and determining a candidate position of the center point of the new graphic frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and connecting lines between the graphic frames represent access authority relations between the display objects; and if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph. In the embodiment of the application, when a new image frame is inserted, the existing image topology is not restored, but the new image frame is inserted into the existing topological graph, so that the new image frame is not overlapped with the existing graph and is close to the central graph as much as possible, and therefore, the image topology manually arranged by a user according to personal habits can be reserved under the condition of realizing the existing topological function.
With reference to a possible implementation manner of the embodiment of the first aspect, the determining that the new graphic frame is inserted into an insertion area in an existing topological graph includes: acquiring an included angle between a connecting line of a central point of one graph frame and an origin of a coordinate axis and a connecting line of the central point of the other graph frame and the origin of the coordinate axis in every two adjacent graph frames in the existing topological graph; and acquiring the maximum included angle of all included angles, wherein the area where the maximum included angle is located is the insertion area. In the embodiment of the application, the included angle between every two adjacent graphic frames in the existing topological graph is obtained, and the area where the maximum included angle is located is the insertion area, so that the probability that the inserted new graphic frame is not overlapped with the existing graphic frame can be reduced.
With reference to a possible implementation manner of the embodiment of the first aspect, the determining a candidate position of the new graphic frame center point within the insertion area includes: taking the angular bisector of the maximum included angle as the central point of the new graphic frame; and determining the candidate position of the center point of the new graphic frame on the angular bisector. In the embodiment of the application, the angular bisector of the maximum included angle is taken as the line where the center point of the graphic frame is located, so that the probability that the inserted new graphic frame is not overlapped with the existing graphic can be further reduced.
With reference to a possible implementation manner of the embodiment of the first aspect, the determining a candidate position of the center point of the new graphic frame on the bisector includes: determining the sum of half of the side length of the central graphic frame where the coordinate axis origin is located, half of the side length of the new graphic frame and a preset graphic frame interval as a candidate X coordinate of the central point of the new graphic frame; and determining a candidate Y coordinate of the center point of the new graphic frame according to the slope of the angular bisector and the candidate X coordinate of the center point of the new graphic frame, wherein the candidate position comprises the candidate X coordinate and the candidate Y coordinate. In the embodiment of the application, the candidate position of the central point of the new graphic frame on the angular bisector obtained by the method can be ensured to be close to the central graphic as much as possible under the condition that the new graphic frame is inserted without overlapping.
With reference to one possible implementation manner of the embodiment of the first aspect, the method further includes: and if the new graphic frame is overlapped with the left and right graphic frames after being inserted into the candidate position, determining a new candidate position of the center point of the new graphic frame in the insertion area until the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the new candidate position. In the embodiment of the application, if the new graphic frame is inserted into the candidate position and then overlaps with the left and right graphic frames, the new candidate position needs to be determined again until the new candidate position does not overlap with the left and right graphic frames, so as to ensure that the displayed topological structures do not overlap.
With reference to a possible implementation manner of the embodiment of the first aspect, the determining a new candidate position of the new graphic frame center point within the insertion area includes: selecting a Y coordinate of an upper edge line of a left graphic frame, a sum of a half of side length of the new graphic frame and a preset graphic frame interval as a first Y coordinate of a center point of the new graphic frame, and determining a first X coordinate of the center point of the new graphic frame according to the first Y coordinate and a bisector slope of a maximum included angle to obtain a first new candidate position of the center point of the new graphic frame, wherein the maximum included angle is the maximum angle in included angles between every two adjacent graphic frames in the existing topological graph; selecting the X coordinate of the right side line of the left graph frame, the sum of the half of the side length of the new graph frame and the preset graph frame interval as a second X coordinate of the center point of the new graph frame, and determining a second Y coordinate of the center point of the new graph frame according to the second X coordinate and the angular bisector slope of the maximum included angle to obtain a second new candidate position of the center point of the new graph frame; selecting the Y coordinate of the upper edge line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a third Y coordinate of the center point of the new graphic frame, and determining a fourth X coordinate of the center point of the new graphic frame according to the third Y coordinate and the angular bisector slope of the maximum included angle to obtain a third new candidate position of the center point of the new graphic frame; selecting the X coordinate of the right side line of the right graphic frame, the sum of the half of the side length of the new graphic frame and the preset graphic frame interval as a fourth X coordinate of the center point of the new graphic frame, and determining a fourth Y coordinate of the center point of the new graphic frame according to the fourth X coordinate and the angular bisector slope of the maximum included angle to obtain a fourth new candidate position of the center point of the new graphic frame; and selecting a new candidate position which is not overlapped with the left and right graphic frames after the new graphic frame is inserted and has the smallest absolute value of X, Y coordinates from a plurality of new candidate positions as a final position of the center point of the new graphic frame. In the embodiment of the application, a plurality of new candidate positions are calculated in the above manner, and then the new candidate position which is selected from the new candidate positions and is not overlapped with the left and right graphic frames after the new graphic frame is inserted and has the smallest absolute value of X, Y coordinates is used as the final position, so that the inserted graphic frame can be ensured to be close to the central graphic as much as possible.
With reference to a possible implementation manner of the embodiment of the first aspect, the determining a new candidate position of the new graphic frame center point within the insertion area includes: selecting the Y coordinate of the upper edge line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the X coordinate of the right side line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the X coordinate of the center point of the new graph frame, and determining the Y coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the Y coordinate of the upper edge line of the right graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the X coordinate of the right side line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as the X coordinate of the center point of the new graphic frame, and determining the Y coordinate of the center point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graphic frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graphic frames in the existing topological graph. In the embodiment of the application, a new candidate position is randomly calculated, and if the new graphic frame is inserted into the new candidate position and then is not overlapped with the left and right graphic frames, the new graphic frame is inserted into the new candidate position, so that the subsequent new candidate position is not calculated, and the calculation amount can be reduced to a certain extent.
In a second aspect, an embodiment of the present application further provides a display device of a network policy topology, including: the device comprises a size determining module, a position determining module and an inserting module; the size determining module is used for determining the size of a new graphic frame corresponding to the newly added object; the position determining module is used for determining an insertion area of the new graphic frame inserted into the existing topological graph and determining a candidate position of the center point of the new graphic frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and connecting lines between the graphic frames represent access authority relations between the display objects; and the inserting module is used for inserting the new graphic frame into the candidate position if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a memory and a processor, the processor coupled to the memory; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform the method according to the first aspect embodiment and/or any possible implementation manner of the first aspect embodiment.
In a fourth aspect, this application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method in the foregoing first aspect and/or any possible implementation manner of the first aspect.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The foregoing and other objects, features and advantages of the application will be apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not intended to be to scale as practical, emphasis instead being placed upon illustrating the subject matter of the present application.
Fig. 1 shows a flowchart of a method for displaying a network policy topology according to an embodiment of the present application.
Fig. 2 shows a topology diagram of an existing topology diagram provided in an embodiment of the present application.
Fig. 3 shows a schematic diagram illustrating a principle of inserting a new graphic box into an existing topology diagram according to an embodiment of the present application.
Fig. 4 is a schematic diagram illustrating a principle of inserting a new graphic box into an existing topology according to an embodiment of the present application.
Fig. 5 shows a module schematic diagram of a display device of a network policy topology provided by an embodiment of the present application.
Fig. 6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely in the description herein to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In view of the problem that the existing display method of the network policy map can automatically restore and rearrange the image topology manually rearranged by the user according to personal habits after a new graph is inserted, the embodiment of the application provides a display method of the network policy map.
The following describes a method for displaying a network policy topology according to an embodiment of the present application with reference to fig. 1.
S1: and determining the size of a new graphic frame corresponding to the newly added object.
When a user adds an object in the existing topological graph, the size of a new graph frame corresponding to the added object is automatically determined, wherein the added object can comprise a new network segment or a terminal with a new IP address positioned in a specified network segment.
In one embodiment, if the new added object is a terminal with an IP address located in a specified network segment, the size of the new graphic frame is a preset fixed graphic frame size. And if the newly added object is the newly added network segment, the size of the new graphic frame is the minimum rectangle surrounding the graphic frames of all the terminals with the IP addresses in the newly added network segment. The size of the graph frame corresponding to the newly added network segment depends on the number of the terminals in the newly added network segment, so that the sizes of the graph frames corresponding to different network segments are not fixed any more, the problem that the existing display method of the network strategy map does not support the arrangement of graphs with different sizes can be solved, and the display method of the network strategy map can support the arrangement of graphs with different sizes.
It should be noted that, whether the newly added object is a terminal or a network segment and the number of terminals with IP addresses in the network segment may be determined according to configuration information input by a user. The specific manner of determining whether the newly added object is a terminal or a network segment according to the configuration information input by the user and the number of terminals with IP addresses located in the network segment can be implemented by the existing manner, which is well known to those skilled in the art and will not be described here.
S2: and determining an insertion area of the new graphic frame inserted into the existing topological graph, and determining a candidate position of the center point of the new graphic frame in the insertion area.
After the new object is added, it is necessary to determine that the new graphic frame corresponding to the new object is inserted into the insertion area in the existing topological graph. In an optional implementation manner, the process of determining that the new graphic frame is inserted into the insertion area in the existing topological graph may be to obtain an included angle between a connecting line between a central point of one graphic frame and an origin of a coordinate axis and a connecting line between a central point of the other graphic frame and the origin of the coordinate axis in every two adjacent graphic frames in the existing topological graph; therefore, included angles between every two adjacent graphic frames in the existing topological graph can be obtained, and then the maximum included angle in all the included angles is obtained, wherein the area where the maximum included angle is located is the insertion area.
Each graphic frame in the existing topological graph represents a display object, a connecting line between the graphic frames represents the access authority relationship between the display objects, if the display object is a network segment or a terminal with an IP address positioned in a specified network segment, each graphic frame in the existing topological graph represents a network segment or a terminal with an IP address positioned in a specified network segment, and the connecting line between the graphic frames represents the access authority relationship between the network segments or the access authority relationship between the terminals.
After the new graphic frame is determined to be inserted into the insertion area in the existing topological graph, the candidate position of the center point of the new graphic frame in the insertion area is determined.
In an alternative embodiment, the process of determining the candidate position of the center point of the new graphic frame in the insertion area may be: and taking the angular bisector of the maximum included angle as the line on which the center point of the new graphic frame is positioned, and determining the candidate position of the center point of the new graphic frame on the angular bisector. I.e. the candidate position is on the bisector of the angle of the maximum included angle. Therefore, the probability of overlapping the left and right graphic frames after the new graphic frame is inserted can be reduced, and the insertion efficiency is improved.
For ease of understanding, the description is made in conjunction with the schematic diagram shown in fig. 2. Assuming that the existing topological graph is shown in fig. 2, because the origin of coordinate axes in the schematic diagram shown in fig. 2 is the central point of the central graphic frame 1, when calculating the included angle between every two adjacent graphic frames in the existing topological graph, the central graphic frame 1 can be removed, the included angle between every two adjacent graphic frames in the remaining topological graph, that is, the included angle between the graphic frame 2 and the graphic frame 7 needs to be calculated, the included angle between the graphic frame 2 and the graphic frame 3 is calculated, the included angle between the graphic frame 3 and the graphic frame 4 is calculated, the included angle between the graphic frame 4 and the graphic frame 5 is calculated, the included angle between the graphic frame 5 and the graphic frame 6 is calculated, and the included angle between the graphic frame 6 and the graphic frame 7 is calculated. Then, the maximum included angle is selected from all included angles, the included angle between the graph frame 2 and the graph frame 7 in the graph 2 is the maximum included angle, and then the angle bisector of the maximum included angle is used as the line where the center point of the new graph frame is located.
The process of determining the candidate position of the center point of the new graphic frame on the angular bisector may be to randomly select a coordinate point as the new candidate position on the angular bisector with the largest included angle.
In another embodiment, the process of determining the candidate position of the center point of the new graphic frame on the angular bisector may be: determining the sum of half of the side length of the central graphic frame where the origin of the coordinate axis is located, half of the side length of the new graphic frame and the distance between the preset graphic frames as candidate X coordinates of the central point of the new graphic frame; and determining the candidate Y coordinate of the center point of the new graphic frame according to the slope of the angular bisector and the candidate X coordinate of the center point of the new graphic frame, so as to obtain a candidate position, wherein the candidate position comprises the candidate X coordinate and the candidate Y coordinate. For convenience of understanding, it is assumed that, with reference to fig. 3, the length of half of the side length of the central graphic frame 1 where the coordinate axis origin is located is a, the length of half of the side length of the new graphic frame 8 is b, and the preset graphic frame interval is c, at this time, the candidate X coordinate of the central point of the new graphic frame 8 is a + b + c, after the X coordinate is obtained, the candidate Y coordinate of the central point of the new graphic frame 8 can be obtained according to the slope of the angular bisector and the X coordinate, and the Y coordinate is (a + b + c) × tanr, where r is 1/2.
It should be noted that, in an alternative embodiment, it may be determined that the bisector of the maximum included angle is not taken as the central point of the new graphic frame, that is, it is determined that the line of 1/2 where the maximum included angle is taken as the central point of the new graphic frame, for example, a time of the line of the maximum included angle may be taken as the central point of the new graphic frame, and a is a real number greater than 0 and smaller than 1. For example, the line between the maximum included angle of 1/3 and the maximum included angle of 2/3 may be the new graphic frame center point. For convenience of understanding, for example, if the maximum included angle is 120 degrees, the line of the 1/2 maximum included angle is an angle bisector, and the corresponding slope is tan60, the line of the 1/3 maximum included angle is a line of the 40-degree included angle, the corresponding slope is tan40, and the line of the 2/3 maximum included angle is a line of the 80-degree included angle, and the corresponding slope is tan 80. Therefore, the above-mentioned angle bisector of the maximum included angle cannot be regarded as the line on which the center point of the new graphic frame is located, and is understood as a limitation of the present application.
S3: and if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
After determining the candidate position of the center point of the new graphic frame in the insertion area, judging whether the new graphic frame is overlapped with the left and right graphic frames after being inserted into the candidate position, in combination with fig. 3, namely judging whether the new graphic frame 8 is overlapped with the left graphic frame 2 and the right graphic frame 7, if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, namely not overlapped with the left graphic frame and the right graphic frame, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph. The left graphics frame is the graphics frame located on the left side of the new graphics frame, the right graphics frame is the graphics frame located on the right side of the new graphics frame, for example, the graphics frame 2 in fig. 3 is the left graphics frame of the new graphics frame 8, and the graphics frame 7 is the right graphics frame of the new graphics frame 8.
It should be noted that, when generating topology according to a network policy, a network segment and a terminal are abstracted into a graphic frame, such as a rectangular frame, and the terminal in the network segment is placed in the graphic frame corresponding to the network segment as an icon, and the topological arrangement manner of the terminal icons may be the existing manner or the manner shown in the present application. The main network segment graphic frame is displayed in the middle of the interface, and the associated network segment graphic frame surrounds the main network segment graphic frame. The access right relationship between the network segments and the terminals is represented by connecting line colors connected with each other, for example, the access right relationship represents that access is allowed, the connecting line color can be represented by red, the access right relationship represents that access is denied, and the connecting line color can be represented by green. When the access authority relationship is modified, the color of the corresponding connection line is modified, and when the access authority relationship is deleted, the corresponding network segment graphic frame and the connection line or the terminal icon and the connection line are deleted. When a network segment or a terminal is newly added, a network segment image frame or a terminal image frame is correspondingly added and presented in the topology, and the connecting line between the corresponding image frames is added according to the access authority relationship between the newly added object and the object in the existing topological graph.
The method for displaying the network policy topology, disclosed by the application, further includes determining a new candidate position of the center point of the new graphic frame in the insertion area if the new graphic frame is overlapped with the left and right graphic frames after being inserted into the candidate position, namely, the new graphic frame is overlapped with the left graphic frame and/or the right graphic frame, until the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the new candidate position.
In one embodiment, determining a new candidate location for the new frame center point within the inset region may be reselecting a new candidate location on the bisector of the largest included angle.
In an alternative embodiment, the process of determining a new candidate position of the center point of the new graphic frame in the insertion area may be: selecting the Y coordinate of the upper edge line of the left graphic frame, the sum of half of the side length of the new graphic frame and the distance between the preset graphic frames as a first Y coordinate of the center point of the new graphic frame, and determining a first X coordinate of the center point of the new graphic frame according to the first Y coordinate and the slope of the angular bisector of the maximum included angle to obtain a first new candidate position of the center point of the new graphic frame; selecting the X coordinate of the right side line of the left graphic frame, the sum of half of the side length of the new graphic frame and the distance between the preset graphic frames as a second X coordinate of the center point of the new graphic frame, and determining a second Y coordinate of the center point of the new graphic frame according to the second X coordinate and the slope of the angular bisector of the maximum included angle to obtain a second new candidate position of the center point of the new graphic frame; selecting the Y coordinate of the upper edge line of the right graphic frame, the sum of half of the side length of the new graphic frame and the distance between the preset graphic frames as a third Y coordinate of the center point of the new graphic frame, and determining a fourth X coordinate of the center point of the new graphic frame according to the third Y coordinate and the slope of the angular bisector of the maximum included angle to obtain a third new candidate position of the center point of the new graphic frame; selecting the X coordinate of the right side line of the right graphic frame, the sum of half of the side length of the new graphic frame and the distance between the preset graphic frames as a fourth X coordinate of the center point of the new graphic frame, and determining a fourth Y coordinate of the center point of the new graphic frame according to the fourth X coordinate and the slope of the angular bisector of the maximum included angle to obtain a fourth new candidate position of the center point of the new graphic frame; among the plurality of new candidate positions, a new candidate position where the new frame is inserted so as not to overlap the left and right frames and where the absolute value of the X, Y coordinate is smallest is selected as the final position of the center point of the new frame.
For ease of understanding, the description is made in conjunction with fig. 4. Selecting the Y coordinate of the upper edge line of the left graphic frame 2, the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval as a first Y coordinate of the center point of the new graphic frame 8, and determining a first X coordinate of the center point of the new graphic frame 8 according to the first Y coordinate and the angular bisector slope of the maximum included angle to obtain a first new candidate position of the center point of the new graphic frame 8, namely the position A in the graph 4; selecting the X coordinate of the right side line of the left graphic frame 2, the sum of the half of the side length of the new graphic frame 8 and the preset graphic frame interval as a second X coordinate of the center point of the new graphic frame 8, and determining a second Y coordinate of the center point of the new graphic frame 8 according to the second X coordinate and the angular bisector slope of the maximum included angle to obtain a second new candidate position of the center point of the new graphic frame 8, namely a position B in the graph 4; selecting the Y coordinate of the upper edge line of the right graphic frame 7, the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval as a third Y coordinate of the center point of the new graphic frame 8, and determining a fourth X coordinate of the center point of the new graphic frame 8 according to the third Y coordinate and the angular bisector slope of the maximum included angle to obtain a third new candidate position of the center point of the new graphic frame 8, namely the position C in the graph 4; selecting the X coordinate of the right side line of the right graphic frame 7, the sum of the half of the side length of the new graphic frame 8 and the preset graphic frame interval as the fourth X coordinate of the center point of the new graphic frame 8, and determining the fourth Y coordinate of the center point of the new graphic frame 8 according to the fourth X coordinate and the angular bisector slope of the maximum included angle to obtain a fourth new candidate position of the center point of the new graphic frame 8, namely the position D in the graph 4; of the plurality of new candidate positions, such as position a, position B, position C, and position D, the new candidate position where the new frame 8 is inserted and does not overlap the left and right frames and where the absolute value of the X, Y coordinate is the smallest is selected as the final position of the center point of the new frame 8, for example, the final position is selected as position C.
In an alternative embodiment, the process of determining a new candidate position of the center point of the new graphic frame in the insertion area may be: and selecting the Y coordinate of the upper edge line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame. For example, the sum of the Y coordinate of the upper edge line of the left frame 2, the half of the side length of the new frame 8, and the preset frame interval is selected as the first Y coordinate of the center point of the new frame 8, and the first X coordinate of the center point of the new frame 8 is determined according to the first Y coordinate and the angular bisector slope of the maximum included angle, so as to obtain the first new candidate position of the center point of the new frame 8, that is, the position a in fig. 4.
Or selecting the sum of the X coordinate of the right side line of the left graph frame, the half of the side length of the new graph frame and the preset graph frame interval as the X coordinate of the center point of the new graph frame, and determining the Y coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame. For example, the X coordinate of the right side line of the left frame 2, the sum of the half of the side length of the new frame 8 and the preset frame interval is selected as the second X coordinate of the center point of the new frame 8, and the second Y coordinate of the center point of the new frame 8 is determined according to the second X coordinate and the angular bisector slope of the maximum included angle to obtain the second new candidate position of the center point of the new frame 8, that is, the position B in fig. 4
Or selecting the Y coordinate of the upper edge line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as the Y coordinate of the center point of the new graphic frame, and determining the X coordinate of the center point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graphic frame. For example, the Y coordinate of the upper edge line of the right frame 7, the sum of the half of the side length of the new frame 8 and the preset frame interval is selected as the third Y coordinate of the center point of the new frame 8, and the fourth X coordinate of the center point of the new frame 8 is determined according to the third Y coordinate and the angular bisector slope of the maximum included angle, so as to obtain the third new candidate position of the center point of the new frame 8, that is, the position C in fig. 4.
Or selecting the X coordinate of the right side line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as the X coordinate of the center point of the new graphic frame, and determining the Y coordinate of the center point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graphic frame. For example, the X coordinate of the right side line of the right frame 7, the sum of the half of the side length of the new frame 8 and the preset frame interval is selected as the fourth X coordinate of the center point of the new frame 8, and the fourth Y coordinate of the center point of the new frame 8 is determined according to the fourth X coordinate and the angular bisector slope of the maximum included angle, so as to obtain a fourth new candidate position of the center point of the new frame 8, that is, the position D in fig. 4.
In this embodiment, instead of simultaneously calculating a plurality of new candidate positions, such as position a, position B, position C, and position D, a new candidate position is calculated sequentially from small to large according to the distance between each position and the origin of the coordinate axis, for example, position B is calculated first, and if a new frame is inserted into the new candidate position and then does not overlap with the left and right frames, the new frame is inserted into the new candidate position, and then the subsequent new candidate position is not calculated. If the new graphic frame is inserted into the new candidate position B and then is overlapped with the left and right graphic frames, then sequentially calculating a new candidate position to obtain a position C, and if the new graphic frame is inserted into the new candidate position C and then is not overlapped with the left and right graphic frames, then not calculating the subsequent new candidate position; if so, calculating the next new candidate position A again until the position A is not overlapped with the left and right graphic frames after insertion.
In summary, according to the method for displaying the network policy topology provided by the embodiment of the application, when a new graphic frame is inserted, the existing image topology is not restored, but the new graphic frame is inserted into the existing topological graph, so that the new graphic frame is not overlapped with the existing graph and is close to the central graph as much as possible, and therefore the image topology manually arranged by a user according to personal habits can be reserved. Meanwhile, the size of the graph frame corresponding to the network segment is the smallest rectangle surrounding the graph frames of all the terminals with the IP addresses located in the network segment, and the size of the graph frame corresponding to the network segment depends on the number of the terminals in the network segment, so that the sizes of the graph frames corresponding to different network segments are not fixed any more, and the method can support the arrangement of graphs with different sizes.
Based on the same inventive concept, the embodiment of the present application further provides a display device 100 of a network policy topology, as shown in fig. 5. The display device 100 of the network policy topology includes: a size determination module 110, a position determination module 120, and an insertion module 130.
A size determining module 110, configured to determine a size of a new graphics frame corresponding to a new object, where the new object includes a new network segment or a terminal with a new IP address located in a specified network segment.
A position determining module 120, configured to determine an insertion region where the new graphic frame is inserted into an existing topological graph, and determine a candidate position of a center point of the new graphic frame in the insertion region; each graphic frame in the existing topological graph represents a display object, and a connecting line between the graphic frames represents an access authority relationship between the display objects, for example, the display object represents a network segment or a terminal with an IP address located in a specified network segment, and the connecting line between the graphic frames represents an access authority relationship between the network segment and the network segment, or an access authority relationship between the terminal and the terminal.
An inserting module 130, configured to insert the new graphics frame into the candidate position if the new graphics frame is not overlapped with the left and right graphics frames after being inserted into the candidate position, and add a connection line between the corresponding graphics frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
Optionally, the position determining module 120 is configured to obtain an included angle between a connecting line between a center point of one of the two adjacent graphic frames in the existing topological graph and an origin of a coordinate axis and a connecting line between a center point of the other graphic frame and the origin of the coordinate axis; and acquiring the maximum included angle of all included angles, wherein the area where the maximum included angle is located is the insertion area.
Optionally, the position determining module 120 is configured to use an angle bisector of the maximum included angle as a line on which the center point of the new graphic frame is located; and determining the candidate position of the center point of the new graphic frame on the angular bisector.
Optionally, the position determining module 120 is configured to determine a sum of a half of a side length of the central graphic frame where the coordinate axis origin is located, a half of the side length of the new graphic frame, and a preset graphic frame interval, as a candidate X coordinate of the new graphic frame center; and determining a candidate Y coordinate of the center point of the new graphic frame according to the slope of the angular bisector and the candidate X coordinate of the center point of the new graphic frame, wherein the candidate position comprises the candidate X coordinate and the candidate Y coordinate.
If the new graphic frame is overlapped with the left and right graphic frames after being inserted into the candidate position, the position determining module 120 is further configured to determine a new candidate position of the center point of the new graphic frame in the insertion region until the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the new candidate position.
The location determination module 120 is configured to: selecting a Y coordinate of an upper edge line of a left graphic frame, a sum of a half of side length of the new graphic frame and a preset graphic frame interval as a first Y coordinate of a center point of the new graphic frame, and determining a first X coordinate of the center point of the new graphic frame according to the first Y coordinate and a bisector slope of a maximum included angle to obtain a first new candidate position of the center point of the new graphic frame, wherein the maximum included angle is the maximum angle in included angles between every two adjacent graphic frames in the existing topological graph; selecting the X coordinate of the right side line of the left graph frame, the sum of the half of the side length of the new graph frame and the preset graph frame interval as a second X coordinate of the center point of the new graph frame, and determining a second Y coordinate of the center point of the new graph frame according to the second X coordinate and the angular bisector slope of the maximum included angle to obtain a second new candidate position of the center point of the new graph frame; selecting the Y coordinate of the upper edge line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a third Y coordinate of the center point of the new graphic frame, and determining a fourth X coordinate of the center point of the new graphic frame according to the third Y coordinate and the angular bisector slope of the maximum included angle to obtain a third new candidate position of the center point of the new graphic frame; selecting the X coordinate of the right side line of the right graphic frame, the sum of the half of the side length of the new graphic frame and the preset graphic frame interval as a fourth X coordinate of the center point of the new graphic frame, and determining a fourth Y coordinate of the center point of the new graphic frame according to the fourth X coordinate and the angular bisector slope of the maximum included angle to obtain a fourth new candidate position of the center point of the new graphic frame; and selecting a new candidate position which is not overlapped with the left and right graphic frames after the new graphic frame is inserted and has the smallest absolute value of X, Y coordinates from a plurality of new candidate positions as a final position of the center point of the new graphic frame.
The location determination module 120 is configured to: selecting the Y coordinate of the upper edge line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the X coordinate of the right side line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the X coordinate of the center point of the new graph frame, and determining the Y coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the Y coordinate of the upper edge line of the right graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; or selecting the X coordinate of the right side line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as the X coordinate of the center point of the new graphic frame, and determining the Y coordinate of the center point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graphic frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graphic frames in the existing topological graph.
The implementation principle and the resulting technical effect of the display device 100 of the network policy topology provided in the embodiment of the present application are the same as those of the foregoing method embodiment, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiment for parts of the embodiment of the device that are not mentioned.
As shown in fig. 6, fig. 6 is a block diagram illustrating a structure of an electronic device 200 according to an embodiment of the present disclosure. The electronic device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.
The elements of the transceiver 210, the memory 220, and the processor 240 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, the components may be electrically coupled to each other via one or more communication buses 230 or signal lines. The transceiver 210 is used for transceiving data. The memory 220 is used to store a computer program such as the display apparatus 100 storing the software function module shown in fig. 5, i.e., the network policy topology. The display apparatus 100 of the network policy topology includes at least one software functional module, which may be stored in the memory 220 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device 200. The processor 240 is configured to execute an executable module stored in the memory 220, such as a software function module or a computer program included in the display apparatus 100 of the network policy topology. For example, the processor 240 is configured to determine a size of a new graphics frame corresponding to a new object, where the new object includes a new network segment or a terminal with a new IP address located in a specified network segment; determining an insertion area of the new graphic frame inserted into the existing topological graph, and determining a candidate position of the center point of the new graphic frame in the insertion area; each graphic frame in the existing topological graph represents a display object, a connecting line between the graphic frames represents the access authority relationship between the display objects, for example, the display object represents a network segment or a terminal with an IP address located in a specified network segment, and the connecting line between the graphic frames represents the access authority relationship between the network segment or the terminal; and if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
The Memory 220 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 240 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 240 may be any conventional processor or the like.
The electronic device 200 includes, but is not limited to, a computer, such as a server.
The embodiment of the present application further provides a non-volatile computer-readable storage medium (hereinafter, referred to as a storage medium), where the storage medium stores a computer program, and the computer program is executed by the computer, such as the electronic device 200, to execute the above-mentioned method for displaying the network policy topology.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product stored in a computer-readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or an electronic device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for displaying a network policy topology, comprising:
determining the size of a new graphic frame corresponding to the newly added object;
determining an insertion area of the new graphic frame inserted into the existing topological graph, and determining a candidate position of the center point of the new graphic frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and connecting lines between the graphic frames represent access authority relations between the display objects;
and if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, inserting the new graphic frame into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
2. The method of claim 1, wherein determining that the new graphical box is inserted into an insertion area of an existing topological graph comprises:
acquiring an included angle between a connecting line of a central point of one graph frame and an origin of a coordinate axis and a connecting line of the central point of the other graph frame and the origin of the coordinate axis in every two adjacent graph frames in the existing topological graph;
and acquiring the maximum included angle of all included angles, wherein the area where the maximum included angle is located is the insertion area.
3. The method of claim 2, wherein determining the candidate location of the new frame center point within the insertion region comprises:
taking the angular bisector of the maximum included angle as the central point of the new graphic frame;
and determining the candidate position of the center point of the new graphic frame on the angular bisector.
4. The method of claim 3, wherein determining the candidate location of the new frame center point on the bisector comprises:
determining the sum of half of the side length of the central graphic frame where the coordinate axis origin is located, half of the side length of the new graphic frame and a preset graphic frame interval as a candidate X coordinate of the central point of the new graphic frame;
and determining a candidate Y coordinate of the center point of the new graphic frame according to the slope of the angular bisector and the candidate X coordinate of the center point of the new graphic frame, wherein the candidate position comprises the candidate X coordinate and the candidate Y coordinate.
5. The method of claim 1, further comprising:
and if the new graphic frame is overlapped with the left and right graphic frames after being inserted into the candidate position, determining a new candidate position of the center point of the new graphic frame in the insertion area until the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the new candidate position.
6. The method of claim 5, wherein determining a new candidate location of the new frame center point within the insertion region comprises:
selecting a Y coordinate of an upper edge line of a left graphic frame, a sum of a half of side length of the new graphic frame and a preset graphic frame interval as a first Y coordinate of a center point of the new graphic frame, and determining a first X coordinate of the center point of the new graphic frame according to the first Y coordinate and a bisector slope of a maximum included angle to obtain a first new candidate position of the center point of the new graphic frame, wherein the maximum included angle is the maximum angle in included angles between every two adjacent graphic frames in the existing topological graph;
selecting the X coordinate of the right side line of the left graph frame, the sum of the half of the side length of the new graph frame and the preset graph frame interval as a second X coordinate of the center point of the new graph frame, and determining a second Y coordinate of the center point of the new graph frame according to the second X coordinate and the angular bisector slope of the maximum included angle to obtain a second new candidate position of the center point of the new graph frame;
selecting the Y coordinate of the upper edge line of the right graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a third Y coordinate of the center point of the new graphic frame, and determining a fourth X coordinate of the center point of the new graphic frame according to the third Y coordinate and the angular bisector slope of the maximum included angle to obtain a third new candidate position of the center point of the new graphic frame;
selecting the X coordinate of the right side line of the right graphic frame, the sum of the half of the side length of the new graphic frame and the preset graphic frame interval as a fourth X coordinate of the center point of the new graphic frame, and determining a fourth Y coordinate of the center point of the new graphic frame according to the fourth X coordinate and the angular bisector slope of the maximum included angle to obtain a fourth new candidate position of the center point of the new graphic frame;
and selecting a new candidate position which is not overlapped with the left and right graphic frames after the new graphic frame is inserted and has the smallest absolute value of X, Y coordinates from a plurality of new candidate positions as a final position of the center point of the new graphic frame.
7. The method of claim 5, wherein determining a new candidate location of the new frame center point within the insertion region comprises:
selecting the Y coordinate of the upper edge line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; alternatively, the first and second electrodes may be,
selecting the X coordinate of the right side line of the left graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the X coordinate of the center point of the new graph frame, and determining the Y coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; alternatively, the first and second electrodes may be,
selecting the Y coordinate of the upper edge line of the right graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the Y coordinate of the center point of the new graph frame, and determining the X coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph; alternatively, the first and second electrodes may be,
selecting the X coordinate of the right side line of the right graph frame, the sum of half of the side length of the new graph frame and the preset graph frame interval as the X coordinate of the center point of the new graph frame, and determining the Y coordinate of the center point of the new graph frame by combining the slope of the angular bisector of the maximum included angle to obtain a new candidate position of the center point of the new graph frame, wherein the maximum included angle is the maximum angle in the included angles between every two adjacent graph frames in the existing topological graph.
8. A device for displaying network policy topology, comprising:
the size determining module is used for determining the size of a new graphic frame corresponding to the newly added object;
the position determining module is used for determining an insertion area of the new graphic frame inserted into the existing topological graph and determining a candidate position of the center point of the new graphic frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and connecting lines between the graphic frames represent access authority relations between the display objects;
and the inserting module is used for inserting the new graphic frame into the candidate position if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, and adding a connecting line between the corresponding graphic frames according to the access authority relationship between the newly added object and the object in the existing topological graph.
9. An electronic device, comprising:
a memory and a processor, the processor coupled to the memory;
the memory is used for storing programs;
the processor to invoke a program stored in the memory to perform the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111221804.0A 2021-10-20 2021-10-20 Network policy topology display method and device, electronic equipment and storage medium Active CN113934341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111221804.0A CN113934341B (en) 2021-10-20 2021-10-20 Network policy topology display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111221804.0A CN113934341B (en) 2021-10-20 2021-10-20 Network policy topology display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113934341A true CN113934341A (en) 2022-01-14
CN113934341B CN113934341B (en) 2024-04-09

Family

ID=79280764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111221804.0A Active CN113934341B (en) 2021-10-20 2021-10-20 Network policy topology display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113934341B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0611076A2 (en) * 1993-02-12 1994-08-17 International Business Machines Corporation Method and system for producing mesh representations of objects
US6898772B1 (en) * 2002-01-22 2005-05-24 Cadence Design Systems, Inc. Method and apparatus for defining vias
CN101882179A (en) * 2010-06-18 2010-11-10 中兴通讯股份有限公司 Method and device for drawing topological graph
WO2014046875A1 (en) * 2012-09-20 2014-03-27 Ntt Docomo, Inc. A method and apparatus for topology and path verification in networks
CN103699707A (en) * 2012-09-27 2014-04-02 苏州瑞盈科技有限公司 Graph space automatic-expansion method for power distribution network
CN106027322A (en) * 2016-08-04 2016-10-12 吴文卿 Topological graph tail end tree automatic layout method and device
CN107749803A (en) * 2017-10-16 2018-03-02 浙江宇视科技有限公司 A kind of network topology layout method and device
CN109388791A (en) * 2018-09-28 2019-02-26 中国平安财产保险股份有限公司 Chart Dynamic Display method, apparatus, computer equipment and storage medium
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment
WO2019128273A1 (en) * 2017-12-28 2019-07-04 华为技术有限公司 Method, device and system for determining connection relation of network devices
CN109977273A (en) * 2019-03-28 2019-07-05 杭州安恒信息技术股份有限公司 A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing
WO2020135218A1 (en) * 2018-12-27 2020-07-02 华为技术有限公司 Network topology determination method and apparatus, and system
US10728121B1 (en) * 2018-05-23 2020-07-28 Juniper Networks, Inc. Dashboard for graphic display of computer network topology
US10778537B1 (en) * 2019-02-19 2020-09-15 Cisco Technology, Inc. Presenting devices from an aggregated node within a network topology
US20200336387A1 (en) * 2019-04-22 2020-10-22 Hitachi, Ltd. Topological map presentation system, topological map presentation method, and computer readable recording medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0611076A2 (en) * 1993-02-12 1994-08-17 International Business Machines Corporation Method and system for producing mesh representations of objects
US6898772B1 (en) * 2002-01-22 2005-05-24 Cadence Design Systems, Inc. Method and apparatus for defining vias
CN101882179A (en) * 2010-06-18 2010-11-10 中兴通讯股份有限公司 Method and device for drawing topological graph
WO2014046875A1 (en) * 2012-09-20 2014-03-27 Ntt Docomo, Inc. A method and apparatus for topology and path verification in networks
CN103699707A (en) * 2012-09-27 2014-04-02 苏州瑞盈科技有限公司 Graph space automatic-expansion method for power distribution network
CN106027322A (en) * 2016-08-04 2016-10-12 吴文卿 Topological graph tail end tree automatic layout method and device
CN107749803A (en) * 2017-10-16 2018-03-02 浙江宇视科技有限公司 A kind of network topology layout method and device
WO2019128273A1 (en) * 2017-12-28 2019-07-04 华为技术有限公司 Method, device and system for determining connection relation of network devices
US10728121B1 (en) * 2018-05-23 2020-07-28 Juniper Networks, Inc. Dashboard for graphic display of computer network topology
CN109388791A (en) * 2018-09-28 2019-02-26 中国平安财产保险股份有限公司 Chart Dynamic Display method, apparatus, computer equipment and storage medium
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment
WO2020135218A1 (en) * 2018-12-27 2020-07-02 华为技术有限公司 Network topology determination method and apparatus, and system
US10778537B1 (en) * 2019-02-19 2020-09-15 Cisco Technology, Inc. Presenting devices from an aggregated node within a network topology
CN109977273A (en) * 2019-03-28 2019-07-05 杭州安恒信息技术股份有限公司 A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing
US20200336387A1 (en) * 2019-04-22 2020-10-22 Hitachi, Ltd. Topological map presentation system, topological map presentation method, and computer readable recording medium

Also Published As

Publication number Publication date
CN113934341B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
WO2020253059A1 (en) Method and apparatus for implementing multi-stage linkage drop-down box, and computer device
CN111814885B (en) Method, system, device and medium for managing image frames
CN111291244B (en) House source information display method, device, terminal and storage medium
CN109298909B (en) Window adjusting method, mobile terminal and computer readable storage medium
CA3163478A1 (en) Method of generating delivery range, device, computer equipment and storage medium
CN110989877B (en) Message management method, related equipment and computer readable storage medium
CN111651225A (en) Graphical interface configuration method and terminal equipment
CN107423395A (en) Navigation data processing system
CN107391003A (en) Navigation data processing method
WO2019134289A1 (en) Screen projection control method and device, electronic terminal, and readable storage medium
CN113157539A (en) Resource statistical method, device and terminal
CN113934341B (en) Network policy topology display method and device, electronic equipment and storage medium
CN110879701B (en) Workflow visual configuration method, server, system and medium
CN111817944A (en) Picture sharing method and device and electronic equipment
CN115599484A (en) Screen capturing method, screen capturing device, screen capturing equipment and computer storage medium
CN115951852A (en) Information display method and device, electronic equipment and storage medium
CN113902841A (en) Image drawing method and device, electronic equipment and readable storage medium
CN114625983A (en) House resource information display method and device, electronic equipment and readable storage medium
CN114115639A (en) Interface control method and device, electronic equipment and storage medium
CN113872798A (en) Method and device for constructing space network topological graph, storage medium and electronic equipment
CN106502873B (en) Application program state information display method and terminal
CN109783100B (en) Method and device for checking user interface element attribute and electronic equipment
CN112102483B (en) Method and device for dynamically displaying three-dimensional model on electronic teaching whiteboard
CN110851227B (en) Display control method and electronic equipment
CN114528614A (en) Display method, device and storage medium

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