Method and device for displaying ring-protected PTN / SPN and SDH service routing
Patent Information
- Application Number
- CN202610242184.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-28
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]当前PTN/SPN、SDH带坏业务普遍采用传统的"信号流"式路由呈现方式,从源到宿基于物理端口顺序或信号标识进行呈现,业务路由存在多个设备点被主备前后重复经过时,这种呈现方式则会导致端到端业务的主、备路径出现大量交叉和缠绕,无法合理确认重复网元的坐标位置,形成直观连贯的业务路径,严重降低了端到端业务视图的可读性和操作性,难于支撑起对该业务的生产维护
[0017]第五方面,本申请提供一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现所述的环保护PTN/SPN、SDH业务路由展示方法的步骤。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to a method and apparatus for displaying PTN / SPN and SDH service routes under environmental protection. Background Technology
[0002] In PTN / SPN and SDH network topologies, protection ring networks exist, and different protection rings may intersect or be tangent to each other. When services are carried on this protection ring network, the primary and backup routes of the services will pass through the same or different protection rings, and there may be intersection or tangency points between different rings. This causes devices that are tangent or intersecting between different rings to repeatedly pass before and after the primary and backup routes of the services, resulting in a large number of intersecting and tangled lines in the route, making it difficult to display the complete service route on a single diagram.
[0003] To provide a comprehensive overview of the complete routing of PTN / SPN and SDH services with ring protection, thereby improving service routing visibility and supporting routine maintenance tasks such as service cutover and fault handling, a service routing display device with ring protection needs to be built to support the analysis and maintenance of newly launched and existing services.
[0004] Currently, PTN / SPN and SDH services that are prone to failure generally adopt the traditional "signal flow" routing presentation method, which presents the route from source to destination based on the physical port sequence or signal identifier. When multiple device points are repeatedly traversed by the primary and backup in the service route, this presentation method will result in a large number of intersections and entanglements in the primary and backup paths of the end-to-end service. It is impossible to reasonably identify the coordinates of the repeated network elements and form an intuitive and coherent service path, which seriously reduces the readability and operability of the end-to-end service view and makes it difficult to support the production and maintenance of the service. Summary of the Invention
[0005] To address the problems in the existing technology, this application provides a method and apparatus for displaying the routing of PTN / SPN and SDH services under ring protection, which can intuitively present the end-to-end path of the service, clearly distinguish between primary and backup routing information and ring protection routing information, and has both the ability to display the whole picture and the ability to display the signal flow.
[0006] To solve at least one of the above problems, this application provides the following technical solution: Firstly, this application provides a method for displaying routing information for ring-protected PTN / SPN and SDH services, including: A graph database is constructed based on routing data from PTN / SPN and SDH networks; service routing data at each level in the PTN / SPN and SDH networks are extracted from the graph database, and a visualized tree structure graph is constructed based on the extracted routing data; the nodes in the tree structure graph are layered according to the depth value to obtain a tree-like hierarchical structure. Identify the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; based on the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indices to each node in each level according to a uniform allocation rule to obtain the initial tree routing structure. Starting from the main path, the paths in the initial tree routing structure are vertically sorted according to their proximity to obtain and display the routing views of ring protection PTN / SPN and SDH services. The parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0007] Furthermore, the step of constructing a graph database based on routing data from PTN / SPN and SDH networks includes: Incrementally synchronize port and channel data in PTN / SPN and SDH networks to the graph database by node type; Based on the hierarchical routing data in PTN / SPN and SDH networks, establish directed connections between ports and assign the hierarchical routing data to the connection relationships, and incrementally synchronize them to the graph database according to the relationship type. Based on the hierarchical routing data in PTN / SPN and SDH networks, directed bearer relationships between channels are established and incrementally synchronized to the graph database according to the relationship type.
[0008] Furthermore, the step of extracting service routing data at each level from the graph database in the PTN / SPN and SDH networks, and constructing a visualized tree structure graph based on the extracted routing data, includes: Based on the service channel ID information, routing data for all network layers of the service is extracted in real time from the graph database. The routing data includes port, path, and topology information. A mapping from original nodes to visual nodes is established in the graph database to create a corresponding visual node for each original node; the visual node contains the attributes of the original node. By constructing a visual representation of unidirectional connections between nodes based on a path list, the tree structure can be expanded to obtain a visual tree structure diagram.
[0009] Furthermore, the step of obtaining a tree-like hierarchical structure by layering the nodes in the tree structure graph according to the depth value includes: Determine the root node for each business channel; Start searching from the root node and calculate the number of hops from each node to the root node, and use the number of hops from each node to the root node as the depth value; Record the parent node of each node during the search process.
[0010] Furthermore, the step of assigning horizontal position indices to each node in each level according to a unified allocation rule, based on the principle of primary path priority, starting from the root node and proceeding horizontally, to obtain the initial tree routing structure includes: Each node is assigned a horizontal position index starting from N in groups; during assignment, child nodes follow their parent nodes and the search for the nearest free position is performed alternately on both sides of the parent node's position: each iteration synchronously checks the adjacent positions above and below, and selects the first free position found for assignment. If there are no available locations nearby, search for nodes near the previously assigned node, starting from the Y-coordinate of the previous node and incrementing the search by offset. It also includes overlap detection of adjacent nodes; the method for overlap detection includes: Get all nodes at the current depth level and sort them in ascending order according to their initial Y coordinates. Then check whether there is spatial overlap between adjacent nodes. If an overlap between adjacent nodes is detected, the overlapping adjacent nodes will be misaligned according to preset rules.
[0011] Furthermore, the step of vertically sorting the paths in the initial tree routing structure according to their proximity, starting from the main path, to obtain the ring-protected PTN / SPN and SDH service routing views includes: Select the main path as the reference path, calculate the affinity between other paths and the reference path, and rank the path with the highest affinity. Use the path whose ranking has been determined as the new reference path, calculate the affinity between the remaining paths (excluding those already ranked) and the new reference path, and select the path with the highest affinity for ranking; repeat this step until all paths have been ranked. The formula for calculating the intimacy level is: long weight = similarity weight × C1 + (C2 - weight of connections between paths) Wherein, the similarity weight is the number of nodes overlapping between the reference path and other paths; the path connection weight is the node number of the reference path that is connected to other paths; C1 is the amplification factor of the similarity weight; and C2 is the default base of the path connection weight.
[0012] Furthermore, the ring-protected PTN / SPN and SDH service routing display method also includes the detection and adjustment of cross-node connections between nodes on the same X coordinate; Methods for detecting and adjusting cross-node connections between nodes on the same X-coordinate include: Traverse all nodes at the current depth level and group the nodes according to their X coordinates; Check if there are connections between nodes in the same group. If a connection exists, the Y-axis coordinates of the nodes with the connection will be used as a data set. Check if there are other nodes in the current dataset. If a node exists and its Y coordinate is between the Y coordinates of the connected nodes in the dataset, then the connecting line segment between the connected nodes is determined to be in a cross-node state. Select the node corresponding to the topmost Y coordinate and offset it along the positive X-axis so that the connection path avoids passing through intermediate nodes.
[0013] Furthermore, the method for displaying ring-protected PTN / SPN and SDH service routes also includes: The source and destination information of each tunnel route is highlighted hop by hop according to the business routing order, forming a path signal flow to achieve a visualization effect.
[0014] Secondly, this application provides a ring-protected PTN / SPN and SDH service routing display device, comprising: The tree structure construction module is used to build a graph database based on routing data from PTN / SPN and SDH networks; extract service routing data at each level in the PTN / SPN and SDH networks from the graph database, and build a visual tree structure graph based on the extracted routing data; and hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. The node sorting module is used to determine the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node. Based on the principle of main path priority, starting from the root node, along the horizontal direction, the module assigns a horizontal position index to each node in each level according to a unified allocation rule to obtain the initial tree routing structure. The result output module is used to vertically sort the paths in the initial tree routing structure according to their proximity, starting from the main path, to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0015] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the described method for displaying the routing of PTN / SPN and SDH services under the protection of the ring.
[0016] Fourthly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the described method for displaying routing of PTN / SPN and SDH services under the protection of the ring.
[0017] Fifthly, this application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the described method for displaying the routing of PTN / SPN and SDH services under the protection of the environment.
[0018] As can be seen from the above technical solution, this application provides a method and device for displaying ring-protected PTN / SPN and SDH service routes. Based on graph model construction technology, it quickly extracts routing data from each network layer of the PTN / SPN and SDH service channels, and uses a tree algorithm to arrange the service routing device nodes in a tree structure. Combined with a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism, it improves the device node coordinates, reduces the intersection between ring-linked tree data, avoids vertical device connection cross-device problems, and effectively solves the visualization problem of route cross-entanglement in complex ring networks, thus constructing a complete display device for ring-protected PTN / SPN and SDH service routes. This display device can not only intuitively present the end-to-end service path and clearly distinguish between primary, backup, and ring-protected routing information, but also support the selection of single or multiple paths, dynamically highlighting the path information in a signal flow manner; it has both a full-view display capability and does not lose the signal flow display method. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts illustrating the ring protection PTN / SPN and SDH service routing display method in the embodiments of this application; Figure 2 This is the second flowchart illustrating the ring protection PTN / SPN and SDH service routing method in the embodiments of this application. Figure 3 This is a schematic diagram illustrating a service routing example for the signal flow algorithm. Figure 4 This is a schematic diagram illustrating a business routing example using a tree-based algorithm. Figure 5 This is one of the schematic diagrams illustrating a simple primary / backup weighting method for sorting service routes in the ring protection PTN / SPN and SDH service route display method in the embodiments of this application. Figure 6 This is the second illustration of a simple example of sorting service routes using the primary / backup weight method in the ring protection PTN / SPN and SDH service route display method in this application embodiment; Figure 7 This is a schematic diagram illustrating the use of path similarity to sort service routes in the ring protection PTN / SPN and SDH service route display method in the embodiments of this application. Figure 8 This is a schematic diagram illustrating an example of sorting service routes by the connection weights between paths in the ring protection PTN / SPN and SDH service route display method in this application embodiment; Figure 9 This is a schematic diagram illustrating an example of sorting service routes using a proximity ranking method in the ring protection PTN / SPN and SDH service route display method of this application embodiment; Figure 10 This is a schematic diagram illustrating a service route display example where cross-device connection occurs in the ring protection PTN / SPN and SDH service route display method in the embodiments of this application. Figure 11 This is a schematic diagram of a service route display example after lateral fine-tuning operation in the ring protection PTN / SPN and SDH service route display method in the embodiments of this application; Figure 12 This is a schematic diagram illustrating an example of service route display after incorporating the signal flow algorithm in the ring protection PTN / SPN and SDH service route display method in this application embodiment; Figure 13 This is a schematic diagram illustrating an example of using the ring unrolling-tree algorithm to display service routes in the ring-protected PTN / SPN and SDH service route display method in this application embodiment. Figure 14 This is a schematic diagram illustrating an example of using the ring shrinkage-signal flow algorithm to display service routes in the ring-protected PTN / SPN and SDH service route display method in this application embodiment. Figure 15 This is a structural diagram of the ring-protected PTN / SPN and SDH service routing display device in the embodiments of this application; Figure 16 This is a schematic diagram of the structure of the electronic device in the embodiments of this application.
[0021] Figure label: Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0024] In view of the problems existing in the prior art, this application provides a method and device for displaying ring-protected PTN / SPN and SDH service routes. Based on graph model construction technology, it quickly extracts routing data from each network layer of the PTN / SPN and SDH service channels, and uses a tree algorithm to arrange the service routing device nodes in a tree structure. Combined with a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism, it improves the device node coordinates, reduces the intersection between ring-linked tree data, avoids vertical device connection cross-device problems, and effectively solves the visualization problem of route cross-entanglement in complex ring networks. It constructs a complete display device for ring-protected PTN / SPN and SDH service routes. This display device can not only intuitively present the end-to-end service path and clearly distinguish between primary, backup, and ring-protected routing information, but also support the selection of single or multiple paths and dynamically highlight the path information in a signal flow manner; it has both a full-view display capability and does not lose the signal flow display method.
[0025] Solution Overview: This solution utilizes a graph database for data storage and retrieval, abstracting service routes at each level in PTN / SPN and SDH networks into two unified elements: "nodes" and "connections." Through tree structure analysis, nodes are grouped to form a clearly hierarchical tree topology. During layout, primary path nodes are prioritized, and the system automatically calculates node depth and allocates positions, detecting and adjusting overlaps between nodes. Based on this, branch nodes are vertically sorted according to their proximity, bringing closely related nodes closer together. Finally, horizontal fine-tuning appropriately staggers connecting lines, improving path clarity and ultimately constructing an intuitive and easy-to-understand PTN / SPN and SDH ring network routing diagram.
[0026] To intuitively present the entire end-to-end service path, clearly distinguish between primary / backup and ring protection routing information, and provide both a comprehensive display capability and a signal flow display method, this application provides an embodiment of a ring protection PTN / SPN and SDH service routing display method. See [link to embodiment]. Figure 1 and Figure 2 The method for displaying ring-protected PTN / SPN and SDH service routes specifically includes the following: Step S101: Construct a graph database based on the routing data of PTN / SPN and SDH networks; extract service routing data of each level in PTN / SPN and SDH networks from the graph database, and construct a visualized tree structure graph based on the extracted routing data; divide the nodes in the tree structure graph into layers according to the depth value to obtain a tree-like hierarchical structure.
[0027] Optionally, in this embodiment, this step discloses... Figure 2 Step 1: Data Preprocessing and Graph Construction 1. Based on the service channel ID information, extract routing data for all network layers of the service from the graph database in real time. The routing data includes information such as the ports, paths, and topologies involved.
[0028] Optionally, this embodiment provides specific steps for storing graph database data: Incrementally synchronize port data from the relational database to the graph database, using node types.
[0029] The channel data in the relational database is incrementally synchronized to the graph database as a node.
[0030] Based on the hierarchical routing data in the relational database, directed connections are established between ports, and the hierarchical routing data is assigned to the connections, incrementally synchronized to the graph database as a relation type.
[0031] Based on the hierarchical routing data in the relational database, a directed bearing relationship is established between channels, and the relationship type is incrementally synchronized to the graph database.
[0032] 2. Establish a mapping from original nodes to visualization nodes in the graph database. Create a corresponding visualization node for each original node, including attributes such as ID, label, and network element information. Only the left-to-right connection relationship between the original nodes is retained between the visualization nodes. A unidirectional connection is constructed based on the path list to ensure the expansion of the tree structure.
[0033] 3. Complete the data structure, including: node mapping, graph structure, and endpoint set.
[0034] Step S102: Confirm the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; according to the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indexes to each node in each level according to the unified allocation rules to obtain the initial tree routing structure.
[0035] Optionally, in this embodiment, this step discloses... Figure 2 Step 2: Tree Algorithm Layout and Node Coordinate Marking 1) Tree structure analysis: 1. Identify the root child node according to the following rules: One source, one destination service: The source end is used as the root node for the search.
[0036] One source, two destinations business: using the source as the root node for the search.
[0037] Two-source, one-stay service: The stay end is used as the root node for the search.
[0038] Two-source, two-destination business: Extract source nodes from the working path as the root nodes for the search.
[0039] 2. Start breadth-first search (BFS) from the root node, calculate the number of hops from each node to the root node as the depth value, and ensure that the depth value accurately reflects the actual number of hops in the route.
[0040] 3. Group nodes by depth to form a clear tree-like hierarchical structure, which facilitates subsequent layer-by-layer processing. Each depth level corresponds to one hop of the route.
[0041] 4. During the BFS traversal, record the parent node of each node to provide a basis for subsequent intelligent location allocation and ensure that the position of the child node is associated with the parent node.
[0042] 2) Main path identification: Primary Path Marking: The first routing path is identified as the primary path, ensuring that the primary path node occupies a more visually advantageous position and providing a clear visual distinction between primary and backup paths. The selection of the first routing path can be determined by the default sorting rules during the extraction of business routing data.
[0043] 3) Intelligent location allocation algorithm: 1. First, retrieve all nodes at the current level (starting from the level below the root node) and group them by parent node, ensuring that main path nodes have priority in the global sort. Then, assign a horizontal position index starting from 1 to each node in the group. During assignment, child nodes immediately follow their parent nodes, and the search for the nearest free position alternately performs a search on both sides of the parent node's position: each iteration synchronously checks the adjacent positions above and below, and selects the first found free position for assignment. Optionally, the closer to the root node, the larger the interval can be to avoid branch overlap in the tree structure.
[0044] 2. Backup Strategy: If there are no available locations nearby, search around the location of the previously assigned node, starting from the Y-coordinate of the previous node and increasing the search by offset to ensure that each node has valid coordinates. For example, assuming the horizontal position index of the current level main path node P is 5, the allocation logic of its three child nodes S1, S2, and S3 is as follows: S1 is allocated to the right side of the parent node (position 6), S2 is allocated to the left side of the parent node (position 4), and S3 is allocated to the free position to the right of S1 (position 7). If there is no free position to the right of S3, then the available position is searched based on the Y coordinate of S2 by incrementing the offset (e.g., 20 pixels).
[0045] 4) Overlap detection and fine-tuning: 1. Overlap detection: Obtain all nodes at the current depth level and sort them in ascending order according to their initial Y coordinates, and check whether there is spatial overlap between adjacent nodes in turn.
[0046] 2. Misalignment Adjustment: If overlapping of adjacent nodes is detected, the Y-coordinate of even-numbered nodes will be slightly adjusted upwards, and the Y-coordinate of odd-numbered nodes will be slightly adjusted downwards. Of course, the reverse or other rules can also be used to adjust the Y-coordinate, ensuring that adjacent nodes are misaligned and the rules are consistent.
[0047] 3. Coordinate Update: Based on the above rules, recalculate a new, non-overlapping Y coordinate for each overlapping node and update its position.
[0048] 4. After completing the tree algorithm, the node layout and coordinate information of the service route with ring protection are as follows: Signal flow algorithms: There may be intersections between lines, and the hierarchical structure may be unclear (see reference). Figure 3 (As shown).
[0049] Tree-structured algorithm: Arranges service routing device nodes according to a tree structure, clearly distinguishing between primary / backup and ring protection routing information (reference). Figure 4 (As shown).
[0050] Step S103: Starting from the main path, sort the paths in the initial tree routing structure vertically according to their proximity to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0051] Optionally, in this embodiment, this step discloses... Figure 2 Step 3: Vertical Intimacy Ranking After defining the tree structure and coordinates of the paths, a proximity ranking is performed to fine-tune the paths. Proximity ranking means prioritizing paths that are connected and have a high degree of correlation to each other.
[0052] In the set of paths we search, there may be connections between paths. If a path is inserted between two paths, the layout will have many intersecting lines and will not look good.
[0053] For example: Suppose there exists a topological graph such as Figure 5 As shown. Simply sorting by primary and backup weights cannot determine a unique order; a random probability may occur, such as... Figure 6 The arrangement of items. Therefore, we also need to sort them by intimacy level.
[0054] 1) Intimacy Ranking Explanation Intimacy is divided into two indicators: path similarity and the connection between paths.
[0055] (a) Path similarity Path similarity refers to calculating the similarity between a given reference path and other paths. The calculation method involves extracting the nodes from the path into an ordered set. The paths to be compared are processed in the same way. Then, the similarity between the two ordered sets is calculated.
[0056] Example: Reference path: A1->B1->C1->D1->E1->F1 -------------------------- Path to be compared 1: A1->B1->C1->D2->E2->F2 Path 2 to be compared: A1->B1->C2->D3->E3->F3 The ordered set of nodes extracted from the reference path is: A1, B1, C1, D1, E1, F1. Path 1 is A1, B1, C1, D2, E2, F2. According to the similarity rules of ordered sets, the overlapping elements of the reference path and path 1 are A1, B1, and C1, so the similarity is 3 elements.
[0057] • The ordered set of nodes extracted from the reference path is: A1, B1, C1, D1, E1, F1, and path 2 is A1, B1, C2, D3, E3, F3. According to the similarity rules of ordered sets, the overlapping elements of the reference path and path 2 are A1 and B1, so the similarity is 2 elements.
[0058] • The higher the similarity, the higher the priority in ranking.
[0059] Therefore, path 1 is ranked second. Path 1 is set as the reference path, paths with already determined locations are excluded, and the remaining paths are sorted by similarity. This process is repeated until all paths are sorted.
[0060] The final sorted topology is as follows: Figure 7As shown.
[0061] (ii) Connections between paths A connection between paths refers to a connection between nodes of different paths, excluding existing connections within the paths themselves. Traverse the node set of the reference path: from the source to the destination, find the first group of nodes connected to other paths, and use the node number as the weight of the connection.
[0062] Example: Reference path: A1->B1->C1->D1->E1->F1 -------------------------- Path to be compared 1: A2->B2->C2->D2->E2->F2 Path 2 to be compared: A3->B3->C3->D3->E3->F3 Among them, there exist relationships: D1->D2, E2->E3 According to the path connection rules, path 1 has a weight of 4, and path 2 has no additional connection with the reference path, so its weight is the default value of 1000. Therefore, path 1 ranks second. Setting path 1 as the reference path, excluding paths with already determined positions, and ranking the remaining paths by similarity. This process is repeated until all paths are ranked.
[0063] The final sorted topology is as follows: Figure 8 As shown.
[0064] 2) Implementation method of intimacy ranking Combining the two indicators above, the weighting formula for ranking intimacy is as follows: Calculation formula: • Long weight = similarity weight × 1000 + (1000 - weight of connections between paths); Example: The following paths exist: Path 1: A1->B1->C1->D1->E1->F1 Path 2: A1->B1->C2->D2->E1->F1 Path 3: A1->B1->C3->D3->E1->F1 Path 4: A1->B4->C4->D4->E1->F1 There are connections between paths, D1->D2 • If path 1 is determined to be the first priority, then the affinity of the remaining paths is calculated.
[0065] – The affinity level for path 2 is: 2 × 1000 + (1000 - 4) = 2996 – The affinity level for path 3 is: 2 × 1000 + (1000 - 1000) = 2000 – The affinity level for path 4 is: 1 × 1000 + (1000 - 1000) = 1000 • If path 2 is determined to be the second priority, then the affinity calculation is performed on the remaining paths.
[0066] • Exclude paths whose locations are already determined, and sort the remaining paths by similarity. Repeat until all paths have been sorted.
[0067] The final sorted topology is as follows: Figure 9 As shown.
[0068] Optionally, this embodiment also includes step 4: lateral fine-tuning. After completing the vertical proximity sorting, the intersection of tree branches can be further reduced; however, there are still instances where nodes on the same X-coordinate are connected across devices, resulting in a "through-device" phenomenon. This problem not only interferes with visual presentation but also affects the accurate identification of connection relationships and the overall visibility of the view. For example: Suppose there is a topology graph like... Figure 10 As shown.
[0069] When nodes on the same X coordinate are connected across devices, there is a problem of devices crossing each other, which makes the connection relationship unclear.
[0070] By fine-tuning the horizontal lines, the clarity of the connections is improved (see reference). Figure 11 (As shown).
[0071] Specific steps for implementing lateral fine-tuning 1. Traverse all nodes at the current depth level, grouping device nodes with the same X coordinate. Example: Group 1: Contains device node A Group 2: Includes device nodes B1 and B2 Group 3: Includes C1 and C2 device nodes Group 4: Includes device nodes D1, D2, and D3. 2. Check if there are connections between nodes within the same group. Assuming that D1 and D3 in group 4 are connected, treat the Y-axis coordinates of D1 and D3 as a data set {y1=100, y2=300}. 3. Check if there are other nodes in the current dataset {y1=100, y2=300}. Taking the connection between D1 and D3 as an example, if the node D2 is assumed to be y3, {y3=200}, and is located between the Y coordinates of D1 and D3, then it is determined that the connecting line segment of D1-D3 will visually "pass through" the D2 device icon, causing path overlap and visual confusion.
[0072] 4. By appropriately offsetting the node corresponding to the topmost Y-coordinate along the positive X-axis, the connection path can avoid passing through intermediate nodes, thus significantly improving the clarity of the connection relationship.
[0073] Optionally, this embodiment also includes step 5: node coordinate output and view rendering. The fusion is completed based on the results of steps 2, 3, and 4, and SPN / PTN / SDH ring network routing coordinate information is generated. The front end renders and presents the information based on the specified coordinates and node attribute information, clearly displaying the relationships between multiple tunnel routing nodes and outputting a ring protection PTN / SPN and SDH service routing view.
[0074] Optionally, this embodiment also includes step 6: multi-dimensional display. To make the display capabilities of ring-protected service routes more scalable without sacrificing the display effect of service path flow, a signal flow algorithm is integrated into steps 1 / 2 / 3 / 4 / 5 to expand the following capabilities: Business path signal flow display capability: The front end can support selecting one or multiple paths. The system then highlights the source and destination information of each tunnel route hop by hop according to the business routing order, forming a path signal flow. This significantly improves the hierarchy and readability of the view, achieving a visual effect (see reference). Figure 12 (As shown).
[0075] Key points and areas to be protected in this embodiment: 1. The key point (protection point) of this invention is based on a graph storage scheme, extracts business routing data based on knowledge graphs, and innovatively adopts a tree structure algorithm of root and child nodes to reorganize and lay out the business routes with rings, making the complex ring network routes clearer and realizing a "one-map" global overview of business paths.
[0076] 2. The key point (protection point) of this invention is to integrate the vertical proximity sorting algorithm optimization to reduce the crossover between the vertical nodes of the loop tree; and to integrate the horizontal fine-tuning algorithm to avoid the problem of crossover between devices when there is a connection between nodes with the same X coordinate, thereby avoiding visual interference and further improving the visibility of the routing view.
[0077] 3. The key point (protection point) of this invention is that it forms a flexible and elastic ring protection service route display device, which supports both displaying the full picture of ring protection service routes using a tree algorithm and displaying the narrowed ring service path using a signal flow algorithm.
[0078] 4. The key point (protection point) of this invention is the implementation process and solution of the complete set of ring-protected PTN / SPN and SDH service display device.
[0079] Advantages of this embodiment: 1. This invention integrates tree-structured algorithms, vertical proximity sorting algorithms, and horizontal fine-tuning mechanisms to make PTN / SPN and SDH ring network routing more intuitive. It can effectively solve the problem of routing crossover and entanglement in complex ring networks and present business paths intuitively and clearly.
[0080] 2. This invention constructs a network model based on a graph database, which can process large-scale network topology and routing information in real time, realize complex path query and analysis, and can connect and dynamically generate routing data in real time, quickly complete the generation of tree layout of routing nodes, and improve visualization rendering and interactive performance.
[0081] 3. The business view is flexible and elastic, supporting the expansion and scaling of loop routes. It can not only intuitively display routes through a tree layout, but also display business paths in a signal flow manner.
[0082] As described above, the ring-protected PTN / SPN and SDH service routing display method provided in this application can quickly extract routing data from each network layer of the PTN / SPN and SDH service channels based on graph model construction technology. It then uses a tree-structured algorithm to arrange service routing device nodes in a tree structure, and combines a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism to improve device node coordinates, reduce the intersection of ring-structured tree data, and avoid vertical device connection issues. This effectively solves the visualization problem of routing intersections and entanglements in complex ring networks, constructing a complete ring-protected PTN / SPN and SDH service routing display device. This display device not only intuitively presents the end-to-end service path and clearly distinguishes between primary / backup and ring-protected routing information, but also supports selecting one or more paths and dynamically highlighting the path information in a signal flow manner; it possesses both comprehensive display capabilities and retains the signal flow display method.
[0083] To intuitively present the entire end-to-end service path, clearly distinguish between primary / backup and ring protection routing information, and provide both a comprehensive display capability and a signal flow display method, this application provides an embodiment of a ring protection PTN / SPN / SDH service routing display device for implementing all or part of the aforementioned ring protection PTN / SPN / SDH service routing display method. See [link to embodiment]. Figure 15The ring-protected PTN / SPN and SDH service routing display device specifically includes the following components: The tree structure construction module 10 is used to construct a graph database based on routing data from PTN / SPN and SDH networks; extract service routing data at each level in PTN / SPN and SDH networks from the graph database, and construct a visualized tree structure graph based on the extracted routing data; and hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. The node sorting module 20 is used to determine the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; according to the principle of main path priority, starting from the root node, along the horizontal direction, and using a unified allocation rule, the horizontal position index is assigned to each node in each level group to obtain the initial tree routing structure. The result output module 30 is used to vertically sort each path in the initial tree routing structure according to the proximity, starting from the main path, to obtain and display the ring protection PTN / SPN and SDH service routing views; the calculation parameters of the proximity include the overlap between paths and the connection between paths.
[0084] As described above, the ring-protected PTN / SPN and SDH service routing display device provided in this application embodiment can quickly extract routing data from each network layer of the PTN / SPN and SDH service channels based on graph model construction technology. It uses a tree-structured algorithm to arrange service routing device nodes in a tree structure, and combines a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism to improve device node coordinates, reduce the intersection of ring-shaped tree data, and avoid vertical device connection cross-device problems. This effectively solves the visualization problem of routing cross-entanglement in complex ring networks, constructing a complete ring-protected PTN / SPN and SDH service routing display device. This display device not only intuitively presents the end-to-end service path and clearly distinguishes between primary / backup and ring-protected routing information, but also supports selecting one or more paths and dynamically highlighting the path information in a signal flow manner; it possesses both comprehensive display capabilities and does not lose the signal flow display method.
[0085] From a hardware perspective, in order to intuitively present the entire end-to-end service path, clearly distinguish between primary / backup and ring protection routing information, and possess both a comprehensive display capability and a signal flow display method, this application provides an embodiment of an electronic device for implementing all or part of the ring protection PTN / SPN and SDH service routing display method. The electronic device specifically includes the following components: The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the environmental protection PTN / SPN and SDH service routing display device and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the environmental protection PTN / SPN and SDH service routing display method and the embodiments of the environmental protection PTN / SPN and SDH service routing display device, the contents of which are incorporated herein by reference, and repeated details will not be described again.
[0086] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.
[0087] In practical applications, some of the routing display methods for PTN / SPN and SDH services can be executed on the electronic device side as described above, or all operations can be completed in the client device. The choice can be made based on the processing capabilities of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed in the client device, the client device may further include a processor.
[0088] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.
[0089] Figure 16 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 16 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 16This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.
[0090] In one embodiment, the function of displaying routing information for ring-protected PTN / SPN and SDH services can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following controls: Step S101: Construct a graph database based on the routing data of PTN / SPN and SDH networks; extract service routing data of each level in PTN / SPN and SDH networks from the graph database, and construct a visualized tree structure graph based on the extracted routing data; hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. Step S102: Confirm the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; according to the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indexes to each node in each level according to the unified allocation rules to obtain the initial tree routing structure. Step S103: Starting from the main path, sort the paths in the initial tree routing structure vertically according to their proximity to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0091] As described above, the electronic device provided in this application embodiment, based on graph model construction technology, quickly extracts routing data from each network layer of PTN / SPN and SDH service channels, and uses a tree algorithm to arrange service routing device nodes in a tree structure. Combined with a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism, it improves device node coordinates, reduces the intersection of ring-linked tree data, avoids vertical device connection cross-device problems, and effectively solves the visualization problem of routing cross-entanglement in complex ring networks. This constructs a complete display device for ring-protected PTN / SPN and SDH service routes. This display device not only intuitively presents the end-to-end service path and clearly distinguishes between primary / backup and ring-protected routing information, but also supports selecting one or more paths and dynamically highlighting the path information in a signal flow manner; it possesses both comprehensive display capabilities and retains the signal flow display method.
[0092] In another embodiment, the PTN / SPN and SDH service routing display device can be configured separately from the central processing unit 9100. For example, the PTN / SPN and SDH service routing display device can be configured as a chip connected to the central processing unit 9100, and the PTN / SPN and SDH service routing display method function can be realized through the control of the central processing unit.
[0093] like Figure 16 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 16 All components shown; in addition, the electronic device 9600 may also include Figure 16 For components not shown, please refer to existing technology.
[0094] like Figure 16 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.
[0095] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.
[0096] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.
[0097] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.
[0098] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0099] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processing unit 9100 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.
[0100] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored audio via the speaker 9131.
[0101] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the ring-protected PTN / SPN and SDH service routing display method with the execution subject being a server or client in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the ring-protected PTN / SPN and SDH service routing display method with the execution subject being a server or client in the above embodiments. For example, when the processor executes the computer program, it implements the following steps: Step S101: Construct a graph database based on the routing data of PTN / SPN and SDH networks; extract service routing data of each level in PTN / SPN and SDH networks from the graph database, and construct a visualized tree structure graph based on the extracted routing data; hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. Step S102: Confirm the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; according to the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indexes to each node in each level according to the unified allocation rules to obtain the initial tree routing structure. Step S103: Starting from the main path, sort the paths in the initial tree routing structure vertically according to their proximity to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0102] As described above, the computer-readable storage medium provided in this application embodiment, based on graph model construction technology, quickly extracts routing data from each network layer of PTN / SPN and SDH service channels, and uses a tree algorithm to arrange service routing device nodes in a tree structure. Combined with a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism, it improves device node coordinates, reduces the intersection of ring-linked tree data, avoids vertical device connection cross-device problems, and effectively solves the visualization problem of routing cross-entanglement in complex ring networks. This constructs a complete display device for ring-protected PTN / SPN and SDH service routes. This display device not only intuitively presents the end-to-end service path and clearly distinguishes between primary / backup and ring-protected routing information, but also supports selecting one or more paths and dynamically highlighting the path information in a signal flow manner; it possesses both comprehensive display capabilities and does not lose the signal flow display method.
[0103] Embodiments of this application also provide a computer program product capable of implementing all steps in the ring protection PTN / SPN and SDH service route display method with the execution subject being a server or client in the above embodiments. When this computer program / instruction is executed by a processor, it implements the steps of the ring protection PTN / SPN and SDH service route display method. For example, the computer program / instruction implements the following steps: Step S101: Construct a graph database based on the routing data of PTN / SPN and SDH networks; extract service routing data of each level in PTN / SPN and SDH networks from the graph database, and construct a visualized tree structure graph based on the extracted routing data; hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. Step S102: Confirm the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; according to the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indexes to each node in each level according to the unified allocation rules to obtain the initial tree routing structure. Step S103: Starting from the main path, sort the paths in the initial tree routing structure vertically according to their proximity to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
[0104] As described above, the computer program product provided in this application embodiment, based on graph model construction technology, quickly extracts routing data from each network layer of PTN / SPN and SDH service channels, and uses a tree algorithm to arrange service routing device nodes in a tree structure. Combined with a vertical proximity sorting algorithm and a horizontal fine-tuning mechanism, it improves device node coordinates, reduces the intersection of ring-linked tree data, avoids vertical device connection cross-device problems, and effectively solves the visualization problem of routing cross-entanglement in complex ring networks. This constructs a complete display device for ring-protected PTN / SPN and SDH service routes. This display device not only intuitively presents the end-to-end service path and clearly distinguishes between primary / backup and ring-protected routing information, but also supports selecting one or more paths and dynamically highlighting the path information in a signal flow manner; it possesses both comprehensive display capabilities and retains the signal flow display method.
[0105] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0107] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0108] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0109] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for displaying routing information for ring-protected PTN / SPN and SDH services, characterized in that, The method includes: A graph database is constructed based on routing data from PTN / SPN and SDH networks; service routing data at each level in the PTN / SPN and SDH networks are extracted from the graph database, and a visualized tree structure graph is constructed based on the extracted routing data; the nodes in the tree structure graph are layered according to the depth value to obtain a tree-like hierarchical structure. Identify the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node; based on the principle of main path priority, starting from the root node, along the horizontal direction, assign horizontal position indices to each node in each level according to a uniform allocation rule to obtain the initial tree routing structure. Starting from the main path, the paths in the initial tree routing structure are vertically sorted according to their proximity to obtain and display the routing views of ring protection PTN / SPN and SDH services. The parameters for calculating the proximity include the overlap between paths and the connections between paths.
2. The method for displaying PTN / SPN and SDH service routes under ring protection according to claim 1, characterized in that, The step of constructing a graph database based on routing data from PTN / SPN and SDH networks includes: Incrementally synchronize port and channel data in PTN / SPN and SDH networks to the graph database by node type; Based on the hierarchical routing data in PTN / SPN and SDH networks, establish directed connections between ports and assign the hierarchical routing data to the connection relationships, and incrementally synchronize them to the graph database according to the relationship type. Based on the hierarchical routing data in PTN / SPN and SDH networks, directed bearer relationships between channels are established and incrementally synchronized to the graph database according to the relationship type.
3. The method for displaying ring-protected PTN / SPN and SDH service routes according to claim 1, characterized in that, The steps of extracting service routing data at each level from the graph database in the PTN / SPN and SDH networks, and constructing a visualized tree structure graph based on the extracted routing data, include: Based on the service channel ID information, routing data for all network layers of the service is extracted in real time from the graph database. The routing data includes port, path, and topology information. A mapping from original nodes to visual nodes is established in the graph database to create a corresponding visual node for each original node; the visual node contains the attributes of the original node. By constructing a visual representation of unidirectional connections between nodes based on a path list, the tree structure can be expanded to obtain a visual tree structure diagram.
4. The method for displaying ring-protected PTN / SPN and SDH service routes according to claim 1, characterized in that, The step of obtaining a tree-like hierarchical structure by layering nodes in the tree structure diagram according to depth values includes: Determine the root node for each business channel; Start searching from the root node and calculate the number of hops from each node to the root node, and use the number of hops from each node to the root node as the depth value; Record the parent node of each node during the search process.
5. The method for displaying ring-protected PTN / SPN and SDH service routes according to claim 1, characterized in that, The step of assigning horizontal position indices to each node in each level according to the principle of primary path priority, starting from the root node and proceeding horizontally along a uniform allocation rule, to obtain the initial tree routing structure, includes: Each node is assigned a horizontal position index starting from N in groups; during assignment, child nodes follow their parent nodes and the search for the nearest free position is performed alternately on both sides of the parent node's position: each iteration synchronously checks the adjacent positions above and below, and selects the first free position found for assignment. If there are no available locations nearby, search for nodes near the previously assigned node, starting from the Y-coordinate of the previous node and incrementing the search by offset. It also includes overlap detection of adjacent nodes; the method for overlap detection includes: Get all nodes at the current depth level and sort them in ascending order according to their initial Y coordinates. Then check whether there is spatial overlap between adjacent nodes. If an overlap between adjacent nodes is detected, the overlapping adjacent nodes will be misaligned according to preset rules.
6. The method for displaying ring-protected PTN / SPN and SDH service routes according to claim 1, characterized in that, The step of vertically sorting the paths in the initial tree routing structure according to their proximity, starting from the main path, to obtain the ring-protected PTN / SPN and SDH service routing view includes: Select the main path as the reference path, calculate the affinity between other paths and the reference path, and rank the path with the highest affinity. Use the path whose ranking has been determined as the new reference path, calculate the affinity between the remaining paths (excluding those already ranked) and the new reference path, and select the path with the highest affinity for ranking; repeat this step until all paths have been ranked. The formula for calculating the intimacy level is: long weight = similarity weight × C1 + (C2 - weight of connections between paths) Wherein, the similarity weight is the number of nodes overlapping between the reference path and other paths; the path connection weight is the node number of the reference path that is connected to other paths; C1 is the amplification factor of the similarity weight; and C2 is the default base of the path connection weight.
7. The method for displaying ring-protected PTN / SPN and SDH service routes according to claim 1, characterized in that, It also includes the detection and adjustment of cross-node connections between nodes on the same X-coordinate; Methods for detecting and adjusting cross-node connections between nodes on the same X-coordinate include: Traverse all nodes at the current depth level and group the nodes according to their X coordinates; Check if there are connections between nodes in the same group. If a connection exists, the Y-axis coordinates of the nodes with the connection will be used as a data set. Check if there are other nodes in the current dataset. If a node exists and its Y coordinate is between the Y coordinates of the connected nodes in the dataset, then the connecting line segment between the connected nodes is determined to be in a cross-node state. Select the node corresponding to the topmost Y coordinate and offset it along the positive X-axis so that the connection path avoids passing through the middle node; Also includes: The source and destination information of each tunnel route is highlighted hop by hop according to the business routing order, forming a path signal flow to achieve a visualization effect.
8. A ring-protected PTN / SPN and SDH service routing display device, characterized in that, The device includes: The tree structure construction module is used to build a graph database based on routing data from PTN / SPN and SDH networks; extract service routing data at each level in the PTN / SPN and SDH networks from the graph database, and build a visual tree structure graph based on the extracted routing data; and hierarchically divide the nodes in the tree structure graph according to the depth value to obtain a tree-like hierarchical structure. The node sorting module is used to determine the main path of the tree structure and group the nodes of each level of the tree structure according to the parent node. Based on the principle of main path priority, starting from the root node, along the horizontal direction, the module assigns a horizontal position index to each node in each level according to a unified allocation rule to obtain the initial tree routing structure. The result output module is used to vertically sort the paths in the initial tree routing structure according to their proximity, starting from the main path, to obtain and display the ring protection PTN / SPN and SDH service routing views; the parameters for calculating the proximity include the overlap between paths and the connections between paths.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the ring protection PTN / SPN and SDH service routing display method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the ring protection PTN / SPN and SDH service route display method as described in any one of claims 1 to 7.