Network path topology method, system, storage medium and electronic device
By generating directed graphs of the primary and backup networks, dividing the gradients according to the node in- and out-degree values, and establishing backup network paths, the clock interlocking and service interruption problems caused by service cutover in the intelligent clock network are solved, achieving a more stable network topology.
Patent Information
- Application Number
- CN202411164924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In intelligent clock networks, service cutover causes dynamic changes in the clock synchronization network, which may form loops, leading to clock interlocking and service interruption. This is a serious problem especially in the fields of synchronous Ethernet and 5G communications.
The main network directed graph is generated, the gradient is divided according to the in-and-out degree values of the network nodes, and a backup network path is established by selecting the node with the highest gradient, avoiding the main network path, generating a complete network directed graph, and ensuring network stability.
It improves the stability of the clock synchronization network, reduces manual maintenance costs, and prevents clock interlocking and service interruption when network nodes fail or change.
Smart Images

Figure CN119109796B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of communication technology, and in particular relates to a network path topology method, system, storage medium, and electronic device. Background Art
[0002] Current intelligent clock networks can initially prevent loops in large-scale networking. However, in engineering applications, service cutovers can dynamically change the existing clock synchronization network. Due to the existence of primary and backup paths in the clock synchronization network, loops are highly likely to form in the newly created network, leading to clock interlocks and, in severe cases, service interruptions. When intelligent clock networks are applied in synchronous Ethernet and 5G communications, preventing loops in the clock synchronization network is a crucial issue.
[0003] Therefore, a more stable and reliable network path topology method is urgently needed to cope with the risks of clock interlock and service interruption caused by changes in clock synchronization paths when network nodes are added or deleted. Summary of the Invention
[0004] To solve the above problems, the present disclosure provides a network path topology method, system, storage medium and electronic device. After generating a main network directed graph, the gradient is divided according to the in-and-out degree values of the network nodes, and a backup network path is generated according to the gradient of the network nodes, providing a more stable and reliable network path topology method.
[0005] The present invention is achieved through the following technical solutions:
[0006] In a first aspect, an embodiment of the present disclosure provides a network path topology method, the method comprising:
[0007] Entering network nodes and network node connection relationships, determining a network node to be used as a primary injection node, taking the primary injection node as a starting node, traversing all network nodes according to the network node connection relationships, and generating a primary network path to determine a primary network directed graph;
[0008] Calculate the number of main network paths of each network node, obtain the in-degree value of each network node, and divide the gradient of the network node according to the in-degree value of the network node;
[0009] Select a network node with the highest gradient as the backup injection node, and use the backup injection node as the starting node to move towards network nodes with lower gradients or network nodes with the same gradient, avoiding the main network path, and establish a backup network path until all network nodes are traversed to determine the backup network directed graph;
[0010] The primary network directed graph and the backup network directed graph are merged to generate a complete network directed graph, and a complete network path is determined.
[0011] Further,
[0012] Entering network nodes and connection relationships between the network nodes, and determining a network node to serve as the main injection node;
[0013] Taking the main injection node as the starting node, and sequentially establishing a main network path according to the connection relationship of the network nodes;
[0014] When the last network node is reached, the process returns to the previous network node until a network node for which a primary network path has not been established exists according to the network node connection relationship, and the primary network path is established;
[0015] All network nodes are traversed, a main network path is established, and the main network directed graph is determined.
[0016] Further,
[0017] Calculate the sum of the number of input paths and output paths of each network node to obtain the in-degree value of each network node;
[0018] The network nodes are sorted from large to small according to their corresponding in-degree values, and the gradients of the network nodes are divided according to the order from high to low according to the sorting of the network nodes.
[0019] Further,
[0020] Add network nodes with the same in-degree values to the same gradient array, and sort the gradient array according to the size of the in-degree values.
[0021] Further,
[0022] Select a network node from the network nodes with the highest gradient as the backup injection node;
[0023] Taking the backup injection node as the starting node, the backup network path is established towards the network node with a lower gradient or the network node with the same gradient, avoiding the main network path;
[0024] When reaching the tail network node, return to the previous network node until there is a network node with a lower gradient or the same gradient and no backup network path is established;
[0025] Determine whether the two network nodes include a primary network path. If there is no primary network path, establish a backup network path.
[0026] All network nodes are traversed, a backup network path is established, and the backup network directed graph is determined.
[0027] In a second aspect, an embodiment of the present disclosure provides a network path topology system, the system comprising a primary network path generation module, a calculation module, a backup network path generation module, and a network path integration module;
[0028] The main network path generation module is used to input network nodes and network node connection relationships, determine a network node to be used as a main injection node, take the main injection node as the starting node, traverse all network nodes according to the network node connection relationships, and generate a main network path to determine a main network directed graph;
[0029] The calculation module is used to calculate the number of main network paths of each network node, obtain the in-degree value of each network node, and divide the gradient of the network node according to the in-degree value of the network node;
[0030] The backup network path generation module is used to select a network node with the highest gradient as a backup injection node, and use the backup injection node as the starting node to move toward network nodes with lower gradients or network nodes with the same gradient, avoiding the main network path, to establish a backup network path until all network nodes are traversed to determine the backup network directed graph;
[0031] The network path integration module is used to merge the main network directed graph and the backup network directed graph to generate a complete network directed graph and determine a complete network path.
[0032] Further,
[0033] The backup injection node selection unit is used to select a network node from the network nodes with the highest gradient as the backup injection node;
[0034] The backup network path generation unit is configured to establish a backup network path starting from a backup injection node, toward network nodes with low gradients or network nodes with the same gradient, avoiding the main network path; upon reaching the tail network node, return to the previous network node until a network node with a low gradient or the same gradient and no backup network path is established exists; determine whether the main network path is included between two network nodes, and if there is no main network path, establish a backup network path; traverse all network nodes, establish a backup network path, and determine a backup network directed graph.
[0035] Further,
[0036] The main injection node receives: GPS signal or BI TS signal; the backup injection node receives: GPS signal or BI TS signal.
[0037] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium storing one or more programs, wherein:
[0038] When the one or more programs are executed, any of the above-mentioned network path topology methods can be implemented.
[0039] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising a processor, a communication interface, the aforementioned computer-readable storage medium, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other via the communication bus;
[0040] in,
[0041] The processor is configured to execute a program stored in a computer-readable storage medium.
[0042] Compared with the prior art, the present disclosure has the following advantages:
[0043] 1. During the initial installation of the primary and backup network paths, failures in a single network node, or the addition or removal of network nodes, can prevent the entire clock synchronization network from failing. This improves the stability of the clock synchronization network and reduces maintenance costs.
[0044] 2. It is not necessary to establish network connections between all network nodes. This ensures that when a network node fails, it will not cause problems in the entire clock synchronization network, or disconnection of undisturbed network nodes from the clock synchronization network.
[0045] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A flowchart of a network path topology method provided by an embodiment of the present disclosure;
[0048] Figure 2 A schematic diagram of a network node and connection relationship structure provided by an embodiment of the present disclosure;
[0049] Figure 3a-3c A main network directed graph provided in an embodiment of the present disclosure;
[0050] Figure 4a-4c A backup network directed graph provided by an embodiment of the present disclosure;
[0051] Figure 5 A complete network directed graph is provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0053] Figure 1 A flow chart of a network path topology method provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the network path topology method of the embodiment of the present disclosure includes:
[0054] S1: Enter the network nodes and the connection relationship between the network nodes, determine a network node to be used as the main injection node, take the main injection node as the starting node, traverse all network nodes according to the connection relationship between the network nodes, generate the main network path, and determine the main network directed graph.
[0055] Specifically, the network nodes and their connection relationships are entered into a network path topology system. A network node is identified as the primary injection node. Based on the network node connection relationships, all network nodes are traversed to generate a primary network path. Based on all primary network paths, a primary network directed graph is determined. In determining the primary network directed graph, starting from the primary injection node, each network node is traversed. Some network nodes have only one primary network path, while others have multiple primary network paths. A primary network path includes both an output path and an input path.
[0056] S2: Calculate the number of main network paths of each network node, obtain the in-degree value of each network node, and divide the gradient of the network node according to the in-degree value of the network node.
[0057] Specifically, the main network path includes an output path and an input path. In the main network directed graph, the number of input paths and output paths connected to each network node is different. The sum of the number of input paths and output paths of each network node is calculated and used as the in-degree value of each network node. Network nodes with the same in-degree value have the same gradient. Network nodes with large in-degree values are high-gradient network nodes, and network nodes with low in-degree values are low-gradient network nodes. Among them, the network node used as the main injection node not only establishes a network path with other network nodes, but also includes an input path for receiving BITS (Building Integrated Timing Supply) or GPS (Global Positioning System) signals.
[0058] S3: Select a network node with the highest gradient as the backup injection node, and use the backup injection node as the starting node to move towards the network nodes with lower gradients or the network nodes with the same gradient, avoiding the main network path, and establish a backup network path until all network nodes are traversed to determine the backup network directed graph.
[0059] Specifically, a network node with the highest gradient, that is, a network node with the highest in-degree value, is selected, and this network node is used as a backup injection node. With the backup injection node as the starting node, a backup network path is generated from the network node with a high gradient to the network node with a low gradient or the network node with the same gradient; it can be understood that with the backup injection node as the starting node, a backup network path is established to the network node with the same in-degree value or the network node with a small in-degree value. When generating a backup network path, it is also necessary to consider preventing path conflicts and avoiding the main network path. After traversing each network node, all backup network paths are determined, and based on all backup network paths, a backup network directed graph is determined. The backup network path also includes an input path and an output path.
[0060] S4: Merge the main network directed graph and the backup network directed graph to generate a complete network directed graph, and determine the complete network path.
[0061] Specifically, in the network path topology system, the main network directed graph and the backup network directed graph are merged to obtain a complete network directed graph, and the complete network path is determined.
[0062] In some examples, network nodes and network node connection relationships are recorded, a network node is determined to be used as a primary injection node, the primary injection node is used as a starting node, all network nodes are traversed based on the network node connection relationships, and a primary network path is generated to determine a primary network directed graph, specifically including:
[0063] S11: Enter the network nodes and the connection relationship between the network nodes, and determine a network node to be used as the main injection node.
[0064] Specifically, the network nodes and their connection relationships are entered into the network path topology system. A network node is determined to be used as the main injection node. A network node can be randomly selected as the main injection node. Of course, a tail network node is preferably used as the main injection node.
[0065] S12: Taking the main injection node as the starting node, the main network path is established in sequence according to the connection relationship of the network nodes.
[0066] Specifically, starting from the main injection node, along the network node connection relationship, the main network path is established in sequence, and as many main network paths as possible are established until the tail network node is reached.
[0067] S13: After reaching the last network node, return to the previous network node until a network node for which a main network path has not been established exists according to the connection relationship of the network nodes, and then establish the main network path.
[0068] Specifically, after reaching the last network node, starting from the last network node, return to the previous network node in sequence until there is a network node with no primary network path established before the previous network node, and there is a network node connection relationship between the two network nodes, and the primary network path is established;
[0069] S14: traverse all network nodes, establish a main network path, and determine the main network directed graph.
[0070] Specifically, the above method is executed repeatedly until all network nodes are traversed, and all network nodes have established a primary network path based on the network node connection relationship. The primary network path includes an output path and an input path. In the process of determining the primary network directed graph, starting from the main injection node, each network node is traversed. Some network nodes have only one primary network path, while some network nodes have multiple primary network paths.
[0071] In some examples, the number of main network paths of each network node is calculated to obtain the in-degree value of each network node, and the gradient of the network node is divided according to the in-degree value of the network node, specifically including:
[0072] S21: Calculate the sum of the number of input paths and output paths of each network node to obtain the in-degree value of each network node.
[0073] Specifically, the main network path includes an input path and an output path. The number of input paths and output paths connected to each network node is different. The sum of the number of input paths and output paths of a network node is the in-degree value of the network node.
[0074] S22: sorting the network nodes from large to small according to their corresponding in-degree values, and dividing the gradients of the network nodes in a descending order according to the sorting of the network nodes.
[0075] Specifically, network nodes with the same in-degree values have the same gradient. Network nodes with large in-degree values are high-gradient network nodes, and network nodes with low in-degree values are low-gradient network nodes. It is understandable that the higher the in-degree value of a network node, the higher the gradient of the network node. The network nodes are sorted from large to small according to their corresponding in-degree values. Based on the sorting results of the network nodes' in-degree values, the gradients of the network nodes are divided in descending order.
[0076] In some examples, the network nodes are sorted from largest to smallest according to their corresponding in-degree values, and the gradient of the network nodes is divided in descending order according to the sorting of the network nodes, further comprising:
[0077] S221: Add network nodes with the same in-degree values to the same gradient array, and sort the gradient array according to the size of the in-degree values.
[0078] Specifically, a gradient array is generated. Network nodes with the same in-degree values are added to the same gradient array, and network nodes with different in-degree values are added to different gradient arrays. In this case, one gradient array represents one in-degree value, and the gradient arrays are sorted according to the in-degree value. The larger the in-degree value, the higher the gradient corresponding to the gradient array. For example, the gradient array with the largest in-degree value is the first gradient array.
[0079] In some examples, a network node with the highest gradient is selected as a backup injection node. A backup network path is established starting from the backup injection node and directed toward network nodes with lower gradients or those with the same gradients until all network nodes are traversed while avoiding the primary network path. This determines a backup network directed graph. Specifically, the backup network directed graph includes:
[0080] S31: Select a network node from the network nodes with the highest gradient as a backup injection node.
[0081] Specifically, a network node is selected from the network nodes with the highest gradient, or from the gradient array with the highest gradient, that is, a network node with the highest in-degree value is selected, and the network node is used as a backup injection node.
[0082] S32: Taking the backup injection node as the starting node, the backup network path is established toward the network node with a lower gradient or the network node with the same gradient, avoiding the main network path.
[0083] Specifically, a backup network path is established with the backup injection node as the starting node to the network node with a low gradient or the network node with the same gradient; a backup network path can be established only from the network node with a high gradient to the network node with a low gradient until it reaches the tail network node.
[0084] S33: After reaching the tail network node, return to the previous network node until a network node with a low gradient or the same gradient exists and no backup network path is established.
[0085] Specifically, after reaching the last network node, the system returns to the previous node in sequence, starting from the last network node, until a network node with a lower gradient or the same gradient as the previous network node exists and no backup network path has been established. During this process, the backup network path should be prevented from overlapping with the main network path.
[0086] S34: Determine whether a primary network path is included between the two network nodes. If there is no primary network path, establish a backup network path.
[0087] Specifically, to avoid duplication between the backup network path and the primary network path, the primary network path should be avoided when establishing the backup network path. When returning sequentially from the last network node to the previous network node, searching for a network node with a low gradient or the same gradient and no backup network path established, it is also necessary to determine whether the primary network path is included between the two network nodes. If the condition of a network node with a low gradient or the same gradient and no backup network path is met, but the condition of no primary network path being established between the two network nodes is not met, then continue to return sequentially to the previous network node to search for a network node that can establish a backup network path.
[0088] S35: traverse all network nodes, establish a backup network path, and determine a backup network directed graph.
[0089] Specifically, the above method is executed cyclically until all network nodes are traversed and at least one backup network path is established for all network nodes. A backup network directed graph is determined based on all backup network paths, and the backup network directed graph and the main network directed graph do not have duplicate paths.
[0090] In order to more clearly illustrate a network path topology method in the present disclosure, a specific embodiment is provided below.
[0091] like Figure 2 As shown, the embodiment of the present disclosure includes 8 network nodes, and the 8 network nodes include a determined network node connection relationship. The following uses V0, V1, V2, V3, V4, V5, V6, and V7 to represent the 8 network nodes to illustrate this embodiment.
[0092] like Figure 3a-3cAs shown, V5 is selected as the main injection node to inject the main BITS signal. Starting from the main injection node, all network nodes are traversed to establish the main network path. First, an output path is established from the main injection node V5 to V2, from V2 to V1, from V1 to V4, from V1 to V6, and from V6 to V3. At this time, V3 is the last network node, and an output path is established from V3 back to V6, and from V6 to V7. At this time, V7 is the last network node, and an output path is established from V7 back to V6, from V6 back to V4, from V4 back to V1, and from V1 to V0. Through the above method, all main network paths are determined, and the main network directed graph is generated.
[0093] Continue to refer Figure 3c As can be seen from the main network directed graph, the gradient is divided according to the input degree value of each network node. The network node with the highest input and output degree value is divided into the first gradient, and the second gradient, third gradient, and so on. In the embodiment of the present disclosure, the input and output degree values of V1 and V6 are 3; the input and output degree values of V2, V4, and V5 are 2; the input and output degree values of V0, V3, and V7 are 1; therefore, the first gradient includes V1 and V6, the second gradient includes V2, V4, and V5; the third gradient includes V0, V3, and V7; in the network path topology system, the network nodes of each gradient are represented as arrays, that is, the first gradient array is TD1[V1,V6]; the second gradient array is TD2[V2,V4,V5]; and the third gradient array is TD3[V0,V3,V7].
[0094] like Figure 4a-4cAs shown, a network node is selected from the first gradient to serve as a backup injection node. In the embodiment of the present disclosure, V6 is selected as the backup injection node and the backup BI TS signal is injected. At this time, the in-degree value of V6 is changed to 4 due to the addition of an input path. First, backup network paths are established in descending order of in-degree values, with the in-degree values decreasing by 1. That is, a network node with an in-degree value of 4 establishes a backup network path to a network node with an in-degree value of 3, a network node with an in-degree value of 3 establishes a backup network path to a network node with an in-degree value of 2, and a network node with an in-degree value of 2 establishes a backup network path to a network node with an in-degree value of 1. An output path is established from V6 to V1. Since there is a main network path between V1 and V2, an output path is established from V1 to V5, and an output path is established from V5 to the nearest V7. At this time, since the main network path needs to be avoided, V7 is the tail network node. Returning from V7 to V5, an output path is established to the network node with the same gradient. Since there is a main network path between V5 and V2, an output path is established from V5 to V4, and an output path is established from V4 to V2 with the same gradient. At this time, since the main network path needs to be avoided, V2 is the tail network node. Return from V2 to V4, and then from V4 to V5. An output path is established from V5 to V3, and an output path is established from V3 to V0. At this time, all network nodes have been traversed, and the backup network path is established.
[0095] like Figure 5 As shown, a backup network directed graph is determined according to the backup network path, and the backup network directed graph and the main network directed graph are merged to obtain a complete network directed graph.
[0096] Continue to refer Figure 5 , without having to establish network connections between all network nodes, it is possible to ensure that when a network node fails, the entire network will not be disconnected, or that there are still network nodes that are disconnected from the network. It is understood that the above connection method is only a specific example and is not a specific limitation. Persons skilled in the relevant art can adjust it according to the actual number of network nodes and connection method.
[0097] In the embodiment of the present disclosure, in order to reasonably establish a backup network path, when selecting a backup network node, the network node with the highest in-degree value of the main network path is selected as the backup network node. Therefore, before establishing the backup network path, the in-degree value of each network node is clearly calculated and the echelons are divided according to the in-degree value. In order to prevent the main network path and the backup network path from being repeated, it is necessary to avoid the main network path when establishing the backup network path, that is, in the topological process of the backup network path, if there is a main network path between two network nodes, then the path is avoided and other network nodes are selected to establish the backup network path. When establishing the backup network path and traversing the network nodes, the backup network path is established from the high-gradient network node to the same-gradient network node or the low-gradient network node.
[0098] In a second aspect, based on the same inventive concept, embodiments of the present disclosure also provide a network path topology system, comprising a primary network path generation module, a calculation module, a backup network path generation module, and a network path integration module. The primary network path generation module is configured to input network nodes and network node connection relationships, determine a network node to be used as a primary injection node, and, starting with the primary injection node, traverse all network nodes based on the network node connection relationships, generate a primary network path, and determine a primary network directed graph. The calculation module is configured to calculate the number of primary network paths for each network node, obtain the in-degree value of each network node, and divide the gradient of the network nodes based on the in-degree value of the network nodes. The backup network path generation module is configured to select a network node with the highest gradient as a backup injection node, and, starting with the backup injection node, traverse toward network nodes with lower gradients or those with the same gradient, avoiding the primary network path, and establish a backup network path until all network nodes are traversed to determine a backup network directed graph. The network path integration module is configured to merge the primary network directed graph and the backup network directed graph to generate a complete network directed graph and determine a complete network path.
[0099] In some examples, the backup network path generation module includes: a backup injection node selection unit and a backup network path generation unit. The backup injection node selection unit is used to select a network node from the network nodes with the highest gradient as a backup injection node. The backup network path generation unit is used to use the backup injection node as the starting node, and to avoid the main network path and establish a backup network path toward the network nodes with low gradients or network nodes with the same gradients; when the tail network node is reached, it returns to the previous network node until there is a network node with low gradients or the same gradients, and no backup network path is established; it determines whether the main network path is included between the two network nodes, and if there is no main network path, establishes a backup network path; it traverses all network nodes, establishes a backup network path, and determines a backup network directed graph.
[0100] In some examples, the primary injection node receives: a GPS signal or a BI TS signal; the backup injection node receives: a GPS signal or a BI TS signal, wherein the primary injection node and the backup injection node receive the same type of signal.
[0101] On the third aspect, based on the same inventive concept, the embodiment of the present disclosure also provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed, the aforementioned network path topology method can be implemented.
[0102] Fourthly, based on the same inventive concept, embodiments of the present disclosure further provide an electronic device comprising a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory communicate with each other via the communication bus. The processor is configured to execute a program stored in the aforementioned computer-readable storage medium.
[0103] It should be noted that the electrical connection between the above-mentioned units does not necessarily mean the connection between lines. An indirect connection method can be applied to the embodiments of the present disclosure as long as the purpose of the present disclosure is achieved.
[0104] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A network path topology method, characterized in that: The method comprises: Entering network nodes and network node connection relationships, determining a network node to be used as a primary injection node, taking the primary injection node as a starting node, traversing all network nodes according to the network node connection relationships, and generating a primary network path to determine a primary network directed graph; Calculate the number of main network paths of each network node, obtain the in-degree value of each network node, and divide the gradient of the network node according to the in-degree value of the network node; Select a network node with the highest gradient as the backup injection node, and use the backup injection node as the starting node to move towards network nodes with lower gradients or network nodes with the same gradient, avoiding the main network path, and establish a backup network path until all network nodes are traversed to determine the backup network directed graph; The primary network directed graph and the backup network directed graph are merged to generate a complete network directed graph, and a complete network path is determined.
2. The method according to claim 1, characterized in that The input network nodes and the network node connection relationship, determining a network node as a main injection node, taking the main injection node as the starting node, traversing all network nodes according to the network node connection relationship, and generating a main network path, and determining a main network directed graph, specifically includes: Entering network nodes and connection relationships between the network nodes, and determining a network node to serve as the main injection node; Taking the main injection node as the starting node, and sequentially establishing a main network path according to the connection relationship of the network nodes; When the last network node is reached, the process returns to the previous network node until a network node for which a primary network path has not been established exists according to the network node connection relationship, and the primary network path is established; All network nodes are traversed, a main network path is established, and the main network directed graph is determined.
3. The method according to claim 1, characterized in that The method of calculating the number of main network paths of each network node, obtaining the in-degree value of each network node, and dividing the gradient of the network node according to the in-degree value of the network node specifically includes: Calculate the sum of the number of input paths and output paths of each network node to obtain the in-degree value of each network node; The network nodes are sorted from large to small according to their corresponding in-degree values, and the gradients of the network nodes are divided according to the order from high to low according to the sorting of the network nodes.
4. The method according to claim 3, characterized in that The method further comprises: sorting the network nodes from large to small according to their corresponding in-degree values, and dividing the gradients of the network nodes from high to low according to the sorting of the network nodes. Add network nodes with the same in-degree values to the same gradient array, and sort the gradient array according to the size of the in-degree values.
5. The method according to claim 1, wherein The method selects a network node with the highest gradient as a backup injection node, and uses the backup injection node as the starting node to move toward network nodes with lower gradients or network nodes with the same gradient, avoiding the main network path, and establishing a backup network path until all network nodes are traversed to determine a backup network directed graph, specifically including: Select a network node from the network nodes with the highest gradient as the backup injection node; Taking the backup injection node as the starting node, the backup network path is established towards the network node with a lower gradient or the network node with the same gradient, avoiding the main network path; When reaching the tail network node, return to the previous network node until there is a network node with a lower gradient or the same gradient and no backup network path is established; Determine whether the two network nodes include a primary network path. If there is no primary network path, establish a backup network path. All network nodes are traversed, a backup network path is established, and the backup network directed graph is determined.
6. A network path topology system, characterized in that: The system includes a main network path generation module, a calculation module, a backup network path generation module and a network path integration module; The main network path generation module is used to input network nodes and network node connection relationships, determine a network node to be used as a main injection node, take the main injection node as the starting node, traverse all network nodes according to the network node connection relationships, and generate a main network path to determine a main network directed graph; The calculation module is used to calculate the number of main network paths of each network node, obtain the in-degree value of each network node, and divide the gradient of the network node according to the in-degree value of the network node; The backup network path generation module is used to select a network node with the highest gradient as a backup injection node, and use the backup injection node as the starting node to move toward network nodes with lower gradients or network nodes with the same gradient, avoiding the main network path, to establish a backup network path until all network nodes are traversed to determine the backup network directed graph; The network path integration module is used to merge the main network directed graph and the backup network directed graph to generate a complete network directed graph and determine a complete network path.
7. The system according to claim 6, characterized in that The backup network path generation module includes: a backup injection node selection unit and a backup network path generation unit; The backup injection node selection unit is used to select a network node from the network nodes with the highest gradient as the backup injection node; The backup network path generation unit is configured to establish a backup network path starting from a backup injection node, toward network nodes with low gradients or network nodes with the same gradient, avoiding the main network path; upon reaching the tail network node, return to the previous network node until a network node with a low gradient or the same gradient and no backup network path is established exists; determine whether the main network path is included between two network nodes, and if there is no main network path, establish a backup network path; traverse all network nodes, establish a backup network path, and determine a backup network directed graph.
8. The system according to claim 6, wherein: The main injection node receives: GPS signal or BITS signal; the backup injection node receives: GPS signal or BITS signal.
9. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed, the network path topology method according to any one of claims 1 to 5 can be implemented.
10. An electronic device comprising a processor, a communication interface, the computer-readable storage medium according to claim 9, and a communication bus; wherein: The processor, the communication interface, and the computer-readable storage medium communicate with each other via a communication bus; It is characterized by: The processor is configured to execute a program stored in a computer-readable storage medium.
Citation Information
Patent Citations
Method for automatically configuring synchronous network clock tracking path
CN108809833A
Communication network equipment clock configuration management method and device
CN112039694A