Railway station communication network diagram planning layout method based on hierarchical layout algorithm
Through the method based on the hierarchical layout algorithm, the node and edge layout of the railway station communication network diagram is optimized, and the problems of unclear hierarchy and unclear business flow performance are solved, and a clearer and simplified communication network diagram design is achieved, which improves the design efficiency and readability.
Patent Information
- Application Number
- CN202411438978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-10
AI Technical Summary
There are problems in the design of railway station communication network diagrams, which are unclear in the hierarchy and unclear in the performance of communication service flow, resulting in complex layout, frequent overlapping connections, and complicated additions, deletions and modifications.
Using a method based on hierarchical layout algorithm, extract business nodes and business channel information, generate graph structures, divide node structure levels, optimize the arrangement order of nodes and edges, adjust edge layout through the Digestella algorithm to ensure long-distance edge direct connection , nodes are evenly distributed, reducing edge overlap.
It effectively improves the expression efficiency of railway communication design, simplifies the layout design process, reduces overlapping connections, and improves the readability and modification efficiency of the design.
Smart Images

Figure CN119299486A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of graph layout, and in particular to a railway station communication network graph planning and layout method based on a hierarchical layout algorithm. Background Art
[0002] In the digital age, graph data is increasingly used, from social networks to bioinformatics, all of which rely on graph representation and analysis. As one of the key technologies for graph data visualization, graph layout algorithms arrange complex nodes and edges into a form that is easy to understand and analyze. According to the layout structure and calculation method, graph layout algorithms can be divided into many types. Common layout algorithms include: force-directed layout algorithms, which simulate the interaction between nodes and edges based on physical models; ring layout algorithms, which lay out nodes and edges in a circular area; hierarchical layout algorithms, which lay out graphs in layers; grid layout algorithms, which lay out nodes and edges in a grid; and tree layout algorithms, which lay out graphs into tree structures.
[0003] The railway station communication network diagram is a type of design drawing in railway communication design that contains the most complex equipment system types and diverse connection methods. The network diagram is the core of the intermediate station atlas and reflects the centralized relationship of elements in other unit drawings in the atlas. Its layout is controlled by the size of the intermediate station, the number of equipment, the number of channels provided, and the addition, deletion and modification of each drawing in the atlas during the design process. Its drawing layout has always had problems such as overlapping connection relationships, difficulty in reading drawings, and very cumbersome additions, deletions and modifications. Summary of the invention
[0004] The present application provides a railway station communication network diagram planning and layout method and system based on a hierarchical layout algorithm to solve the problems of unclear hierarchy and unclear communication business flow in the design layout of the railway station communication network diagram, and ensure that the design intent can be effectively conveyed.
[0005] According to the first aspect, an embodiment provides a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm, the method comprising:
[0006] Extract the service nodes and service channel information in the railway station communication network diagram and generate a graph structure including nodes and edges;
[0007] Divide the structural levels to which all nodes in the graph structure belong;
[0008] For each level of the division, obtain the arrangement order of all nodes in each level so that the number of edge overlaps between adjacent levels is the minimum, and determine the coordinate positions of all nodes in each level in the graph;
[0009] Based on the coordinate positions of all nodes in each level, the edge layout is determined and the edge drawing is completed to obtain the network graph optimization layout result.
[0010] Furthermore, the service nodes and service channel information in the railway station communication network diagram are extracted to generate a graph structure including nodes and edges, specifically including:
[0011] The equipment and connection relationship data between equipment contained in the railway station communication network diagram are obtained, and the equipment is abstracted as a node V, and the connection relationship between equipment is abstracted as an edge E, and a directed acyclic graph G(V,E) is generated.
[0012] Furthermore, the structural levels to which all nodes in the graph structure belong are divided, including:
[0013] Define the structural level V to which all nodes V belong 1 , V 2 ,…V l ;
[0014] If the structural levels divided by two connected nodes are not adjacent levels, add virtual nodes between the two nodes to fill them, that is, for edge e = (v, w) ∈ E, if there is a node v ∈ V i , but the node w∈V i+n , if n is greater than 1, a virtual node is added between node v and node w.
[0015] Furthermore, for each level of the division, the arrangement order of all nodes in each level is obtained so that the number of edge overlaps between adjacent levels is minimized, specifically including:
[0016] a. According to the divided structural hierarchy, the graph with the hierarchy arranged as L is represented as G(V,E,L), σ i :V i →{1,2,…|V i | represents the level V i A linear arrangement of all nodes of K(V i ,V i+1 ,σ i ,σ i+1 ) represents the number of edge overlaps obtained based on the given arrangement of adjacent layers, and i = 1 initially;
[0017] b. For a fixed linear sequence σ i , calculate σ i+1 Make K(V i ,V i+1 ,σ i ,σ i+1 ) is minimized, assuming A=(a ij ) is represented as the proximity matrix of G, and the calculated σ i+1 With parameter B j Arrange in order:
[0018]
[0019] c. If i < n - 1, where n is the total number of structural levels, then set i ← i + 1 and return to step b; otherwise, go to step d;
[0020] d. For a fixed linear sequence σ i+1 , calculate σ i such that K(V i , V i+1 , σ i , σ i+1 ) reaches the minimum value;
[0021] e. If i > 1, then set i ← i - 1 and return to step d; otherwise, end.
[0022] Furthermore, determine the coordinate positions of all nodes in each level in the graph, specifically including:
[0023] Based on the fixed linear sequence σ of level V i , calculate the x - axis positions of the nodes in level V i i+1
[0024]
[0025] where x(v k ) represents the x - axis position of node v in level V i k .
[0026] Furthermore, determine the coordinate positions of all nodes in each level in the graph, specifically including:
[0027] Adjust and determine the node positions based on the following principles: Long - distance edges should form direct connections as much as possible; connected nodes should be as close as possible; and the edge layout should be balanced within the out - degree or in - degree range of the nodes.
[0028] Furthermore, based on the coordinate positions of all nodes in each level, determine the edge layout and complete the drawing of the edges, specifically including:
[0029] Implement the edge layout using Dijkstra's algorithm and distinguish the edge drawing methods according to the different local shapes of the network graph.
[0030] Furthermore, based on the coordinate positions of all nodes in each level, determine the edge layout and complete the drawing of the edges, specifically including:
[0031] The edge layout is adjusted and determined based on the following principles: compared with the initial layout, the layout of the network graph tries to form direct connections for long-distance edges; overlapping connections are simplified as much as possible; and the out-degree and in-degree points of the nodes are evenly distributed.
[0032] According to the second aspect, in one embodiment, a railway station communication network diagram planning and layout system based on a hierarchical layout algorithm is provided, the system comprising:
[0033] A graph generation module, used to extract the service nodes and service channel information in the railway station communication network graph, and generate a graph structure including nodes and edges;
[0034] The hierarchical division module is used to divide the structural hierarchies to which all nodes in the graph structure belong;
[0035] A node layout determination module is used to obtain, for each level of division, the arrangement order of all nodes in each level so that the number of edge overlaps between adjacent levels is minimized, and determine the coordinate positions of all nodes in each level in the graph;
[0036] The edge layout determination module is used to determine the edge layout and complete the edge drawing based on the coordinate positions of all nodes in each level to obtain the network graph optimization layout result.
[0037] According to a third aspect, an embodiment provides an electronic device, the device comprising: a processor and a memory;
[0038] The memory is used to store one or more program instructions;
[0039] The processor is used to run one or more program instructions to execute the steps of a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as described in any of the above items.
[0040] The present application provides a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm, extracts service nodes and service channel information in the railway station communication network diagram, generates a graph structure including nodes and edges; divides the structural levels to which all nodes in the graph structure belong; for each divided level, obtains the arrangement order of all nodes in each level that minimizes the number of edge overlaps between adjacent levels, and determines the coordinate positions of all nodes in each level in the graph; based on the coordinate positions of all nodes in each level, determines the layout of the edges and completes the drawing of the edges to obtain the network diagram optimization layout result. The present invention effectively improves the expression efficiency of railway communication design content by abstracting the network diagram elements of the intermediate station into graph data of nodes and edges, and using an adapted graph layout algorithm to perform calculation optimization on the network diagram drawing layout. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1A flowchart of a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm provided by an embodiment of the present invention;
[0042] Figure 2 A railway station communication network diagram in a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm provided by an embodiment of the present invention;
[0043] Figure 3 A railway station communication network graph DAG in a railway station communication network graph planning and layout method based on a hierarchical layout algorithm provided by an embodiment of the present invention;
[0044] Figure 4 In a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm provided in one embodiment of the present invention, a virtual node DAG is added to a railway station communication network diagram;
[0045] Figure 5 A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm provided in one embodiment of the present invention reduces overlapping connection results of a railway station communication network diagram DAG;
[0046] Figure 6 A final optimization result of a railway station communication network diagram in a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of the logical structure of a railway station communication network diagram planning and layout system based on a hierarchical layout algorithm is provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0049] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0050] The first embodiment of the present invention provides a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm. Figure 1 Provide detailed explanation.
[0051] like Figure 1 As shown, in step S100, the service nodes and service channel information in the railway station communication network diagram are extracted to generate a graph structure including nodes and edges.
[0052] The above steps specifically include:
[0053] Step S110, obtaining the equipment and the connection relationship data between the equipment reflected in the communication network diagram of a railway station, as shown in Table 1 and Table 2. Figure 2 shown.
[0054] Table 1 Equipment configuration table of a railway station communication network diagram
[0055]
[0056] Table 2 Equipment connection configuration table of a railway station
[0057]
[0058]
[0059] Step S120, abstract the device as a node V, abstract the connection relationship as an edge E, and convert the network graph structure into a directed acyclic graph DAG that can be recognized by a computer, such as Figure 3 As shown in the figure, some edges are processed in a directional manner, that is, the direction of information flow is indicated. There is information flow between communication devices, and the direction of information flow here is from the central device to the terminal device.
[0060] like Figure 1 As shown, in step S200, the structural levels to which all nodes in the graph structure belong are divided.
[0061] The above steps specifically include:
[0062] S210: According to the DAG formed in step S120, define the level V to which all Vs belong 1 , V 2,…V l ; Traverse each edge e=(v,w)∈E, if the node v∈V i , then the node w∈V i+1 , and use this to determine the positioning data of all levels.
[0063] S220, for those that cannot meet the requirements specified in step S210, add virtual nodes to meet the requirements, and set a virtual node at the intersection of each structural level and a long-distance edge (a long-distance edge is an edge that crosses a certain level). Specifically, if the structural levels divided by two connected nodes are not adjacent levels, add a virtual node between the two nodes for filling, that is, for edge e = (v, w) ∈ E, if there is a node v ∈ V i , but does not satisfy the node w∈V i+1 , w∈V i+n , n>1, then add a virtual node s between node v and node w, and then add edges e(v,s), e(s,w), such as Figure 4 shown.
[0064] like Figure 1 As shown, in step S300, for each divided level, the arrangement order of all nodes in each level is obtained so that the number of edge overlaps between adjacent levels is minimized, and the coordinate positions of all nodes in each level in the graph are determined.
[0065] The above steps specifically include:
[0066] Step S310: Based on the result obtained in step S200, the nodes at each structural level are linearly sorted to reduce the number of overlapping edges. The result is as follows: Figure 5 As shown. Specifically including the following steps:
[0067] a. According to the divided structural hierarchy, the graph with the hierarchy arranged as L is represented as G(V,E,L), σ i :V i →{1,2,…|V i | represents the level V i A linear arrangement of all nodes of K(V i ,V i+1 ,σ i ,σ i+1 ) represents the number of edge overlaps obtained based on the given arrangement of adjacent layers (obtained by calculating the intersection of line segments), and i = 1 initially;
[0068] b. For a fixed linear sequence σ i , calculate σ i+1 Make K(V i ,V i+1 ,σ i ,σi+1 ) is minimized, assuming A = (a ij ) represents the adjacency matrix of G, and the calculated σ i+1 is sorted in the order of parameter B j as follows:
[0069]
[0070] c. If i < n - 1, where n is the total number of structural levels, then set i ← i + 1 and return to step b; otherwise, go to step d;
[0071] d. For a fixed linear sequence σ i+1 , calculate σ i such that K(V i , V i+1 , σ i , σ i+1 ) reaches the minimum value;
[0072] e. If i > 1, then set i ← i - 1 and return to step d; otherwise, end.
[0073] Step S320: According to the result obtained in step S310, for the fixed linear sequence σ i of V i , calculate the x - axis positions of each node of V i+1 so as to clarify the specific relative positions of the nodes at each structural level and meet the following requirements: (1) Long - distance edges should form direct connections as much as possible; (2) Connected nodes should be as close as possible; (3) Edge layout should be balanced within the out - degree or in - degree range of nodes.
[0074]
[0075] where x(v k ) represents the x - axis position of the node at level v i of V k .
[0076] As Figure 1 shown, in step S400, based on the coordinate positions of all nodes in each level, determine the edge layout and complete the drawing of edges to obtain the optimized layout result of the network graph.
[0077] The above steps specifically include: According to the result obtained in step S300, calculate the positioning data of edges. The positioning of edges can be implemented using Dijkstra's algorithm and meet the following requirements: The layout of the network graph should form direct connections for long - distance edges as much as possible compared to the initial layout, simplify overlapping connections as much as possible, and evenly distribute the out - degree and in - degree points of nodes. The result is as Figure 6 shown.
[0078] Corresponding to the above-disclosed railway station communication network diagram planning and layout method based on hierarchical layout algorithm, the embodiment of the present invention also discloses a railway station communication network diagram planning and layout system based on hierarchical layout algorithm, such as Figure 7 As shown, it specifically includes:
[0079] A graph generation module, used to extract the service nodes and service channel information in the railway station communication network graph, and generate a graph structure including nodes and edges;
[0080] The hierarchical division module is used to divide the structural hierarchies to which all nodes in the graph structure belong;
[0081] A node layout determination module is used to obtain, for each level of division, the arrangement order of all nodes in each level so that the number of edge overlaps between adjacent levels is minimized, and determine the coordinate positions of all nodes in each level in the graph;
[0082] The edge layout determination module is used to determine the edge layout and complete the edge drawing based on the coordinate positions of all nodes in each level to obtain the network graph optimization layout result.
[0083] It should be noted that for the detailed description of a railway station communication network map planning and layout system based on a hierarchical layout algorithm provided in an embodiment of the present invention, reference can be made to the relevant description of a railway station communication network map planning and layout method based on a hierarchical layout algorithm provided in an embodiment of the present application, which will not be repeated here.
[0084] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0085] The above specific examples are used to illustrate the present invention, which are only used to help understand the present invention and are not used to limit the present invention. For those skilled in the art to which the present invention belongs, some simple deductions, modifications or substitutions can be made according to the idea of the present invention.
Claims
1. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm, characterized in that: The method includes: Extracting service nodes and service channel information in the communication network diagram of a railway station, and generating a graph structure including nodes and edges; Dividing the structural levels to which all nodes in the graph structure belong; For each divided level, obtaining the arrangement order of all nodes in each level that minimizes the number of overlapping edges between adjacent levels, and determining the coordinate positions of all nodes in each level in the graph; Based on the coordinate positions of all nodes in each level, determining the layout of the edges and completing the drawing of the edges to obtain the optimized layout result of the network diagram.
2. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 1, characterized in that: Extracting service nodes and service channel information in the communication network diagram of a railway station, and generating a graph structure including nodes and edges, specifically including: Obtaining the data of devices and the connection relationships between devices included in the communication network diagram of a railway station, abstracting the devices as nodes V, abstracting the connection relationships between devices as edges E, and generating a directed acyclic graph G(V, E).
3. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 2, characterized in that: Dividing the structural levels to which all nodes in the graph structure belong, specifically including: Define the structural levels V1, V2, ...V to which all nodes V belong l ; If the structural levels divided by two connected nodes are not adjacent levels, add virtual nodes between the two nodes to fill them, that is, for edge e = (v, w) ∈ E, if there is a node v ∈ V i , but the node w∈V i+n , if n is greater than 1, a virtual node is added between node v and node w.
4. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 1, characterized in that: For each divided level, obtaining the arrangement order of all nodes in each level that minimizes the number of overlapping edges between adjacent levels, specifically including: a. According to the divided structural hierarchy, the graph with the hierarchy arranged as L is represented as G(V,E,L), σ i :V i →{1,2,…|V i | represents the level V i A linear arrangement of all nodes of K(V i ,V i+1 ,σ i ,σ i+1 ) represents the number of edge overlaps obtained based on the given arrangement of adjacent layers, and i = 1 initially; b. For a fixed linear sequence σ i , calculate σ i+1 Make K(V i ,V i+1 ,σ i ,σ i+1 ) is minimized, assuming A=(a ij ) is represented as the proximity matrix of G, and the calculated σ i+1 With parameter B j Arrange in order: c. If i < n - 1, where n is the total number of levels, then perform i ← i + 1 and return to step b, otherwise go to step d; d. For a fixed linear sequence σ i+1 , calculate σ i Make K(V i ,V i+1 ,σ i ,σ i+1 ) reaches a minimum value; e. If i > 1, then i ← i - 1 and return to step d, otherwise end.
5. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 4, characterized in that: Determining the coordinate positions of all nodes in each level in the graph, specifically including: Based on Tier V i Fixed linear sequence σ i , calculation level V i+1 The x-axis position of each node in where x(v k ) represents V i Tier v k The x-axis position of the node.
6. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 5, characterized in that: Determining the coordinate positions of all nodes in each level in the graph, specifically including: Adjusting and determining the node positions based on the following principles: Long-distance edges should form direct connections as much as possible; Connected nodes should be as close as possible; The edge layout should be balanced within the out-degree or in-degree range of the nodes.
7. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 1, characterized in that: Based on the coordinate positions of all nodes in each level, determining the layout of the edges and completing the drawing of the edges, specifically including: Implementing the edge layout using Dijkstra's algorithm and differentiating the edge drawing methods according to the different local shapes of the network diagram.
8. A railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as claimed in claim 7, characterized in that: Based on the coordinate positions of all nodes in each level, determining the layout of the edges and completing the drawing of the edges, specifically including: Adjusting and determining the edge layout based on the following principles: The layout of the network diagram should form direct connections for long-distance edges as much as possible compared to the initial layout; Simplify overlapping connections as much as possible; The out-degree and in-degree points of the nodes are evenly distributed.
9. A railway station communication network diagram planning and layout system based on a hierarchical layout algorithm, characterized in that: The system includes: A graph generation module, configured to extract service nodes and service channel information in the communication network diagram of a railway station, and generate a graph structure including nodes and edges; A level division module, configured to divide the structural levels to which all nodes in the graph structure belong; A node layout determination module, configured to, for each divided level, obtain the arrangement order of all nodes in each level that minimizes the number of overlapping edges between adjacent levels, and determine the coordinate positions of all nodes in each level in the graph; An edge layout determination module, configured to, based on the coordinate positions of all nodes in each level, determine the layout of the edges and complete the drawing of the edges to obtain the optimized layout result of the network diagram.
10. An electronic device, characterized in that: The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a railway station communication network diagram planning and layout method based on a hierarchical layout algorithm as described in any one of claims 1 to 8.