CN113934341B - 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
CN113934341B
CN113934341B CN202111221804.0A CN202111221804A CN113934341B CN 113934341 B CN113934341 B CN 113934341B CN 202111221804 A CN202111221804 A CN 202111221804A CN 113934341 B CN113934341 B CN 113934341B
Authority
CN
China
Prior art keywords
new
frame
graphic frame
graphic
coordinate
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
Application number
CN202111221804.0A
Other languages
Chinese (zh)
Other versions
CN113934341A (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

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

Abstract

The application relates to a method and a device for displaying network policy topology, electronic equipment and a storage medium, and belongs to the technical field of network communication. Determining the size of a new image frame corresponding to a new object; determining an insertion area of a new graphic frame into an existing topological graph, and determining a candidate position of a center point of the new graphic frame in the insertion area; if the new graphic frame is not overlapped with the left and right graphic frames after being inserted into the candidate position, the new graphic frame is inserted into the candidate position, and a connecting line between the corresponding graphic frames is added according to the access authority relationship between the newly added object and the object in the existing topological graph. In the method, when a new image frame is inserted, the existing image topology is not restored, but the new image frame is inserted into the existing topology graph, so that the new image frame is not overlapped with the existing graph and is close to the center graph as much as possible, and therefore 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 network policy topology, electronic equipment and a storage medium.
Background
Park network policy refers to a control policy of access rights between networks, including two types of network segments and terminals, and is generally applied to network planning of a company or an enterprise by controlling interworking relationship between networks through issuing an ACL (Access Control List ). Without topology presentation, the network policy presentation is not intuitive, but only presents a list of IP (Internet Protocol ) address-to-IP address access rights information. When the list data is very much, the access rights of the concerned network segment and other network segments cannot be perceived directly. It is therefore desirable to design a topology presentation scheme.
In the current topology presentation scheme, a layered surrounding display mode is generally adopted to present topology, and the main implementation principle is as follows: firstly determining the number of key patterns and the size of the key patterns, then determining the display number of each layer according to the size of the key patterns and the display layer number according to the number of the key patterns, arranging the patterns on each layer in turn clockwise, and arranging the next layer when one layer is full. The main graph concerned is presented in the center of the topological graph, other graphs related to the main graph are layered around the main body, and all graphs are ensured to be distributed as close to the central graph as possible and are not overlapped with each other. When the graphics are newly added, the algorithm automatically rearranges the graphics according to all the graphics in the mode, and a new topology is presented. If the user manually arranges according to personal habits, the position dragged by the user is automatically restored when a new graph is inserted next time, and the user is arranged again according to the mode to present a new topology.
Disclosure of Invention
In view of the foregoing, an object of the present application is to provide a method, an apparatus, an electronic device, and a storage medium for displaying a network policy topology, which solve the problem that when a new graphic is inserted, a user automatically restores and rearranges an image topology manually laid out according to personal habits.
Embodiments of the present application are implemented 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 image frame corresponding to the new object; determining an insertion area of the new image frame into an existing topological graph, and determining a candidate position of a center point of the new image frame in the insertion area; wherein, each graphic frame in the existing topological graph represents a display object, and the connection line between the graphic frames represents the access authority relationship between the display objects; and if the new image frame is not overlapped with the left image frame and the right image frame after being inserted into the candidate position, inserting the new image frame into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new 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 topology graph, so that the new image frame is not overlapped with the existing graph and is close to the center graph as much as possible, and therefore, under the condition of realizing the existing topology function, the image topology manually arranged by a user according to personal habits can be reserved.
With reference to a possible implementation manner of the first aspect embodiment, determining that the new image frame is inserted into an insertion area in an existing topology map includes: acquiring an included angle between a connecting line of a central point of one graphic frame and an origin of a coordinate axis and a connecting line of the 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; and obtaining the maximum included angle in all included angles, wherein the area where the maximum included angle is located is the insertion area. In the embodiment of the application, the area where the maximum included angle is located is the insertion area by acquiring the included angle between every two adjacent graphic frames in the existing topological graph, so that the probability that the new graphic frame after insertion is not overlapped with the existing graph can be reduced.
With reference to a possible implementation manner of the first aspect embodiment, determining a candidate position of the new graphics frame center point in the insertion area includes: taking the angular bisector of the maximum included angle as the on-line of the center point of the new image frame; and determining candidate positions of the center point of the new image frame on the angular bisector. In the embodiment of the application, the angular bisector of the maximum included angle is taken as the line of the center point of the graph frame, so that the probability that the new graph frame after insertion is not overlapped with the existing graph can be further reduced.
With reference to a possible implementation manner of the first aspect embodiment, determining a candidate position of the new graphics frame center point on the angular bisector includes: determining the sum of half of the side length of the central graphic frame where the coordinate axis origin is located and half of the side length of the new graphic frame and the preset graphic frame interval as the candidate X coordinate of the central point of the new graphic frame; and determining candidate Y coordinates of the center point of the new image frame according to the slope of the angular bisector and the candidate X coordinates of the center point of the new image frame, wherein the candidate positions comprise the candidate X coordinates and the candidate Y coordinates. In the embodiment of the application, the candidate position of the center point of the new graphic frame on the angular bisector, which is obtained by the method, can ensure that the inserted new graphic frame is close to the center graphic as much as possible under the condition of no overlapping.
With reference to a possible implementation manner of the first aspect embodiment, the method further includes: and if the new graphic frame is inserted into the candidate positions and then is overlapped with the left graphic frame and the right graphic frame, determining a new candidate position of the center point of the new graphic frame in the insertion area until the new graphic frame is inserted into the new candidate position and then is not overlapped with the left graphic frame and the right graphic frame. In this embodiment of the present application, if a new graphics frame overlaps with left and right graphics frames after being inserted into a candidate position, the new candidate position needs to be determined again until the new candidate position does not overlap with the left and right graphics frames, so as to ensure that the displayed topology structures do not overlap.
With reference to a possible implementation manner of the first aspect embodiment, determining a new candidate position of the new graphics frame center point in the insertion area includes: selecting the Y coordinate of the upper edge of the left graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a first Y coordinate of the central point of the new graphic frame, and determining a first X coordinate of the central point of the new graphic frame according to the first Y coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain a first new candidate position of the central point of the new graphic frame, wherein the maximum included angle is the maximum angle in the included angle between every two adjacent graphic frames in the existing topological graph; selecting the X coordinate of the right edge of the left graphic frame and the sum of half of the edge length of the new graphic frame and the preset graphic frame interval 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 of the right graphic frame and 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 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 edge of the right graphic frame, the sum of half of the edge 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 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 which is not overlapped with the left and right graphic frames after the insertion of the new graphic frame and has the minimum absolute value of X, Y coordinates is selected 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 through the mode, then the new candidate position which is not overlapped with the left and right graphic frames after the insertion of the new graphic frame is selected as the final position, and the absolute value of the X, Y coordinate is minimum, 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 first aspect embodiment, determining a new candidate position of the new graphics frame center point in the insertion area includes: selecting the Y coordinate of the upper edge of the left 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the angle bisector slope of the maximum included angle, so as to obtain a new candidate position of the central 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; or selecting the X coordinate of the right edge of the left graphic frame and the sum of half of the edge 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, so as 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; or selecting the Y coordinate of the upper edge of the right graphic frame and 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle, so as to obtain a new candidate position of the central 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; or selecting the X coordinate of the right edge of the right graphic frame and the sum of half of the edge 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 angle bisector slope of the maximum included angle, so as to obtain the 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, 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, and the subsequent new candidate position is not calculated any more, so that 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 image frame corresponding to the new added object; the position determining module is used for determining the insertion area of the new image frame into the existing topological graph and determining the candidate position of the center point of the new image frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and a connecting line between the graphic frames represents an access right relation between the display objects; and the inserting module is used for inserting the new image frame into the candidate position if the new image frame is not overlapped with the left and right image frames after being inserted into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new 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: the device comprises a memory and a processor, wherein the processor is connected with the memory; the memory is used for storing programs; the processor is configured to invoke the program stored in the memory, so as to perform the foregoing embodiment of the first aspect and/or the method provided in connection with any possible implementation manner of the embodiment of the first aspect.
In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method provided by the embodiments of the first aspect and/or any one of the possible implementations of the embodiments 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 apparent from the description, or may be learned by practice of the embodiments of the application. The objects and other advantages of the present 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 that are needed 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 that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art. The above and other objects, features and advantages of the present application will become more apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the several views of the drawings. The drawings are not intended to be drawn to scale, with emphasis instead being placed upon illustrating the principles of the present application.
Fig. 1 is a flow chart illustrating a method for displaying a network policy topology according to an embodiment of the present application.
Fig. 2 shows a schematic topology diagram of an existing topology provided in an embodiment of the present application.
Fig. 3 shows a schematic diagram of inserting a new graphic frame into an existing topology according to an embodiment of the present application.
Fig. 4 shows a schematic diagram of still another method for inserting a new graphic frame into an existing topology according to an embodiment of the present application.
Fig. 5 is a schematic block diagram of a display device of a network policy topology according to an embodiment of the present application.
Fig. 6 shows a schematic structural diagram of an electronic device according to 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 numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Also, relational terms such as "first," "second," and the like may be used solely 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, the term "and/or" in this application is merely an association relation describing an association object, and indicates that three relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone.
In view of the problem that when a new graph is inserted, the existing network policy map display method automatically restores and rearranges the image topology manually arranged by a user according to personal habits, the embodiment of the application provides the network policy map display method, when a new graph frame is inserted, the existing image topology is not restored, but the new graph frame is inserted into the existing topology graph, so that the new graph frame is not overlapped with the existing graph and is close to the center graph as much as possible, and therefore the image topology manually arranged by the user according to personal habits can be reserved.
The following will describe 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 image frame corresponding to the new object.
When a user adds an object in the existing topological graph, the size of a new image 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 in a designated network segment.
In one embodiment, if the newly added object is a terminal whose IP address is located in the specified network segment, the new graphic frame size is a preset fixed graphic frame size. If the newly added object is a newly added network segment, the new graphic frame is the smallest rectangle of the graphic frame surrounding all terminals with IP addresses in the newly added network segment. The size of the graphic 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 graphic frames corresponding to different network segments are not fixed any more, the display method of the network policy topology can solve the problem that the existing display method of the network policy map does not support the arrangement of graphics with different sizes, and the display method of the network policy topology can support the arrangement of graphics 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 whose IP addresses are located in the network segment may be determined according to configuration information input by the user. The specific manner of determining whether the new object is a terminal or a network segment according to the configuration information input by the user, and the number of terminals whose IP addresses are located in the network segment may be implemented in an existing manner, which is well known to those skilled in the art and will not be described herein.
S2: and determining an insertion area of the new image frame into the existing topological graph, and determining a candidate position of the center point of the new image frame in the insertion area.
After the object is newly added, it is necessary to determine that a new image frame corresponding to the newly added object is inserted into an insertion area in the existing topological graph. In an alternative implementation manner, the process of determining that a new graphic frame is inserted into an insertion area in an existing topological graph may be that an included angle between a connection line between a central point of one graphic frame and an origin of a coordinate axis and a connection line between a central point of another graphic frame and the origin of the coordinate axis is obtained in every two adjacent graphic frames in the existing topological graph; therefore, the 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 connection line between the graphic frames represents an access right relation between the display objects, and if the display object is a network segment or a terminal with an IP address in a designated network segment, each graphic frame in the existing topological graph represents a network segment or a terminal with an IP address in the designated network segment, and the connection line between the graphic frames represents the access right relation between the network segments or between the terminal and the terminal.
After determining that the new graphical frame is inserted into the insertion region in the existing topological graph, determining candidate positions of the center point of the new graphical frame in the insertion region.
In an alternative embodiment, the process of determining candidate locations of the new graphical frame center point within the insertion area may be: and taking the angular bisector of the maximum included angle as the line where the new graphic frame center point is located, and determining the candidate position of the new graphic frame center point on the angular bisector. I.e. the candidate position is on the bisector of the maximum included angle. Therefore, the probability of overlapping left and right graphic frames after the insertion of the new graphic frame can be reduced, and the insertion efficiency is improved.
For ease of understanding, the description is provided in connection with the schematic diagram shown in fig. 2. Assuming that the existing topological graph is shown in fig. 2, since the origin of the coordinate axes in the schematic diagram shown in fig. 2 is the center 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, and 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, the included angle between the graphic frame 2 and the graphic frame 3, the included angle between the graphic frame 3 and the graphic frame 4, the included angle between the graphic frame 4 and the graphic frame 5, the included angle between the graphic frame 5 and the graphic frame 6, and the included angle between the graphic frame 6 and the graphic frame 7 need to be calculated. Then selecting the maximum included angle from all included angles, wherein the included angle between the graphic frame 2 and the graphic frame 7 in fig. 2 is the maximum included angle, and then taking the angular bisector of the maximum included angle as the new graphic frame center point to be positioned on line.
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 of the maximum included angle.
In yet another embodiment, the process of determining the candidate position of the new graphical frame center point 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, and taking the sum as the candidate X coordinate of the central point of the new graphic frame; and determining candidate Y coordinates of the center point of the new graphic frame according to the slope of the angular bisector and the candidate X coordinates of the center point of the new graphic frame, so that candidate positions can be obtained, wherein the candidate positions comprise the candidate X coordinates and the candidate Y coordinates. For the sake of understanding, it is assumed that, in the description of fig. 3, the length of half of the side length of the center graphic frame 1 where the origin of the coordinate axis 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, then, at this time, the candidate X coordinate=a+b+c of the center point of the new graphic frame 8, and after obtaining the X coordinate, the candidate Y coordinate of the center point of the new graphic frame 8 is obtained according to the slope of the angular bisector and the X coordinate, and Y coordinate= (a+b+c) tan r is obtained, where r is the maximum included angle of 1/2.
It should be noted that, in an alternative embodiment, instead of taking the angular bisector of the maximum included angle as the new center of the image frame, that is, taking the 1/2 maximum included angle as the new center of the image frame, the line of the maximum included angle a may be taken as the new center of the image frame, where a is a real number greater than 0 and less than 1. For example, a line between a maximum included angle of 1/3 and a maximum included angle of 2/3 is used as a new image frame center point. For ease of understanding, for example, assuming that the maximum included angle is 120 degrees, the 1/2 maximum included angle is the angular bisector, the corresponding slope is tan60, the 1/3 maximum included angle is 40 degrees, the corresponding slope is tan40, the 2/3 maximum included angle is 80 degrees, and the corresponding slope is tan80. Therefore, the above-mentioned angle bisector of the maximum included angle cannot be taken as a new image frame center point on line, and is not to be construed as a limitation of the present application.
S3: and if the new image frame is not overlapped with the left image frame and the right image frame after being inserted into the candidate position, inserting the new image frame into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new 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 graphic frame and the right graphic frame 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 graphic frame and the right graphic frame after being inserted into the candidate position, namely, is 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 relation between the newly added object and the object in the existing topological graph. The left graphic frame refers to the graphic frame located at the left side of the new graphic frame, the right graphic frame refers to the graphic frame located at the right side of the new graphic frame, for example, the graphic frame 2 in fig. 3 is the left graphic frame of the new graphic frame 8, and the graphic frame 7 is the right graphic frame of the new graphic frame 8.
When generating topology according to the network policy, the network segment and the terminal are abstracted into graphic frames, such as rectangular frames, and the terminal in the network segment is placed in the graphic frame corresponding to the network segment as an icon, and the topology arrangement mode of the terminal icon can be an existing mode or a mode shown in the application. The main network segment graphic frame is presented in the middle of the interface, and the associated network segment graphic frame surrounds the main network segment graphic frame. The access right relation between network segments and between terminals is presented through the connection line color connected with each other, for example, the access right relation indicates that the access is allowed, the connection line color can be indicated by red, the access right relation indicates that the access is refused, and the connection line color can be indicated by green. When the access authority relation is modified, the color of the corresponding connection line is modified, and when the access authority relation 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, the network segment image frame or the terminal image frame is displayed in the topology, and a 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 topology.
The method for displaying the network policy topology further comprises the step of determining a new candidate position of a center point of the new graphic frame in an insertion area if the new graphic frame overlaps left and right graphic frames after being inserted into the candidate position, namely overlaps left and right graphic frames, until the new graphic frame does not overlap left and right graphic frames after being inserted into the new candidate position.
In one embodiment, determining a new candidate location for the new graphical frame center point within the insertion region may be a reselection of the new candidate location on the bisector of the largest included angle.
In an alternative embodiment, the process of determining a new candidate location of the new graphical frame center point within the insertion area may be: selecting the Y coordinate of the upper edge of the left graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval 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 edge of the left graphic frame, the sum of half of the edge length of the new graphic frame and the preset graphic frame interval 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 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 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 edge of the right graphic frame, the sum of half of the edge 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 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 which is not overlapped with the left and right graphic frames after the insertion of the new graphic frame and has the minimum absolute value of X, Y coordinates is selected as the final position of the center point of the new graphic frame.
For ease of understanding, the description is provided in connection with fig. 4. Selecting the Y coordinate of the upper edge of the left graphic frame 2 and the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval as the first Y coordinate of the center point of the new graphic frame 8, and determining the first X coordinate of the center point of the new graphic frame 8 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 8, namely the position A in FIG. 4; selecting the X coordinate of the right line of the left graphic frame 2 and the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval as the second X coordinate of the center point of the new graphic frame 8, and determining the second Y coordinate of the center point of the new graphic frame 8 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 8, namely a position B in FIG. 4; selecting the Y coordinate of the upper edge of the right graphic frame 7 and the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval as the third Y coordinate of the center point of the new graphic frame 8, and determining the fourth X coordinate of the center point of the new graphic frame 8 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 8, namely the position C in FIG. 4; selecting the X coordinate of the right edge of the right graphic frame 7, the sum of half of the edge 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 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 8, namely the position D in fig. 4; among a plurality of new candidate positions, such as position a, position B, position C, and position D, a new candidate position having the smallest absolute value of X, Y coordinates, which does not overlap with the left and right graphic frames after insertion of the new graphic frame 8, is selected as the final position of the center point of the new graphic frame 8, for example, the final selected final position is position C.
In an alternative embodiment, the process of determining a new candidate location of the new graphical frame center point within the insertion area may be: and selecting the Y coordinate of the upper edge of the left 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 the new candidate position of the center point of the new graphic frame. For example, the Y coordinate of the upper edge of the left graphic frame 2 and the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval are selected as the first Y coordinate of the center point of the new graphic frame 8, and the first X coordinate of the center point of the new graphic frame 8 is determined according to the first Y coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain the first new candidate position of the center point of the new graphic frame 8, namely the position a in fig. 4.
Or selecting the X coordinate of the right edge of the left graphic frame, the sum of half of the edge 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 the new candidate position of the center point of the new graphic frame. For example, the sum of the X-coordinate of the right edge of the left graphic frame 2, half of the edge length of the new graphic frame 8 and the preset graphic frame interval is selected as the second X-coordinate of the center point of the new graphic frame 8, and the second Y-coordinate of the center point of the new graphic frame 8 is determined according to the second X-coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain the second new candidate position of the center point of the new graphic frame 8, namely the position B in fig. 4
Or selecting the Y coordinate of the upper edge 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 the new candidate position of the center point of the new graphic frame. For example, the Y coordinate of the upper edge of the right graphic frame 7 and the sum of half of the side length of the new graphic frame 8 and the preset graphic frame interval are selected as the third Y coordinate of the center point of the new graphic frame 8, and the fourth X coordinate of the center point of the new graphic frame 8 is determined according to the third Y coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain the third new candidate position of the center point of the new graphic frame 8, namely the position C in fig. 4.
Or selecting the X coordinate of the right edge of the right graphic frame, the sum of half of the edge 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 the new candidate position of the center point of the new graphic frame. For example, the sum of the X coordinate of the right edge of the right graphic frame 7 and half of the side length of the new graphic frame 8 and the preset graphic frame interval is selected as the fourth X coordinate of the center point of the new graphic frame 8, and the fourth Y coordinate of the center point of the new graphic frame 8 is determined according to the fourth X coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain the fourth new candidate position of the center point of the new graphic frame 8, namely the position D in fig. 4.
In this embodiment, instead of 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 a small distance to a large distance from the origin of the coordinate axes, for example, position B is calculated first, and if a new graphics frame is inserted into a new candidate position and then is not overlapped with left and right graphics frames, the new graphics frame is inserted into the new candidate position, and then the subsequent new candidate positions are not calculated. If the new graphic frame is inserted into the new candidate position B and then overlapped with the left and right graphic frames, 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 not overlapped with the left and right graphic frames, then not calculating the subsequent new candidate position; if so, the next new candidate position A is calculated again until the new candidate 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 image frame is inserted, the existing image topology is not restored, but the new image frame is inserted into the existing topology graph, so that the new image frame is not overlapped with the existing image and is close to the center image 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 graphic frame corresponding to the network segment is the smallest rectangle surrounding the graphic frames of all terminals with IP addresses in the network segment, and the size of the graphic frame corresponding to the network segment depends on the number of the terminals in the network segment, so that the sizes of the graphic frames corresponding to different network segments are not fixed any more, and the method can support the arrangement of graphics 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 location determination module 120, and an insertion module 130.
The size determining module 110 is configured to determine a new frame size 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 area of the new frame into an existing topological graph, and determine a candidate position of a center point of the new frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and a connection line between the graphic frames represents an access right relationship between the display objects, for example, the display object represents a network segment or a terminal with an IP address in a designated network segment, and the connection line between the graphic frames represents an access right relationship between the network segments or between the terminals.
And the inserting module 130 is configured to insert the new image frame into the candidate position if the new image frame is not overlapped with the left and right image frames after being inserted into the candidate position, and add a connection line between the corresponding image frames according to the access authority relationship between the new object and the object in the existing topological graph.
Optionally, the position determining module 120 is configured to obtain an included angle between a connection line between a central point of one graphic frame and an origin of a coordinate axis and a connection line between a central point of another graphic frame and the origin of the coordinate axis in every two adjacent graphic frames in the existing topological graph; and obtaining the maximum included angle in 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 take an angular bisector of the maximum included angle as a line where the new image frame center point is located; and determining candidate positions of the center point of the new image frame on the angular bisector.
Optionally, the position determining module 120 is configured to determine a sum of half of a side length of the center graphic frame where the coordinate axis origin is located, half of a side length of the new graphic frame, and a preset graphic frame interval, as a candidate X coordinate of the center point of the new graphic frame; and determining candidate Y coordinates of the center point of the new image frame according to the slope of the angular bisector and the candidate X coordinates of the center point of the new image frame, wherein the candidate positions comprise the candidate X coordinates and the candidate Y coordinates.
If the new graphic frame is inserted into the candidate position and then overlaps the left and right graphic frames, 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 area until the new graphic frame is inserted into the new candidate position and then does not overlap the left and right graphic frames.
The location determination module 120 is configured to: selecting the Y coordinate of the upper edge of the left graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a first Y coordinate of the central point of the new graphic frame, and determining a first X coordinate of the central point of the new graphic frame according to the first Y coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain a first new candidate position of the central point of the new graphic frame, wherein the maximum included angle is the maximum angle in the included angle between every two adjacent graphic frames in the existing topological graph; selecting the X coordinate of the right edge of the left graphic frame and the sum of half of the edge length of the new graphic frame and the preset graphic frame interval 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 of the right graphic frame and 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 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 edge of the right graphic frame, the sum of half of the edge 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 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 which is not overlapped with the left and right graphic frames after the insertion of the new graphic frame and has the minimum absolute value of X, Y coordinates is selected 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 of the left 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the angle bisector slope of the maximum included angle, so as to obtain a new candidate position of the central 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; or selecting the X coordinate of the right edge of the left graphic frame and the sum of half of the edge 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, so as 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; or selecting the Y coordinate of the upper edge of the right graphic frame and 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the slope of the angular bisector of the maximum included angle, so as to obtain a new candidate position of the central 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; or selecting the X coordinate of the right edge of the right graphic frame and the sum of half of the edge 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 angle bisector slope of the maximum included angle, so as to obtain the 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 display device 100 of network policy topology provided in the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment portion is not mentioned.
As shown in fig. 6, fig. 6 shows a block diagram of an electronic device 200 according to an embodiment of the present application. The electronic device 200 includes: a transceiver 210, a memory 220, a communication bus 230, and a processor 240.
The transceiver 210, the memory 220, and the processor 240 are electrically connected directly or indirectly to each other to realize 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. Wherein the transceiver 210 is configured to transmit and receive data. The memory 220 is used for storing a computer program, such as the display device 100 storing the software functional modules shown in fig. 5, i.e. the network policy topology. The network policy topology display device 100 includes at least one software function module that may be stored in the memory 220 in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the electronic device 200. The processor 240 is configured to execute executable modules stored in the memory 220, such as software functional modules or computer programs included in the network policy topology display device 100. For example, the processor 240 is configured to determine a new frame size 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 image frame into an existing topological graph, and determining a candidate position of a center point of the new image frame in the insertion area; wherein each graphic frame in the existing topological graph represents a display object, a connection line between the graphic frames represents an access right relationship between the display objects, for example, the display object represents a network segment or a terminal with an IP address in a designated network segment, and the connection line between the graphic frames represents an access right relationship between the network segments or between the terminals; and if the new image frame is not overlapped with the left image frame and the right image frame after being inserted into the candidate position, inserting the new image frame into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new object and the object in the existing topological graph.
The Memory 220 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The processor 240 may be an integrated circuit chip with signal processing capabilities. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks 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 embodiments of the present application further provide a non-volatile computer readable storage medium (hereinafter referred to as a storage medium) on which a computer program is stored, where the computer program, when executed by a computer such as the electronic device 200 described above, performs the method for displaying a network policy topology described above.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams 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, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single 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 solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a computer-readable storage medium, including several instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or an electronic device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely 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 think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to 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 (9)

1. A method for displaying a network policy topology, comprising:
determining the size of a new image frame corresponding to the new object;
determining an insertion area of the new image frame into an existing topological graph, and determining a candidate position of a center point of the new image frame in the insertion area; wherein, each graphic frame in the existing topological graph represents a display object, and the connection line between the graphic frames represents the access authority relationship between the display objects;
if the new image frame is not overlapped with the left image frame and the right image frame after being inserted into the candidate position, inserting the new image frame into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new object and the object in the existing topological graph;
Wherein determining that the new graphical frame is inserted into an insertion region in an existing topological graph comprises:
acquiring an included angle between a connecting line of a central point of one graphic frame and an origin of a coordinate axis and a connecting line of the 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;
and obtaining the maximum included angle in all included angles, wherein the area where the maximum included angle is located is the insertion area.
2. The method of claim 1, wherein determining candidate locations of the new graphical frame center point within the insertion region comprises:
taking the angular bisector of the maximum included angle as the on-line of the center point of the new image frame;
and determining candidate positions of the center point of the new image frame on the angular bisector.
3. The method of claim 2, wherein determining candidate locations of the new graphical frame center point on the angular bisector comprises:
determining the sum of half of the side length of the central graphic frame where the coordinate axis origin is located and half of the side length of the new graphic frame and the preset graphic frame interval as the candidate X coordinate of the central point of the new graphic frame;
and determining candidate Y coordinates of the center point of the new image frame according to the slope of the angular bisector and the candidate X coordinates of the center point of the new image frame, wherein the candidate positions comprise the candidate X coordinates and the candidate Y coordinates.
4. The method according to claim 1, wherein the method further comprises:
and if the new graphic frame is inserted into the candidate positions and then is overlapped with the left graphic frame and the right graphic frame, determining a new candidate position of the center point of the new graphic frame in the insertion area until the new graphic frame is inserted into the new candidate position and then is not overlapped with the left graphic frame and the right graphic frame.
5. The method of claim 4, wherein determining a new candidate location for the new graphical frame center point within the insertion region comprises:
selecting the Y coordinate of the upper edge of the left graphic frame, the sum of half of the side length of the new graphic frame and the preset graphic frame interval as a first Y coordinate of the central point of the new graphic frame, and determining a first X coordinate of the central point of the new graphic frame according to the first Y coordinate and the slope of the angular bisector of the maximum included angle, so as to obtain a first new candidate position of the central point of the new graphic frame, wherein the maximum included angle is the maximum angle in the included angle between every two adjacent graphic frames in the existing topological graph;
selecting the X coordinate of the right edge of the left graphic frame and the sum of half of the edge length of the new graphic frame and the preset graphic frame interval 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 of the right graphic frame and 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 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 edge of the right graphic frame, the sum of half of the edge 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 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 which is not overlapped with the left and right graphic frames after the insertion of the new graphic frame and has the minimum absolute value of X, Y coordinates is selected as a final position of the center point of the new graphic frame.
6. The method of claim 4, wherein determining a new candidate location for the new graphical frame center point within the insertion region comprises:
Selecting the Y coordinate of the upper edge of the left 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the angle bisector slope of the maximum included angle, so as to obtain a new candidate position of the central 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; or,
selecting the X coordinate of the right edge of the left graphic frame, the sum of half of the edge 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 angle bisector slope of the maximum included angle, so as 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; or,
selecting the Y coordinate of the upper edge 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 central point of the new graphic frame, and determining the X coordinate of the central point of the new graphic frame by combining the angle bisector slope of the maximum included angle, so as to obtain a new candidate position of the central 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; or,
And selecting the X coordinate of the right edge of the right graphic frame, the sum of half of the edge 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 angle bisector slope of the maximum included angle, so as to obtain the 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.
7. A display device of a network policy topology, comprising:
the size determining module is used for determining the size of a new image frame corresponding to the new added object;
the position determining module is used for determining the insertion area of the new image frame into the existing topological graph and determining the candidate position of the center point of the new image frame in the insertion area; each graphic frame in the existing topological graph represents a display object, and a connecting line between the graphic frames represents an access right relation between the display objects;
the inserting module is used for inserting the new image frame into the candidate position if the new image frame is not overlapped with the left image frame and the right image frame after being inserted into the candidate position, and adding a connecting line between the corresponding image frames according to the access authority relationship between the new object and the object in the existing topological graph;
Wherein, the location determination module is used for:
acquiring an included angle between a connecting line of a central point of one graphic frame and an origin of a coordinate axis and a connecting line of the 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;
and obtaining the maximum included angle in all included angles, wherein the area where the maximum included angle is located is the insertion area.
8. An electronic device, comprising:
the device comprises a memory and a processor, wherein the processor is connected with 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 of any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, performs the method according to any of claims 1-6.
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 CN113934341A (en) 2022-01-14
CN113934341B true 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 (14)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7166982B2 (en) * 2019-04-22 2022-11-08 株式会社日立製作所 TOPOLOGY MAP PRESENTATION SYSTEM, TOPOLOGY MAP PRESENTATION METHOD, AND COMPUTER PROGRAM

Patent Citations (14)

* 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

Also Published As

Publication number Publication date
CN113934341A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
US9037571B1 (en) Topology service using closure tables and metagraphs
CN109377542B (en) Three-dimensional model rendering method and device and electronic equipment
CN111291244B (en) House source information display method, device, terminal and storage medium
CN111580730B (en) Background display method of application program, electronic device and storage medium
CN107770146B (en) User data authority control method and device
CN107480554A (en) A kind of right management method, rights management device and intelligent terminal
CN110989877B (en) Message management method, related equipment and computer readable storage medium
CN107391914B (en) Parameter display method, device and equipment
CN111651225A (en) Graphical interface configuration method and terminal equipment
CN107423395A (en) Navigation data processing system
CN110674050B (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN113934341B (en) Network policy topology display method and device, electronic equipment and storage medium
WO2019134289A1 (en) Screen projection control method and device, electronic terminal, and readable storage medium
CN115599484A (en) Screen capturing method, screen capturing device, screen capturing equipment and computer storage medium
CN115510508A (en) Page information protection method and device and electronic equipment
CN111552537B (en) Theme switching method and device, computer equipment and storage medium
CN110427135B (en) Method, device, terminal and storage medium for determining application call
CN112988426A (en) Message processing method and device
CN112463228A (en) Storage pool hybrid deployment method and device
CN111158566A (en) Event processing method, device, equipment and storage medium
CN112416189A (en) Cross-page focus searching method and device and electronic equipment
CN105988804B (en) Software transfer method and terminal
CN113312661B (en) User authorization system, method and device and electronic equipment
CN112819693B (en) Sliding verification code generation method and device, electronic equipment and computer readable medium
CN115878296B (en) Resource management method and device, electronic equipment and readable 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