CN106302158B - Method and device for selecting transmission path in network topology - Google Patents
Method and device for selecting transmission path in network topology Download PDFInfo
- Publication number
- CN106302158B CN106302158B CN201510287902.2A CN201510287902A CN106302158B CN 106302158 B CN106302158 B CN 106302158B CN 201510287902 A CN201510287902 A CN 201510287902A CN 106302158 B CN106302158 B CN 106302158B
- Authority
- CN
- China
- Prior art keywords
- node
- ring
- information
- path
- level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/30—Routing of multiclass traffic
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例提供的一种网络拓扑中选择传输路径的方法及装置,能够自动筛选出从所述源节点到所述宿节点的不经过特定节点的传输路径,有助于提高选路的效率。该方法中,控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息。所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息。所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径。
A method and device for selecting a transmission path in a network topology provided by an embodiment of the present invention can automatically filter out a transmission path from the source node to the sink node that does not pass through a specific node, which helps to improve the efficiency of path selection . In this method, the control device obtains the information of the first ring according to the first network topology, the information of the first layer and the source node of the path. The control device obtains the information of the second ring according to the first network topology, the sink node, and the information of the first layer. The control device obtains a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is the slave that satisfies the routing condition. The path from the source node to the sink node.
Description
技术领域technical field
本发明涉及通信技术领域,特别是涉及一种网络拓扑中选择传输路径的方法及装置。The invention relates to the field of communication technology, in particular to a method and device for selecting a transmission path in a network topology.
背景技术Background technique
当运营商开通新业务或对已开通的业务调优时,需要在网络拓扑中选择一条从源节点到宿节点的传输路径,采用所选择的传输路径对业务进行传输。目前,主要采用路径计算单元(Path Compute Element,PCE)从一个网络拓扑中选择端到端的传输路径。When an operator opens a new service or optimizes an already opened service, it needs to select a transmission path from the source node to the sink node in the network topology, and use the selected transmission path to transmit the service. At present, a Path Compute Element (PCE) is mainly used to select an end-to-end transmission path from a network topology.
采用PCE选择一个网络拓扑的传输路径时,将所述网络拓扑的拓扑结构输入所述PCE中,所述拓扑结构包括该网络拓扑的所有节点之间的连接关系,所述PCE根据从该网络拓扑中预先选取的源节点和宿节点,输出一条从所述源节点到所述宿节点的传输路径。When using PCE to select a transmission path of a network topology, the topology structure of the network topology is input into the PCE, the topology structure includes the connection relationship between all nodes of the network topology, and the PCE output a transmission path from the source node to the sink node according to the preselected source node and sink node.
采用PCE计算源节点到宿节点的传输路径,PCE根据网络拓扑中每个节点之间的连接关系,选择延时最短或者路径最短的传输路径。若需要选择一条从源节点到宿节点的不经过特定节点的传输路径,多条传输路径中的任一条传输路径为源节点到宿节点的传输路径,则需要人工对PCE计算获得的多条传输路径进行筛选,获得从所述源节点到所述宿节点的不经过特定节点的传输路径。The PCE is used to calculate the transmission path from the source node to the sink node, and the PCE selects the transmission path with the shortest delay or the shortest path according to the connection relationship between each node in the network topology. If it is necessary to select a transmission path from the source node to the sink node that does not pass through a specific node, and any one of the multiple transmission paths is the transmission path from the source node to the sink node, it is necessary to manually analyze the multiple transmission paths obtained by PCE calculation. The path is screened to obtain a transmission path from the source node to the sink node that does not pass through a specific node.
发明内容Contents of the invention
本发明实施例在于提供一种网络拓扑中选择传输路径的方法及装置,能够自动筛选出从所述源节点到所述宿节点的不经过特定节点的传输路径,有助于提高选路的效率。The embodiment of the present invention is to provide a method and device for selecting a transmission path in a network topology, which can automatically filter out a transmission path from the source node to the sink node that does not pass through a specific node, which helps to improve the efficiency of path selection .
为此,本发明解决技术问题的技术方案是:For this reason, the technical scheme that the present invention solves technical problem is:
第一方面,提供了一种网络拓扑中选择传输路径的方法,包括:In the first aspect, a method for selecting a transmission path in a network topology is provided, including:
控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环;The control device obtains the information of the first ring according to the first network topology, the information of the first level, and the source node of the path, where the first network topology includes the source node, the sink node of the path, and the first level Included nodes and connection relationships between adjacent nodes, the first level is the highest level in the first network topology, and the information of the first level includes connection relationships between nodes included in the first level , the information of the first ring includes the layer to which the first ring belongs and the nodes included in the first ring, and the first ring includes the source node in the layer to which the first ring belongs and includes The ring with the least number of nodes;
所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环;The control device obtains the information of the second ring according to the first network topology, the sink node, and the information of the first layer, and the information of the second ring includes the layer to which the second ring belongs and the nodes included in the second ring, where the second ring is a ring that includes the sink node and includes the least number of nodes in the hierarchy to which the second ring belongs;
所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。The control device obtains a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is the slave that satisfies the routing condition. The path from the source node to the sink node, the path selection condition is: do not pass through the nodes included in the third ring and/or the nodes included in the fourth ring, the third ring includes the nodes that belong to the first ring rings of the same level and/or a level lower than the level to which the first ring belongs, and the fourth ring includes rings of the same level as the second ring and/or a level lower than the second ring The ring of the hierarchy it belongs to.
在第一方面的第一种可能的实现方式中,所述控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息包括:In a first possible implementation manner of the first aspect, the obtaining, by the control device, the information of the first ring according to the first network topology, the information of the first layer, and the source node of the path includes:
所述控制设备根据所述第一网络拓扑和所述第一层级的信息,获得第一节点,所述第一节点为所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;The control device obtains a first node according to the first network topology and the information of the first level, the first node is a node with child nodes in the first level, and the child nodes of the first node The node is the source node, a node directly connected to the source node, or a node indirectly connected to the source node;
所述控制设备根据所述第一网络拓扑和所述第一节点,获得第五环的信息,所述第五环为在第二层级中包括所述第一节点且包括的节点数目小于第一预设值的环的集合,所述第五环的信息包括所述第二层级和所述第五环包括的节点,所述第二层级的等级低于所述第一层级的等级;The control device obtains information of a fifth ring according to the first network topology and the first node, and the fifth ring includes the first node in the second level and includes a smaller number of nodes than the first A set of rings with preset values, the information of the fifth ring includes the second level and the nodes included in the fifth ring, and the level of the second level is lower than the level of the first level;
所述控制设备判断所述第五环的信息是否包括所述源节点;The control device judges whether the information of the fifth ring includes the source node;
如果所述第五环的信息包括所述源节点,所述控制设备从所述第五环的信息中获得第六环的信息,将所述第六环的信息作为所述第一环的信息,所述第六环为所述第五环中包括所述源节点,并且包括的节点数目最少的环。If the information of the fifth ring includes the source node, the control device obtains the information of the sixth ring from the information of the fifth ring, and uses the information of the sixth ring as the information of the first ring , the sixth ring is a ring that includes the source node and includes the least number of nodes in the fifth ring.
结合上述第一方面的第一种可能的实现方式,还提供了第一方面的第二种可能的实现方式,所述控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息还包括:In combination with the first possible implementation manner of the first aspect above, a second possible implementation manner of the first aspect is also provided, wherein the control device, according to the first network topology, the first-level information, and the source node of the path, Access to information on the first ring also includes:
如果所述第五环的信息不包括所述源节点,则所述控制设备根据所述第一网络拓扑和所述第五环的信息,获得第二节点,所述第二节点为所述第二层级中具有子节点的节点,所述第二节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;If the information of the fifth ring does not include the source node, the control device obtains a second node according to the first network topology and the information of the fifth ring, and the second node is the first node. A node having a child node in the second level, where the child node of the second node is the source node, a node directly connected to the source node, or a node indirectly connected to the source node;
所述控制设备根据所述第一网络拓扑和所述第二节点,获得所述第一环的信息,所述第一环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。The control device obtains the information of the first ring according to the first network topology and the second node, the layer to which the first ring belongs is a third layer, and the level of the third layer is lower than the Describe the level of the second level.
结合上述第一方面、第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式,还提供了第一方面的第三种可能的实现方式,所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息包括:In combination with the above first aspect, the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, a third possible implementation manner of the first aspect is also provided, the control device according to The information about the first network topology, the sink node, and the first layer, and obtaining the information about the second ring include:
所述控制设备根据所述第一网络拓扑和所述第一层级的信息,获得第三节点,所述第三节点为所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;The control device obtains a third node according to the first network topology and information of the first level, the third node is a node with child nodes in the first level, and the child nodes of the third node The node is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node;
所述控制设备根据所述第一网络拓扑和所述第三节点,获得第七环的信息,所述第七环为在第二层级中包括所述第三节点且包括的节点数目小于第二预设值的环的集合,所述第七环的信息包括所述第二层级和所述第七环包括的节点,所述第二层级的等级低于所述第一层级的等级;The control device obtains information of a seventh ring according to the first network topology and the third node, and the seventh ring includes the third node in the second level and includes a smaller number of nodes than the second A set of rings with preset values, the information of the seventh ring includes the second level and the nodes included in the seventh ring, and the level of the second level is lower than the level of the first level;
所述控制设备判断所述第七环的信息是否包括所述宿节点;The control device judges whether the information of the seventh ring includes the sink node;
如果所述第三环的信息包括所述宿节点,所述控制设备从所述第七环的信息中获得第八环的信息,将所述第八环的信息作为所述第二环的信息,所述第八环为所述第七环中包括所述源节点,并且包括的节点数目最新少的环。If the information of the third ring includes the sink node, the control device obtains the information of the eighth ring from the information of the seventh ring, and uses the information of the eighth ring as the information of the second ring , the eighth ring is the ring that includes the source node and includes the least number of nodes in the seventh ring.
结合上述第一方面的第三种可能的实现方式,还提供了第一方面的第四种可能的实现方式,所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息还包括:In combination with the third possible implementation manner of the first aspect above, a fourth possible implementation manner of the first aspect is also provided, where the control device, according to the first network topology, the sink node, and the first Hierarchical information, the second ring information also includes:
如果所述第七环的信息不包括所述源节点,则所述控制设备根据所述第一网络拓扑和所述第七环的信息,获得第四节点,所述第四节点为所述第二层级中具有子节点的节点,所述第四节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;If the information of the seventh ring does not include the source node, the control device obtains a fourth node according to the first network topology and the information of the seventh ring, and the fourth node is the first A node with child nodes in the second level, where the child node of the fourth node is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node;
所述控制设备根据所述第一网络拓扑和所述第四节点,获得所述第二环的信息,所述第二环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。The control device obtains the information of the second ring according to the first network topology and the fourth node, the layer to which the second ring belongs is a third layer, and the level of the third layer is lower than the Describe the level of the second level.
结合上述第一方面,第一方面第一种可能的实现方式,第一方面第二种可能的实现方式,第一方面第三种可能的实现方式或第一方面第四种可能的实现方式,还提供了第一方面的第五种可能的实现方式,所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:In combination with the above first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect or the fourth possible implementation of the first aspect, A fifth possible implementation manner of the first aspect is also provided, the control device obtains the preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring include:
所述控制设备根据所述选路条件和所述第一网络拓扑,获得第二网络拓扑,所述第二网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;The control device obtains a second network topology based on the routing condition and the first network topology, and the second network topology is to filter out rings that do not meet the routing condition based on the first network topology. and/or the network topology obtained after links that do not meet the routing conditions;
所述控制设备根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑,所述第一子网拓扑只包括所述第一层级包括的节点,所述第二子网拓扑包括所述第一环包括的节点,所述第三子网拓扑包括所述第二环包括的节点;The control device obtains the first subnet topology, the second subnet topology, and the second subnet topology according to the second network topology, the first layer information, the first ring information, and the second ring information. Three subnet topology, the first subnet topology includes only nodes included in the first level, the second subnet topology includes nodes included in the first ring, and the third subnet topology includes the the nodes included in the second ring;
所述控制设备根据所述第二子网拓扑和所述第一环的信息,获得第一路径,所述第一路径为所述第二子网拓扑中由所述源节点到达所述第一子网拓扑包括的第五节点的路径,所述第五节点连接所述第二子网拓扑中的一个或多个节点;The control device obtains a first path according to information about the second subnet topology and the first ring, and the first path is from the source node to the first ring in the second subnet topology. the subnet topology includes a path of a fifth node connecting one or more nodes in the second subnet topology;
所述控制设备根据所述第三子网拓扑和所述第二环的信息,获得第二路径,所述第二路径为所述第三子网拓扑中由所述宿节点到达所述第一子网拓扑包括的第六节点的路径,所述第六节点连接所述第三子网拓扑中的一个或多个节点;The control device obtains a second path according to the information of the third subnet topology and the second ring, and the second path is from the sink node to the first link in the third subnet topology. a path of a sixth node included in the subnet topology, the sixth node connecting one or more nodes in the third subnet topology;
所述控制设备根据所述第一子网拓扑、所述第五节点和所述第六节点,获得第三路径,所述第三路径为所述第一子网拓扑中由所述第五节点到达所述第六节点的路径;The control device obtains a third path according to the first subnet topology, the fifth node, and the sixth node, and the third path is the fifth node in the first subnet topology a path to the sixth node;
所述控制设备根据所述第一路径、所述第二路径和所述第三路径,获得所述优选路径,所述优选路径为所述第一路径、所述第二路径和所述第三路径拼接后获得的路径。The control device obtains the preferred route according to the first route, the second route and the third route, and the preferred route is the first route, the second route and the third route The path obtained after path splicing.
结合上述第一方面,第一方面第一种可能的实现方式,第一方面第二种可能的实现方式,第一方面第三种可能的实现方式或第一方面第四种可能的实现方式,还提供了第一方面的第六种可能的实现方式,所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:In combination with the above first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect or the fourth possible implementation of the first aspect, A sixth possible implementation manner of the first aspect is also provided, wherein the control device obtains a preferred path according to routing conditions, the first network topology, information about the first ring, and information about the second ring include:
所述控制设备根据所述选路条件和所述第一网络拓扑,获得第三网络拓扑,所述第三网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;The control device obtains a third network topology based on the routing condition and the first network topology, and the third network topology is to filter out rings that do not meet the routing condition based on the first network topology. and/or the network topology obtained after links that do not meet the routing conditions;
所述控制设备根据所述第三网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第四子网络拓扑,所述第四子网拓扑包括所述第一环包括的节点以及所述第二环包括的节点;The control device obtains a fourth subnetwork topology according to the third network topology, the information of the first layer, the information of the first ring, and the information of the second ring, and the fourth subnetwork topology including nodes included in the first ring and nodes included in the second ring;
所述控制设备根据所述第四子网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息获得优选路径,所述第四子网络拓扑包括所述第一环包括的节点和包括所述第二环包括的节点,所述优选路径为所述源节点到达所述宿节点的路径。The control device obtains a preferred path according to the fourth sub-network topology, the information of the first layer, the information of the first ring, and the information of the second ring, where the fourth sub-network topology includes the The nodes included in the first ring include the nodes included in the second ring, and the preferred path is a path from the source node to the sink node.
结合上述第一方面,第一方面第一种可能的实现方式,第一方面第二种可能的实现方式,第一方面第三种可能的实现方式或第一方面第四种可能的实现方式,还提供了第一方面的第七种可能的实现方式,所述选路条件还包括所述优选路径包含的横向链路的数量小于第三预设值,所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:In combination with the above first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect or the fourth possible implementation of the first aspect, A seventh possible implementation manner of the first aspect is also provided, the route selection condition further includes that the number of horizontal links contained in the preferred path is less than a third preset value, and the control device according to the route selection condition, the The first network topology, the information of the first ring and the information of the second ring, obtaining the preferred path includes:
所述控制设备根据所述选路条件和所述第一网络拓扑,获得第四网络拓扑,所述第四网络拓扑为在第一网络拓扑的基础上标识出一条或多条横向链路后获得的网络拓扑;The control device obtains a fourth network topology according to the routing condition and the first network topology, and the fourth network topology is obtained after identifying one or more horizontal links on the basis of the first network topology network topology;
所述控制设备根据所述第四网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第五子网拓扑、第六子网拓扑和第七子网拓扑,所述第五子网拓扑只包括所述第一层级包括的节点,所述第六子网拓扑包括所述第一环包括的节点,所述第七子网拓扑包括所述第二环包括的节点;The control device obtains the fifth subnet topology, the sixth subnet topology, and the sixth subnet topology according to the fourth network topology, the information of the first layer, the information of the first ring, and the information of the second ring. Seven subnet topology, the fifth subnet topology only includes nodes included in the first level, the sixth subnet topology includes nodes included in the first ring, and the seventh subnet topology includes the the nodes included in the second ring;
所述控制设备根据所述第六子网拓扑和所述第一环的信息,获得第四路径,所述第四路径为所述第六子网拓扑中由所述源节点到达所述第四子网拓扑包括的第七节点的路径,所述第七节点连接所述第五子网拓扑中的一个或多个节点;The control device obtains a fourth path according to the information of the sixth subnet topology and the first ring, and the fourth path is from the source node to the fourth path in the sixth subnet topology. the subnet topology includes a path of a seventh node connecting one or more nodes in the fifth subnet topology;
所述控制设备根据所述第七子网拓扑和所述第二环的信息,获得第五路径,所述第五路径为所述第七子网拓扑中由所述宿节点到达所述第四子网拓扑包括的第八节点的路径,所述第八节点连接所述第六子网拓扑中的一个或多个节点,所述第五路径和所述第四路径包含的横向链路的数量小于所述第三预设值;The control device obtains a fifth path according to the information of the seventh subnet topology and the second ring, and the fifth path is from the destination node to the fourth ring in the seventh subnet topology. The subnetwork topology includes the eighth node path, the eighth node connects one or more nodes in the sixth subnetwork topology, the fifth path and the number of horizontal links contained in the fourth path less than the third preset value;
所述控制设备根据所述第五子网拓扑、所述第七节点和所述第八节点,获得第六路径,所述第六路径为所述第五子网拓扑中由所述第七节点到达所述第八节点的路径;The control device obtains a sixth path according to the fifth subnet topology, the seventh node, and the eighth node, and the sixth path is the seventh node in the fifth subnet topology a path to the eighth node;
所述控制设备根据所述第四路径、所述第五路径和所述第六路径,获得所述优选路径,所述优选路径为所述第四路径、所述第五路径和所述第六路径拼接后获得的路径。The control device obtains the preferred route according to the fourth route, the fifth route and the sixth route, and the preferred route is the fourth route, the fifth route and the sixth route The path obtained after path splicing.
第二方面,提供了一种网络拓扑中选择传输路径的装置,包括:In a second aspect, a device for selecting a transmission path in a network topology is provided, including:
第一环信息获取单元,用于根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环;The first ring information obtaining unit is configured to obtain the information of the first ring according to the first network topology, the information of the first level and the source node of the path, and the first network topology includes the source node and the sink of the path Nodes, nodes included in the first level, and connection relationships between adjacent nodes, the first level is the highest level in the first network topology, and the information of the first level includes the first level The connection relationship between the included nodes, the information of the first ring includes the layer to which the first ring belongs and the nodes included in the first ring, and the first ring is in the layer to which the first ring belongs a ring including the source node and including the least number of nodes;
第二环信息获取单元,用于根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环;The second ring information obtaining unit is configured to obtain information of a second ring according to the first network topology, the sink node, and the information of the first layer, and the information of the second ring includes the second ring The level to which it belongs and the nodes included in the second ring, where the second ring is a ring that includes the sink node and includes the least number of nodes in the level to which the second ring belongs;
路径获取单元,用于根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。a path obtaining unit, configured to obtain a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is a route that satisfies the routing condition For the path from the source node to the sink node, the route selection condition is: not passing through the nodes included in the third ring and/or the nodes included in the fourth ring, the third ring includes the nodes included in the first ring rings belonging to the same level and/or lower than the level of the first ring, and the fourth ring includes rings of the same level as the second ring and/or lower than the first ring The ring of the hierarchy to which the second ring belongs.
在第二方面的第一种可能的实现方式中,所述第一环信息获取单元具体用于:In a first possible implementation manner of the second aspect, the first ring information acquiring unit is specifically configured to:
根据所述第一网络拓扑和所述第一层级的信息,获得第一节点,所述第一节点为所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;According to the information of the first network topology and the first level, a first node is obtained, the first node is a node with child nodes in the first level, and the child nodes of the first node are the a source node, a node directly connected to said source node, or a node indirectly connected to said source node;
根据所述第一网络拓扑和所述第一节点,获得第五环的信息,所述第五环为在第二层级中包括所述第一节点且包括的节点数目小于第一预设值的环的集合,所述第五环的信息包括所述第二层级和所述第五环包括的节点,所述第二层级的等级低于所述第一层级的等级;Obtain information about a fifth ring according to the first network topology and the first node, the fifth ring includes the first node in the second level and the number of nodes included is less than a first preset value a set of rings, the information of the fifth ring includes the second level and the nodes included in the fifth ring, and the level of the second level is lower than that of the first level;
判断所述第五环的信息是否包括所述源节点;judging whether the information of the fifth ring includes the source node;
如果所述第五环的信息包括所述源节点,从所述第五环的信息中获得第六环的信息,将所述第六环的信息作为所述第一环的信息,所述第六环为所述第五环中包括所述源节点,并且包括的节点数目最少的环。If the information of the fifth ring includes the source node, obtain the information of the sixth ring from the information of the fifth ring, use the information of the sixth ring as the information of the first ring, and the information of the sixth ring The sixth ring is the ring that includes the source node and includes the least number of nodes in the fifth ring.
结合上述第二方面的第一种可能的实现方式,还提供了第二方面的第二种可能的实现方式,所述第一环信息获取单元还具体用于:In combination with the first possible implementation of the second aspect above, a second possible implementation of the second aspect is also provided, and the first ring information acquisition unit is further specifically configured to:
如果所述第五环的信息不包括所述源节点,根据所述第一网络拓扑和所述第五环的信息,获得第二节点,所述第二节点为所述第二层级中具有子节点的节点,所述第二节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;If the information of the fifth ring does not include the source node, according to the first network topology and the information of the fifth ring, obtain a second node, and the second node is a child node in the second layer A node of a node, the child node of the second node is the source node, a node directly connected to the source node, or a node indirectly connected to the source node;
根据所述第一网络拓扑和所述第二节点,获得所述第一环的信息,所述第一环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。According to the first network topology and the second node, obtain the information of the first ring, the level to which the first ring belongs is a third level, and the level of the third level is lower than the second level level.
结合上述第二方面,第二方面第一种可能的实现方式或第二方面第二种可能的实现方式,还提供了第二方面第三种可能的实现方式,所述第二环信息获取单元具体用于:In combination with the second aspect above, the first possible implementation of the second aspect or the second possible implementation of the second aspect, a third possible implementation of the second aspect is also provided, the second ring information acquisition unit Specifically for:
根据所述第一网络拓扑和所述第一层级的信息,获得第三节点,所述第三节点为所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;According to the information of the first network topology and the first level, a third node is obtained, the third node is a node with child nodes in the first level, and the child nodes of the third node are the a sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node;
根据所述第一网络拓扑和所述第三节点,获得第七环的信息,所述第七环为在第二层级中包括所述第三节点且包括的节点数目小于第二预设值的环的集合,所述第七环的信息包括所述第二层级和所述第七环包括的节点,所述第二层级的等级低于所述第一层级的等级;Obtain information about a seventh ring according to the first network topology and the third node, the seventh ring includes the third node in the second level and the number of nodes included is less than a second preset value a set of rings, the information of the seventh ring includes the second level and the nodes included in the seventh ring, and the level of the second level is lower than the level of the first level;
判断所述第七环的信息是否包括所述宿节点;judging whether the information of the seventh ring includes the sink node;
如果所述第三环的信息包括所述宿节点,从所述第七环的信息中获得第八环的信息,将所述第八环的信息作为所述第二环的信息,所述第八环为所述第七环中包括所述源节点,并且包括的节点数目最新少的环。If the information of the third ring includes the sink node, obtain the information of the eighth ring from the information of the seventh ring, use the information of the eighth ring as the information of the second ring, and the information of the second ring The eighth ring is the ring that includes the source node and includes the least number of nodes in the seventh ring.
结合上述第二方面第三种可能的实现方式,还提供了第二方面的第四种可能的实现方式,所述第二环信息获取单元还具体用于:In combination with the above-mentioned third possible implementation of the second aspect, a fourth possible implementation of the second aspect is also provided, and the second ring information acquisition unit is further specifically configured to:
如果所述第七环的信息不包括所述源节点,根据所述第一网络拓扑和所述第七环的信息,获得第四节点,所述第四节点为所述第二层级中具有子节点的节点,所述第四节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;If the information of the seventh ring does not include the source node, according to the first network topology and the information of the seventh ring, a fourth node is obtained, and the fourth node is a child node in the second layer A node of a node, where the child node of the fourth node is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node;
根据所述第一网络拓扑和所述第四节点,获得所述第二环的信息,所述第二环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。According to the first network topology and the fourth node, obtain the information of the second ring, the level to which the second ring belongs is a third level, and the level of the third level is lower than the second level level.
结合上述第二方面,第二方面第一种可能的实现方式,第二方面第二种可能的实现方式,第二方面第三种可能的实现方式或第二方面第四种可能的实现方式,还提供了第二方面第五种可能的实现方式,所述路径获取单元具体用于:In combination with the second aspect above, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect or the fourth possible implementation of the second aspect, A fifth possible implementation manner of the second aspect is also provided, and the path obtaining unit is specifically used for:
根据所述选路条件和所述第一网络拓扑,获得第二网络拓扑,所述第二网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;According to the routing conditions and the first network topology, a second network topology is obtained, and the second network topology is to filter out rings that do not meet the routing conditions and/or rings that do not meet the routing conditions based on the first network topology. The network topology obtained after the link meeting the routing condition;
根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑,所述第一子网拓扑只包括所述第一层级包括的节点,所述第二子网拓扑包括所述第一环包括的节点,所述第三子网拓扑包括所述第二环包括的节点;Obtain a first subnet topology, a second subnet topology, and a third subnet topology according to the second network topology, the information of the first layer, the information of the first ring, and the information of the second ring , the first subnet topology includes only nodes included in the first level, the second subnet topology includes nodes included in the first ring, and the third subnet topology includes nodes included in the second ring the node;
根据所述第二子网拓扑和所述第一环的信息,获得第一路径,所述第一路径为所述第二子网拓扑中由所述源节点到达所述第一子网拓扑包括的第五节点的路径,所述第五节点连接所述第二子网拓扑中的一个或多个节点;Obtaining a first path according to the information about the second subnet topology and the first ring, where the first path is from the source node in the second subnet topology to the first subnet topology includes a path of a fifth node, the fifth node connecting one or more nodes in the second subnet topology;
根据所述第三子网拓扑和所述第二环的信息,获得第二路径,所述第二路径为所述第三子网拓扑中由所述宿节点到达所述第一子网拓扑包括的第六节点的路径,所述第六节点连接所述第三子网拓扑中的一个或多个节点;Obtaining a second path according to information about the third subnet topology and the second ring, where the second path is from the destination node in the third subnet topology to the first subnet topology includes The path of the sixth node of the sixth node, the sixth node is connected to one or more nodes in the third subnet topology;
根据所述第一子网拓扑、所述第五节点和所述第六节点,获得第三路径,所述第三路径为所述第一子网拓扑中由所述第五节点到达所述第六节点的路径;According to the first subnet topology, the fifth node, and the sixth node, a third path is obtained, and the third path is from the fifth node to the sixth node in the first subnet topology. A six-node path;
根据所述第一路径、所述第二路径和所述第三路径,获得所述优选路径,所述优选路径为所述第一路径、所述第二路径和所述第三路径拼接后获得的路径。Obtain the preferred route according to the first route, the second route and the third route, where the preferred route is obtained by splicing the first route, the second route and the third route path of.
结合上述第二方面,第二方面第一种可能的实现方式,第二方面第二种可能的实现方式,第二方面第三种可能的实现方式或第二方面第四种可能的实现方式,还提供了第二方面第六种可能的实现方式,所述路径获取单元具体用于:In combination with the second aspect above, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect or the fourth possible implementation of the second aspect, A sixth possible implementation manner of the second aspect is also provided, and the path obtaining unit is specifically configured to:
根据所述选路条件和所述第一网络拓扑,获得第三网络拓扑,所述第三网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;According to the routing conditions and the first network topology, a third network topology is obtained, and the third network topology is to filter out rings that do not meet the routing conditions and/or rings that do not meet the routing conditions based on the first network topology. The network topology obtained after the link meeting the routing condition;
根据所述第三网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第四子网络拓扑,所述第四子网拓扑包括所述第一环包括的节点以及所述第二环包括的节点;According to the third network topology, the information of the first layer, the information of the first ring, and the information of the second ring, obtain a fourth subnetwork topology, where the fourth subnetwork topology includes the first the nodes included in the first ring and the nodes included in the second ring;
根据所述第四子网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息获得优选路径,所述第四子网络拓扑包括所述第一环包括的节点和包括所述第二环包括的节点,所述优选路径为所述源节点到达所述宿节点的路径。A preferred path is obtained according to the fourth sub-network topology, the information of the first level, the information of the first ring, and the information of the second ring, the fourth sub-network topology includes the first ring including and nodes included in the second ring, and the preferred path is a path from the source node to the sink node.
结合上述第二方面,第二方面第一种可能的实现方式,第二方面第二种可能的实现方式,第二方面第三种可能的实现方式或第二方面第四种可能的实现方式,还提供了第二方面第六种可能的实现方式,所述选路条件还包括所述优选路径包含的横向链路的数量小于第三预设值,所述路径获取单元具体用于:In combination with the second aspect above, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect or the fourth possible implementation of the second aspect, A sixth possible implementation manner of the second aspect is also provided, the route selection condition further includes that the number of horizontal links included in the preferred route is less than a third preset value, and the route obtaining unit is specifically configured to:
根据所述选路条件和所述第一网络拓扑,获得第四网络拓扑,所述第四网络拓扑为在第一网络拓扑的基础上标识出一条或多条横向链路后获得的网络拓扑;Obtaining a fourth network topology according to the routing condition and the first network topology, where the fourth network topology is a network topology obtained after identifying one or more horizontal links on the basis of the first network topology;
根据所述第四网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第五子网拓扑、第六子网拓扑和第七子网拓扑,所述第五子网拓扑只包括所述第一层级包括的节点,所述第六子网拓扑包括所述第一环包括的节点,所述第七子网拓扑包括所述第二环包括的节点;Obtain a fifth subnet topology, a sixth subnet topology, and a seventh subnet topology according to the fourth network topology, the information of the first layer, the information of the first ring, and the information of the second ring , the fifth subnet topology includes only nodes included in the first level, the sixth subnet topology includes nodes included in the first ring, and the seventh subnet topology includes nodes included in the second ring the node;
根据所述第六子网拓扑和所述第一环的信息,获得第四路径,所述第四路径为所述第六子网拓扑中由所述源节点到达所述第四子网拓扑包括的第七节点的路径,所述第七节点连接所述第五子网拓扑中的一个或多个节点;Obtaining a fourth path according to the information about the sixth subnet topology and the first ring, where the fourth path is from the source node in the sixth subnet topology to the fourth subnet topology includes A path of a seventh node of the fifth subnetwork topology, the seventh node connecting one or more nodes in the fifth subnet topology;
根据所述第七子网拓扑和所述第二环的信息,获得第五路径,所述第五路径为所述第七子网拓扑中由所述宿节点到达所述第四子网拓扑包括的第八节点的路径,所述第八节点连接所述第六子网拓扑中的一个或多个节点,所述第五路径和所述第四路径包含的横向链路的数量小于所述第三预设值;Obtaining a fifth path according to the seventh subnet topology and the information of the second ring, where the fifth path is from the sink node to the fourth subnet topology in the seventh subnet topology includes The path of the eighth node, the eighth node is connected to one or more nodes in the sixth subnetwork topology, the number of horizontal links contained in the fifth path and the fourth path is smaller than that of the first Three preset values;
根据所述第五子网拓扑、所述第七节点和所述第八节点,获得第六路径,所述第六路径为所述第五子网拓扑中由所述第七节点到达所述第八节点的路径;According to the fifth subnet topology, the seventh node, and the eighth node, a sixth path is obtained, and the sixth path is from the seventh node to the fifth subnet topology in the fifth subnet topology. eight-node path;
根据所述第四路径、所述第五路径和所述第六路径,获得所述优选路径,所述优选路径为所述第四路径、所述第五路径和所述第六路径拼接后获得的路径。Obtain the optimal path according to the fourth path, the fifth path, and the sixth path, where the optimal path is obtained by splicing the fourth path, the fifth path, and the sixth path path of.
本发明实施例提供的一种网络拓扑中选择传输路径的方法及装置,控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息。所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息。所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径。所述控制设备利用所述选路条件,选择从源节点到宿节点的优选路径,所述优选路径可不经过特定的节点,有助于提高选路的效率。In the method and device for selecting a transmission path in a network topology provided by an embodiment of the present invention, a control device obtains information of a first ring according to a first network topology, information of a first layer, and a source node of a path. The control device obtains the information of the second ring according to the first network topology, the sink node, and the information of the first layer. The control device obtains a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is the slave that satisfies the routing condition. The path from the source node to the sink node. The control device uses the route selection condition to select a preferred path from the source node to the sink node, and the preferred route may not pass through a specific node, which helps to improve the efficiency of route selection.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例提供的一种网络拓扑中选择传输路径的方法流程图;FIG. 1 is a flowchart of a method for selecting a transmission path in a network topology provided by an embodiment of the present invention;
图2为本发明实施例提供的所述源节点和所述宿节点的父节点是所述第一层级中不同的节点示意图;FIG. 2 is a schematic diagram of the source node and the parent node of the sink node being different nodes in the first level according to an embodiment of the present invention;
图3为本发明实施例提供的所述源节点和所述宿节点的父节点是所述第一层级中相同的节点示意图;FIG. 3 is a schematic diagram of a parent node of the source node and the sink node being the same node in the first level provided by an embodiment of the present invention;
图4为本发明实施例提供的一种网络拓扑结构示意图;FIG. 4 is a schematic diagram of a network topology structure provided by an embodiment of the present invention;
图5为本发明实施例提供的所述源节点和所述宿节点的父节点是所述第一层级中不同的节点的第一网络拓扑的结构示意图;5 is a schematic structural diagram of a first network topology in which the parent nodes of the source node and the sink node are different nodes in the first layer according to an embodiment of the present invention;
图6为本发明实施例提供的去掉层级低于所述第一环和所述第二环的环所获得的第二网络拓扑结构示意图;FIG. 6 is a schematic diagram of a second network topology structure obtained by removing rings at levels lower than the first ring and the second ring provided by an embodiment of the present invention;
图7为本发明实施例提供的去掉层级与所述第一环和所述第二环层级相同的环所获得的第二网络拓扑结构示意图;FIG. 7 is a schematic diagram of a second network topology obtained by removing rings at the same level as the first ring and the second ring provided by an embodiment of the present invention;
图8为本发明实施例提供的去掉层级低于和等于所述第一环和所述第二环的环所获得的第二网络拓扑结构示意图;FIG. 8 is a schematic diagram of a second network topology structure obtained by removing rings with levels lower than and equal to the first ring and the second ring provided by an embodiment of the present invention;
图9为本发明实施例提供的将所述第二网络拓扑划分为三个子网络拓扑结构示意图;FIG. 9 is a schematic diagram of the second network topology divided into three sub-network topologies according to an embodiment of the present invention;
图10为本发明实施例提供的图5所示的第一网络拓扑中优选路径示意图;FIG. 10 is a schematic diagram of a preferred path in the first network topology shown in FIG. 5 provided by an embodiment of the present invention;
图11为本发明实施例提供的所述源节点和所述宿节点的父节点是所述第一层级中相同的节点的第一网络拓扑示意图;FIG. 11 is a schematic diagram of a first network topology in which the parent nodes of the source node and the sink node are the same node in the first level provided by an embodiment of the present invention;
图12为本发明实施例提供的图11所示的第一网络拓扑中优选路径示意图;FIG. 12 is a schematic diagram of a preferred path in the first network topology shown in FIG. 11 provided by an embodiment of the present invention;
图13为本发明实施例提供的横向链路示意图;FIG. 13 is a schematic diagram of a horizontal link provided by an embodiment of the present invention;
图14为本发明实施例提供的一种网络拓扑中选择传输路径的装置结构示意图;FIG. 14 is a schematic structural diagram of a device for selecting a transmission path in a network topology provided by an embodiment of the present invention;
图15为本发明实施例提供的路径获取单元结构示意图;FIG. 15 is a schematic structural diagram of a path acquisition unit provided by an embodiment of the present invention;
图16为本发明实施例提供的一种网络拓扑中选择传输路径的装置结构示意图。FIG. 16 is a schematic structural diagram of an apparatus for selecting a transmission path in a network topology according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供了一种网络拓扑中选择传输路径的方法及装置,为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述。Embodiments of the present invention provide a method and device for selecting a transmission path in a network topology. In order to make the purpose, technical solutions, and advantages of the embodiments of the present invention clearer, the following will implement the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. The technical solution in the example is clearly described.
根据网络拓扑中包括的节点以及相邻节点之间的连接关系,从一个网络拓扑中选择的从源节点到宿节点的传输路径可能会存在逆行和/或绕行。若所述源节点的父节点和所述宿节点的父节点属于所述网络拓扑中的最高层级,则所述传输路径存在的逆行指的是所述传输路径经过低于所述源节点所属层级的环或经过低于所述宿节点所属层级的环。包括逆行路径的传输路径会占用低层级业务数据的传输带宽,影响低层级业务数据的传输速率。所述传输路径存在的绕行指的是所述传输路径经过所述源节点所属的层级上至少两个环或经过所述宿节点所属的层级上至少两个环。所述源节点所属的层级上至少两个环包括第一环,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环。所述宿节点所属的层级上至少两个环包括第二环,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环。包括绕行路径的传输路径会占用同一层级上业务数据的传输带宽,影响同一层级上其他业务数据的传输速率。本发明实施例提供的选路条件要求所述传输路径不存在逆行的路径和/或绕行的路径。According to the nodes included in the network topology and the connection relationship between adjacent nodes, the transmission path from the source node to the sink node selected in a network topology may have reverse and/or detour. If the parent node of the source node and the parent node of the sink node belong to the highest level in the network topology, the retrograde existence of the transmission path means that the transmission path passes through a level lower than the level to which the source node belongs or through a ring lower than the level to which the sink node belongs. The transmission path including the retrograde path will occupy the transmission bandwidth of the low-level service data and affect the transmission rate of the low-level service data. The detour of the transmission path means that the transmission path passes through at least two rings on the level to which the source node belongs or passes through at least two rings on the level to which the sink node belongs. At least two rings on the level to which the source node belongs include a first ring, and the first ring is a ring that includes the source node and includes the least number of nodes in the level to which the first ring belongs. At least two rings on the level to which the sink node belongs include a second ring, and the second ring is a ring that includes the sink node and includes the least number of nodes in the level to which the second ring belongs. The transmission path including the detour path will occupy the transmission bandwidth of service data on the same layer and affect the transmission rate of other service data on the same layer. The routing conditions provided by the embodiments of the present invention require that the transmission path does not have a reverse path and/or a detour path.
本发明实施例提供了一种网络拓扑中选择传输路径的方法,所述方法包括:控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环;所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环;所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。An embodiment of the present invention provides a method for selecting a transmission path in a network topology. The method includes: the control device obtains information about the first ring according to the first network topology, information at the first level, and the source node of the path. The first network topology includes the source node, the sink node of the path, the nodes included in the first level, and the connection relationship between adjacent nodes, and the first level is the highest level in the first network topology. level, the information of the first level includes the connection relationship between the nodes included in the first level, the information of the first ring includes the level to which the first ring belongs and the nodes included in the first ring, the The first ring is a ring that includes the source node and includes the least number of nodes in the hierarchy to which the first ring belongs; the control device according to the first network topology, the sink node, and the first ring Hierarchy information, obtain the information of the second ring, the information of the second ring includes the level to which the second ring belongs and the nodes included in the second ring, the second ring is the The ring that includes the sink node and includes the least number of nodes in the hierarchical level; the control device obtains the A preferred path, where the preferred path is a path from the source node to the sink node that satisfies the routing condition, and the routing condition is: no nodes included in the third ring and/or nodes included in the fourth ring nodes, the third ring includes rings at the same level as the first ring and/or rings at a lower level than the first ring, and the fourth ring includes rings at the same level as the second ring rings belonging to the same level and/or rings whose level is lower than the level to which the second ring belongs.
图1为本发明实施例提供的一种网络拓扑中选择传输路径的方法流程图。下面结合图1,对本发明实施例提供的方法进行详细说明。FIG. 1 is a flowchart of a method for selecting a transmission path in a network topology provided by an embodiment of the present invention. The method provided by the embodiment of the present invention will be described in detail below with reference to FIG. 1 .
101:控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环。101: The control device obtains the information of the first ring according to the first network topology, the first-level information, and the source node of the path, where the first network topology includes the source node, the sink node of the path, and the second The nodes included in one level and the connection relationship between adjacent nodes, the first level is the highest level in the first network topology, the information of the first level includes the connection between the nodes included in the first level connection relationship, the information of the first ring includes the layer to which the first ring belongs and the nodes included in the first ring, and the first ring includes the source node in the layer to which the first ring belongs and contains the least number of nodes.
举例说明,所述第一网络拓扑包括多个节点和相邻的节点间的连接关系,所述多个节点包括所述源节点、所述宿节点和所述第一层级包括的节点。所述第一层级包括的节点间的连接关系包括所述第一层级包括的相邻两个节点间的连接关系。所述相邻的节点间的连接关系可通过链路(link)的标识和所述链路两端的节点的标识来表示。For example, the first network topology includes multiple nodes and connection relationships between adjacent nodes, and the multiple nodes include the source node, the sink node, and nodes included in the first level. The connection relationship between nodes included in the first level includes the connection relationship between two adjacent nodes included in the first level. The connection relationship between the adjacent nodes may be represented by an identifier of a link (link) and identifiers of nodes at both ends of the link.
举例说明,所述源节点的父节点是所述第一层级的节点,所述宿节点的父节点是所述第一层级的节点。所述源节点的父节点可以和所述宿节点的父节点相同,也可以和所述宿节点的父节点不同。如图2所示的第一网络拓扑中,所述源节点和所述宿节点的父节点是所述第一层级中不同的节点,所述源节点的父节点是所述第一层级的节点M,所述宿节点的父节点是所述第一层级的节点N。图3所示的第一网络拓扑中,所述源节点和所述宿节点的父节点是所述第一层级中相同的节点,所述源节点和所述宿节点的父节点都是所述第一层级的节点N。本发明实施例中提及的所述源节点的父节点可以是与所述源节点直接连接的、且位于所述源节点所属的层级的上一层级的节点,所述源节点的父节点还可以是与所述源节点间接连接的、且位于所述源节点所属的层级之上的节点,如图2和图3所示。本发明实施例中提及的所述宿节点的父节点可以是与所述宿节点直接连接的、且位于所述宿节点所属的层级的上一层级的节点,所述宿节点的父节点还可以是与所述宿节点间接连接的、且位于所述宿节点所属的层级之上的节点,如图2和图3所示。For example, the parent node of the source node is a node of the first level, and the parent node of the sink node is a node of the first level. The parent node of the source node may be the same as the parent node of the sink node, or may be different from the parent node of the sink node. In the first network topology as shown in Figure 2, the parent nodes of the source node and the sink node are different nodes in the first level, and the parent node of the source node is a node of the first level M, the parent node of the sink node is the node N of the first level. In the first network topology shown in FIG. 3 , the parent nodes of the source node and the sink node are the same nodes in the first level, and the parent nodes of the source node and the sink node are both the Node N of the first level. The parent node of the source node mentioned in the embodiment of the present invention may be a node directly connected to the source node and located at the upper level of the level to which the source node belongs, and the parent node of the source node is also It may be a node indirectly connected to the source node and located above the level to which the source node belongs, as shown in FIG. 2 and FIG. 3 . The parent node of the sink node mentioned in the embodiment of the present invention may be a node directly connected to the sink node and located at a level above the level to which the sink node belongs, and the parent node of the sink node is also It may be a node indirectly connected to the sink node and located above the level to which the sink node belongs, as shown in FIG. 2 and FIG. 3 .
举例说明,所述控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息包括:所述控制设备根据所述第一网络拓扑和所述第一层级的信息,获得第一节点,所述第一节点为所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;所述控制设备根据所述第一网络拓扑和所述第一节点,获得第五环的信息,所述第五环为在第二层级中包括所述第一节点且包括的节点数目小于第一预设值的环的集合,所述第五环的信息包括所述第二层级和所述第五环包括的节点,所述第二层级的等级低于所述第一层级的等级;所述控制设备判断所述第五环的信息是否包括所述源节点;如果所述第五环的信息包括所述源节点,从所述第五环的信息中获得第六环的信息,所述第六环为所述第五环中包括所述源节点,并且包括的节点数目最少的环,则所述控制设备将所述第六环的信息作为所述第一环的信息。For example, the obtaining the information of the first ring by the control device according to the first network topology, the information of the first level and the source node of the path includes: the control device according to the first network topology and the information of the first level Information to obtain a first node, the first node is a node with child nodes in the first level, and the child nodes of the first node are the source node, a node directly connected to the source node, or an indirect connection A node of the source node; the control device obtains information of a fifth ring according to the first network topology and the first node, where the fifth ring includes the first node in the second level and A set of rings whose number of nodes is less than a first preset value, the information of the fifth ring includes the nodes included in the second level and the fifth ring, and the level of the second level is lower than that of the fifth ring One-level level; the control device judges whether the information of the fifth ring includes the source node; if the information of the fifth ring includes the source node, obtain the sixth ring information, the sixth ring is the ring that includes the source node and includes the least number of nodes in the fifth ring, then the control device uses the information of the sixth ring as the first ring Information.
如图4所示的网络拓扑中,包含节点A1的一个环可以依次经过节点A1,节点B1,节点B3,节点B4,节点B5和节点B2,换句话说,包含节点A1的一个环包括节点A1节点B1,节点B3,节点B4,节点B5和节点B2。包含节点B4的一个环可以是包含节点A1的一个环,包含节点B4的一个环还可以是依次经过节点B4,节点C1,节点C2,节点C3,节点C4以及节点B5的环,换句话说,包含节点B4的一个环还可以是包含节点B4,节点C1,节点C2,节点C3,节点C4以及节点B5的环。In the network topology shown in Figure 4, a ring containing node A1 can pass through node A1, node B1, node B3, node B4, node B5 and node B2 in turn, in other words, a ring containing node A1 includes node A1 Node B1, Node B3, Node B4, Node B5 and Node B2. A ring including node B4 may be a ring including node A1, and a ring including node B4 may also be a ring passing through node B4, node C1, node C2, node C3, node C4 and node B5 in sequence, in other words, A ring including node B4 may also be a ring including node B4, node C1, node C2, node C3, node C4 and node B5.
如图4所示的网络拓扑中,节点C2为源节点,节点A1、节点A2和节点A3所属的层级为第一层级,如图4中虚线框标识出的区域中的节点都是所述第一层级中的节点。所述控制设备根据图4所示的网络拓扑,找出所述节点A1,节点A2和节点A3为所述第一层级中具有子节点的节点。所述控制设备根据图4所示的网络拓扑,找出节点A1的子节点B1为间接连接所述源节点(节点C2)的节点,则所述控制设备将节点A1作为所述第一节点。若节点B9为所述源节点,则所述控制设备则会将所述节点A2或节点A3作为第一节点。所述节点A2的子节点B8为直接连接所述源节点(节点B9)的节点。若节点B1为所述源节点,则节点A1的子节点为所述源节点(节点B1),所述控制设备选择节点A1作为第一节点。。In the network topology shown in Figure 4, node C2 is the source node, and the level to which node A1, node A2, and node A3 belong is the first level. Nodes in a hierarchy. According to the network topology shown in FIG. 4 , the control device finds out that the node A1 , the node A2 and the node A3 are nodes with child nodes in the first layer. According to the network topology shown in FIG. 4 , the control device finds out that the child node B1 of node A1 is a node indirectly connected to the source node (node C2 ), then the control device takes node A1 as the first node. If the node B9 is the source node, the control device will use the node A2 or the node A3 as the first node. The child node B8 of the node A2 is a node directly connected to the source node (node B9). If node B1 is the source node, the child node of node A1 is the source node (node B1), and the control device selects node A1 as the first node. .
举例说明,所述控制设备根据所述第一网络拓扑中相邻节点之间的连接关系,找到包含所述第一节点,并且节点数目小于第一预设值的环的集合。所述第一预设值可以根据实际需要具体设定,一般情况下,所述第一预设阈值不超过11。如图4所示的网络拓扑中,若所述第一节点为节点A1,则所述控制设备找到的第五环包括环Bh1和环Bh2。环Bh1和环Bh2中任一个环包含所述节点A1并且包含的节点数目小于第一预设值。环Bh1包括节点A1,节点B1,节点B3,节点B4,节点B5和节点B2。环Bh2包括节点A1,节点B1,节点B6,节点B7,节点B3,节点B4,,节点B5和节点B2。此处以所述控制设备找到两个包括所述第一节点且包括的节点数目小于第一预设值的环为例进行说明。所述控制设备还可以找到多于两个包括所述第一节点且包括的节点数目小于第一预设值的环,这里不再赘述。For example, the control device finds, according to the connection relationship between adjacent nodes in the first network topology, a set of rings that include the first node and whose number of nodes is less than a first preset value. The first preset value can be specifically set according to actual needs, and generally, the first preset threshold value does not exceed 11. In the network topology shown in FIG. 4 , if the first node is node A1, the fifth ring found by the control device includes ring Bh1 and ring Bh2. Either of the ring Bh1 and the ring Bh2 includes the node A1 and the number of nodes included is less than a first preset value. Ring Bh1 includes node A1, node B1, node B3, node B4, node B5 and node B2. Ring Bh2 includes node A1, node B1, node B6, node B7, node B3, node B4, node B5 and node B2. Here, it is described as an example that the control device finds two rings that include the first node and the number of nodes included is less than a first preset value. The control device may also find more than two rings including the first node and the number of nodes included is less than a first preset value, which will not be repeated here.
如图4所示的网络拓扑,若所述源节点为节点B1,则环Bh1和环Bh2均包括所述第一节点和所述源节点。环Bh1包括的节点数目小于环Bh2包括的节点数目,即环Bh1是第五环中包括的节点数目最少的环。所述控制设备从所述第五环的信息中获得环Bh1的信息,环Bh1的信息为所述第六环的信息,即环Bh1的信息为所述第一环的信息。As shown in the network topology of FIG. 4 , if the source node is node B1, both ring Bh1 and ring Bh2 include the first node and the source node. The number of nodes included in the ring Bh1 is smaller than the number of nodes included in the ring Bh2, that is, the ring Bh1 is the ring with the smallest number of nodes included in the fifth ring. The control device obtains the information of the ring Bh1 from the information of the fifth ring, and the information of the ring Bh1 is the information of the sixth ring, that is, the information of the ring Bh1 is the information of the first ring.
可选的,所述控制设备根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息还包括:如果所述第五环的信息不包括所述源节点,则所述控制设备根据所述第一网络拓扑和所述第五环的信息,获得第二节点,所述第二节点为所述第二层级中具有子节点的节点,所述第二节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;所述控制设备根据所述第一网络拓扑和所述第二节点,获得所述第一环的信息,所述第一环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the obtaining the information of the first ring by the control device according to the first network topology, the information of the first level, and the source node of the path further includes: if the information of the fifth ring does not include the source node, then The control device obtains a second node according to the information of the first network topology and the fifth ring, the second node is a node with child nodes in the second level, and the child nodes of the second node The node is the source node, a node directly connected to the source node, or a node indirectly connected to the source node; the control device obtains the information of the first ring according to the first network topology and the second node Information, the level to which the first ring belongs is the third level, and the level of the third level is lower than the level of the second level.
如图4所示的网络拓扑,若所述源节点为节点C2,则环Bh1和环Bh2都不包括所述源节点,即所述第五环的信息不包括所述源节点。所述控制设备将环Bh1和环Bh2所在的层级作为第二层级,即第二层级包括环Bh1和环Bh2。所述控制设备根据所述第一网络拓扑中相邻节点之间的连接关系以及所述第五环的信息,获取第二层级中具有子节点的节点B4和节点B10。节点B4是间接连接节点C2的节点,所述控制设备将节点B4作为所述第二节点。节点B10未直接连接节点C2或未间接连接节点C2,所以节点B10不是所述第二节点。As shown in the network topology of FIG. 4 , if the source node is node C2, neither ring Bh1 nor ring Bh2 includes the source node, that is, the information of the fifth ring does not include the source node. The control device takes the level where the ring Bh1 and the ring Bh2 are located as the second level, that is, the second level includes the ring Bh1 and the ring Bh2. The control device obtains node B4 and node B10 having child nodes in the second layer according to the connection relationship between adjacent nodes in the first network topology and the information of the fifth ring. Node B4 is a node indirectly connected to node C2, and the control device uses node B4 as the second node. Node B10 is not directly connected to node C2 or indirectly connected to node C2, so node B10 is not the second node.
如图4所示的网络拓扑,所述控制设备根据所述第一网络拓扑中相邻节点之间的连接关系,获得环Ch1和环Ch2。环Ch1和环Ch2均包含作为所述第二节点的节点B4和作为所述源节点的节点C2。环Ch1包含节点B4,节点C1,节点C2,节点C3和节点C4。环Ch2包含节点B4,节点C1,节点C10,节点C11,节点C2,节点C3和节点C4。环Ch1所包含的节点数目小于环Ch2所包含的节点数目。所述控制设备将环Ch1作为所述第一环,将环Ch1的信息作为所述第一环的信息。环Ch1和环Ch2所属的层级为第三层级,即所述第三层级包含环Ch1和环Ch2。As shown in the network topology in FIG. 4 , the control device obtains a ring Ch1 and a ring Ch2 according to the connection relationship between adjacent nodes in the first network topology. Both the ring Ch1 and the ring Ch2 include the node B4 as the second node and the node C2 as the source node. Ring Ch1 contains node B4, node C1, node C2, node C3 and node C4. Ring Ch2 includes node B4, node C1, node C10, node C11, node C2, node C3 and node C4. The number of nodes included in the ring Ch1 is smaller than the number of nodes included in the ring Ch2. The control device uses the ring Ch1 as the first ring, and uses the information of the ring Ch1 as the information of the first ring. The level to which the ring Ch1 and the ring Ch2 belong is the third level, that is, the third level includes the ring Ch1 and the ring Ch2.
本发明实施例中,所述第一环为所述第二层级中的一个包含源节点且包括的节点数目最小的环,或者所述第一环为所述第三层级中的一个包含源节点且包括的节点数目最小的环。所述第一环还可以是低于所述第三层级的一个层级中包含源节点且包括的节点数目最小的环,所述控制设备获取所述第一环的信息的实现方式与上述描述类似,在此不再赘述。In this embodiment of the present invention, the first ring is a ring in the second level that includes the source node and includes the smallest number of nodes, or the first ring is a ring in the third level that includes the source node and includes the smallest number of nodes. The first ring may also be a ring that includes source nodes and includes the smallest number of nodes in a layer lower than the third layer, and the implementation manner for the control device to obtain the information of the first ring is similar to the above description , which will not be repeated here.
102:所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环。102: The control device obtains information about a second ring according to information about the first network topology, the destination node, and the first layer, where the information about the second ring includes the layer to which the second ring belongs and the nodes included in the second ring, where the second ring is a ring that includes the sink node and includes the least number of nodes in the hierarchy to which the second ring belongs.
举例说明,所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息包括:所述控制设备根据所述第一网络拓扑和所述第一层级的信息,获得第三节点,所述第三节点为所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;所述控制设备根据所述第一网络拓扑和所述第三节点,获得第七环的信息,所述第七环为在第二层级中包括所述第三节点且包括的节点数目小于第二预设值的环的集合,所述第七环的信息包括所述第二层级和所述第七环包括的节点,所述第二层级的等级低于所述第一层级的等级;所述控制设备判断所述第七环的信息是否包括所述宿节点;如果所述第三环的信息包括所述宿节点,从所述第七环的信息中获得第八环的信息,所述第八环为所述第七环中包括所述源节点,并且包括的节点数目最新少的环,则所述控制设备将所述第八环的信息作为所述第二环的信息。For example, the obtaining, by the control device, the information of the second ring according to the information of the first network topology, the sink node, and the first layer includes: the control device according to the first network topology and the information of the The information of the first level is obtained by obtaining a third node, the third node is a node with a child node in the first level, and the child node of the third node is the sink node directly connected to the sink node node or a node indirectly connected to the sink node; the control device obtains the information of the seventh ring according to the first network topology and the third node, and the seventh ring includes the A set of rings with a third node and the number of nodes included is less than a second preset value, the information of the seventh ring includes the nodes included in the second level and the seventh ring, and the level of the second level is low at the level of the first layer; the control device judges whether the information of the seventh ring includes the sink node; if the information of the third ring includes the sink node, from the information of the seventh ring The information of the eighth ring is obtained in the eighth ring, the eighth ring is the ring that includes the source node and includes the least number of nodes in the seventh ring, then the control device uses the information of the eighth ring as Information about the second ring.
举例说明,所述第一节点和所述第三节点可以相同,所述第一节点和所述第三节点也可以不同。若所述源节点的父节点和所述宿节点的父节点为所述第一层级的同一个节点,则所述第一节点和所述第三节点相同。若所述源节点的父节点和所述宿节点的父节点为所述第一层级的不同节点,则所述第一节点和所述第三节点不相同。For example, the first node and the third node may be the same, and the first node and the third node may also be different. If the parent node of the source node and the parent node of the sink node are the same node at the first level, then the first node and the third node are the same. If the parent node of the source node and the parent node of the sink node are different nodes of the first level, the first node and the third node are different.
如图4所示的网络拓扑中,若宿节点为节点C8,所述控制设备找出所述第一层级包含的节点A1,节点A2和节点A3都有子节点。所述控制设备找到节点A2的子节点B8间接连接所述宿节点C8,所述控制设备还找到节点A3的子节点B10间接连接所述宿节点C8。所述控制设备将节点A2或节点A3作为第三节点。In the network topology shown in FIG. 4 , if the sink node is node C8, the control device finds out node A1 included in the first level, and both node A2 and node A3 have child nodes. The control device finds that the child node B8 of the node A2 is indirectly connected to the sink node C8, and the control device also finds that the child node B10 of the node A3 is indirectly connected to the sink node C8. The control device uses node A2 or node A3 as the third node.
如图4所示的网络拓扑中,若所述控制设备将节点A2作为所述第三节点,则所述控制设备找到环Bh3和环Bh4。环Bh3和环Bh4均为包含所述第三节点(节点A2),并且包含的节点数目小于第一预设值的环。环Bh3包括节点A2,节点B8,节点B9,节点B10,节点B11,节点B12和节点A3。环Bh4包括节点A2,节点B8,节点B9,节点B10,节点B11,节点13,节点14,节点B12和节点A3。所述环Bh3和所述环Bh4都属于所述第七环。此处以所述控制设备找到两个包括所述第三节点且包括的节点数目小于第一预设值的环为例进行说明。所述控制设备还可以找到多于两个包括所述第三节点且包括的节点数目小于第一预设值的环,在此不再赘述。In the network topology shown in FIG. 4 , if the control device uses node A2 as the third node, the control device finds a ring Bh3 and a ring Bh4 . Both ring Bh3 and ring Bh4 include the third node (node A2), and the number of nodes included is less than the first preset value. Ring Bh3 includes node A2, node B8, node B9, node B10, node B11, node B12 and node A3. Ring Bh4 includes node A2, node B8, node B9, node B10, node B11, node 13, node 14, node B12 and node A3. Both the loop Bh3 and the loop Bh4 belong to the seventh loop. Here, an example is described where the control device finds two rings including the third node and the number of nodes included is smaller than a first preset value. The control device may also find more than two rings including the third node and the number of nodes included is less than a first preset value, which will not be repeated here.
如图4所示的网络拓扑中,若节点B9为宿节点,则环Bh3和环Bh4都包括所述第三节点和所述宿节点。环Bh3为包括节点数目最少的环,所述控制设备从所述第七环的信息中获得环Bh3的信息,将环Bh3的信息作为第八环的信息。换句话说,所述控制设备将环Bh3的信息作为所述第二环的信息。环Bh3和环Bh4所在的层级为所述第二层级,即所述第二层级包括环Bh3和环Bh4。In the network topology shown in FIG. 4 , if node B9 is the sink node, both ring Bh3 and ring Bh4 include the third node and the sink node. The ring Bh3 is the ring including the least number of nodes, and the control device obtains the information of the ring Bh3 from the information of the seventh ring, and uses the information of the ring Bh3 as the information of the eighth ring. In other words, the control device uses the information of the ring Bh3 as the information of the second ring. The level where ring Bh3 and ring Bh4 are located is the second level, that is, the second level includes ring Bh3 and ring Bh4.
可选的,所述控制设备根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息还包括:如果所述第七环的信息不包括所述源节点,则所述控制设备根据所述第一网络拓扑和所述第七环的信息,获得第四节点,所述第四节点为所述第二层级中具有子节点的节点,所述第四节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;所述控制设备根据所述第一网络拓扑和所述第四节点,获得所述第二环的信息,所述第二环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the controlling device obtaining the information of the second ring according to the information of the first network topology, the sink node, and the first layer further includes: if the information of the seventh ring does not include the source node, the control device obtains a fourth node according to the information of the first network topology and the seventh ring, the fourth node is a node with child nodes in the second level, and the fourth node The child node of the four nodes is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node; the control device obtains the For the information of the second ring, the level to which the second ring belongs is the third level, and the level of the third level is lower than the level of the second level.
如图4所示的网络拓扑中,若节点C8为宿节点,则环Bh3和环Bh4都不包括所述宿节点(节点C8),即所述第七环的信息不包括所述宿节点。所述控制设备根据所述第一网络拓扑中相邻节点之间的连接关系,以及所述第七环的信息,获取第二层级中节点B10有子节点。所述节点B10是间接连接所述宿节点的节点,则所述控制设备将所述节点B10作为所述第四节点。In the network topology shown in FIG. 4, if node C8 is the sink node, neither ring Bh3 nor ring Bh4 includes the sink node (node C8), that is, the information of the seventh ring does not include the sink node. The control device acquires that the node B10 in the second level has child nodes according to the connection relationship between adjacent nodes in the first network topology and the information of the seventh ring. The node B10 is a node indirectly connected to the sink node, and the control device uses the node B10 as the fourth node.
如图4所示的网络拓扑中,所述控制设备根据所述第一网络拓扑中相邻节点之间的连接关系,找到环Ch3和环Ch4。环Ch3和环Ch4均包含所述第四节点(节点B10)和所述宿节点(节点C8)。环Ch3包含节点B10,节点C5,节点C6,节点C7,节点C8和节点C9。环Ch4包含节点B10,节点C5,节点C6,节点C7,节点C8,节点C12,节点13和节点C9。环Ch3所包含的节点数目小于环Ch4所包含的节点数目。所述控制设备将环Ch3作为所述第二环,将所述环Ch3的信息作为所述第二环的信息。In the network topology shown in FIG. 4 , the control device finds ring Ch3 and ring Ch4 according to the connection relationship between adjacent nodes in the first network topology. Both ring Ch3 and ring Ch4 include the fourth node (node B10) and the sink node (node C8). Ring Ch3 contains node B10, node C5, node C6, node C7, node C8 and node C9. Ring Ch4 contains node B10, node C5, node C6, node C7, node C8, node C12, node 13 and node C9. The number of nodes included in ring Ch3 is smaller than the number of nodes included in ring Ch4. The control device uses the ring Ch3 as the second ring, and uses the information of the ring Ch3 as the information of the second ring.
本发明实施例中,所述第二环为所述第二层级中的一个包含宿节点且包括的节点数目最小的环,或者所述第二环为所述第三层级中的一个包含宿节点且包括的节点数目最小的环。所述第二环还可以是低于所述第三层级的一个层级中包含所述宿节点且包括的节点数目最小的环,获取所述第二环的信息的实现方式与上述描述的方法类似,在此不再赘述。In this embodiment of the present invention, the second ring is a ring in the second level that includes the sink node and includes the smallest number of nodes, or the second ring is a ring in the third level that includes the sink node and includes the smallest number of nodes. The second ring may also be a ring that contains the sink node and includes the smallest number of nodes in a layer lower than the third layer, and the implementation of obtaining the information of the second ring is similar to the method described above , which will not be repeated here.
103:所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。103: The control device obtains a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is a route that satisfies the routing condition. For the path from the source node to the sink node, the route selection condition is: not passing through the nodes included in the third ring and/or the nodes included in the fourth ring, the third ring includes the nodes included in the first ring rings belonging to the same level and/or lower than the level of the first ring, and the fourth ring includes rings of the same level as the second ring and/or lower than the first ring The ring of the hierarchy to which the second ring belongs.
举例说明,若所述源节点的父节点和所述宿节点的父节点属于所述第一层级,且所述源节点的父节点和所述宿节点的父节点不同,所述选路条件为不经过第三环包括的节点和第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。若所述源节点的父节点和所述宿节点的父节点属于所述第一层级,且所述源节点的父节点和所述宿节点的父节点相同,所述选路条件为不经过所述第三环包括的节点或不经过所述第四环包括的节点。For example, if the parent node of the source node and the parent node of the sink node belong to the first level, and the parent node of the source node is different from the parent node of the sink node, the routing condition is Not passing through the nodes included in the third ring and the nodes included in the fourth ring, the third ring includes a ring at the same level as the first ring and/or a ring at a level lower than the level to which the first ring belongs , the fourth ring includes a ring at the same level as the second ring and/or a ring at a lower level than the second ring. If the parent node of the source node and the parent node of the sink node belong to the first level, and the parent node of the source node and the parent node of the sink node are the same, the routing condition is Nodes included in the third ring or nodes not included in the fourth ring.
举例说明,若所述源节点的父节点和所述宿节点的父节点不同,则所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:所述控制设备根据所述选路条件和所述第一网络拓扑,获得第二网络拓扑,所述第二网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;所述控制设备根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑,所述第一子网拓扑只包括所述第一层级包括的节点,所述第二子网拓扑包括所述第一环包括的节点,所述第三子网拓扑包括所述第二环包括的节点;所述控制设备根据所述第二子网拓扑和所述第一环的信息,获得第一路径,所述第一路径为所述第二子网拓扑中由所述源节点到达所述第一子网拓扑包括的第五节点的路径,所述第五节点连接所述第二子网拓扑中的一个或多个节点;所述控制设备根据所述第三子网拓扑和所述第二环的信息,获得第二路径,所述第二路径为所述第三子网拓扑中由所述宿节点到达所述第一子网拓扑包括的第六节点的路径,所述第六节点连接所述第三子网拓扑中的一个或多个节点;所述控制设备根据所述第一子网拓扑、所述第五节点和所述第六节点,获得第三路径,所述第三路径为所述第一子网拓扑中由所述第五节点到达所述第六节点的路径;所述控制设备根据所述第一路径、所述第二路径和所述第三路径,获得所述优选路径,所述优选路径为所述第一路径、所述第二路径和所述第三路径拼接后获得的路径。For example, if the parent node of the source node is different from the parent node of the sink node, the control device will The information about the ring, obtaining the preferred path includes: the control device obtains a second network topology according to the routing condition and the first network topology, and the second network topology is filtered out on the basis of the first network topology The network topology obtained after the rings that do not meet the routing conditions and/or the links that do not meet the routing conditions; the control device according to the second network topology, the information of the first layer, the The information of the first ring and the information of the second ring obtain the first subnet topology, the second subnet topology and the third subnet topology, and the first subnet topology only includes nodes included in the first level , the second subnet topology includes nodes included in the first ring, and the third subnet topology includes nodes included in the second ring; the control device according to the second subnet topology and the Information about the first ring to obtain a first path, where the first path is a path from the source node in the second subnet topology to a fifth node included in the first subnet topology, and the fifth The nodes are connected to one or more nodes in the second subnet topology; the control device obtains a second path according to the information of the third subnet topology and the second ring, and the second path is the A path from the sink node in the third subnet topology to a sixth node included in the first subnet topology, where the sixth node is connected to one or more nodes in the third subnet topology; The control device obtains a third path according to the first subnet topology, the fifth node, and the sixth node, and the third path is reached by the fifth node in the first subnet topology the path of the sixth node; the control device obtains the preferred path according to the first path, the second path, and the third path, and the preferred path is the first path, the A path obtained by splicing the second path and the third path.
举例说明,图5至图12中,所述第一层级包括节点1节点2,节点3,节点4,节点5节点6,节点7以及节点8。6-1表示父节点为所述第一层级的节点6,并且属于第二层级的节点;6-2表示父节点为所述第一层级的节点6,并且属于第三层级的节点;6-3表示父节点为所述第一层级的节点6,并且属于第四层级的节点。6-4表示父节点为所述第一层级的节点6,并且属于第五层级的节点。3-1表示父节点为所述第一层级的节点3,并且属于第二层级的节点;3-2表示父节点为所述第一层级的节点3,并且属于第三层级的节点;3-3表示父节点为所述第一层级的节点3,并且属于第四层级的节点;3-4表示父节点为所述第一层级的节点6,并且属于第五层级的节点。其中,所述第二层级低于所述第一层级,所述第三层级低于所述第二层级,所述第四层级低于所述第三层级,所述第五层级低于所述第四层级。For example, in Fig. 5 to Fig. 12, the first level includes node 1, node 2, node 3, node 4, node 5, node 6, node 7 and node 8. 6-1 indicates that the parent node is the first level 6, and belongs to the node of the second level; 6-2 indicates that the parent node is the node 6 of the first level, and belongs to the node of the third level; 6-3 indicates that the parent node is the node of the first level 6, and belongs to the fourth level of nodes. 6-4 indicates that the parent node is the node 6 of the first level and belongs to the node of the fifth level. 3-1 indicates that the parent node is node 3 of the first level and belongs to the node of the second level; 3-2 indicates that the parent node is node 3 of the first level and belongs to the node of the third level; 3- 3 indicates that the parent node is node 3 of the first level and belongs to the node of the fourth level; 3-4 indicates that the parent node is node 6 of the first level and belongs to the node of the fifth level. Wherein, the second level is lower than the first level, the third level is lower than the second level, the fourth level is lower than the third level, and the fifth level is lower than the fourth level.
所述控制设备将图5所示的第一网络拓扑中包含的低于所述第一环所属的层级的环和低于所述第二环所属的层级的环过滤掉,获得图6所示的第二网络拓扑。所述控制设备将图5所示的第一网络拓扑中与所述第一环所属的层级相同的环和与所述第二环所属的层级相同的环过滤掉,获得图7所示的第二网络拓扑。所示控制设备将图5所示的第一网络拓扑中与所述第一环所属的层级相同的环、层级低于所述第一环所属的层级的环、与所述第二环所属的层级相同的环和层级低于所述第二环所属的层级的环过滤掉,获得图8所示的第二网络拓扑。图6、图7和图8所示的网络拓扑是所示第二网络拓扑的三种具体的形式。The control device filters out the rings lower than the level to which the first ring belongs and the rings lower than the level to which the second ring belongs included in the first network topology shown in FIG. 5 , to obtain the The second network topology. The control device filters rings at the same level as the first ring and rings at the same level as the second ring in the first network topology shown in FIG. 5 to obtain the first ring shown in FIG. 7 . Two network topology. The control device shown in FIG. 5 associates rings at the same level as the first ring, rings at a level lower than the level to which the first ring belongs, and rings at the same level as the second ring in the first network topology shown in FIG. Rings with the same level and rings with a level lower than the level to which the second ring belongs are filtered out to obtain the second network topology shown in FIG. 8 . The network topologies shown in FIG. 6 , FIG. 7 and FIG. 8 are three specific forms of the second network topology shown.
举例说明,所述控制设备可以图8所示的第二网络拓扑为基础,将图8所示的第二网络拓扑划分为三个子网络拓扑,如图9所示。所述第一子网络拓扑如图9中的Z2区域所示,所述第一子网络拓扑中只包括所述第一层级包括的节点。所述第二子网络拓扑如图9中的Z1区域所示,所述第二子网络拓扑中包括所述第一环包括的节点,即所述第二子网络拓扑包括所述源节点。所述第三子网络拓扑如图9中的Z3区域所示,所述第二子网络拓扑中包括所述第二环包括的节点,即所述第二子网络拓扑包括所述宿节点。For example, the control device may divide the second network topology shown in FIG. 8 into three sub-network topologies, as shown in FIG. 9 , based on the second network topology shown in FIG. 8 . The first sub-network topology is shown as the Z2 area in FIG. 9 , and the first sub-network topology only includes nodes included in the first layer. The second sub-network topology is shown as the Z1 area in FIG. 9 , and the second sub-network topology includes the nodes included in the first ring, that is, the second sub-network topology includes the source node. The third sub-network topology is shown in the Z3 area in FIG. 9 , and the second sub-network topology includes nodes included in the second ring, that is, the second sub-network topology includes the sink node.
举例说明,所述控制设备根据Z1区域和所述第一环的信息,获得由所述源节点到达所述第一子网络拓扑包括的第五节点的路径作为第一路径。第一环是包含源节点,并且包含节点数目最少的环,所述第一环如图9中Z1区域中由虚线圈出的环H1所示。所述第一节点是所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接链接所述源节点的节点,如图9所示,所述第一节点为所述第一层级中间接连接所述源节点的节点6。所述第五节点是所述第一子网络拓扑中连接所述第二子网络拓扑中的一个或多个节点的节点,如图9所示,所述第五节点为所述第一子网络中链接所述第二子网络中多个节点的节点6。其中,所述第五节点可以和所述第一节点相同,也可以和所述第一节点不同。如图9所示,所述第一路径为图9中所示的源节点到节点6的路径。所述第一路径为图10中从所述源节点到所述第一层级中的节点6的实线所示的路径。For example, the control device obtains a path from the source node to a fifth node included in the first sub-network topology as the first path according to the information of the Z1 area and the first ring. The first ring is the ring that includes the source node and includes the least number of nodes, and the first ring is shown as a ring H1 circled by a dotted line in the area Z1 in FIG. 9 . The first node is a node with a child node in the first level, and the child node of the first node is the source node, a node directly connected to the source node, or a node indirectly linked to the source node, As shown in FIG. 9 , the first node is a node 6 indirectly connected to the source node in the first level. The fifth node is a node connected to one or more nodes in the second subnetwork topology in the first subnetwork topology. As shown in FIG. 9, the fifth node is a node in the first subnetwork topology A node 6 linking multiple nodes in the second sub-network. Wherein, the fifth node may be the same as the first node, or may be different from the first node. As shown in FIG. 9 , the first path is the path from the source node to node 6 shown in FIG. 9 . The first path is the path shown by the solid line from the source node to the node 6 in the first level in FIG. 10 .
所述控制设备根据所述第三子网拓扑和所述第二环的信息,获得由所述宿节点到达所述第一子网络拓扑包括的第六节点的路径作为第二路径。第二环是包含宿节点,并且包含节点数目最少的环,所述第二环如图9中Z3区域中由虚线圈出的环H2所示。所述第三节点是所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述源节点的节点或间接链接所述源节点的节点,如图9所示,所述第三节点为所述第一层级中间接连接所述宿节点的节点3。所述第六节点是所述第一子网络拓扑中连接所述第二子网络拓扑中的一个或多个节点的节点,如图9所示,所述第六节点为所述第一子网络中链接所述第二子网络中多个节点的节点3。其中,所述第六节点可以和所述第三节点相同,也可以和所述第三节点不同。如图9所示,所述第一路径为图9中所示的宿节点到节点3的路径。所述第二路径为图10中从所述宿节点到所述第一层级中的节点3的实线所示的路径。The control device obtains, as a second path, a path from the sink node to a sixth node included in the first subnetwork topology according to the third subnetwork topology and information about the second ring. The second ring is the ring that contains the sink node and contains the least number of nodes, and the second ring is shown as the ring H2 circled by the dotted circle in the Z3 area in FIG. 9 . The third node is a node with a child node in the first level, and the child node of the third node is the sink node, a node directly connected to the source node, or a node indirectly connected to the source node, As shown in FIG. 9 , the third node is a node 3 indirectly connected to the sink node in the first level. The sixth node is a node connected to one or more nodes in the second subnetwork topology in the first subnetwork topology. As shown in FIG. 9, the sixth node is a node in the first subnetwork topology A node 3 linking multiple nodes in the second subnetwork. Wherein, the sixth node may be the same as the third node, or may be different from the third node. As shown in FIG. 9 , the first path is a path from the sink node to node 3 shown in FIG. 9 . The second path is the path shown by the solid line from the sink node to node 3 in the first level in FIG. 10 .
所述控制设备根据所述第一子网拓扑、所述第五节点和所述第六节点,获得所述第五节点到所述第六节点的路径作为第三路径。如图9所示,所述第三路径为图9中所示的节点6到节点3的路径。所述第三路径为图10中从所述第一层级中的节点6到所述第一层级中的节点3的实线所示的路径。The control device obtains a path from the fifth node to the sixth node as a third path according to the first subnet topology, the fifth node, and the sixth node. As shown in FIG. 9 , the third path is the path from node 6 to node 3 shown in FIG. 9 . The third path is the path shown by the solid line from node 6 in the first level to node 3 in the first level in FIG. 10 .
所述控制设备将所述第一路径、所述第二路径和所述第三路径拼接后获得所述第一网络拓扑的优选路径。所述优选路径如图10所示。The control device obtains the preferred path of the first network topology after concatenating the first path, the second path, and the third path. The preferred path is shown in FIG. 10 .
举例说明,若所述源节点的父节点和所述宿节点的父节点相同,且为所述第一层级的同一节点,则所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:所述控制设备根据所述选路条件和所述第一网络拓扑,获得第三网络拓扑,所述第三网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;所述控制设备根据所述第三网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第四子网络拓扑,所述第四子网拓扑包括所述第一环包括的节点以及所述第二环包括的节点;所述控制设备根据所述第四子网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息获得优选路径,所述第四子网络拓扑包括所述第一环包括的节点和所述第二环包括的节点,所述优选路径为所述源节点到达所述宿节点的路径。For example, if the parent node of the source node is the same as the parent node of the sink node and is the same node at the first level, the control device, according to the routing condition, the first network topology, the The information of the first ring and the information of the second ring, obtaining the preferred path includes: the control device obtains a third network topology according to the routing condition and the first network topology, and the third network topology is a network topology obtained after filtering rings that do not meet the routing conditions and/or links that do not meet the routing conditions on the basis of the first network topology; the control device according to the third network topology , the information of the first level, the information of the first ring and the information of the second ring to obtain a fourth subnetwork topology, the fourth subnetwork topology includes the nodes included in the first ring and the The nodes included in the second ring; the control device obtains a preferred path according to the fourth subnetwork topology, the information of the first layer, the information of the first ring, and the information of the second ring, the The fourth subnetwork topology includes nodes included in the first ring and nodes included in the second ring, and the preferred path is a path from the source node to the sink node.
所述第一网络拓扑如图11所示,所述控制设备在图11所示的第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后,获得第三网络拓扑。第三网络拓扑为从图11所示的第一网络拓扑中,过滤掉与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环后获得的网络拓扑。由于源节点间接连接的属于第一层级的节点和宿节点的父节点相同,所以所述源节点和所述宿节点属于同一子网络拓扑,如图12所示的第四子网络拓扑。The first network topology is shown in Figure 11, and the control device filters out rings that do not meet the routing conditions and/or rings that do not meet the routing conditions based on the first network topology shown in Figure 11 After the links, the third network topology is obtained. The third network topology is obtained by filtering out rings at the same level as the first ring and/or rings at a level lower than the level to which the first ring belongs from the first network topology shown in FIG. 11 Network topology. Since the source node indirectly connected to the node belonging to the first level is the same as the parent node of the sink node, the source node and the sink node belong to the same sub-network topology, such as the fourth sub-network topology shown in FIG. 12 .
所述控制设备从图12所示的第四子网络拓扑中选择从源节点到宿节点的路径,作为优选传输路径。The control device selects a path from the source node to the sink node from the fourth sub-network topology shown in FIG. 12 as the preferred transmission path.
可选的,所述选路条件还包括:所述优选路径包含的横向链路的数量小于第三预设值,所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径包括:所述控制设备根据所述选路条件和所述第一网络拓扑,获得第四网络拓扑,所述第四网络拓扑为在第一网络拓扑的基础上标识出一条或多条横向链路后获得的网络拓扑;所述控制设备根据所述第四网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第五子网拓扑、第六子网拓扑和第七子网拓扑,所述第五子网拓扑只包括所述第一层级包括的节点,所述第六子网拓扑包括所述第一环包括的节点,所述第七子网拓扑包括所述第二环包括的节点;所述控制设备根据所述第六子网拓扑和所述第一环的信息,获得第四路径,所述第四路径为所述第六子网拓扑中由所述源节点到达所述第四子网拓扑包括的第七节点的路径,所述第七节点连接所述第五子网拓扑中的一个或多个节点;所述控制设备根据所述第七子网拓扑和所述第二环的信息,获得第五路径,所述第五路径为所述第七子网拓扑中由所述宿节点到达所述第四子网拓扑包括的第八节点的路径,所述第八节点连接所述第六子网拓扑中的一个或多个节点,所述第五路径和所述第四路径包含的横向链路的数量小于所述第三预设值;所述控制设备根据所述第五子网拓扑、所述第七节点和所述第八节点,获得第六路径,所述第六路径为所述第五子网拓扑中由所述第七节点到达所述第八节点的路径;所述控制设备根据所述第四路径、所述第五路径和所述第六路径,获得所述优选路径,所述优选路径为所述第四路径、所述第五路径和所述第六路径拼接后获得的路径。Optionally, the route selection condition further includes: the number of horizontal links included in the preferred path is less than a third preset value, and the control device according to the route selection condition, the first network topology, the first The information about the ring and the information about the second ring, and obtaining the preferred path includes: the control device obtaining a fourth network topology according to the routing condition and the first network topology, and the fourth network topology is the A network topology obtained after one or more horizontal links are identified on the basis of a network topology; the control device according to the fourth network topology, the information of the first layer, the information of the first ring, and the According to the information of the second ring, the fifth subnet topology, the sixth subnet topology and the seventh subnet topology are obtained, the fifth subnet topology only includes the nodes included in the first level, and the sixth subnet The topology includes nodes included in the first ring, and the seventh subnet topology includes nodes included in the second ring; the control device obtains, according to information about the sixth subnet topology and the first ring, a fourth path, the fourth path is a path from the source node in the sixth subnet topology to the seventh node included in the fourth subnet topology, and the seventh node is connected to the fifth subnet topology One or more nodes in the topology of the network; the control device obtains a fifth path according to the information of the seventh subnet topology and the second ring, and the fifth path is in the seventh subnet topology A path from the sink node to an eighth node included in the fourth subnet topology, where the eighth node is connected to one or more nodes in the sixth subnet topology, the fifth path and the The number of horizontal links included in the fourth path is less than the third preset value; the control device obtains a sixth path according to the fifth subnet topology, the seventh node, and the eighth node, and the The sixth path is the path from the seventh node to the eighth node in the fifth subnet topology; the control device according to the fourth path, the fifth path and the sixth path , to obtain the preferred path, where the preferred path is a path obtained by concatenating the fourth path, the fifth path, and the sixth path.
本发明实施例中的所述横向链路为所述第一网络拓扑中,两个属于不同环的节点之间的链路。如图13所示,由W1,W2,W3,W4以及W5组成的环中,节点W1和节点W5分别属于两个不同的的环,则W1和W5之间的链路为一条横向链路。节点W2和节点W3分别属于两个不同的的环,则W2和W3之间的链路为另一条横向链路。所述控制设备可在识别出横向链路后,在所述第一网络拓扑中标识出来所述横向链路,获得第四网络拓扑。所述第四网络拓扑是标识有横向链路的所述第一网络拓扑。所述控制设备获得第五子网拓扑、第六子网拓扑和第七子网拓扑,与上述获得第一子网拓扑、第二子网拓扑和第三子网拓扑类似,参考上述描述,这里不再赘述。The horizontal link in the embodiment of the present invention is a link between two nodes belonging to different rings in the first network topology. As shown in Figure 13, in the ring composed of W1, W2, W3, W4 and W5, node W1 and node W5 respectively belong to two different rings, then the link between W1 and W5 is a horizontal link. Node W2 and node W3 respectively belong to two different rings, and the link between W2 and W3 is another horizontal link. After identifying the horizontal link, the control device may identify the horizontal link in the first network topology to obtain a fourth network topology. The fourth network topology is the first network topology with lateral links identified. The control device obtains the fifth subnet topology, the sixth subnet topology and the seventh subnet topology, similar to the above-mentioned obtaining the first subnet topology, the second subnet topology and the third subnet topology, refer to the above description, here No longer.
由所述源节点到所述第四子网拓扑包括所述第七节点的路径有很多条,从多条路径中去除横向链路个数超过所述第三预设值的路径。由所述宿节点到所述第四子网拓扑包括所述第八节点的路径有很多条,从多条路径中去除横向链路个数超过所述第三预设值的路径。若所述第三预设值设置为1,则所选的传输路径中的横向链路的个数不能超过1个,则所述控制设备选择横向链路个数不超过1个的所述第四路径和所述第五路径。其中,所述第七节点与所述第一节点可以相同也可以不同,所述第八节点与所述第三节点可以相同也可以不同。There are many paths from the source node to the fourth subnetwork topology including the seventh node, and the paths whose number of horizontal links exceeds the third preset value are removed from the multiple paths. There are many paths from the sink node to the fourth subnetwork topology including the eighth node, and the paths whose number of horizontal links exceeds the third preset value are removed from the multiple paths. If the third preset value is set to 1, the number of horizontal links in the selected transmission path cannot exceed one, and the control device selects the first horizontal link whose number of horizontal links does not exceed one. four paths and the fifth path. Wherein, the seventh node may be the same as or different from the first node, and the eighth node may be the same as or different from the third node.
本发明实施例提供的方法中,所述控制设备根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径。利用所述选路条件选择从源节点到宿节点的优选路径,所述优选路径不经过任意一个符合所述选路条件中包含的层级上的环,所选择的优选路径可以规避实际应用不允许通过的层级上的环,以使得输出的优选路径满足实际应用的需求。In the method provided in the embodiment of the present invention, the control device obtains a preferred path according to the routing condition, the first network topology, the information of the first ring, and the information of the second ring, and the preferred path is A path from the source node to the sink node that satisfies the routing condition. Use the routing condition to select the preferred path from the source node to the sink node, the preferred path does not pass through any ring that meets the hierarchy contained in the routing condition, and the selected preferred path can avoid practical applications. The rings on the passed levels make the optimal path of the output meet the requirements of practical applications.
图14为本发明实施例提供的一种网络拓扑中选择传输路径的装置结构示意图。本发明实施例提供的网络拓扑中选择传输路径的装置可执行本发明实施例提供的方法。本发明实施例提供的网络拓扑中选择传输路径的装置可以是上述实施例中的控制设备。本发明实施例提供的网络拓扑中选择传输路径的装置包括:第一环信息获取单元1401、第二环信息获取单元1402和路径获取单元1403。FIG. 14 is a schematic structural diagram of an apparatus for selecting a transmission path in a network topology according to an embodiment of the present invention. The apparatus for selecting a transmission path in a network topology provided in an embodiment of the present invention may execute the method provided in an embodiment of the present invention. The apparatus for selecting a transmission path in a network topology provided in an embodiment of the present invention may be the control device in the foregoing embodiments. The device for selecting a transmission path in a network topology provided by an embodiment of the present invention includes: a first ring information acquisition unit 1401 , a second ring information acquisition unit 1402 , and a path acquisition unit 1403 .
所述第一环信息获取单元1401用于根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环。The first ring information obtaining unit 1401 is configured to obtain the information of the first ring according to the first network topology, the information of the first level and the source node of the path, the first network topology includes the source node, the path The sink node, the nodes included in the first level, and the connection relationship between adjacent nodes, the first level is the highest level in the first network topology, and the information of the first level includes the first level A connection relationship between nodes included in a level, the information of the first ring includes the level to which the first ring belongs and the nodes included in the first ring, the first ring is the A ring that includes the source node and includes the least number of nodes in the hierarchy.
举例说明,所述第一环信息获取单元1401具体用于:根据所述第一网络拓扑和所述第一层级的信息,获得第一节点,所述第一节点为所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;根据所述第一网络拓扑和所述第一节点,获得第五环的信息,所述第五环为在第二层级中包括所述第一节点且包括的节点数目小于第一预设值的环的集合,所述第五环的信息包括所述第二层级和所述第五环包括的节点,所述第二层级的等级低于所述第一层级的等级;判断所述第五环的信息是否包括所述源节点;如果所述第五环的信息包括所述源节点,从所述第五环的信息中获得第六环的信息,将所述第六环的信息作为所述第一环的信息,所述第六环为所述第五环中包括所述源节点,并且包括的节点数目最少的环。For example, the first ring information obtaining unit 1401 is specifically configured to: obtain a first node according to the first network topology and the information of the first layer, and the first node is a A node of a child node, the child node of the first node is the source node, a node directly connected to the source node or a node indirectly connected to the source node; according to the first network topology and the first node , to obtain the information of the fifth ring, the fifth ring is a set of rings including the first node in the second level and the number of nodes included is less than the first preset value, the information of the fifth ring includes the The nodes included in the second level and the fifth ring, the level of the second level is lower than the level of the first level; judging whether the information of the fifth ring includes the source node; if the second level The information of the fifth ring includes the source node, the information of the sixth ring is obtained from the information of the fifth ring, and the information of the sixth ring is used as the information of the first ring, and the sixth ring is the The fifth ring includes the source node and includes the least number of nodes.
可选地,所述第一环信息获取单元1401还具体用于:如果所述第五环的信息不包括所述源节点,根据所述第一网络拓扑和所述第五环的信息,获得第二节点,所述第二节点为所述第二层级中具有子节点的节点,所述第二节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;根据所述第一网络拓扑和所述第二节点,获得所述第一环的信息,所述第一环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the first ring information obtaining unit 1401 is further specifically configured to: if the information of the fifth ring does not include the source node, according to the first network topology and the information of the fifth ring, obtain The second node, the second node is a node with a child node in the second level, and the child node of the second node is the source node, a node directly connected to the source node or indirectly connected to the source A node of a node; according to the first network topology and the second node, obtain the information of the first ring, the level to which the first ring belongs is a third level, and the level of the third level is lower than the level of the Describe the level of the second level.
所述第二环信息获取单元1402用于根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环。The second ring information obtaining unit 1402 is configured to obtain second ring information according to the first network topology, the sink node, and the first layer information, and the second ring information includes the first The level to which the second ring belongs and the nodes included in the second ring, where the second ring is a ring that includes the sink node and includes the least number of nodes in the level to which the second ring belongs.
举例说明,所述第二环信息获取单元1402具体用于:根据所述第一网络拓扑和所述第一层级的信息,获得第三节点,所述第三节点为所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;根据所述第一网络拓扑和所述第三节点,获得第七环的信息,所述第七环为在第二层级中包括所述第三节点且包括的节点数目小于第二预设值的环的集合,所述第七环的信息包括所述第二层级和所述第七环包括的节点,所述第二层级的等级低于所述第一层级的等级;判断所述第七环的信息是否包括所述宿节点;如果所述第三环的信息包括所述宿节点,从所述第七环的信息中获得第八环的信息,将所述第八环的信息作为所述第二环的信息,所述第八环为所述第七环中包括所述源节点,并且包括的节点数目最新少的环。For example, the second ring information obtaining unit 1402 is specifically configured to: obtain a third node according to the first network topology and the information of the first layer, and the third node is a A node of a child node, the child node of the third node is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node; according to the first network topology and the third node , obtaining the information of the seventh ring, the seventh ring is a set of rings including the third node in the second level and the number of nodes included is less than a second preset value, the information of the seventh ring includes the The nodes included in the second level and the seventh ring, the level of the second level is lower than the level of the first level; judging whether the information of the seventh ring includes the sink node; if the second level The information of the third ring includes the sink node, the information of the eighth ring is obtained from the information of the seventh ring, and the information of the eighth ring is used as the information of the second ring, and the eighth ring is the information of the eighth ring. The seventh ring includes the source node and is the ring that includes the least number of nodes.
可选地,所述第二环信息获取单元1402还具体用于:如果所述第七环的信息不包括所述源节点,根据所述第一网络拓扑和所述第七环的信息,获得第四节点,所述第四节点为所述第二层级中具有子节点的节点,所述第四节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;根据所述第一网络拓扑和所述第四节点,获得所述第二环的信息,所述第二环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the second ring information obtaining unit 1402 is further specifically configured to: if the information of the seventh ring does not include the source node, according to the first network topology and the information of the seventh ring, obtain A fourth node, where the fourth node is a node with a child node in the second level, and the child node of the fourth node is the sink node, a node directly connected to the sink node, or indirectly connected to the sink node A node of a node; according to the first network topology and the fourth node, obtain the information of the second ring, the level to which the second ring belongs is a third level, and the level of the third level is lower than the level of the Describe the level of the second level.
所述路径获取单元1403用于根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。The path acquisition unit 1403 is configured to obtain an optimal path according to the path selection condition, the first network topology, the information of the first ring, and the information of the second ring, and the optimal path satisfies the path selection Conditional path from the source node to the sink node, the routing condition is: not passing through the nodes included in the third ring and/or the nodes included in the fourth ring, the third ring includes the same A ring belongs to a ring at the same level and/or a ring at a level lower than the first ring, and the fourth ring includes a ring at the same level as the second ring and/or at a level lower than the ring at which the first ring belongs. The ring of the hierarchy to which the second ring belongs.
举例说明,所述路径获取单元1403具体用于:根据所述选路条件和所述第一网络拓扑,获得第二网络拓扑,所述第二网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑,所述第一子网拓扑只包括所述第一层级包括的节点,所述第二子网拓扑包括所述第一环包括的节点,所述第三子网拓扑包括所述第二环包括的节点;根据所述第二子网拓扑和所述第一环的信息,获得第一路径,所述第一路径为所述第二子网拓扑中由所述源节点到达所述第一子网拓扑包括的第五节点的路径,所述第五节点连接所述第二子网拓扑中的一个或多个节点;根据所述第三子网拓扑和所述第二环的信息,获得第二路径,所述第二路径为所述第三子网拓扑中由所述宿节点到达所述第一子网拓扑包括的第六节点的路径,所述第六节点连接所述第三子网拓扑中的一个或多个节点;根据所述第一子网拓扑、所述第五节点和所述第六节点,获得第三路径,所述第三路径为所述第一子网拓扑中由所述第五节点到达所述第六节点的路径;根据所述第一路径、所述第二路径和所述第三路径,获得所述优选路径,所述优选路径为所述第一路径、所述第二路径和所述第三路径拼接后获得的路径。For example, the path obtaining unit 1403 is specifically configured to: obtain a second network topology according to the path selection condition and the first network topology, and the second network topology is to filter out A network topology obtained after a ring and/or a link that does not meet the routing condition; according to the second network topology, the information of the first layer, and the information of the first ring information and the information of the second ring to obtain the first subnet topology, the second subnet topology and the third subnet topology, the first subnet topology only includes nodes included in the first level, and the second The second subnet topology includes nodes included in the first ring, and the third subnet topology includes nodes included in the second ring; according to information about the second subnet topology and the first ring, obtain the second A path, the first path is a path from the source node in the second subnet topology to a fifth node included in the first subnet topology, and the fifth node is connected to the second subnet One or more nodes in the topology; according to the information of the third subnet topology and the second ring, obtain a second path, the second path is the sink node in the third subnet topology A path to a sixth node included in the first subnet topology, the sixth node connecting to one or more nodes in the third subnet topology; according to the first subnet topology, the fifth The node and the sixth node obtain a third path, and the third path is a path from the fifth node to the sixth node in the first subnet topology; according to the first path, the The second path and the third path are used to obtain the optimal path, and the optimal path is a path obtained by splicing the first path, the second path, and the third path.
这里需要说明的是,根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑由所述路径获取单元1403中的策略引擎子单元执行处理,而根据所述第二子网拓扑和所述第一环的信息,获得第一路径,根据所述第三子网拓扑和所述第二环的信息,获得第二路径,根据所述第一路径、所述第二路径和所述第三路径,则是由所述路径获取单元1403中的路径计算子单元(Path Compute Element,PCE)算路子单元执行处理。如图15所示,所述路径获取单元1403包括策略引擎子单元1501和PCE子单元1502。It should be noted here that, according to the second network topology, the information of the first layer, the information of the first ring and the information of the second ring, the first subnet topology and the second subnet topology and the third subnet topology are processed by the policy engine subunit in the path obtaining unit 1403, and the first path is obtained according to the information of the second subnet topology and the first ring, and according to the third Subnet topology and the information of the second ring to obtain the second path, according to the first path, the second path and the third path, the path calculator in the path obtaining unit 1403 A path computing subunit (Path Compute Element, PCE) performs processing. As shown in FIG. 15 , the path acquisition unit 1403 includes a policy engine subunit 1501 and a PCE subunit 1502 .
当所述第一网络拓扑是软件定义的分组传送网(SDN-Packet TransportNetwork,SPTN)的省网拓扑等大网络拓扑时,由于网络拓扑包含的节点可达到10万量级,PCE无法计算如此巨大的所述第一网络拓扑中从源节点到宿节点的传输路径。由所述路径获取单元1403中的策略引擎子单元1501先去掉所述第一网络拓扑中不符合所述选路条件的环,再将去掉不符合所述选路条件的环的第一网络拓扑划分成三个子网络拓扑:获得第一子网拓扑、第二子网拓扑和第三子网拓扑。再由PCE子单元1502分别根据所述第二子网拓扑和所述第一环的信息,获得第一路径,根据所述第三子网拓扑和所述第二环的信息,获得第二路径,根据所述第一路径、所述第二路径和所述第三路径。所述策略引擎子单元1501再将所述第一路径,所述第二路径和所述第三路径合并输出从源节点到宿节点的传输路径。这样,就可以采用传统的PCE子单元计算所述第一网络拓扑中从源节点到宿节点的传输路径。When the first network topology is a large network topology such as a software-defined packet transport network (SDN-Packet TransportNetwork, SPTN) provincial network topology, since the nodes included in the network topology can reach the order of 100,000, PCE cannot calculate such a huge The transmission path from the source node to the sink node in the first network topology. The policy engine subunit 1501 in the path acquisition unit 1403 first removes the rings that do not meet the routing conditions in the first network topology, and then removes the rings that do not meet the routing conditions from the first network topology. Divide into three subnetwork topologies: a first subnetwork topology, a second subnetwork topology and a third subnetwork topology are obtained. Then, the PCE subunit 1502 obtains the first path according to the information of the second subnet topology and the first ring, and obtains the second path according to the information of the third subnet topology and the second ring , according to the first path, the second path and the third path. The policy engine subunit 1501 then combines the first path, the second path and the third path to output a transmission path from the source node to the sink node. In this way, the traditional PCE subunit can be used to calculate the transmission path from the source node to the sink node in the first network topology.
举例说明,所述路径获取单元1403具体用于:根据所述选路条件和所述第一网络拓扑,获得第三网络拓扑,所述第三网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;根据所述第三网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第四子网络拓扑,所述第四子网拓扑包括所述第一环包括的节点以及所述第二环包括的节点;根据所述第四子网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息获得优选路径,所述第四子网络拓扑包括所述第一环包括的节点和包括所述第二环包括的节点,所述优选路径为所述源节点到达所述宿节点的路径。For example, the path obtaining unit 1403 is specifically configured to: obtain a third network topology according to the path selection condition and the first network topology, and the third network topology is filtered out based on the first network topology A network topology obtained after a ring and/or a link that does not meet the routing condition; according to the third network topology, the information of the first layer, and the information of the first ring information and the information of the second ring to obtain a fourth subnetwork topology, the fourth subnetwork topology includes the nodes included in the first ring and the nodes included in the second ring; according to the fourth subnetwork Topology, the information of the first level, the information of the first ring and the information of the second ring obtain a preferred path, and the fourth sub-network topology includes the nodes included in the first ring and includes the nodes included in the second ring The nodes included in the second ring, the preferred path is a path from the source node to the sink node.
可选的,所述选路条件还包括所述优选路径包含的横向链路的数量小于第三预设值,所述路径获取单元1403还具体用于:根据所述选路条件和所述第一网络拓扑,获得第四网络拓扑,所述第四网络拓扑为在第一网络拓扑的基础上标识出一条或多条横向链路后获得的网络拓扑;根据所述第四网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第五子网拓扑、第六子网拓扑和第七子网拓扑,所述第五子网拓扑只包括所述第一层级包括的节点,所述第六子网拓扑包括所述第一环包括的节点,所述第七子网拓扑包括所述第二环包括的节点;根据所述第六子网拓扑和所述第一环的信息,获得第四路径,所述第四路径为所述第六子网拓扑中由所述源节点到达所述第四子网拓扑包括的第七节点的路径,所述第七节点连接所述第五子网拓扑中的一个或多个节点;根据所述第七子网拓扑和所述第二环的信息,获得第五路径,所述第五路径为所述第七子网拓扑中由所述宿节点到达所述第四子网拓扑包括的第八节点的路径,所述第八节点连接所述第六子网拓扑中的一个或多个节点,所述第五路径和所述第四路径包含的横向链路的数量小于所述第三预设值;根据所述第五子网拓扑、所述第七节点和所述第八节点,获得第六路径,所述第六路径为所述第五子网拓扑中由所述第七节点到达所述第八节点的路径;根据所述第四路径、所述第五路径和所述第六路径,获得所述优选路径,所述优选路径为所述第四路径、所述第五路径和所述第六路径拼接后获得的路径。Optionally, the route selection condition further includes that the number of horizontal links contained in the preferred path is less than a third preset value, and the route acquisition unit 1403 is further specifically configured to: according to the route selection condition and the first A network topology, obtaining a fourth network topology, the fourth network topology is a network topology obtained after one or more horizontal links are identified on the basis of the first network topology; according to the fourth network topology, the The information of the first level, the information of the first ring and the information of the second ring obtain the fifth subnet topology, the sixth subnet topology and the seventh subnet topology, and the fifth subnet topology only includes The nodes included in the first level, the sixth subnet topology includes nodes included in the first ring, and the seventh subnet topology includes nodes included in the second ring; according to the sixth subnet information about the topology and the first ring, and obtain a fourth path, where the fourth path is a path from the source node to the seventh node included in the fourth subnet topology in the sixth subnet topology, The seventh node is connected to one or more nodes in the fifth subnet topology; according to the information of the seventh subnet topology and the second ring, a fifth path is obtained, and the fifth path is the In the seventh subnet topology, the path from the sink node to the eighth node included in the fourth subnet topology, where the eighth node is connected to one or more nodes in the sixth subnet topology, the The number of horizontal links contained in the fifth path and the fourth path is less than the third preset value; according to the fifth subnet topology, the seventh node, and the eighth node, the sixth a path, the sixth path is a path from the seventh node to the eighth node in the fifth subnet topology; according to the fourth path, the fifth path, and the sixth path, The preferred path is obtained, where the preferred path is a path obtained by splicing the fourth path, the fifth path, and the sixth path.
图16为本发明实施例提供的一种网络拓扑中选择传输路径的装置结构示意图。本发明实施例提供的网络拓扑中选择传输路径的装置可执行本发明实施例提供的方法。本发明实施例提供的网络拓扑中选择传输路径的装置可以是上述实施例中的控制设备。图16所示的装置和图14所示的装置可以为同一装置。图16从物理的角度显示了网络拓扑中选择传输路径的装置包括的内容,而图14从逻辑的角度显示了网络拓扑中选择传输路径的装置包括的内容。FIG. 16 is a schematic structural diagram of an apparatus for selecting a transmission path in a network topology according to an embodiment of the present invention. The apparatus for selecting a transmission path in a network topology provided in an embodiment of the present invention may execute the method provided in an embodiment of the present invention. The apparatus for selecting a transmission path in a network topology provided in an embodiment of the present invention may be the control device in the foregoing embodiments. The device shown in FIG. 16 and the device shown in FIG. 14 may be the same device. Figure 16 shows the content of the device for selecting a transmission path in the network topology from a physical point of view, and Figure 14 shows the content of the device for selecting a transmission path in the network topology from a logical point of view.
本发明实施例提供的网络拓扑中选择传输路径的装置包括:存储器1601、处理器1602、通信接口1603和通信总线1604。所述处理器1602、所述存储器1601和所述通信接口1603通过所述通信总线1604进行通信。所述存储器1601用于存储程序代码。The device for selecting a transmission path in a network topology provided in an embodiment of the present invention includes: a memory 1601 , a processor 1602 , a communication interface 1603 and a communication bus 1604 . The processor 1602 , the memory 1601 and the communication interface 1603 communicate through the communication bus 1604 . The memory 1601 is used to store program codes.
所述处理器1602用于读取所述存储器1601中存储的程序代码后,执行一下内容:The processor 1602 is configured to execute the following content after reading the program code stored in the memory 1601:
根据第一网络拓扑、第一层级的信息和路径的源节点,获得第一环的信息,所述第一网络拓扑包括所述源节点、所述路径的宿节点、所述第一层级包括的节点以及相邻的节点间的连接关系,所述第一层级为所述第一网络拓扑中的最高层级,所述第一层级的信息包括所述第一层级包括的节点间的连接关系,所述第一环的信息包括所述第一环所属的层级和所述第一环包括的节点,所述第一环为在所述第一环所属的层级中包括所述源节点且包括的节点数目最少的环;According to the first network topology, the information of the first level and the source node of the path, the information of the first ring is obtained, and the first network topology includes the source node, the sink node of the path, and the path included in the first level. The connection relationship between nodes and adjacent nodes, the first level is the highest level in the first network topology, and the information of the first level includes the connection relationship between nodes included in the first level, so The information of the first ring includes the layer to which the first ring belongs and the nodes included in the first ring, and the first ring is a node that includes the source node and includes nodes in the layer to which the first ring belongs the least number of rings;
根据所述第一网络拓扑、所述宿节点和所述第一层级的信息,获得第二环的信息,所述第二环的信息包括所述第二环所属的层级和所述第二环包括的节点,所述第二环为在所述第二环所属的层级中包括所述宿节点且包括的节点数目最少的环;Obtain information about a second ring according to the first network topology, the sink node, and the information about the first layer, where the information about the second ring includes the layer to which the second ring belongs and the second ring Included nodes, the second ring is a ring that includes the sink node and includes the least number of nodes in the hierarchy to which the second ring belongs;
根据选路条件、所述第一网络拓扑、所述第一环的信息和所述第二环的信息,获得优选路径,所述优选路径为满足所述选路条件的从所述源节点到达所述宿节点的路径,所述选路条件为:不经过第三环包括的节点和/或第四环包括的节点,所述第三环包括与所述第一环所属的层级相同的环和/或层级低于所述第一环所属的层级的环,所述第四环包括与所述第二环所属的层级相同的环和/或层级低于所述第二环所属的层级的环。According to the routing conditions, the first network topology, the information of the first ring, and the information of the second ring, an optimal path is obtained, and the optimal path is a route from the source node that satisfies the routing conditions For the path of the sink node, the path selection condition is: no nodes included in the third ring and/or nodes included in the fourth ring, the third ring includes the same level as the first ring and/or a ring whose level is lower than the level to which the first ring belongs, the fourth ring includes the same ring as the level to which the second ring belongs and/or a ring whose level is lower than the level to which the second ring belongs ring.
举例说明,所述处理器1602具体执行如下操作:For example, the processor 1602 specifically performs the following operations:
根据所述第一网络拓扑和所述第一层级的信息,获得第一节点,所述第一节点为所述第一层级中具有子节点的节点,所述第一节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;According to the information of the first network topology and the first level, a first node is obtained, the first node is a node with child nodes in the first level, and the child nodes of the first node are the a source node, a node directly connected to said source node, or a node indirectly connected to said source node;
根据所述第一网络拓扑和所述第一节点,获得第五环的信息,所述第五环为在第二层级中包括所述第一节点且包括的节点数目小于第一预设值的环的集合,所述第五环的信息包括所述第二层级和所述第五环包括的节点,所述第二层级的等级低于所述第一层级的等级;Obtain information about a fifth ring according to the first network topology and the first node, the fifth ring includes the first node in the second level and the number of nodes included is less than a first preset value a set of rings, the information of the fifth ring includes the second level and the nodes included in the fifth ring, and the level of the second level is lower than that of the first level;
判断所述第五环的信息是否包括所述源节点;judging whether the information of the fifth ring includes the source node;
如果所述第五环的信息包括所述源节点,从所述第五环的信息中获得第六环的信息,将所述第六环的信息作为所述第一环的信息,所述第六环为所述第五环中包括所述源节点,并且包括的节点数目最少的环。If the information of the fifth ring includes the source node, obtain the information of the sixth ring from the information of the fifth ring, use the information of the sixth ring as the information of the first ring, and the information of the sixth ring The sixth ring is the ring that includes the source node and includes the least number of nodes in the fifth ring.
可选地,所述处理器1602还执行如下操作:如果所述第五环的信息不包括所述源节点,根据所述第一网络拓扑和所述第五环的信息,获得第二节点,所述第二节点为所述第二层级中具有子节点的节点,所述第二节点的子节点为所述源节点、直接连接所述源节点的节点或间接连接所述源节点的节点;根据所述第一网络拓扑和所述第二节点,获得所述第一环的信息,所述第一环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the processor 1602 further performs the following operation: if the information of the fifth ring does not include the source node, obtain a second node according to the first network topology and the information of the fifth ring, The second node is a node having a child node in the second level, and the child node of the second node is the source node, a node directly connected to the source node, or a node indirectly connected to the source node; According to the first network topology and the second node, obtain the information of the first ring, the level to which the first ring belongs is a third level, and the level of the third level is lower than the second level level.
举例说明,所述处理器1602具体执行如下操作:For example, the processor 1602 specifically performs the following operations:
根据所述第一网络拓扑和所述第一层级的信息,获得第三节点,所述第三节点为所述第一层级中具有子节点的节点,所述第三节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;According to the information of the first network topology and the first level, a third node is obtained, the third node is a node with child nodes in the first level, and the child nodes of the third node are the a sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node;
根据所述第一网络拓扑和所述第三节点,获得第七环的信息,所述第七环为在第二层级中包括所述第三节点且包括的节点数目小于第二预设值的环的集合,所述第七环的信息包括所述第二层级和所述第七环包括的节点,所述第二层级的等级低于所述第一层级的等级;Obtain information about a seventh ring according to the first network topology and the third node, the seventh ring includes the third node in the second level and the number of nodes included is less than a second preset value a set of rings, the information of the seventh ring includes the second level and the nodes included in the seventh ring, and the level of the second level is lower than the level of the first level;
判断所述第七环的信息是否包括所述宿节点;judging whether the information of the seventh ring includes the sink node;
如果所述第三环的信息包括所述宿节点,从所述第七环的信息中获得第八环的信息,将所述第八环的信息作为所述第二环的信息,所述第八环为所述第七环中包括所述源节点,并且包括的节点数目最新少的环。If the information of the third ring includes the sink node, obtain the information of the eighth ring from the information of the seventh ring, use the information of the eighth ring as the information of the second ring, and the information of the second ring The eighth ring is the ring that includes the source node and includes the least number of nodes in the seventh ring.
可选地,所述处理器1602还执行如下操作:如果所述第七环的信息不包括所述源节点,根据所述第一网络拓扑和所述第七环的信息,获得第四节点,所述第四节点为所述第二层级中具有子节点的节点,所述第四节点的子节点为所述宿节点、直接连接所述宿节点的节点或间接连接所述宿节点的节点;根据所述第一网络拓扑和所述第四节点,获得所述第二环的信息,所述第二环所属的层级为第三层级,所述第三层级的等级低于所述第二层级的等级。Optionally, the processor 1602 further performs the following operation: if the information of the seventh ring does not include the source node, obtain a fourth node according to the first network topology and the information of the seventh ring, The fourth node is a node with a child node in the second level, and the child node of the fourth node is the sink node, a node directly connected to the sink node, or a node indirectly connected to the sink node; According to the first network topology and the fourth node, obtain the information of the second ring, the level to which the second ring belongs is a third level, and the level of the third level is lower than the second level level.
举例说明,所述处理器1602具体执行如下操作:For example, the processor 1602 specifically performs the following operations:
根据所述选路条件和所述第一网络拓扑,获得第二网络拓扑,所述第二网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;According to the routing conditions and the first network topology, a second network topology is obtained, and the second network topology is to filter out rings that do not meet the routing conditions and/or rings that do not meet the routing conditions based on the first network topology. The network topology obtained after the link meeting the routing condition;
根据所述第二网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第一子网拓扑、第二子网拓扑和第三子网拓扑,所述第一子网拓扑只包括所述第一层级包括的节点,所述第二子网拓扑包括所述第一环包括的节点,所述第三子网拓扑包括所述第二环包括的节点;Obtain a first subnet topology, a second subnet topology, and a third subnet topology according to the second network topology, the information of the first layer, the information of the first ring, and the information of the second ring , the first subnet topology includes only nodes included in the first level, the second subnet topology includes nodes included in the first ring, and the third subnet topology includes nodes included in the second ring the node;
根据所述第二子网拓扑和所述第一环的信息,获得第一路径,所述第一路径为所述第二子网拓扑中由所述源节点到达所述第一子网拓扑包括的第五节点的路径,所述第五节点连接所述第二子网拓扑中的一个或多个节点;Obtaining a first path according to the information about the second subnet topology and the first ring, where the first path is from the source node in the second subnet topology to the first subnet topology includes a path of a fifth node, the fifth node connecting one or more nodes in the second subnet topology;
根据所述第三子网拓扑和所述第二环的信息,获得第二路径,所述第二路径为所述第三子网拓扑中由所述宿节点到达所述第一子网拓扑包括的第六节点的路径,所述第六节点连接所述第三子网拓扑中的一个或多个节点;Obtaining a second path according to information about the third subnet topology and the second ring, where the second path is from the destination node in the third subnet topology to the first subnet topology includes The path of the sixth node of the sixth node, the sixth node is connected to one or more nodes in the third subnet topology;
根据所述第一子网拓扑、所述第五节点和所述第六节点,获得第三路径,所述第三路径为所述第一子网拓扑中由所述第五节点到达所述第六节点的路径;According to the first subnet topology, the fifth node, and the sixth node, a third path is obtained, and the third path is from the fifth node to the sixth node in the first subnet topology. A six-node path;
根据所述第一路径、所述第二路径和所述第三路径,获得所述优选路径,所述优选路径为所述第一路径、所述第二路径和所述第三路径拼接后获得的路径。Obtain the preferred route according to the first route, the second route and the third route, where the preferred route is obtained by splicing the first route, the second route and the third route path of.
举例说明,所述处理器1602具体执行如下操作:For example, the processor 1602 specifically performs the following operations:
根据所述选路条件和所述第一网络拓扑,获得第三网络拓扑,所述第三网络拓扑为在第一网络拓扑的基础上过滤掉不符合所述选路条件的环和/或不符合所述选路条件的链路后获得的网络拓扑;According to the routing conditions and the first network topology, a third network topology is obtained, and the third network topology is to filter out rings that do not meet the routing conditions and/or rings that do not meet the routing conditions based on the first network topology. The network topology obtained after the link meeting the routing condition;
根据所述第三网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第四子网络拓扑,所述第四子网拓扑包括所述第一环包括的节点以及所述第二环包括的节点;According to the third network topology, the information of the first layer, the information of the first ring, and the information of the second ring, obtain a fourth subnetwork topology, where the fourth subnetwork topology includes the first the nodes included in the first ring and the nodes included in the second ring;
根据所述第四子网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息获得优选路径,所述第四子网络拓扑包括所述第一环包括的节点和包括所述第二环包括的节点,所述优选路径为所述源节点到达所述宿节点的路径。A preferred path is obtained according to the fourth sub-network topology, the information of the first level, the information of the first ring, and the information of the second ring, the fourth sub-network topology includes the first ring including and nodes included in the second ring, and the preferred path is a path from the source node to the sink node.
举例说明,所述选路条件还所述优选路径包含的横向链路的数量小于第三预设值,所述处理器1602具体执行如下操作:For example, the route selection condition is that the number of horizontal links contained in the preferred route is less than a third preset value, and the processor 1602 specifically performs the following operations:
根据所述选路条件和所述第一网络拓扑,获得第四网络拓扑,所述第四网络拓扑为在第一网络拓扑的基础上标识出一条或多条横向链路后获得的网络拓扑;Obtaining a fourth network topology according to the routing condition and the first network topology, where the fourth network topology is a network topology obtained after identifying one or more horizontal links on the basis of the first network topology;
根据所述第四网络拓扑、所述第一层级的信息、所述第一环的信息和所述第二环的信息,获得第五子网拓扑、第六子网拓扑和第七子网拓扑,所述第五子网拓扑只包括所述第一层级包括的节点,所述第六子网拓扑包括所述第一环包括的节点,所述第七子网拓扑包括所述第二环包括的节点;Obtain a fifth subnet topology, a sixth subnet topology, and a seventh subnet topology according to the fourth network topology, the information of the first layer, the information of the first ring, and the information of the second ring , the fifth subnet topology includes only nodes included in the first level, the sixth subnet topology includes nodes included in the first ring, and the seventh subnet topology includes nodes included in the second ring the node;
根据所述第六子网拓扑和所述第一环的信息,获得第四路径,所述第四路径为所述第六子网拓扑中由所述源节点到达所述第四子网拓扑包括的第七节点的路径,所述第七节点连接所述第五子网拓扑中的一个或多个节点;Obtaining a fourth path according to the information about the sixth subnet topology and the first ring, where the fourth path is from the source node in the sixth subnet topology to the fourth subnet topology includes A path of a seventh node of the fifth subnetwork topology, the seventh node connecting one or more nodes in the fifth subnet topology;
根据所述第七子网拓扑和所述第二环的信息,获得第五路径,所述第五路径为所述第七子网拓扑中由所述宿节点到达所述第四子网拓扑包括的第八节点的路径,所述第八节点连接所述第六子网拓扑中的一个或多个节点,所述第五路径和所述第四路径包含的横向链路的数量小于所述第三预设值;Obtaining a fifth path according to the seventh subnet topology and the information of the second ring, where the fifth path is from the sink node to the fourth subnet topology in the seventh subnet topology includes The path of the eighth node, the eighth node is connected to one or more nodes in the sixth subnetwork topology, the number of horizontal links contained in the fifth path and the fourth path is smaller than that of the first Three preset values;
所述控制设备根据所述第五子网拓扑、所述第七节点和所述第八节点,获得第六路径,所述第六路径为所述第五子网拓扑中由所述第七节点到达所述第八节点的路径;The control device obtains a sixth path according to the fifth subnet topology, the seventh node, and the eighth node, and the sixth path is the seventh node in the fifth subnet topology a path to the eighth node;
所述控制设备根据所述第四路径、所述第五路径和所述第六路径,获得所述优选路径,所述优选路径为所述第四路径、所述第五路径和所述第六路径拼接后获得的路径。The control device obtains the preferred route according to the fourth route, the fifth route and the sixth route, and the preferred route is the fourth route, the fifth route and the sixth route The path obtained after path splicing.
上述处理器可以是微处理器或者该处理器也可以是任何常规的处理器。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。当使用软件实现时,可以将实现上述功能的代码存储在计算机可读介质中。计算机可读介质包括计算机存储介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以是随机存取存储器(英文全称为random access memory,英文缩写为RAM)、只读存储器(英文全称为read-only memory,英文缩写为ROM)、电可擦可编程只读存储器(英文全称为electrically erasableprogrammable read-only memory,英文缩写为EEPROM)、只读光盘(英文全称为compactdisc read-only memory,英文缩写为CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的程序代码并能够由计算机存取的任何其他介质。计算机可读介质可以是压缩光碟(英文全称为compact disc,英文缩写为CD)、激光碟、数字视频光碟(英文全称为digital video disc,英文缩写为DVD)、软盘或者蓝光碟。The aforementioned processor may be a microprocessor or the processor may be any conventional processor. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. When implemented in software, codes for realizing the functions described above can be stored in a computer-readable medium. Computer-readable media includes computer storage media. A storage media may be any available media that can be accessed by a computer. Take this as an example but not limited to: the computer readable medium can be random access memory (full name in English is random access memory, English abbreviation is RAM), read-only memory (full name in English is read-only memory, English abbreviation is ROM), Electrically Erasable Programmable Read-Only Memory (English full name is electrically erasableprogrammable read-only memory, English abbreviation is EEPROM), read-only CD (English full name is compactdisc read-only memory, English abbreviation is CD-ROM) or other optical disc storage, Disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store program code in the form of instructions or data structures and can be accessed by a computer. The computer-readable medium may be a compact disc (compact disc in English, abbreviated as CD in English), laser disc, digital video disc (digital video disc in English, abbreviated as DVD in English), floppy disk or Blu-ray disc.
最后应说明的是:以上实施例仅用于示例性说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明及本发明带来的有益效果进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明权利要求的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them; although the present invention and the beneficial effects brought by the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art Those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the present invention Scope of Claims.
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510287902.2A CN106302158B (en) | 2015-05-29 | 2015-05-29 | Method and device for selecting transmission path in network topology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510287902.2A CN106302158B (en) | 2015-05-29 | 2015-05-29 | Method and device for selecting transmission path in network topology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106302158A CN106302158A (en) | 2017-01-04 |
CN106302158B true CN106302158B (en) | 2019-10-22 |
Family
ID=57655914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510287902.2A Active CN106302158B (en) | 2015-05-29 | 2015-05-29 | Method and device for selecting transmission path in network topology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106302158B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019000340A1 (en) * | 2017-06-29 | 2019-01-03 | 华为技术有限公司 | Network topology structure mapping method and device, terminal and storage medium |
CN109361596B (en) * | 2018-10-26 | 2021-07-06 | 新华三技术有限公司合肥分公司 | Route calculation method and device and electronic equipment |
CN109684087B (en) * | 2018-12-17 | 2020-01-10 | 中科寒武纪科技股份有限公司 | Operation method, device and related product |
CN112751760B (en) * | 2019-10-29 | 2023-03-31 | 中盈优创资讯科技有限公司 | Automatic routing method and system based on two-layer multi-service path |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102075402A (en) * | 2011-02-12 | 2011-05-25 | 华为技术有限公司 | Virtual network mapping processing method and system |
CN102546345A (en) * | 2011-12-30 | 2012-07-04 | Ut斯达康通讯有限公司 | Method for realizing cross-ring protection of resilient packet ring by use of spanning tree protocol |
CN102648605A (en) * | 2009-10-07 | 2012-08-22 | 北电网络有限公司 | Method and apparatus for exchanging routing information and establishing connections across multiple network regions |
CN103702383A (en) * | 2014-01-09 | 2014-04-02 | 北京交通大学 | Clustering routing method of wireless sensor network |
CN103733579A (en) * | 2012-02-17 | 2014-04-16 | 明知大学产学协力团 | Method of decreasing network traffic |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7626930B2 (en) * | 2006-11-13 | 2009-12-01 | Corrigent Systems Ltd. | Hash-based multi-homing |
-
2015
- 2015-05-29 CN CN201510287902.2A patent/CN106302158B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102648605A (en) * | 2009-10-07 | 2012-08-22 | 北电网络有限公司 | Method and apparatus for exchanging routing information and establishing connections across multiple network regions |
CN102075402A (en) * | 2011-02-12 | 2011-05-25 | 华为技术有限公司 | Virtual network mapping processing method and system |
CN102546345A (en) * | 2011-12-30 | 2012-07-04 | Ut斯达康通讯有限公司 | Method for realizing cross-ring protection of resilient packet ring by use of spanning tree protocol |
CN103733579A (en) * | 2012-02-17 | 2014-04-16 | 明知大学产学协力团 | Method of decreasing network traffic |
CN103702383A (en) * | 2014-01-09 | 2014-04-02 | 北京交通大学 | Clustering routing method of wireless sensor network |
Also Published As
Publication number | Publication date |
---|---|
CN106302158A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102783097B (en) | Packet transfer system, control apparatus, transfer apparatus, method of creating processing rules | |
CN104685838B (en) | Virtualized using abstract and interface the software defined network of particular topology is serviced | |
JP6920533B2 (en) | Data flow transmission | |
JP4621220B2 (en) | Virtual topology design apparatus and virtual topology design method | |
CN106302158B (en) | Method and device for selecting transmission path in network topology | |
US10063457B2 (en) | Method, system, and apparatus for improving forwarding capabilities during route convergence | |
WO2017215378A1 (en) | Software-defined network, node, path calculation method and device, and storage medium | |
CN107231304B (en) | Method, system and apparatus for forwarding network traffic using a minimal forwarding information base | |
CN104205767A (en) | Supporting software defined networking with application layer traffic optimization | |
CN103716176A (en) | Method and communication system for mapping a network topology request to a physical network | |
US10374935B2 (en) | Link discovery method, system, and device | |
CN104579775B (en) | A kind of power telecom network optical fiber and optical transmission device resource allocation method and equipment | |
CN105072035B (en) | A kind of generation method and system of optical transfer network atom route | |
WO2015139533A1 (en) | Method for network manager to back-calculate hybrid networking services | |
US9639604B2 (en) | System and method for traffic engineering information summary of a zone in network communications | |
JP5167293B2 (en) | Route control apparatus, communication system, and route calculation method | |
CN107046504A (en) | Method and controller for traffic engineering in a communication network | |
CN102142991A (en) | Method and system for simulating network cutting | |
CN105745874A (en) | Method and device for determining service function path | |
CN110581806B (en) | Method, device and equipment for automatically segmenting network and storage medium | |
WO2018161754A1 (en) | Method and apparatus for recovering tunnel bandwidth resource | |
JP5756049B2 (en) | Multicast route calculation method and apparatus | |
EP2983333B1 (en) | A system and method for providing routes to physical residential gateways | |
CN105704192B (en) | Method and apparatus for determining the location of a controller in an SDN network | |
JP6637911B2 (en) | Network design apparatus, network design method, and network design processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |