WO2023098858A1 - 网络拓扑获取方法、装置、控制器及核心网网元 - Google Patents

网络拓扑获取方法、装置、控制器及核心网网元 Download PDF

Info

Publication number
WO2023098858A1
WO2023098858A1 PCT/CN2022/136131 CN2022136131W WO2023098858A1 WO 2023098858 A1 WO2023098858 A1 WO 2023098858A1 CN 2022136131 W CN2022136131 W CN 2022136131W WO 2023098858 A1 WO2023098858 A1 WO 2023098858A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
forwarding device
information
complexity
devices
Prior art date
Application number
PCT/CN2022/136131
Other languages
English (en)
French (fr)
Inventor
谷肖飞
程志密
胡渭琦
Original Assignee
大唐移动通信设备有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大唐移动通信设备有限公司 filed Critical 大唐移动通信设备有限公司
Publication of WO2023098858A1 publication Critical patent/WO2023098858A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Definitions

  • the present disclosure relates to the technical field of communications, and in particular to a network topology acquisition method, device, controller, and core network element.
  • the communication network of the related art there are various methods for presenting the network topology, which have a great influence on the mastery of the global network and related information by the administrator. For example, based on the tiling method, the same number of devices are placed in each row, and the same distance is set between the devices to present the network topology. Although the tiling method also presents the network topology, due to the uncertain number of devices, the uncertain complexity of links between network devices, and the different link relationships between network devices, the topology is disordered and the identification of link information is difficult. Difficult, incomprehensible. Although other methods solve the shortcomings of single and inflexible network topology shapes in the tiling method, there are still problems such as disordered link relationships between network devices and difficult identification of link information.
  • Embodiments of the present disclosure provide a network topology acquisition method, device, controller, and core network element to solve the problems in the related art that the network topology presentation method causes disordered link relationships between network devices and difficult identification of link information.
  • an embodiment of the present disclosure provides a network topology acquisition method, executed by a controller, including:
  • forwarding information sent by multiple forwarding devices where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link information between the forwarding devices Port number, working status of the forwarding device;
  • a network topology map is determined.
  • performing hierarchical division according to the forwarding information, the decreasing complexity criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtaining the hierarchical division information includes:
  • the method before obtaining the complexity value of each forwarding device according to the link information of the forwarding device, the method further includes:
  • the first forwarding device is any one of the multiple forwarding devices.
  • the method further includes:
  • the second forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the second forwarding device with the stored complexity value;
  • the second forwarding device is any one of multiple forwarding devices.
  • the obtaining the complexity value of each forwarding device according to the link information of the forwarding device includes:
  • a first timer is started, and the first timer is used to determine whether to update the hierarchical division information
  • the first situation includes at least one of the following:
  • the forwarding device in the working state is changed to a non-working state
  • the forwarding device in the non-working state is changed to the working state
  • the link between the forwarding devices works abnormally.
  • the layer division is performed according to the complexity value of each forwarding device, the forwarding information, the complexity reduction criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and the level division information is obtained ,include:
  • the forwarding information perform hierarchical division according to the first rule, and obtain hierarchical division information
  • the first rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the first rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • Embodiments of the present disclosure also provide a method for obtaining a network topology, which is executed by a network element of the core network, where the network element of the core network is an application layer network element or a management plane network element, including:
  • the forwarding information includes: identification information of the forwarding devices, identification information of neighboring forwarding devices belonging to the forwarding devices, and link information between the forwarding devices And the link port number, the working status of the forwarding device;
  • a network topology map is determined.
  • performing hierarchical division according to the forwarding information, the decreasing complexity criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtaining the hierarchical division information includes:
  • the obtaining the complexity value of each forwarding device includes:
  • the complexity decreasing criterion of the forwarding device and the upper threshold of the number of forwarding devices at each level are divided into levels.
  • the level division information it also includes:
  • Receiving the action of calculating the complexity value for each forwarding device sent by the controller, the action of calculating the value of the complexity includes: updating the value of the complexity or generating the value of the complexity.
  • the method also includes:
  • the complexity value corresponding to the third forwarding device is to update the complexity value, using the new complexity value to update the complexity value corresponding to the third forwarding device;
  • the complexity value action corresponding to the third forwarding device is to generate a complexity value, storing a new complexity value of the third forwarding device;
  • the third forwarding device is any one of multiple forwarding devices.
  • the level division is carried out, and the level division information is obtained, including:
  • the second timer is started, and the second timer is used to judge whether to update the hierarchical division information
  • the second timer expires and the network is in the state corresponding to the second situation, according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and each The upper limit threshold of the number of forwarding devices at the level is divided into levels, and the level division information is obtained;
  • the second situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the determining of each forwarding device according to the link information of the forwarding device the determining of each forwarding device according to the link information of the forwarding device.
  • the complexity values including:
  • a third timer is started, and the third timer is used to judge whether to update the hierarchical division information
  • the third situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the fourth forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the fourth forwarding device with the stored complexity value;
  • the fourth forwarding device is any one of multiple forwarding devices.
  • the fifth forwarding device is any one of multiple forwarding devices.
  • performing hierarchical division according to the complexity value of each forwarding device, the forwarding information, the complexity reduction criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtaining the level Partition information including:
  • the forwarding information According to the sorting of complexity values, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, divide the levels according to the second rule, and obtain the level division information;
  • the second rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the second rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • An embodiment of the present disclosure also provides a controller, including a memory, a transceiver, and a processor:
  • the memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations:
  • forwarding information sent by multiple forwarding devices where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link information between the forwarding devices Port number, working status of the forwarding device;
  • a network topology map is determined.
  • the processor is configured to read the computer program in the memory and perform the following operations:
  • the processor configured to read the computer program in the memory, also performs the following operations:
  • the first forwarding device is any one of the multiple forwarding devices.
  • the processor configured to read the computer program in the memory, also performs the following operations:
  • the second forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the second forwarding device with the stored complexity value;
  • the second forwarding device is any one of multiple forwarding devices.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • a first timer is started, and the first timer is used to determine whether to update the hierarchical division information
  • the first situation includes at least one of the following:
  • the forwarding device in the working state is changed to a non-working state
  • the forwarding device in the non-working state is changed to the working state
  • the link between the forwarding devices works abnormally.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • the forwarding information perform hierarchical division according to the first rule, and obtain hierarchical division information
  • the first rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the first rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • An embodiment of the present disclosure also provides a core network element, where the core network element is an application layer network element or a management plane network element, including a memory, a transceiver, and a processor:
  • the memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations:
  • the forwarding information includes: identification information of the forwarding devices, identification information of neighboring forwarding devices belonging to the forwarding devices, and link information between the forwarding devices And the link port number, the working status of the forwarding device;
  • a network topology map is determined.
  • the processor is configured to read the computer program in the memory and perform the following operations:
  • the processor is configured to read the computer program in the memory and perform one of the following operations:
  • the processor configured to read the computer program in the memory, further performs the following operations:
  • Receiving the action of calculating the complexity value for each forwarding device sent by the controller, the action of calculating the value of the complexity includes: updating the value of the complexity or generating the value of the complexity.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • the complexity value corresponding to the third forwarding device is to update the complexity value, using the new complexity value to update the complexity value corresponding to the third forwarding device;
  • the complexity value action corresponding to the third forwarding device is to generate a complexity value, storing a new complexity value of the third forwarding device;
  • the third forwarding device is any one of multiple forwarding devices.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • a second timer is started, and the second timer is used to determine whether to update the hierarchical division information
  • the second timer expires and the network is in the state corresponding to the second situation, according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and each The upper limit threshold of the number of forwarding devices at the level is divided into levels, and the level division information is obtained;
  • the second situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the processor is configured to read the computer program in the memory and execute Do the following:
  • a third timer is started, and the third timer is used to judge whether to update the hierarchical division information
  • the third situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the processor is configured to read the computer program in the memory and further Do the following:
  • the fourth forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the fourth forwarding device with the stored complexity value;
  • the fourth forwarding device is any one of multiple forwarding devices.
  • the processor configured to read the computer program in the memory, also performs the following operations:
  • the fifth forwarding device is any one of multiple forwarding devices.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • the forwarding information According to the sorting of complexity values, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, divide the levels according to the second rule, and obtain the level division information;
  • the second rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the second rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • An embodiment of the present disclosure also provides a device for obtaining a network topology, which is applied to a controller, including:
  • the first acquiring unit is configured to acquire forwarding information sent by multiple forwarding devices, where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, and information between the forwarding devices link information and link port number, and the working status of the forwarding device;
  • the second obtaining unit is configured to perform hierarchical division according to the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and acquire the hierarchical division information;
  • the first determining unit is configured to determine the network topology map according to the hierarchical division information.
  • An embodiment of the present disclosure also provides a network topology acquisition device, which is applied to a core network element, where the core network element is an application layer network element or a management plane network element, including:
  • the third obtaining unit is configured to obtain the forwarding information of multiple forwarding devices sent by the controller, the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, the forwarding Link information and link port numbers between devices, and the working status of the forwarding device;
  • the fourth obtaining unit is configured to perform hierarchical division according to the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and acquire the hierarchical division information;
  • the second determining unit is configured to determine the network topology map according to the hierarchical division information.
  • An embodiment of the present disclosure further provides a processor-readable storage medium, where a computer program is stored in the processor-readable storage medium, and the computer program is configured to cause the processor to execute the above method.
  • the above solution obtains the layer division information according to the forwarding information of the forwarding device, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and then obtains the network topology map. According to the link of the forwarding device Adjust the network topology and display the network topology diagram clearly.
  • Figure 1 shows the LLDP work flow chart
  • FIG. 2 shows one of the schematic flow charts of the network topology acquisition method applied to the controller according to the embodiment of the present disclosure
  • Fig. 3 shows the architecture diagram of specific application situation 1
  • FIG. 4 shows a schematic flow chart of a specific application situation 1
  • FIG. 5 shows a schematic flow chart of the specific application situation 2
  • FIG. 6 shows a schematic flow chart of specific application situation 3.
  • FIG. 7 shows a schematic flowchart of a network topology acquisition method applied to a core network element according to an embodiment of the present disclosure
  • Fig. 8 shows the architecture diagram of specific application situation 4.
  • FIG. 9 shows a schematic flow chart of specific application situation 4.
  • Fig. 10 shows a schematic flow chart of specific application situation five
  • Figure 11 shows a schematic flow chart of the specific application situation six
  • Fig. 12 shows a schematic flow chart of specific application situation 7
  • Fig. 13 shows a schematic flow chart of specific application situation eight
  • Fig. 14 shows a schematic flow chart of specific application situation 9
  • Figure 15 shows a schematic flow chart of a specific application situation ten
  • FIG. 16 shows the second schematic flow diagram of the network topology acquisition method applied to the controller according to the embodiment of the present disclosure
  • FIG. 17 shows one of the unit schematic diagrams of the network topology acquisition device of the embodiment of the present disclosure.
  • Fig. 18 shows the structural diagram of the controller of the embodiment of the present application.
  • FIG. 19 shows the second schematic diagram of the units of the network topology acquisition device of the embodiment of the present disclosure.
  • FIG. 20 shows the third schematic diagram of the units of the device for obtaining the network topology according to the embodiment of the present disclosure.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • the network topology acquisition method, device, controller, and core network element provided in the embodiments of the present application may be applied in a wireless communication system.
  • the wireless communication system may be a system using the fifth generation (5th Generation, 5G) mobile communication technology (hereinafter referred to as the 5G system).
  • 5G fifth generation
  • NR New Radio
  • SDN Software-defined networking
  • Application Layer Application Layer
  • Control Layer control layer
  • infrastructure Layer infrastructure layer
  • LLDP Link Layer Discovery Protocol
  • LLDPDU Link Layer Discovery Protocol Data Unit
  • Status is a protocol that enables devices in the network to discover each other and report status and exchange information.
  • the work of sending LLDP frames is completed by the controller, as shown in Figure 1, in Figure 1, the LLDP frame is generated in the controller, and the data packet (packet_out) message is sent to the switch 1 through the openflow protocol, and the switch 1 After receiving the LLDP frame from the controller, it will forward it to the direct neighbor switch 2. After the direct neighbor switch 2 receives the LLDP frame, it will send the incoming data packet (packet_in) message to the controller through the openflow protocol, and the controller accordingly Do link detection.
  • the openflow protocol is a network communication protocol.
  • the network topology is presented using the tiling method, the circular uniform distribution method, the random distribution method, and the concentric circle distribution method.
  • Tiling method Set the same number of network nodes and the same distance between nodes in each row, and present the network topology according to the link information between nodes.
  • Ring uniform distribution method All nodes are evenly distributed on a ring, and the network topology is presented according to the link information between nodes.
  • Random distribution method according to the preset interface size, the nodes are randomly distributed in the interface, and the network topology is presented according to the link information between nodes.
  • Embodiments of the present application provide a network topology acquisition method, device, controller, and core network element to solve the problems of confusing link relationships between network devices and difficult identification of link information caused by network topology presentation methods in related technologies.
  • the method and the device are conceived based on the same application. Since the principle of solving problems of the method and the device is similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • an embodiment of the present disclosure provides a network topology acquisition method, executed by a controller, including:
  • Step S201 acquiring forwarding information sent by multiple forwarding devices
  • the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link port numbers between the forwarding devices, the The working status of the forwarding device;
  • Step S202 perform hierarchical division according to the forwarding information, the decreasing complexity criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtain hierarchical division information;
  • the decreasing complexity criterion of the forwarding device means that when performing hierarchical division, the hierarchical division is performed sequentially in descending order of complexity.
  • the upper limit threshold of the number of forwarding devices at each level is used to limit the upper limit of the number of forwarding devices belonging to the same level, which represents the maximum number of forwarding devices allowed to be placed on one level.
  • Step S203 Determine the network topology map according to the hierarchical division information.
  • the network topology can be displayed clearly Graphs and network links.
  • step S202 is:
  • Step S2021 according to the link information of the forwarding device, obtain the complexity value of each forwarding device
  • Step S2022 perform hierarchical division according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtain hierarchical division information.
  • step S2022 is:
  • the forwarding information perform hierarchical division according to the first rule, and obtain hierarchical division information
  • the first rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the forwarding device with the highest complexity value is first selected as the first level of the network topology. If there are multiple forwarding devices with the same complexity value , then put these forwarding devices on the first level; then the forwarding devices connected to the first level forwarding devices and with the largest complexity value except the first level forwarding devices are taken as the second level, if there are multiple forwarding devices If the complexity values of the devices are the same, these forwarding devices are all placed in the second level; and so on, the third level, the fourth level and other levels are divided according to the above method.
  • the first rule further includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • forwarding devices originally belonging to the same level need to be displayed on the same row, but if there are too many forwarding devices at the same level, so many forwarding devices cannot fit in the same row, you can Forwarding devices are displayed in multiple lines; or these forwarding devices can also be displayed in the same line, but some forwarding devices are displayed in the same position, which can be understood as node folding (that is, two or more When forwarding devices are displayed in the network topology, the display positions of these forwarding devices will overlap).
  • the controller stores the complexity value of at least one forwarding device, if the second forwarding device is an existing forwarding device, the obtained comparing the new complexity value corresponding to the second forwarding device with the stored complexity value;
  • the second forwarding device is any one of multiple forwarding devices.
  • the controller After the controller obtains the complexity value, it needs to store the complexity value. If the controller has already stored the complexity value for a certain forwarding device, the obtained new complexity value When it is different from the previous one, the stored complexity value needs to be updated.
  • the obtaining the complexity value of each forwarding device according to the link information of the forwarding device includes:
  • a first timer is started, and the first timer is used to determine whether to update the hierarchical division information
  • the first situation includes at least one of the following:
  • the forwarding device in the working state is changed to the non-working state
  • the forwarding device in the non-working state is changed to the working state
  • timing duration of the first timer can be set according to actual operating conditions.
  • the controller may also send a response message to the forwarding device, where the response message is used to indicate that the controller has determined the network topology according to the forwarding information.
  • the process of sending the response message is carried out in the non-SDN domain, but for the SDN domain, after the controller receives the forwarding information from the forwarding device and generates the network topology map, it will no longer update the forwarding information. The device sends a response message.
  • the controller obtains the forwarding information of the forwarding device for the first time, it needs to obtain all The complexity value of the forwarding device in the working state; if the first forwarding device changes from the working state to the non-working state, delete the first forwarding device, that is, if the controller has obtained the forwarding information of the first forwarding device Information, if the first forwarding device is a forwarding device that was in the working state before, if the first forwarding device is no longer in the working state, delete the first forwarding device, that is, if the forwarding device is not in the working state, Then it is not necessary to reflect the node corresponding to the forwarding device in the hierarchical division information; or
  • the first forwarding device is changed from the non-working state to the working state, then add the first forwarding device; further optionally, if the first forwarding device is changed from the non-working state to the working state, and the first forwarding device and other forwarding devices If there is no connection, then do not add the first forwarding device, if the first forwarding device is changed from a non-working state to a working state, and the first forwarding device is connected to other forwarding devices, then add the first forwarding device; that is That is, if the first forwarding device is a forwarding device that has not been in working state before, if the first forwarding device is in working state and is connected to other forwarding devices, add the first forwarding device, if the The first forwarding device is in the working state, and the first forwarding device is not connected to other forwarding devices, then the first forwarding device is not added, that is, the new forwarding device is in the working state, and it is connected to other forwarding devices, Then add it, and calculate the complexity value of the newly added forwarding
  • the controller can also display the network topology map on the display interface.
  • the network topology map can display the current network status in real time, and usually the controller needs to refresh the network topology map dynamically or periodically.
  • the controller can refresh the network topology map every 1 second.
  • the shape of the forwarding device in the network topology diagram can be a dot, square, triangle, etc., and the size can be set as required.
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • the devices involved in this embodiment of the present application mainly include a controller (also called a network controller) and at least one forwarding device (for example, a switch) connected to the controller.
  • a controller also called a network controller
  • at least one forwarding device for example, a switch
  • the controller pre-configures the complexity decreasing criterion of the forwarding device and the upper limit threshold of the number of forwarding devices at each level for hierarchical division.
  • the complexity refers to the forwarding device The number of neighbor devices of the forwarding device, the more the neighbor devices of the forwarding device, the higher the complexity.
  • the complexity value is used to represent the complexity.
  • the controller sends LLDP data packets to all forwarding devices connected to it through a packet-out message.
  • the controller generates hierarchical division information and generates a network topology map
  • the specific implementation process in this case mainly includes:
  • Step 41 The forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 42 the controller calculates the complexity value of each forwarding device according to the reported forwarding information, and generates layers according to the pre-configured decreasing complexity criterion of forwarding devices and the upper limit threshold of the number of forwarding devices at each level Divide information and generate a network topology map, mainly including the following processes:
  • the main implementation method of hierarchical division is: according to the complexity value of the forwarding device, the forwarding device with the largest complexity value is selected as the first layer of the network topology. If there are multiple forwarding devices with the same The forwarding devices are all placed on the first level; the forwarding device connected to the first level forwarding devices and has the largest complexity value except the first level forwarding devices is the second level. If there are multiple forwarding devices, the complexity value If they are the same, these forwarding devices are all placed on the second level; other levels such as the third level and the fourth level are divided according to the above method;
  • the basis for splitting includes displaying the forwarding devices exceeding the upper limit in multiple rows or displaying At least two forwarding devices with the same complexity value are displayed at the same position in the row corresponding to their levels; to avoid crossing and confusion of link lines.
  • the hierarchical division information includes: the complexity value of forwarding equipment, the number of topology division layers, the number of forwarding equipment in each layer, the identifier (Identifier, ID) of forwarding equipment in each layer, the link information between forwarding equipment in the same The working status information of layer forwarding equipment, the port number of the link of each layer forwarding equipment, etc.
  • the shape of the forwarding device in the network topology diagram can be a dot, square, triangle, etc., and the size can be set as required.
  • the topology map is dynamically refreshed or periodically refreshed (for example: once every 1 second).
  • Step 43 after the controller generates the network topology map, it sends a response message to the forwarding device.
  • this step is optional.
  • the controller After the controller receives the relevant information of the forwarding device and generates a topology map, it will not make a report response to the forwarding device, so this step 43 is ignored and does not need to be executed.
  • the controller updates the hierarchical division information and updates the network topology map
  • the specific implementation process in this case mainly includes:
  • Step 51 The forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 52 the controller calculates the complexity value of each forwarding device according to the latest forwarding information reported, according to the pre-configured forwarding device complexity decreasing criterion and the upper threshold of the number of forwarding devices at each level, Updating the hierarchical division information and updating the network topology map mainly includes the following processes:
  • the level division information is updated according to the pre-configured decreasing complexity criterion of forwarding equipment and the upper limit threshold of the number of forwarding equipment at each level.
  • level division please refer to the specific (2) in step 42 in application case 1 will not be repeated here.
  • the content contained in the hierarchical division information may refer to the definition in the specific application situation 1, and details are not repeated here.
  • Step 53 after the controller generates the network topology map, it sends a response message to the forwarding device.
  • this step is optional.
  • the controller After the controller receives the relevant information of the forwarding device and generates a topology map, it will no longer make a report response to the forwarding device, so this step 53 is ignored and does not need to be executed.
  • the controller determines to update the network topology map according to the timer
  • the specific implementation process in this case mainly includes:
  • Step 61 The forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 62 the controller determines that the forwarding device A changes from the working state to the non-working state according to the latest forwarding information reported, and starts a timer. After the timer expires, the forwarding device A is still in the non-working state, and each forwarding device Calculate the complexity value, update the hierarchical division information, and update the network topology map according to the pre-configured decreasing complexity criterion of forwarding devices and the upper limit threshold of the number of forwarding devices at each level.
  • the specific Step 52 in application case 2 will not be repeated here.
  • step 63 the controller sends a response message to the forwarding device after generating the network topology map.
  • this step is optional.
  • the controller After the controller receives the relevant information of the forwarding device and generates a topology map, it will not make a report response to the forwarding device, so this step 63 is ignored and does not need to be executed.
  • the controller divides the device level according to the complexity decreasing criterion of the forwarding device and the upper limit threshold of the number of forwarding devices at each level, and presents the network topology flexibly and dynamically;
  • the network topology and link information can be displayed clearly;
  • the network topology map is dynamically refreshed or periodically refreshed according to forwarding equipment and its link information.
  • the applicable system may be a global system of mobile communication (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) general packet Wireless business (general packet radio service, GPRS) system, long term evolution (long term evolution, LTE) system, LTE frequency division duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex, TDD) system, Long term evolution advanced (LTE-A) system, universal mobile telecommunications system (UMTS), worldwide interoperability for microwave access (WiMAX) system, 5G new air interface (New Radio, NR) system, etc.
  • GSM global system of mobile communication
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • GPRS general packet Wireless business
  • long term evolution long term evolution
  • LTE long term evolution
  • LTE frequency division duplex frequency division duplex
  • FDD frequency division duplex
  • TDD time division duplex
  • LTE-A Long term evolution advanced
  • an embodiment of the present disclosure provides a network topology acquisition method, which is executed by a core network element, and the core network element is an application layer network element or a management plane network element, including:
  • Step S701 acquiring the forwarding information of multiple forwarding devices sent by the controller
  • the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link port numbers between the forwarding devices, the The working status of the forwarding device;
  • Step S702 perform hierarchical division according to the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtain hierarchical division information;
  • Step S703 Determine the network topology map according to the hierarchical division information.
  • the hierarchical division information is obtained, and then the network topology map is obtained, which can clearly show Network topology and network links.
  • step S702 is:
  • Step S7021 obtaining the complexity value of each forwarding device
  • Step S7022 perform hierarchical division according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and obtain the hierarchical division information.
  • step S7022 is:
  • the forwarding information According to the sorting of complexity values, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, divide the levels according to the second rule, and obtain the level division information;
  • the second rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the forwarding device with the highest complexity value is first selected as the first level of the network topology. If there are multiple forwarding devices with the same complexity value , then put these forwarding devices on the first level; then the forwarding devices connected to the first level forwarding devices and with the largest complexity value except the first level forwarding devices are taken as the second level, if there are multiple forwarding devices If the complexity of the devices is the same, these forwarding devices are all placed in the second level; and so on, the third level, the fourth level and other levels are divided according to the above method.
  • the second rule further includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the forwarding devices originally belonging to the same level need to be displayed on the same row, but if there are too many forwarding devices at the same level, so many forwarding devices cannot fit in the same row, you can Forwarding devices are displayed in multiple lines; or these forwarding devices can also be displayed in the same line, but some forwarding devices are displayed in the same position, which can be understood as node folding (that is, two or more When the forwarding devices are displayed in the network topology, the display positions of these forwarding devices will overlap), for example, using a certain point in the network topology diagram (for example, a circle, a square, etc., which are not limited to This) means two or more forwarding devices, that is, the folding of nodes is realized.
  • step S7021 The specific implementation of step S7021 is described below.
  • step S7021 may choose one of the following implementations:
  • Implementation mode 1 receiving the complexity value of each forwarding device sent by the controller;
  • the complexity value of each forwarding device the forwarding information, the complexity reduction criterion of the forwarding device, and the forwarding device at each level
  • the upper limit threshold of the number is divided into levels. Before obtaining the level division information, it also includes:
  • Receiving the action of calculating the complexity value for each forwarding device sent by the controller, the action of calculating the value of the complexity includes: updating the value of the complexity or generating the value of the complexity.
  • the action of calculating the complexity value corresponding to the third forwarding device is to update the complexity value, update the complexity value corresponding to the third forwarding device with the new complexity value;
  • the complexity value action corresponding to the third forwarding device is to generate a complexity value, then store the new complexity value of the third forwarding device;
  • the third forwarding device is any one of multiple forwarding devices.
  • the main implementation method for the controller to determine the complexity value action is:
  • the action of determining the complexity value is determined.
  • the action of determining the complexity value according to the complexity value of each forwarding device includes:
  • the complexity value of the target forwarding device If the complexity value of the target forwarding device is stored, then judge whether the acquired new complexity value of the target device is the same as the stored complexity value, if not, determine the complexity value as the update complexity value; if the complexity value of the target forwarding device is not stored, the action of determining the complexity value is to generate the complexity value.
  • the layer division is performed according to the complexity value of each forwarding device, the forwarding information, the complexity reduction criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and the obtained Hierarchy information, including:
  • a second timer is started, and the second timer is used to determine whether to update the hierarchical division information
  • the second timer expires and the network is in the state corresponding to the second situation, according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and each The upper limit threshold of the number of forwarding devices at the level is divided into levels, and the level division information is obtained;
  • the second situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the links between the forwarding devices are working abnormally.
  • timing duration of the second timer can be set according to actual operating conditions.
  • Implementation Mode 2 Determine the complexity value of each forwarding device according to the link information of the forwarding device
  • each forwarding device after obtaining the complexity value of each forwarding device, it also includes:
  • the fourth forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the fourth forwarding device with the stored complexity value;
  • the fourth forwarding device is any one of multiple forwarding devices.
  • the core network element needs to store the complexity value. If the core network element has already stored the complexity value for a certain forwarding device, the obtained new When the complexity value is different from the previous one, the stored complexity value needs to be updated.
  • the determining the complexity value of each forwarding device according to the link information of the forwarding device includes:
  • a third timer is started, and the third timer is used to judge whether to update the hierarchical division information
  • the third situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the links between the forwarding devices are working abnormally.
  • the core network element obtains the forwarding information of the forwarding equipment for the first time, it needs to be based on all The forwarding device in the working state determines the hierarchical division information; if the fifth forwarding device changes from the working state to the non-working state, delete the fifth forwarding device, that is, if the core network element has obtained the fifth forwarding device For the forwarding information of the device, if the fifth forwarding device is already in the working state, if the fifth forwarding device is no longer in the working state, delete the fifth forwarding device, that is, if the forwarding device is not in the working status, it is not necessary to reflect the node corresponding to the forwarding device in the hierarchical division information; or
  • the fifth forwarding device When the fifth forwarding device changes from the non-working state to the working state, then add the fifth forwarding device; further optionally, if the fifth forwarding device changes from the non-working state to the working state, and the fifth forwarding device and other forwarding devices If the device is not connected, then do not add the fifth forwarding device, if the fifth forwarding device changes from a non-working state to a working state, and the fifth forwarding device is connected to other forwarding devices, then add the fifth forwarding device; That is to say, if the fifth forwarding device is a forwarding device that has not been in the working state before, if the fifth forwarding device is in the working state and is connected to other forwarding devices, adding the fifth forwarding device, if the If the fifth forwarding device is in the working state and the fifth forwarding device is not connected to other forwarding devices, then the fifth forwarding device is not added, that is, the new forwarding device is in the working state and connected to other forwarding devices , then add it, and calculate the complexity value of the newly
  • the network element of the core network can also display the network topology map on the display interface.
  • the network topology map displayed by the element can display the current network status in real time, and usually the network elements of the core network need to refresh the network topology map dynamically or periodically.
  • the controller can refresh the network topology map every 1 second.
  • the shape of the forwarding device in the network topology diagram can be a dot, square, triangle, etc., and the size can be set as required.
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • the devices involved in this embodiment of the present application mainly include a controller (also called a network controller), at least one forwarding device (for example, a switch) connected to the controller, and the A core network element connected to the controller, the core network element may be an application layer network element (for example, it may be an application layer application service management function) or a management plane network element (for example, it may be a management platform).
  • a controller also called a network controller
  • at least one forwarding device for example, a switch
  • the core network element may be an application layer network element (for example, it may be an application layer application service management function) or a management plane network element (for example, it may be a management platform).
  • the complexity decreasing criterion of pre-configured forwarding devices on core network elements and the upper limit threshold of the number of forwarding devices at each level are divided into layers.
  • the complexity refers to The number of neighboring devices of the forwarding device. The more neighboring devices of the forwarding device, the higher the complexity.
  • the complexity value is used to represent the complexity.
  • the controller sends LLDP data packets to all forwarding devices connected to it through a packet-out message.
  • the specific implementation process in this case mainly includes:
  • Step 90 the forwarding device sends forwarding information to the controller
  • Step 91 the controller sends forwarding information
  • Step 92 the core network element saves the forwarding information reported by the controller, and responds to it;
  • this step is optional, and if there is no need for the network element of the core network to respond to this, this step 92 is ignored and does not need to be executed.
  • Step 93 the core network element calculates the complexity value of each forwarding device according to the reported forwarding information, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit threshold of the number of forwarding devices at each level, Generate hierarchical division information, and generate a network topology map.
  • the core network element calculates the complexity value of each forwarding device according to the reported forwarding information, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit threshold of the number of forwarding devices at each level, Generate hierarchical division information, and generate a network topology map.
  • the specific implementation process in this case mainly includes:
  • Step 100 the forwarding device sends forwarding information to the controller
  • Step 101 the controller sends forwarding information
  • Step 102 the core network element saves the forwarding information reported by the controller, and responds to it;
  • this step is optional, and if there is no need for the network element of the core network to respond to this, this step 102 is ignored and does not need to be executed.
  • Step 103 the core network element calculates the complexity value of each forwarding device according to the latest forwarding information reported, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit of the number of forwarding devices at each level Threshold, update the hierarchical division information, and update the network topology map.
  • the core network element calculates the complexity value of each forwarding device according to the latest forwarding information reported, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit of the number of forwarding devices at each level Threshold, update the hierarchical division information, and update the network topology map.
  • the controller calculates the value of complexity, and the core network element generates hierarchical division information and generates a topology map
  • the specific implementation process in this case mainly includes:
  • Step 111 the forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 112 the controller calculates the complexity value of each forwarding device according to the link information of the forwarding device.
  • Step 113 the controller sends the complexity value and the forwarding information to the network element of the core network.
  • Step 114 the core network element saves the complexity value and forwarding information reported by the controller, and responds to it.
  • Step 115 the core network element generates hierarchical division information according to the reported complexity value and forwarding information, according to the pre-configured decreasing complexity criterion of forwarding equipment and the upper threshold of the number of forwarding equipment at each level, and generates a network
  • the core network element For the specific implementation of the topology diagram, refer to (2) and (3) in step 42 in the above-mentioned specific application situation 1, and details are not repeated here.
  • the controller calculates the value of the complexity, the core network element updates the hierarchical division information, and updates the topology map
  • the specific implementation process in this case mainly includes:
  • Step 121 The forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 122 the controller calculates the complexity value of each forwarding device according to the link information of the forwarding device.
  • Step 123 the controller sends the complexity value and the forwarding information to the network element of the core network.
  • Step 124 the network element of the core network saves the complexity value and forwarding information reported by the controller, and responds to it.
  • Step 125 the controller updates the hierarchical division information and updates the network according to the latest reported complexity value and forwarding information, according to the pre-configured forwarding device complexity decreasing criterion and the upper threshold of the number of forwarding devices at each level.
  • the controller updates the hierarchical division information and updates the network according to the latest reported complexity value and forwarding information, according to the pre-configured forwarding device complexity decreasing criterion and the upper threshold of the number of forwarding devices at each level.
  • the controller calculates the complexity value and judges the complexity value.
  • the core network element generates hierarchical division information according to the benchmark and network topology information, and generates a topology map.
  • the specific implementation process in this case mainly includes:
  • Step 131 the forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 132 the controller calculates the complexity value of each forwarding device according to the link information of the forwarding device, and obtains a complexity value action;
  • the calculated complexity value is the initial complexity value, and the judgment result is: generate, that is, the complexity value action is to generate the complexity value;
  • Step 133 the controller reports a hierarchical division generation information report request message, the request message carries: complexity value, forwarding device information, complexity value action: generate, that is, the complexity value action is generate complexity value.
  • Step 134 the network element of the core network saves the generation information of the hierarchical division reported by the controller, and responds to it.
  • Step 135 the network element of the core network generates information according to the reported hierarchical division, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit threshold of the number of forwarding devices at each level, generates hierarchical division information, and generates a network topology map,
  • the network element of the core network generates information according to the reported hierarchical division, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit threshold of the number of forwarding devices at each level, generates hierarchical division information, and generates a network topology map,
  • the network element of the core network generates information according to the reported hierarchical division, according to the pre-configured forwarding device complexity decreasing criterion and the upper limit threshold of the number of forwarding devices at each level, generates hierarchical division information, and generates a network topology map,
  • the specific implementation process in this case mainly includes:
  • Step 141 the forwarding device reports an information request to the controller.
  • the information request carries the forwarding information of the forwarding device.
  • the forwarding information mainly includes: forwarding device ID, neighbor forwarding device ID, link information between forwarding devices, and link information. Port number, working status of the forwarding device, etc.
  • Step 142 the controller calculates the complexity value of each forwarding device according to the latest link information of the forwarding device, and performs an action on the complexity value;
  • the judgment result is: update, that is, the action of setting the value of the complexity is to update the value of the complexity;
  • Step 143 the controller reports a hierarchical division update information report request message, the request message carries: complexity value, forwarding device information, complexity value action: update, that is, the complexity value action is update complexity value.
  • Step 144 the network element of the core network saves the hierarchical division update information reported by the controller, and responds to it.
  • Step 145 the network element of the core network updates the hierarchical division information according to the reported hierarchical division update information, according to the pre-configured forwarding device complexity decreasing criterion and the upper threshold of the number of forwarding devices at each level, and updates the topology map, specifically Including the following process:
  • Core network elements are determined according to the timer to update the network topology map
  • the specific implementation process in this case mainly includes:
  • Step 150 the forwarding device sends forwarding information to the controller
  • Step 151 the controller sends forwarding information
  • Step 152 the core network element saves the forwarding information reported by the controller, and responds to it;
  • this step is optional, and if there is no need for the network element of the core network to respond to this, this step 152 is ignored and does not need to be executed.
  • Step 153 the network element of the core network determines that the forwarding device B is changed from the working state to the non-working state according to the latest forwarding information, and starts the timer. After the timer expires, the forwarding device B is still in the non-working state.
  • the network element of the core network determines that the forwarding device B is changed from the working state to the non-working state according to the latest forwarding information, and starts the timer. After the timer expires, the forwarding device B is still in the non-working state.
  • For each forwarding device Calculate the complexity value, update the layer division information, and update the network topology map according to the pre-configured decreasing complexity criterion of the forwarding device and the upper limit threshold of the number of forwarding devices at each level.
  • the specific implementation method please refer to the above (1), (2), (3), (4) and (5) in step 52 in the specific application situation 2 are not repeated here.
  • the core network element divides the equipment level according to the complexity decreasing criterion of forwarding equipment and the upper limit threshold of the number of forwarding equipment at each level, and flexibly and dynamically presents the network topology;
  • the network topology and link information can be displayed clearly;
  • the network topology map is dynamically refreshed or periodically refreshed according to forwarding equipment and its link information.
  • an embodiment of the present disclosure provides a network topology acquisition method, which is executed by a controller, including:
  • Step S1601 obtain forwarding information sent by multiple forwarding devices, the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information between the forwarding devices And the link port number, the working status of the forwarding device;
  • Step S1602 sending the forwarding information to the network element of the core network, so that the forwarding information of the network element of the core network, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level are divided into layers , obtain hierarchical division information, and determine the network topology map.
  • the method further includes:
  • the method further includes:
  • the complexity value action includes: update the complexity value or generate the complexity value
  • the action of determining the complexity value according to the complexity value of each forwarding device includes:
  • the complexity value of the target forwarding device If the complexity value of the target forwarding device is stored, then judge whether the acquired new complexity value of the target device is the same as the stored complexity value, if not, determine the complexity value as the update complexity value; if the complexity value of the target forwarding device is not stored, the action of determining the complexity value is to generate the complexity value.
  • controller side in the above embodiments are applicable to the embodiment of the network topology acquisition method applied to the controller side, and can also achieve the same technical effect.
  • an embodiment of the present disclosure provides an apparatus 1700 for obtaining a network topology, which is applied to a controller, including:
  • the first obtaining unit 1701 is configured to obtain forwarding information sent by multiple forwarding devices, where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, and The link information and the link port number, the working status of the forwarding device;
  • the second obtaining unit 1702 is configured to perform hierarchical division according to the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and acquire hierarchical division information;
  • the first determining unit 1703 is configured to determine the network topology map according to the hierarchical division information.
  • the second acquiring unit 1702 is configured to implement:
  • the second obtaining unit 1702 obtains the complexity value of each forwarding device according to the link information of the forwarding device, it further includes:
  • the first processing unit is configured to delete the first forwarding device when the first forwarding device changes from the working state to the non-working state;
  • the second processing unit is configured to add the first forwarding device when the first forwarding device changes from the non-working state to the working state;
  • the first forwarding device is any one of the multiple forwarding devices.
  • the second obtaining unit 1702 obtains the complexity value of each forwarding device according to the link information of the forwarding device, it further includes:
  • the first comparison unit is configured to compare the acquired new complexity value corresponding to the second forwarding device with the stored complexity value if the second forwarding device is an existing forwarding device;
  • the first updating unit is configured to update the complexity value corresponding to the second forwarding device with the new complexity value if the new complexity value is different from the stored complexity value;
  • the second forwarding device is any one of multiple forwarding devices.
  • the second obtaining unit 1702 obtains the complexity value of each forwarding device according to the link information of the forwarding device.
  • the specific implementation method is as follows:
  • a first timer is started, and the first timer is used to determine whether to update the hierarchical division information
  • the first situation includes at least one of the following:
  • the forwarding device in the working state is changed to a non-working state
  • the forwarding device in the non-working state is changed to the working state
  • the link between the forwarding devices works abnormally.
  • the second obtaining unit 1702 performs hierarchical division according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level , the specific implementation method of obtaining hierarchical division information is as follows:
  • the forwarding information perform hierarchical division according to the first rule, and obtain hierarchical division information
  • the first rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the first rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • this device embodiment is a device that corresponds one-to-one to the above-mentioned method embodiments, and all the implementation methods in the above-mentioned method embodiments are applicable to this device embodiment, and can also achieve the same technical effect.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a processor-readable storage medium.
  • the essence of the technical solution of this application or the part that contributes to the related technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • a processor processor
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • an embodiment of the present disclosure also provides a controller, including a processor 1800, a transceiver 1810, a memory 1820, and a program stored in the memory 1820 and operable on the processor 1800; wherein , the transceiver 1810 is connected to the processor 1800 and the memory 1820 through a bus interface, wherein the processor 1800 is used to read the program in the memory and execute the following process:
  • forwarding information sent by multiple forwarding devices where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link information between the forwarding devices Port number, working status of the forwarding device;
  • a network topology map is determined.
  • the transceiver 1810 is used for receiving and sending data under the control of the processor 1800 .
  • the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by the processor 1800 and various circuits of the memory represented by the memory 1820 are linked together.
  • the bus architecture can also link together various other circuits such as peripherals, voltage regulators, and power management circuits, etc., which are well known in the art and therefore will not be further described herein.
  • the bus interface provides the interface.
  • Transceiver 1810 may be a plurality of elements, including a transmitter and a receiver, providing a unit for communicating with various other devices over transmission media, including wireless channels, wired channels, optical cables, and other transmission media.
  • the processor 1800 is responsible for managing the bus architecture and general processing, and the memory 1820 can store data used by the processor 1800 when performing operations.
  • the processor 1800 can be a central processing unit (CPU), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or a complex programmable logic device (Complex Programmable Logic Device, CPLD), the processor can also adopt a multi-core architecture.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • FPGA field programmable gate array
  • CPLD Complex Programmable Logic Device
  • processor is configured to read the computer program in the memory and perform the following operations:
  • processor is configured to read the computer program in the memory and also perform the following operations:
  • the first forwarding device is any one of the multiple forwarding devices.
  • processor is configured to read the computer program in the memory and also perform the following operations:
  • the second forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the second forwarding device with the stored complexity value;
  • the second forwarding device is any one of multiple forwarding devices.
  • processor is configured to read the computer program in the memory to perform the following operations:
  • a first timer is started, and the first timer is used to determine whether to update the hierarchical division information
  • the first situation includes at least one of the following:
  • the forwarding device in the working state is changed to a non-working state
  • the forwarding device in the non-working state is changed to the working state
  • the link between the forwarding devices works abnormally.
  • processor is configured to read the computer program in the memory to perform the following operations:
  • the forwarding information perform hierarchical division according to the first rule, and obtain hierarchical division information
  • the first rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the first rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • An embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method for acquiring a network topology applied to a controller are implemented.
  • the processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic memory (such as floppy disk, hard disk, magnetic tape, magneto optical disk (Magneto Optical, MO), etc.), optical Storage (such as laser disc (Compact Disc, CD), digital video disc (Digital Video Disc, DVD), Blu-ray Disc (Blu-ray Disc, BD), high-definition universal disc (High-definition Versatile Disc, HVD), etc.), and Semiconductor memory (such as read-only memory (Read Only Memory, ROM), electrical program-controlled read-only memory (Electrical Programmable Read Only Memory, EPROM), electrically erasable programmable read-only memory (Electrically Eras
  • an embodiment of the present disclosure provides a network topology acquisition device 1900, which is applied to a core network element, and the core network element is an application layer network element or a management plane network element, including:
  • the third obtaining unit 1901 is configured to obtain forwarding information of multiple forwarding devices sent by the controller, where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, the Link information between forwarding devices, link port numbers, and working status of the forwarding devices;
  • the fourth obtaining unit 1902 is configured to perform hierarchical division according to the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, and acquire hierarchical division information;
  • the second determining unit 1903 is configured to determine the network topology map according to the hierarchical division information.
  • the fourth acquiring unit 1902 is specifically configured to:
  • the fourth obtaining unit 1902 obtains the complexity value of each forwarding device in a specific implementation manner as follows:
  • the fourth acquiring unit 1902 in the fourth acquiring unit 1902 according to the complexity value of each forwarding device, the The forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level are divided into levels, and before obtaining the level division information, it also includes:
  • the receiving unit is configured to receive a complexity value evaluation action for each forwarding device sent by the controller, where the complexity value evaluation action includes: updating a complexity value or generating a complexity value.
  • the device also includes:
  • the third processing unit is configured to use the new complexity value to perform an operation on the complexity value corresponding to the third forwarding device if the complexity value corresponding to the third forwarding device is to update the complexity value. update; or
  • the fourth processing unit is configured to store a new complexity value of the third forwarding device if the complexity value corresponding to the third forwarding device is to generate a complexity value;
  • the third forwarding device is any one of multiple forwarding devices.
  • the fourth acquiring unit 1902 according to the complexity value of each forwarding device, the forwarding Information, the complexity decreasing criterion of the forwarding device and the upper limit threshold of the number of forwarding devices at each level are divided into levels, and the specific implementation method of obtaining the level division information is as follows:
  • a second timer is started, and the second timer is used to determine whether to update the hierarchical division information
  • the second timer expires and the network is in the state corresponding to the second situation, according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and each The upper limit threshold of the number of forwarding devices at the level is divided into levels, and the level division information is obtained;
  • the second situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the fourth acquiring unit 1902 according to the link information of the forwarding device, the fourth acquiring unit 1902, according to the link information of the forwarding device, the specific implementation method for determining the complexity value of each forwarding device is:
  • a third timer is started, and the third timer is used to judge whether to update the hierarchical division information
  • the third situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the fourth acquiring unit 1902 acquires the complexity value of each forwarding device After the value, also include:
  • the second comparison unit is configured to compare the obtained new complexity value corresponding to the fourth forwarding device with the stored complexity value if the fourth forwarding device is an existing forwarding device;
  • the second updating unit is configured to use the new complexity value to update the complexity value corresponding to the fourth forwarding device if the new complexity value is different from the stored complexity value;
  • the fourth forwarding device is any one of multiple forwarding devices.
  • the fourth obtaining unit 1902 according to the complexity value of each forwarding device, the forwarding information, the complexity reduction criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level Before performing hierarchical division and obtaining hierarchical division information, it also includes:
  • the fifth processing unit is configured to delete the fifth forwarding device when the fifth forwarding device changes from the working state to the non-working state;
  • the sixth processing unit is configured to add the fifth forwarding device when the fifth forwarding device changes from the non-working state to the working state;
  • the fifth forwarding device is any one of multiple forwarding devices.
  • the fourth obtaining unit 1902 performs the calculation according to the complexity value of each forwarding device, the forwarding information, the complexity reduction criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level Hierarchical division, the specific implementation method of obtaining hierarchical division information is as follows:
  • the forwarding information According to the sorting of complexity values, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, divide the levels according to the second rule, and obtain the level division information;
  • the second rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the second rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • this device embodiment is a device that corresponds one-to-one to the above-mentioned method embodiments, and all the implementation methods in the above-mentioned method embodiments are applicable to this device embodiment, and can also achieve the same technical effect.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a processor-readable storage medium.
  • the essence of the technical solution of this application or the part that contributes to the related technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • a processor processor
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • An embodiment of the present disclosure also provides a core network element, the core network element is an application layer network element or a management plane network element, including a processor, a transceiver, a memory, and a A program running on the processor; wherein the transceiver is connected to the processor and the memory through a bus interface, wherein the processor is used to read the program in the memory and perform the following process:
  • the forwarding information includes: identification information of the forwarding devices, identification information of neighboring forwarding devices belonging to the forwarding devices, and link information between the forwarding devices And the link port number, the working status of the forwarding device;
  • a network topology map is determined.
  • Transceiver used to receive and transmit data under the control of the processor.
  • processor is configured to read the computer program in the memory and perform the following operations:
  • the level division is performed to obtain the level division information.
  • processor is configured to read the computer program in the memory and perform one of the following operations:
  • the processor configured to read the computer program in the memory, further performs the following operations:
  • Receiving the action of calculating the complexity value for each forwarding device sent by the controller, the action of calculating the value of the complexity includes: updating the value of the complexity or generating the value of the complexity.
  • processor is configured to read the computer program in the memory to perform the following operations:
  • the complexity value corresponding to the third forwarding device is to update the complexity value, using the new complexity value to update the complexity value corresponding to the third forwarding device;
  • the complexity value action corresponding to the third forwarding device is to generate a complexity value, storing a new complexity value of the third forwarding device;
  • the third forwarding device is any one of multiple forwarding devices.
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • a second timer is started, and the second timer is used to determine whether to update the hierarchical division information
  • the second timer expires and the network is in the state corresponding to the second situation, according to the complexity value of each forwarding device, the forwarding information, the complexity decreasing criterion of the forwarding device, and each The upper limit threshold of the number of forwarding devices at the level is divided into levels, and the level division information is obtained;
  • the second situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the processor is configured to read the computer program in the memory to execute the following operate:
  • a third timer is started, and the third timer is used to judge whether to update the hierarchical division information
  • the third situation includes at least one of the following:
  • the controller notifies the forwarding device in the working state to change to the non-working state
  • the controller notifies the forwarding device in the non-working state to change to the working state
  • the controller notifies that the link between the forwarding devices is working abnormally.
  • the processor is configured to read the computer program in the memory and execute Do the following:
  • the fourth forwarding device is an existing forwarding device, comparing the acquired new complexity value corresponding to the fourth forwarding device with the stored complexity value;
  • the fourth forwarding device is any one of multiple forwarding devices.
  • processor is configured to read the computer program in the memory and also perform the following operations:
  • the fifth forwarding device is any one of multiple forwarding devices.
  • processor is configured to read the computer program in the memory to perform the following operations:
  • the forwarding information According to the sorting of complexity values, the forwarding information, the complexity decreasing criterion of the forwarding device, and the upper limit threshold of the number of forwarding devices at each level, divide the levels according to the second rule, and obtain the level division information;
  • the second rule includes:
  • the forwarding device corresponding to the larger value of the complexity value of the adjacent sorting is taken as the upper level, and the forwarding device corresponding to the smaller value of the complexity value of the adjacent sorting is set as the next level.
  • the second rule also includes:
  • the forwarding devices with the same complexity value exceeds the upper limit threshold, display the forwarding devices with the same complexity value in multiple rows or forward at least two of the forwarding devices with the same complexity value Devices are shown in the same position in the row corresponding to their hierarchy.
  • the hierarchical division information includes:
  • the value of the complexity of forwarding devices the number of topology division layers, the number of forwarding devices in each layer, the identification information of forwarding devices in each layer, the link information between forwarding devices in the same layer, the working status information of forwarding devices in each layer, the The port number of the link of the forwarding device.
  • the core network element provided by the embodiment of the present disclosure can implement all the method steps implemented by the above method embodiment, and can achieve the same technical effect.
  • the same parts and beneficial effects of the embodiments are described in detail.
  • An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the steps of the network topology acquisition method applied to a network element of a core network are implemented.
  • the processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including but not limited to magnetic storage (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
  • magnetic storage e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
  • optical storage e.g., CD, DVD, BD, HVD, etc.
  • semiconductor memory such as ROM, EPROM,
  • an embodiment of the present disclosure provides a network topology acquisition apparatus 2000, which is applied to a controller, including:
  • the fifth acquiring unit 2001 is configured to acquire forwarding information sent by multiple forwarding devices, where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, and The link information and the link port number, the working status of the forwarding device;
  • the first sending unit 2002 is configured to send the forwarding information to a network element of the core network, so that the forwarding information of the network element of the core network, the complexity reduction criterion of the forwarding device, and the number of forwarding devices at each level
  • the upper threshold is used for hierarchical division, and the hierarchical division information is obtained to determine the network topology map.
  • the fifth obtaining unit 2001 obtains the forwarding information sent by multiple forwarding devices, it further includes:
  • a sixth obtaining unit configured to obtain the complexity value of each forwarding device according to the link information of the forwarding device
  • the second sending unit is configured to send the complexity value of each forwarding device to the network element of the core network.
  • the sixth obtaining unit obtains the complexity value of each forwarding device according to the link information of the forwarding device, it further includes:
  • the third determining unit is configured to determine a complexity value taking action according to the complexity value of each forwarding device, and the complexity value taking action includes: updating the complexity value or generating the complexity value;
  • a third sending unit configured to send the action of calculating the complexity value to the network element of the core network.
  • the third determining unit is specifically configured to:
  • the complexity value of the target forwarding device If the complexity value of the target forwarding device is stored, then judge whether the acquired new complexity value of the target device is the same as the stored complexity value, if not, determine the complexity value as the update complexity value; if the complexity value of the target forwarding device is not stored, the action of determining the complexity value is to generate the complexity value.
  • this device embodiment is a device that corresponds one-to-one to the above-mentioned method embodiments, and all the implementation methods in the above-mentioned method embodiments are applicable to this device embodiment, and can also achieve the same technical effect.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a processor-readable storage medium.
  • the essence of the technical solution of this application or the part that contributes to the related technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • a processor processor
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • An embodiment of the present disclosure also provides a controller, including a processor, a transceiver, a memory, and a program stored on the memory and operable on the processor; wherein, the transceiver communicates with the processor and the memory through a bus interface connected, wherein the processor is configured to read the program in the memory, perform the following process:
  • forwarding information sent by multiple forwarding devices where the forwarding information includes: identification information of the forwarding device, identification information of neighboring forwarding devices belonging to the forwarding device, link information and link information between the forwarding devices Port number, working status of the forwarding device;
  • Transceiver used to receive and transmit data under the control of the processor.
  • the processor configured to read the computer program in the memory, also performs the following operations:
  • the processor is configured to read the computer program in the memory and further perform the following operations: according to the complexity value of each forwarding device, determine the action of calculating the complexity value, the action of determining the value of the complexity Including: updating the complexity value or generating the complexity value;
  • the processor is configured to read the computer program in the memory to perform the following operations:
  • the complexity value of the target forwarding device If the complexity value of the target forwarding device is stored, then judge whether the acquired new complexity value of the target device is the same as the stored complexity value, if not, determine the complexity value as the update complexity value; if the complexity value of the target forwarding device is not stored, the action of determining the complexity value is to generate the complexity value.
  • An embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method for acquiring a network topology applied to a controller are implemented.
  • the processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) having computer-usable program code embodied therein.
  • processor-executable instructions may also be stored in a processor-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the processor-readable memory produce a manufacturing product, the instruction device realizes the functions specified in one or more procedures of the flow chart and/or one or more blocks of the block diagram.
  • processor-executable instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented
  • the executed instructions provide steps for implementing the functions specified in the procedure or procedures of the flowchart and/or the block or blocks of the block diagrams.
  • the division of the above modules is only a division of logical functions, and may be fully or partially integrated into a physical entity or physically separated during actual implementation.
  • these modules can all be implemented in the form of calling software through processing elements; they can also be implemented in the form of hardware; some modules can also be implemented in the form of calling software through processing elements, and some modules can be implemented in the form of hardware.
  • the determining module may be a separate processing element, or may be integrated into a certain chip of the above-mentioned device.
  • it may also be stored in the memory of the above-mentioned device in the form of program code, and a certain processing element of the above-mentioned device may Call and execute the functions of the modules identified above.
  • each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • each module, unit, subunit or submodule may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or Multiple microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processors that can call program codes.
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开提供了一种网络拓扑获取方法、装置、控制器及核心网网元,涉及通信技术领域。该方法,由控制器执行,包括:获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;根据所述转发信息、所述转发设备的复杂度递减准则以及层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;根据所述层级划分信息,确定网络拓扑图。

Description

网络拓扑获取方法、装置、控制器及核心网网元
相关申请的交叉引用
本申请主张在2021年12月02日在中国提交的中国专利申请No.202111459203.3的优先权,其全部内容通过引用包含于此。
技术领域
本公开涉及通信技术领域,特别涉及一种网络拓扑获取方法、装置、控制器及核心网网元。
背景技术
相关技术的通信网络中,网络拓扑呈现的方法多种多样,其对管理员掌握全局网络以及相关信息有着巨大的影响。例如,基于平铺的方法,每行放置相同的设备数量、设备之间设定相同的距离来呈现网络拓扑。虽然采用平铺法也呈现出了网络拓扑,但由于设备数量不定、网络设备之间的链路复杂度不定、网络设备之间的链路关系不同,造成了拓扑呈现错乱、链路信息识别较困难、难以理解。虽然其它方法解决了平铺法网络拓扑形状摆放单一、不灵活的缺点,但依然存在网络设备之间链路关系错乱、链路信息难以识别等问题。
发明内容
本公开实施例提供一种网络拓扑获取方法、装置、控制器及核心网网元,以解决相关技术中网络拓扑呈现方式造成网络设备之间链路关系错乱、链路信息难以识别的问题。
为了解决上述技术问题,本公开实施例提供一种网络拓扑获取方法,由控制器执行,包括:
获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
可选地,所述根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,在所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之前,还包括:
在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
其中,所述第一转发设备为所述多个转发设备中的任一个。
可选地,在所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之后,还包括:
若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
其中,所述第二转发设备为多个转发设备中的任一个。
可选地,所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值,包括:
若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据 所述转发设备的链路信息,获取每个转发设备的复杂度取值;
其中,所述第一情况,包括以下至少一项:
处于工作状态的转发设备变更为非工作状态;
处于非工作状态的转发设备变更为工作状态;
转发设备之间的链路工作异常。
可选地,所述根据每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
其中,所述第一规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第一规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
可选地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
本公开实施例还提供一种网络拓扑获取方法,由核心网网元执行,所述核心网网元为应用层网元或管理面网元,包括:
获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转 发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
可选地,所述根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,所述获取每个转发设备的复杂度取值,包括:
接收所述控制器发送的所述每个转发设备的复杂度取值;或
根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,在所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
可选地,所述方法,还包括:
若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储新的所述第三转发设备的复杂度取值;
其中,所述第三转发设备为多个转发设备中的任一个。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
在确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是 否更新层级划分信息;
若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
其中,所述第二情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述根据所述转发设备的链路信息,确定每个转发设备的复杂度取值,包括:
在确定出现第三情况,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
其中,所述第三情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,在所述获取每个转发设备的复杂度取值之后,还包括:
若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
其中,所述第四转发设备为多个转发设备中的任一个。
可选地,在所述根据所述每个转发设备的复杂度取值、所述转发信息、 所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
在第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备;或者
在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;
其中,所述第五转发设备为多个转发设备中的任一个。
可选地,所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
其中,所述第二规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第二规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
可选地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
本公开实施例还提供一种控制器,包括存储器,收发机,处理器:
存储器,用于存储计算机程序;收发机,用于在所述处理器的控制下收发数据;处理器,用于读取所述存储器中的计算机程序并执行以下操作:
获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备 的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
可选地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
其中,所述第一转发设备为所述多个转发设备中的任一个。
可选地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
其中,所述第二转发设备为多个转发设备中的任一个。
可选地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
其中,所述第一情况,包括以下至少一项:
处于工作状态的转发设备变更为非工作状态;
处于非工作状态的转发设备变更为工作状态;
转发设备之间的链路工作异常。
可选地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
其中,所述第一规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第一规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
本公开实施例还提供一种核心网网元,所述核心网网元为应用层网元或管理面网元,包括存储器,收发机,处理器:
存储器,用于存储计算机程序;收发机,用于在所述处理器的控制下收发数据;处理器,用于读取所述存储器中的计算机程序并执行以下操作:
获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
可选地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作:
获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作中的一项:
接收所述控制器发送的所述每个转发设备的复杂度取值;或
根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
可选地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储新的所述第三转发设备的复杂度取值;
其中,所述第三转发设备为多个转发设备中的任一个。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
在确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是否更新层级划分信息;
若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
其中,所述第二情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
在确定出现第三情况,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
其中,所述第三情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
其中,所述第四转发设备为多个转发设备中的任一个。
可选地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
在第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备;或者
在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;
其中,所述第五转发设备为多个转发设备中的任一个。
可选地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
其中,所述第二规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第二规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
本公开实施例还提供一种网络拓扑获取装置,应用于控制器,包括:
第一获取单元,用于获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
第二获取单元,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
第一确定单元,用于根据所述层级划分信息,确定网络拓扑图。
本公开实施例还提供一种网络拓扑获取装置,应用于核心网网元,所述核心网网元为应用层网元或管理面网元,包括:
第三获取单元,用于获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
第四获取单元,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
第二确定单元,用于根据所述层级划分信息,确定网络拓扑图。
本公开实施例还提供一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使所述处理器执行上述的方法。
本公开的有益效果是:
上述方案,通过依据转发设备的转发信息、转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,进行层级划分信息的获取,进而获取网络拓扑图,能够根据转发设备的链路状况对网络拓扑进行调整且清晰明了的展现网络拓扑图。
附图说明
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1表示LLDP工作流程图;
图2表示本公开实施例的应用于控制器的网络拓扑获取方法的流程示意图之一;
图3表示具体应用情况一的架构图;
图4表示具体应用情况一的流程示意图;
图5表示具体应用情况二的流程示意图;
图6表示具体应用情况三的流程示意图;
图7表示本公开实施例的应用于核心网网元的网络拓扑获取方法的流程示意图;
图8表示具体应用情况四的架构图;
图9表示具体应用情况四的流程示意图;
图10表示具体应用情况五的流程示意图;
图11表示具体应用情况六的流程示意图;
图12表示具体应用情况七的流程示意图;
图13表示具体应用情况八的流程示意图;
图14表示具体应用情况九的流程示意图;
图15表示具体应用情况十的流程示意图;
图16表示本公开实施例的应用于控制器的网络拓扑获取方法的流程示意图之二;
图17表示本公开实施例的网络拓扑获取装置的单元示意图之一;
图18表示本申请实施例的控制器的结构图;
图19表示本公开实施例的网络拓扑获取装置的单元示意图之二;
图20表示本公开实施例的网络拓扑获取装置的单元示意图之三。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例,例如除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例中术语“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关 系。本申请实施例中术语“多个”是指两个或两个以上,其它量词与之类似。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
下面结合附图介绍本申请的实施例。本申请实施例提供的网络拓扑获取方法、装置、控制器及核心网网元可以应用于无线通信系统中。该无线通信系统可以为采用第五代(5th Generation,5G)移动通信技术的系统(以下均简称为5G系统),所述领域技术人员可以了解,5G新空口(New Radio,NR)系统仅为示例,不为限制。
首先对与本公开实施例相关的一些概念进行说明如下。
软件定义网络(Software-defined networking,SDN)是一种新的网络架构,其主要思想是控制平面和转发平面的分离、网络资源集中控制和调度以及开放的可编程能力。SDN主要分为三层体系结构:应用层(Application Layer)、控制层(Control Layer)以及基础设施层(Infrastructure Layer)。
在SDN域,控制器使用链路层发现协议(Link Layer Discovery Protocol,LLDP)实现链路检测。LLDP是链路层发现协议,是一种数据链路层协议,网络设备可以通过在本地网络中发送链路层发现协议协议数据单元(Link Layer Discovery Protocol Data Unit,LLDPDU)来通告其他设备自身的状态,是一种能够使网络中的设备互相发现并通告状态、交互信息的协议。
在ODL中,发送LLDP帧的工作由控制器来完成,如图1所示,在图1中,LLDP帧在控制器中生成,通过openflow协议发出数据包(packet_out)消息发给交换机1,交换机1收到来自控制器的LLDP帧后,会转发给直邻交换机2,其直邻交换机2收到LLDP帧后,通过openflow协议的收入数据包(packet_in)消息发给控制器,控制器据此做链路检测。其中,openflow协议是一种网络通信协议。
目前网络系统中通过收集设备及链路信息,使用平铺法、圆环均匀分布法、随机分布法、同心圆分布法等呈现网络拓扑。
1)平铺法:每行设置相同网络节点数量、节点之间相同间距,根据节点 之间的链路信息呈现网络拓扑。
2)圆环均匀分布法:所有的节点在一个圆环上均匀分布,根据节点之间的链路信息呈现网络拓扑。
3)随机分布法:根据预先设置界面大小,节点在界面中随机分布,根据节点之间的链路信息呈现网络拓扑。
4)同心圆分布法:所有的节点在同心圆上分布,根据节点之间的链路信息呈现网络拓扑。
目前,相关技术一定程度上实现了网络拓扑的呈现,可依然存在相关问题:
1.链路信息杂乱,不能根据链路关系对拓扑呈现进行调整。
2.结构感较差,不能清晰明了的展现拓扑。
3.当链路信息发生变化时,需要手动刷新才能呈现新的拓扑图。
本申请实施例提供了网络拓扑获取方法、装置、控制器及核心网网元,用以解决相关技术的网络拓扑呈现方式造成网络设备之间链路关系错乱、链路信息难以识别的问题。
其中,方法和装置是基于同一申请构思的,由于方法和装置解决问题的原理相似,因此装置和方法的实施可以相互参见,重复之处不再赘述。
如图2所示,本公开实施例提供一种网络拓扑获取方法,由控制器执行,包括:
步骤S201,获取多个转发设备发送的转发信息;
需要说明的是,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
步骤S202,根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
需要说明的是,该转发设备的复杂度递减准则指的是在进行层级划分时,按照复杂度由大到小的顺序依次进行层级的划分。
该每个层级的转发设备的数量上限阈值用于限制属于同一层级的转发设备的数量的上限,其表示一个层级上允许放置的转发设备的最大个数。
步骤S203,根据所述层级划分信息,确定网络拓扑图。
需要说明的是,通过依据转发设备的转发信息以及转发设备的复杂度递减准则以及层级的转发设备的数量上限阈值,进行层级划分信息的获取,进而获取网络拓扑图,能够清晰明了的展现网络拓扑图及网络链路情况。
具体地,所述步骤S202的一种可选地实现方式为:
步骤S2021,根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
步骤S2022,根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
进一步需要说明的是,步骤S2022的可选实现方式为:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
需要说明的是,所述第一规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
也就是说,在获取层级划分信息时是根据转发设备的复杂度取值,先选复杂度取值最大的转发设备作为网络拓扑的第一层级,若有多个转发设备的复杂度取值相同,则将这些转发设备均放在第一层级;然后将与第一层级转发设备相连、且除了第一层转发设备外的复杂度取值最大的转发设备作为第二层级,若存在多个转发设备的复杂度取值相同,则这些转发设备均放在第二层级;依此类推,第三层级、第四层级等其他层级均按照上面的方式进行划分。
这里还需要说明的是,因受限于层级的转发设备的数量上限阈值,若在某一个层级划分过程中,若复杂度取值相同的转发设备的数量超过所述数量上限阈值,则需要对此种情况进行处理,可选地,所述第一规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复 杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
需要说明的是,原本属于同一层级的转发设备是需要放在同一行显示的,但是若同一层级的转发设备的数量过多,同一行放不下这么多的转发设备,则可以将该层级下的转发设备显示在多行中;或者是也可以将这些转发设备显示在同一行,只不过是将某些转发设备显示在相同的位置,可以理解为进行节点折叠(即将两个及两个以上的转发设备在网络拓扑中显示时,这些转发设备的显示位置会重叠在一起)。
进一步需要说明的是,在获取到转发设备的复杂度取值之后,若控制器存储有至少一个转发设备的复杂度取值,则若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
其中,所述第二转发设备为多个转发设备中的任一个。
也就是说,控制器在得到复杂度取值之后,需要对复杂度取值进行存储,若控制器对某一个转发设备已经进行复杂度取值的存储,则在获取的新的复杂度取值与之前的不一样时,需要对存储的复杂度取值进行更新。
可选地,还需要说明的是,为了防止转发设备状态因上电原因时上线时下线、转发设备之间的链路因为物理原因时断时续或其它原因出现的异常现象,本申请的另一实施例中,所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值,包括:
若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
其中,所述第一情况,包括以下至少一项:
A11、处于工作状态的转发设备变更为非工作状态;
A12、处于非工作状态的转发设备变更为工作状态;
A13、转发设备之间的链路工作异常。
这里需要说明的是,第一定时器的定时时长可根据实际操作情况进行设定。
通过设置定时器,能够避免设备因频繁的状态切换,造成更新的网络拓扑图不准确的问题出现。
可选地,在所述根据所述层级划分信息,确定网络拓扑图之后,控制器还可以向所述转发设备发送响应消息,所述响应消息用于指示所述控制器已根据所述转发信息进行网络拓扑图的确定,需要说明的是,发送响应消息的过程是在非SDN域进行的,而对于SDN域,控制器收到转发设备的转发信息生成网络拓扑图以后,不会再对转发设备发送响应消息。
还需要说明的是,在进行复杂度取值获取之前,需要先确定获取复杂度取值的转发设备,通常情况下,若是控制器第一次获取到转发设备的转发信息,则需要获取所有处于工作状态的转发设备的复杂度取值;若第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备,也就是说,若是控制器已经获取过第一转发设备的转发信息,在第一转发设备为之前处于工作状态的转发设备的情况下,若所述第一转发设备不再处于工作状态,则删除所述第一转发设备,即若转发设备不处于工作状态,则不需要在层级划分信息中体现该转发设备对应的节点;或者
第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;进一步可选地,若第一转发设备由非工作状态变更为工作状态、且第一转发设备与其他转发设备没有连接,则不添加所述第一转发设备,若第一转发设备由非工作状态变更为工作状态、且第一转发设备与其他转发设备有连接,则添加所述第一转发设备;也就是说,在第一转发设备为之前未处于工作状态的转发设备的情况下,若所述第一转发设备处于工作状态、且与其他转发设备有连接,添加所述第一转发设备,若所述第一转发设备处于工作状态、且所述第一转发设备与其他转发设备无连接,则不添加所述第一转发设备,即,新出现的转发设备处于工作状态、其与其他转发设备连接,则将其添加,同时计算新添加的转发设备的复杂度取值,若是新出现的转发设备虽然处于工作状态、但此转发设备与其他转发设备无连接,则不做操作,即不添加该 转发设备。
进一步还需要说明的是,在所述根据所述层级划分信息,确定网络拓扑图之后,控制器还可以在显示界面上显示所述网络拓扑图,进一步需要说明的是为了保证控制器所显示的网络拓扑图能实时展示当前的网络状态,通常控制器需要动态刷新或周期性刷新所述网络拓扑图。
例如,控制器可以每1秒刷新一次网络拓扑图。
还需要说明的是,网络拓扑图中的转发设备的形状可以是圆点、方块、三角等,大小可以根据需要设置。
需要说明的是,本申请实施例所说的层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
下面对本申请的具体应用举例说如下。
如图3所示,本申请实施例中涉及的设备主要包括控制器(也可以称为网络控制器)以及与所述控制器连接的至少一个转发设备(例如,可以为交换机)。
首先需要说明的是,为了保证本申请的顺利实施,在控制器预配置转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,具体地,复杂度是指转发设备的邻居设备的数量,转发设备的邻居设备越多,则复杂度越高,本申请中采用复杂度取值进行复杂度的表示。
还需要说明的是,对于SDN域,控制器通过一个packet-out消息向所有与之连接的转发设备发送LLDP数据包。
具体应用情况一、控制器生成层级划分信息并生成网络拓扑图
具体的,如图4所示,此情况下的具体实现过程主要包括:
步骤41,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤42,控制器根据上报的转发信息,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发 设备的数量上限阈值,生成层次划分信息,并生成网络拓扑图,主要包括下述过程:
(1)依据转发设备的链路信息,计算每个转发设备的复杂度取值;
(2)根据转发设备的复杂度取值,进行层级划分;
层级划分的主要实现方式为:根据转发设备的复杂度取值,选复杂度取值最大的转发设备作为网络拓扑的第一层级,若有多个转发设备的复杂度取值相同,则将这些转发设备均放在第一层级;与第一层级转发设备相连、且除了第一层转发设备外的复杂度取值最大的转发设备作为第二层级,若存在多个转发设备的复杂度取值相同,则这些转发设备均放在第二层级;第三层级、第四层级等其他层级均按照上面的方式进行划分;
需要说明的是,上述层级划分过程中,若同一层级的转发设备的数量超过上限阈值,则进行二次拆分,其中拆分的依据包括把超过上限数量的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置;以避免出现链路连线交叉、错乱。
(3)生成层级划分信息并保存,而后依据生成的层级划分信息生成网络拓扑图;
层级划分信息包括:转发设备的复杂度取值、拓扑划分层数、每层数转发设备的数量、每层转发设备标识符(Identifier,ID)、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号等。
这里需要说明的是,网络拓扑图中的转发设备的形状可以是圆点、方块、三角等,大小可以根据需要设置。同时,拓扑图是动态刷新或周期性刷新(例:每1秒刷新一次)。
步骤43,控制器生成网络拓扑图后,发送响应消息到转发设备。
需要说明的是,该步骤是可选地,对于SDN域,控制器收到转发设备的相关信息生成拓扑图以后,不会再对转发设备做出上报响应,则此步骤43忽略,不用执行。
具体应用情况二、控制器更新层级划分信息,并更新网络拓扑图
具体的,如图5所示,此情况下的具体实现过程主要包括:
步骤51,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤52,控制器根据上报的最新的转发信息,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新网络拓扑图,主要包括下述过程:
(1)依据最新的转发设备的链路信息和工作状态,计算每个转发设备的复杂度取值;
(2)对于每个转发设备,对新计算的复杂度取值与此前的复杂度取值做比较,若复杂度取值未改变,则不做任何操作,即不需要更新;若复杂度取值发生变化,则更新其复杂度取值;
(3)若转发设备不处于工作状态,则删除其节点;若是新出现的转发设备且处于工作状态,则添加其信息,包括复杂度取值的计算;若是新出现的转发设备且处于工作状态,但此转发设备与其他设备无连接,则不做操作;
(4)根据转发设备的复杂度取值,依据预配置的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值更新层级划分信息,具体地层级划分的主要实现方式可参见具体应用情况一中的步骤42中的(2),在此不再赘述。
(5)生成更新后的层级划分信息并保存,而后依据更新后的层级划分信息更新网络拓扑图。
具体地,层级划分信息所包含的内容可参见具体应用情况一中的限定,在此不再赘述。
步骤53,控制器生成网络拓扑图后,发送响应消息到转发设备。
需要说明的是,该步骤是可选地,对于SDN域,控制器收到转发设备的相关信息生成拓扑图以后,不会再对转发设备做出上报响应,则此步骤53忽略,不用执行。
具体应用情况三、控制器依据定时器确定进行网络拓扑图更新
具体的,如图6所示,此情况下的具体实现过程主要包括:
步骤61,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤62,控制器根据上报的最新的转发信息,确定转发设备A由工作状态变更为非工作状态,启动定时器,在定时器超时后,转发设备A仍然为非工作状态,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新网络拓扑图,具体地实现过程可参见具体应用情况二中的步骤52,在此不再赘述。
步骤63,控制器生成网络拓扑图后,发送响应消息到转发设备。
需要说明的是,该步骤是可选地,对于SDN域,控制器收到转发设备的相关信息生成拓扑图以后,不会再对转发设备做出上报响应,则此步骤63忽略,不用执行。
需要说明的是,本申请实施例能够达到如下有益效果:
1、依据链路信息由控制器依据转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值划分设备层级,灵活动态的呈现网络拓扑;
2、根据层级划分信息可清晰明了的展现网络拓扑图及链路信息;
3、网络拓扑图是根据转发设备及其链路信息动态刷新或周期性刷新。
本申请实施例提供的技术方案可以适用于多种系统,尤其是5G系统。例如适用的系统可以是全球移动通讯(global system of mobile communication,GSM)系统、码分多址(code division multiple access,CDMA)系统、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)通用分组无线业务(general packet radio service,GPRS)系统、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)系统、高级长期演进(long term evolution advanced,LTE-A)系统、通用移动系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)系统、5G新空口(New Radio,NR)系统等。这多种系统中均包括终端设备和网络设备。系统中还可以包括核心网部分,例如演进的 分组系统(Evolved Packet System,EPS)、5G系统(5G System,5GS)等。
如图7所示,本公开实施例提供一种网络拓扑获取方法,由核心网网元执行,所述核心网网元为应用层网元或管理面网元,包括:
步骤S701,获取控制器发送的多个转发设备的转发信息;
需要说明的是,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
步骤S702,根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
步骤S703,根据所述层级划分信息,确定网络拓扑图。
需要说明的是,通过依据转发设备的转发信息、转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,进行层级划分信息的获取,进而获取网络拓扑图,能够清晰明了的展现网络拓扑图及网络链路情况。
具体地,所述步骤S702的一种可选地实现方式为:
步骤S7021,获取每个转发设备的复杂度取值;
步骤S7022,根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
进一步需要说明的是,步骤S7022的可选实现方式为:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
其中,所述第二规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
也就是说,在获取层级划分信息时是根据转发设备的复杂度取值,先选复杂度取值最大的转发设备作为网络拓扑的第一层级,若有多个转发设备的复杂度取值相同,则将这些转发设备均放在第一层级;然后将与第一层级转 发设备相连、且除了第一层转发设备外的复杂度取值最大的转发设备作为第二层级,若存在多个转发设备的复杂度相同,则这些转发设备均放在第二层级;依此类推,第三层级、第四层级等其他层级均按照上面的方式进行划分。
这里还需要说明的是,因受限于层级的转发设备的数量上限阈值,若在某一个层级划分过程中,若复杂度取值相同的转发设备的数量超过所述数量上限阈值,则需要对此种情况进行处理,可选地,所述第二规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
需要说明的是,原本属于同一层级的转发设备是需要放在同一行显示的,但是若同一层级的转发设备的数量过多,同一行放不下这么多的转发设备,则可以将该层级下的转发设备显示在多行中;或者是也可以将这些转发设备显示在同一行,只不过是将某些转发设备显示在相同的位置,可以理解为进行节点折叠(即将两个及两个以上的转发设备在网络拓扑中显示时,这些转发设备的显示位置会重叠在一起),示例性地,比如采用网络拓扑图中的某个点(例如,圆形、正方形等,此处并不局限于此)表示两个或更多个转发设备,即实现了节点的折叠。
下面对步骤S7021的具体实现进行说明如下。
可选地,步骤S7021可以从如下实现方式中任选一项:
实现方式一、接收所述控制器发送的每个转发设备的复杂度取值;
需要说明的是,在此种实现方式下,在所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
进一步地,若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储 新的所述第三转发设备的复杂度取值;
其中,所述第三转发设备为多个转发设备中的任一个。
可选地,控制器确定复杂度取值动作的主要实现方式为:
根据每个转发设备的复杂度取值,确定复杂度取值动作。
可选地,所述根据每个转发设备的复杂度取值,确定复杂度取值动作,包括:
判断是否存储有目标转发设备的复杂度取值;
若存储有目标转发设备的复杂度取值,则判断获取的目标设备的新的复杂度取值与存储的复杂度取值是否相同,若不相同,则确定复杂度取值动作为更新复杂度取值;若未存储有目标转发设备的复杂度取值,则确定复杂度取值动作为生成复杂度取值。
可选地,还需要说明的是,为了防止转发设备状态因上电原因时上线时下线、转发设备之间的链路因为物理原因时断时续或其它原因出现的异常现象,本申请的另一实施例中,所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
若确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是否更新层级划分信息;
若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
其中,所述第二情况包括以下至少一项:
B11、所述控制器通知处于工作状态的转发设备变更为非工作状态;
B12、所述控制器通知处于非工作状态的转发设备变更为工作状态;
B13、所述控制器通知转发设备之间的链路工作异常。
这里需要说明的是,第二定时器的定时时长可根据实际操作情况进行设定。
通过设置定时器,能够避免设备因频繁的状态切换,造成更新的网络拓 扑图不准确的问题出现。
实现方式二、根据所述转发设备的链路信息,确定每个转发设备的复杂度取值
需要说明的是,在此种实现方式下,在所述获取每个转发设备的复杂度取值之后,还包括:
若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
其中,所述第四转发设备为多个转发设备中的任一个。
也就是说,核心网网元在得到复杂度取值之后,需要对复杂度取值进行存储,若核心网网元对某一个转发设备已经进行复杂度取值的存储,则在获取的新的复杂度取值与之前的不一样时,需要对存储的复杂度取值进行更新。
可选地,还需要说明的是,为了防止转发设备状态因上电原因时上线时下线、转发设备之间的链路因为物理原因时断时续或其它原因出现的异常现象,本申请的另一实施例中,所述根据所述转发设备的链路信息,确定每个转发设备的复杂度取值,包括:
在确定出现第三情况时,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
其中,所述第三情况包括以下至少一项:
C11、所述控制器通知处于工作状态的转发设备变更为非工作状态;
C12、所述控制器通知处于非工作状态的转发设备变更为工作状态;
C13、所述控制器通知转发设备之间的链路工作异常。
通过设置定时器,能够避免设备因频繁的状态切换,造成更新的网络拓扑图不准确的问题出现。
还需要说明的是,在进行层级划分信息获取之前,需要先确定参与层级划分信息的转发设备,通常情况下,若是核心网网元第一次获取到转发设备 的转发信息,则需要依据所有处于工作状态的转发设备进行层级划分信息的确定;若第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备,也就是说,若是核心网网元已经获取过第五转发设备的转发信息,在第五转发设备为已经处于工作状态的转发设备的情况下,若所述第五转发设备不再处于工作状态,则删除所述第五转发设备,即若转发设备不处于工作状态,则不需要在层级划分信息中体现该转发设备对应的节点;或者
在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;进一步可选地,若第五转发设备由非工作状态变更为工作状态、且第五转发设备与其他转发设备没有连接,则不添加所述第五转发设备,若第五转发设备由非工作状态变更为工作状态、且第五转发设备与其他转发设备有连接,则添加所述第五转发设备;也就是说,在第五转发设备为之前未处于工作状态的转发设备的情况下,若所述第五转发设备处于工作状态、且与其他转发设备有连接,添加所述第五转发设备,若所述第五转发设备处于工作状态、且所述第五转发设备与其他转发设备无连接,则不添加所述第五转发设备,即,新出现的转发设备处于工作状态、其与其他转发设备连接,则将其添加,同时计算新添加的转发设备的复杂度取值,若是新出现的转发设备虽然处于工作状态、但此转发设备与其他转发设备无连接,则不做操作,即不添加该转发设备。
进一步还需要说明的是,在所述根据所述层级划分信息,确定网络拓扑图之后,核心网网元还可以在显示界面上显示所述网络拓扑图,进一步需要说明的是为了保证核心网网元所显示的网络拓扑图能实时展示当前的网络状态,通常核心网网元需要动态刷新或周期性刷新所述网络拓扑图。
例如,控制器可以每1秒刷新一次网络拓扑图。
还需要说明的是,网络拓扑图中的转发设备的形状可以是圆点、方块、三角等,大小可以根据需要设置。
需要说明的是,本申请实施例所说的层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
下面对本申请的具体应用举例说如下。
如图8所示,本申请实施例中涉及的设备主要包括控制器(也可以称为网络控制器)、与所述控制器连接的至少一个转发设备(例如,可以为交换机)以及与所述控制器连接的核心网网元,该核心网网元可以为应用层网元(例如可以为应用层应用服务管理功能)或管理面网元(例如,可以为管理平台)。
首先需要说明的是,为了保证本申请的顺利实施,在核心网网元预配置转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,具体地,复杂度是指转发设备的邻居设备的数量,转发设备的邻居设备越多,则复杂度越高,本申请中采用复杂度取值进行复杂度的表示。
还需要说明的是,对于SDN域,控制器通过一个packet-out消息向所有与之连接的转发设备发送LLDP数据包。
具体应用情况四、核心网网元生成层级划分信息并生成拓扑图
具体的,如图9所示,此情况下的具体实现过程主要包括:
步骤90,转发设备发送转发信息给控制器;
步骤91,控制器进行转发信息的发送;
步骤92,核心网网元保存控制器上报的转发信息,并对此做出响应;
需要说明的是,此步骤为可选步骤,若无需在核心网网元对此做出响应,此步骤92忽略,不用执行。
步骤93,核心网网元根据上报的转发信息,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,生成层次划分信息,并生成网络拓扑图,具体地实现方式可参见上述的具体应用情况一中的步骤42,在此不再赘述。
具体应用情况五、核心网网元更新层级划分信息,并更新拓扑图
具体的,如图10所示,此情况下的具体实现过程主要包括:
步骤100,转发设备发送转发信息给控制器;
步骤101,控制器进行转发信息的发送;
步骤102,核心网网元保存控制器上报的转发信息,并对此做出响应;
需要说明的是,此步骤为可选步骤,若无需在核心网网元对此做出响应,此步骤102忽略,不用执行。
步骤103,核心网网元根据上报的最新的转发信息,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新网络拓扑图,具体地实现方式可参见上述的具体应用情况二中的步骤52,在此不再赘述。
具体应用情况六、控制器计算复杂度取值,核心网网元生成层级划分信息,并生成拓扑图
具体的,如图11所示,此情况下的具体实现过程主要包括:
步骤111,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤112,控制器依据转发设备的链路信息,计算每个转发设备的复杂度取值。
步骤113,控制器把复杂度取值和转发信息发送给核心网网元。
步骤114,核心网网元保存控制器上报的复杂度取值和转发信息,并对此做出响应。
步骤115,核心网网元根据上报的复杂度取值和转发信息,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,生成层次划分信息,并生成网络拓扑图,具体地实现方式可参见上述的具体应用情况一中的步骤42中的(2)和(3),在此不再赘述。
具体应用情况七、控制器计算复杂度取值,核心网网元更新层级划分信息,并更新拓扑图
具体的,如图12所示,此情况下的具体实现过程主要包括:
步骤121,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤122,控制器依据转发设备的链路信息,计算每个转发设备的复杂度取值。
步骤123,控制器把复杂度取值和转发信息发送给核心网网元。
步骤124,核心网网元保存控制器上报的复杂度取值和转发信息,并对 此做出响应。
步骤125,控制器根据上报的最新的复杂度取值和转发信息,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新网络拓扑图,具体地实现方式可参见上述的具体应用情况二中的步骤52中的(2)、(3)、(4)和(5),在此不再赘述。
具体应用情况八、控制器计算复杂度取值,并对复杂度取值进行判断,核心网网元根据基准、网络拓扑信息生成层级划分信息,生成拓扑图
具体的,如图13所示,此情况下的具体实现过程主要包括:
步骤131,转发设备上报信息请求给控制器,所述信息请求中携带转发设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤132,控制器依据转发设备的链路信息,计算每个转发设备的复杂度取值,并获取复杂度取值动作;
具体地,首先,把新计算的复杂度取值与此前的复杂度取值做比较;
然后,若发现控制器中无复杂度取值,则此次计算的复杂度取值为初始复杂度取值,则判断结果为:生成,即复杂度取值动作为生成复杂度取值;
步骤133,控制器上报层级划分生成信息报告请求消息,请求消息里携带:复杂度取值、转发设备信息、复杂度取值动作:生成,即复杂度取值动作为生成复杂度取值。
步骤134,核心网网元保存控制器上报的层级划分生成信息,并对此做出响应。
步骤135,核心网网元根据上报的层级划分生成信息,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,生成层次划分信息,并生成网络拓扑图,具体地实现方式可参见上述的具体应用情况一中的步骤42中的(2)和(3),在此不再赘述。
具体应用情况九、当控制器计算基准复杂度取值,并对复杂度取值进行判断,核心网网元更新层级划分信息,更新拓扑图
具体的,如图14所示,此情况下的具体实现过程主要包括:
步骤141,转发设备上报信息请求给控制器,所述信息请求中携带转发 设备的转发信息,该转发信息主要包括:转发设备ID、邻居转发设备ID、转发设备之间的链路信息以及链路端口号、转发设备的工作状态等。
步骤142,控制器依据最新的转发设备链路信息,计算每个转发设备的复杂度取值,并复杂度取值动作;
具体地,首先,把新计算的复杂度取值与此前的复杂度取值做比较;
然后,若复杂度取值发生变化,则判断结果为:更新,即复杂度取值动作为更新复杂度取值;
步骤143,控制器上报层级划分更新信息报告请求消息,请求消息里携带:复杂度取值、转发设备信息、复杂度取值动作:更新,即复杂度取值动作为更新复杂度取值。
步骤144,核心网网元保存控制器上报的层级划分更新信息,并对此做出响应。
步骤145,核心网网元根据上报的层级划分更新信息,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新拓扑图,具体包括如下过程:
(1)当核心网网元获取的某个转发设备的复杂度取值动作为更新复杂度取值时,则核心网网元直接利用获取的新的复杂度取值对已存储的复杂度取值进行更新;
还需要说明的是,核心网网元的其他实现方式可参见上述的具体应用情况二中的步骤52中的(3)、(4)和(5),在此不再赘述。
具体应用情况十、核心网网元依据定时器确定进行网络拓扑图更新
具体的,如图15所示,此情况下的具体实现过程主要包括:
步骤150,转发设备发送转发信息给控制器;
步骤151,控制器进行转发信息的发送;
步骤152,核心网网元保存控制器上报的转发信息,并对此做出响应;
需要说明的是,此步骤为可选步骤,若无需在核心网网元对此做出响应,此步骤152忽略,不用执行。
步骤153,核心网网元根据最新的转发信息,确定转发设备B由工作状态变更为非工作状态,启动定时器,在定时器超时后,转发设备B仍然为非 工作状态,对每个转发设备进行复杂度取值的计算,依据预先配置好的转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,更新层次划分信息,并更新网络拓扑图,具体地实现方式可参见上述的具体应用情况二中的步骤52中的(1)、(2)、(3)、(4)和(5),在此不再赘述。
需要说明的是,本申请实施例能够达到如下有益效果:
1、依据链路信息由核心网网元依据转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值划分设备层级,灵活动态的呈现网络拓扑;
2、根据层级划分信息可清晰明了的展现网络拓扑图及链路信息;
3、网络拓扑图是根据转发设备及其链路信息动态刷新或周期性刷新。
对应于核心网网元侧的实现,如图16所示,本公开实施例提供一种网络拓扑获取方法,由控制器执行,包括:
步骤S1601,获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
步骤S1602,将所述转发信息发送给核心网网元,使得所述核心网网元所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,确定网络拓扑图。
可选地,在所述获取多个转发设备发送的转发信息之后,还包括:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
将所述每个转发设备的复杂度取值发送给所述核心网网元。
可选地,在所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之后,还包括:
根据每个转发设备的复杂度取值,确定复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值;
将所述复杂度取值动作发送给所述核心网网元。
可选地,所述根据每个转发设备的复杂度取值,确定复杂度取值动作,包括:
判断是否存储有目标转发设备的复杂度取值;
若存储有目标转发设备的复杂度取值,则判断获取的目标设备的新的复 杂度取值与存储的复杂度取值是否相同,若不相同,则确定复杂度取值动作为更新复杂度取值;若未存储有目标转发设备的复杂度取值,则确定复杂度取值动作为生成复杂度取值。
需要说明的是,上述实施例中所有关于控制器侧的描述均适用于该应用于控制器侧的网络拓扑获取方法的实施例中,也能达到与之相同的技术效果。
如图17所示,本公开实施例提供一种网络拓扑获取装置1700,应用于控制器,包括:
第一获取单元1701,用于获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
第二获取单元1702,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
第一确定单元1703,用于根据所述层级划分信息,确定网络拓扑图。
可选地,所述第二获取单元1702,用于实现:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,在所述第二获取单元1702根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之前,还包括:
第一处理单元,用于在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
第二处理单元,用于在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
其中,所述第一转发设备为所述多个转发设备中的任一个。
可选地,在所述第二获取单元1702根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之后,还包括:
第一比较单元,用于若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
第一更新单元,用于若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
其中,所述第二转发设备为多个转发设备中的任一个。
可选地,所述第二获取单元1702根据所述转发设备的链路信息,获取每个转发设备的复杂度取值具体实现方式为:
若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
其中,所述第一情况,包括以下至少一项:
处于工作状态的转发设备变更为非工作状态;
处于非工作状态的转发设备变更为工作状态;
转发设备之间的链路工作异常。
可选地,所述第二获取单元1702根据每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息的具体实现方式为:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
其中,所述第一规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第一规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
可选地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
需要说明的是,该装置实施例是与上述方法实施例一一对应的装置,上述方法实施例中所有实现方式均适用于该装置的实施例中,也能达到相同的技术效果。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
如图18所示,本公开实施例还提供一种控制器,包括处理器1800、收发机1810、存储器1820及存储在所述存储器1820上并可在所述处理器1800上运行的程序;其中,收发机1810通过总线接口与处理器1800和存储器1820连接,其中,所述处理器1800用于读取存储器中的程序,执行下列过程:
获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转 发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
收发机1810,用于在处理器1800的控制下接收和发送数据。
其中,在图18中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1800代表的一个或多个处理器和存储器1820代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1810可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元,这些传输介质包括无线信道、有线信道、光缆等传输介质。处理器1800负责管理总线架构和通常的处理,存储器1820可以存储处理器1800在执行操作时所使用的数据。
处理器1800可以是中央处理器(CPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD),处理器也可以采用多核架构。
进一步地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
进一步地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
其中,所述第一转发设备为所述多个转发设备中的任一个。
进一步地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
其中,所述第二转发设备为多个转发设备中的任一个。
进一步地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
其中,所述第一情况,包括以下至少一项:
处于工作状态的转发设备变更为非工作状态;
处于非工作状态的转发设备变更为工作状态;
转发设备之间的链路工作异常。
进一步地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
其中,所述第一规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
进一步地,所述第一规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的 至少两个转发设备显示在与其层级对应的行中的相同位置。
可选地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
在此需要说明的是,本公开实施例提供的上述控制器,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现应用于控制器的网络拓扑获取方法的步骤。所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(Magneto Optical,MO)等)、光学存储器(例如激光唱片(Compact Disc,CD)、数字影视光盘(Digital Video Disc,DVD)、蓝光光盘(Blu-ray Disc,BD)、高清通用光盘(High-definition Versatile Disc,HVD)等)、以及半导体存储器(例如只读存储器(Read Only Memory,ROM)、电动程控只读存储器(Electrical Programmable Read Only Memory,EPROM)、电可擦编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、非易失性存储器(与非型闪存(NAND FLASH)、固态硬盘(Solid state drive,SSD))等。
如图19所示,本公开实施例提供一种网络拓扑获取装置1900,应用于核心网网元,所述核心网网元为应用层网元或管理面网元,包括:
第三获取单元1901,用于获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
第四获取单元1902,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
第二确定单元1903,用于根据所述层级划分信息,确定网络拓扑图。
可选地,所述第四获取单元1902,具体用于:
获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
可选地,所述第四获取单元1902获取每个转发设备的复杂度取值的具体实现方式为:
接收所述控制器发送的所述每个转发设备的复杂度取值;或
根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,在所述第四获取单元1902根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
接收单元,用于接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
可选地,所述装置,还包括:
第三处理单元,用于若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
第四处理单元,用于若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储新的所述第三转发设备的复杂度取值;
其中,所述第三转发设备为多个转发设备中的任一个。
可选地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述第四获取单元1902根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息的具体实现方式为:
在确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是否更新层级划分信息;
若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
其中,所述第二情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述第四获取单元1902根据所述转发设备的链路信息,确定每个转发设备的复杂度取值的具体实现方式为:
在确定出现第三情况,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
其中,所述第三情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
可选地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,在所述第四获取单元1902获取每个转发设备的复杂度取值之后,还包括:
第二比较单元,用于若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
第二更新单元,用于若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
其中,所述第四转发设备为多个转发设备中的任一个。
可选地,在所述第四获取单元1902根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的 数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
第五处理单元,用于在第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备;或者
第六处理单元,用于在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;
其中,所述第五转发设备为多个转发设备中的任一个。
可选地,所述第四获取单元1902根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息的具体实现方式为:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
其中,所述第二规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
可选地,所述第二规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
可选地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
需要说明的是,该装置实施例是与上述方法实施例一一对应的装置,上述方法实施例中所有实现方式均适用于该装置的实施例中,也能达到相同的技术效果。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实 施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本公开实施例还提供一种核心网网元,所述核心网网元为应用层网元或管理面网元,包括处理器、收发机、存储器及存储在所述存储器上并可在所述处理器上运行的程序;其中,收发机通过总线接口与处理器和存储器连接,其中,所述处理器用于读取存储器中的程序,执行下列过程:
获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
根据所述层级划分信息,确定网络拓扑图。
收发机,用于在处理器的控制下接收和发送数据。
需要说明的是,该核心网网元的结构可参见图18的控制器的结构,在此不再赘述。
进一步地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作:
获取每个转发设备的复杂度取值;
根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的 复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
进一步地,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作中的一项:
接收所述控制器发送的所述每个转发设备的复杂度取值;或
根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值。
进一步地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
进一步地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储新的所述第三转发设备的复杂度取值;
其中,所述第三转发设备为多个转发设备中的任一个。
进一步地,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
在确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是否更新层级划分信息;
若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
其中,所述第二情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
进一步地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
在确定出现第三情况,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
其中,所述第三情况包括以下至少一项:
所述控制器通知处于工作状态的转发设备变更为非工作状态;
所述控制器通知处于非工作状态的转发设备变更为工作状态;
所述控制器通知转发设备之间的链路工作异常。
进一步地,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
其中,所述第四转发设备为多个转发设备中的任一个。
进一步地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
在第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备;或者
在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;
其中,所述第五转发设备为多个转发设备中的任一个。
进一步地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
按照复杂度取值由大到小的顺序进行排序;
根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
其中,所述第二规则,包括:
将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
进一步地,所述第二规则,还包括:
若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
进一步地,所述层级划分信息,包括:
转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
在此需要说明的是,本公开实施例提供的上述核心网网元,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现应用于核心网网元的网络拓扑获取方法的步骤。所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。
如图20所示,本公开实施例提供一种网络拓扑获取装置2000,应用于控制器,包括:
第五获取单元2001,用于获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的 工作状态;
第一发送单元2002,用于将所述转发信息发送给核心网网元,使得所述核心网网元所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,确定网络拓扑图。
可选地,在所述第五获取单元2001获取多个转发设备发送的转发信息之后,还包括:
第六获取单元,用于根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
第二发送单元,用于将所述每个转发设备的复杂度取值发送给所述核心网网元。
可选地,在所述第六获取单元根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之后,还包括:
第三确定单元,用于根据每个转发设备的复杂度取值,确定复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值;
第三发送单元,用于将所述复杂度取值动作发送给所述核心网网元。
可选地,所述第三确定单元具体用于:
判断是否存储有目标转发设备的复杂度取值;
若存储有目标转发设备的复杂度取值,则判断获取的目标设备的新的复杂度取值与存储的复杂度取值是否相同,若不相同,则确定复杂度取值动作为更新复杂度取值;若未存储有目标转发设备的复杂度取值,则确定复杂度取值动作为生成复杂度取值。
需要说明的是,该装置实施例是与上述方法实施例一一对应的装置,上述方法实施例中所有实现方式均适用于该装置的实施例中,也能达到相同的技术效果。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既 可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本公开实施例还提供一种控制器,包括处理器、收发机、存储器及存储在所述存储器上并可在所述处理器上运行的程序;其中,收发机通过总线接口与处理器和存储器连接,其中,所述处理器用于读取存储器中的程序,执行下列过程:
获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、属于所述转发设备的邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
将所述转发信息发送给核心网网元,使得所述核心网网元所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,确定网络拓扑图。
收发机,用于在处理器的控制下接收和发送数据。
需要说明的是,该核心网网元的结构可参见图18的控制器的结构,在此不再赘述。
可选地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
将所述每个转发设备的复杂度取值发送给所述核心网网元。
可选地,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:根据每个转发设备的复杂度取值,确定复杂度取值动作,所述复杂度 取值动作包括:更新复杂度取值或生成复杂度取值;
将所述复杂度取值动作发送给所述核心网网元。
可选地,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
判断是否存储有目标转发设备的复杂度取值;
若存储有目标转发设备的复杂度取值,则判断获取的目标设备的新的复杂度取值与存储的复杂度取值是否相同,若不相同,则确定复杂度取值动作为更新复杂度取值;若未存储有目标转发设备的复杂度取值,则确定复杂度取值动作为生成复杂度取值。
在此需要说明的是,本公开实施例提供的上述控制器,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现应用于控制器的网络拓扑获取方法的步骤。所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NAND FLASH)、固态硬盘(SSD))等。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机可执行指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机可执行指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些处理器可执行指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的处理器可读存储器中,使得存储在该处理器可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些处理器可执行指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
需要说明的是,应理解以上各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。例如,确定模块可以为单独设立的处理元件,也可以集成在上述装置的某一个芯片中实现,此外,也可以以程序代码的形式存储于上述装置的存储器中,由上述装置的某一个处理元件调用并执行以上确定模块的功能。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,各个模块、单元、子单元或子模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(Central Processing Unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起, 以片上系统(system-on-a-chip,SOC)的形式实现。
本公开的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例,例如除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,说明书以及权利要求中使用“和/或”表示所连接对象的至少其中之一,例如A和/或B和/或C,表示包含单独A,单独B,单独C,以及A和B都存在,B和C都存在,A和C都存在,以及A、B和C都存在的7种情况。类似地,本说明书以及权利要求中使用“A和B中的至少一个”应理解为“单独A,单独B,或A和B都存在”。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (30)

  1. 一种网络拓扑获取方法,由控制器执行,所述方法包括:
    获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
    根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    根据所述层级划分信息,确定网络拓扑图。
  2. 根据权利要求1所述的方法,其中,所述根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
    根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
    根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
  3. 根据权利要求2所述的方法,其中,在所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之前,还包括:
    在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
    在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
    其中,所述第一转发设备为所述多个转发设备中的任一个。
  4. 根据权利要求2所述的方法,其中,在所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值之后,还包括:
    若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
    若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
    其中,所述第二转发设备为多个转发设备中的任一个。
  5. 根据权利要求2所述的方法,其中,所述根据所述转发设备的链路信息,获取每个转发设备的复杂度取值,包括:
    若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
    若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
    其中,所述第一情况,包括以下至少一项:
    处于工作状态的转发设备变更为非工作状态;
    处于非工作状态的转发设备变更为工作状态;
    转发设备之间的链路工作异常。
  6. 根据权利要求2所述的方法,其中,所述根据每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
    按照复杂度取值由大到小的顺序进行排序;
    根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
    其中,所述第一规则,包括:
    将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
  7. 根据权利要求6所述的方法,其中,所述第一规则,还包括:
    若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
  8. 根据权利要求1所述的方法,其中,所述层级划分信息,包括:
    转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
  9. 一种网络拓扑获取方法,由核心网网元执行,所述核心网网元为应用层网元或管理面网元,所述方法包括:
    获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
    根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    根据所述层级划分信息,确定网络拓扑图。
  10. 根据权利要求9所述的方法,其中,所述根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
    获取每个转发设备的复杂度取值;
    根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
  11. 根据权利要求10所述的方法,其中,所述获取每个转发设备的复杂度取值,包括:
    接收所述控制器发送的所述每个转发设备的复杂度取值;或
    根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值。
  12. 根据权利要求11所述的方法,其中,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,在所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
    接收所述控制器发送针对每个转发设备的复杂度取值动作,所述复杂度取值动作包括:更新复杂度取值或生成复杂度取值。
  13. 根据权利要求12所述的方法,还包括:
    若第三转发设备对应的所述复杂度取值动作为更新复杂度取值,则利用新的复杂度取值对所述第三转发设备对应的复杂度取值进行更新;或者
    若第三转发设备对应的所述复杂度取值动作为生成复杂度取值,则存储 新的所述第三转发设备的复杂度取值;
    其中,所述第三转发设备为多个转发设备中的任一个。
  14. 根据权利要求11所述的方法,其中,在所述接收所述控制器发送的每个转发设备的复杂度取值的情况下,所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
    在确定出现第二情况,则开启第二定时器,所述第二定时器用于判断是否更新层级划分信息;
    若第二定时器超时且网络处于所述第二情况所对应的状态,则根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    其中,所述第二情况包括以下至少一项:
    所述控制器通知处于工作状态的转发设备变更为非工作状态;
    所述控制器通知处于非工作状态的转发设备变更为工作状态;
    所述控制器通知转发设备之间的链路工作异常。
  15. 根据权利要求11所述的方法,其中,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,所述根据所述转发设备的链路信息,确定每个转发设备的复杂度取值,包括:
    在确定出现第三情况,则开启第三定时器,所述第三定时器用于判断是否更新层级划分信息;
    若所述第三定时器超时且网络处于所述第三情况所对应的状态,则根据所述转发设备的链路信息,确定每个转发设备的复杂度取值;
    其中,所述第三情况包括以下至少一项:
    所述控制器通知处于工作状态的转发设备变更为非工作状态;
    所述控制器通知处于非工作状态的转发设备变更为工作状态;
    所述控制器通知转发设备之间的链路工作异常。
  16. 根据权利要求11所述的方法,其中,在所述根据所述转发设备的链路信息,确定所述每个转发设备的复杂度取值的情况下,在所述获取每个转 发设备的复杂度取值之后,还包括:
    若第四转发设备为已经存在的转发设备,则将获取的所述第四转发设备对应的新的复杂度取值与存储的复杂度取值进行比较;
    若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第四转发设备对应的复杂度取值进行更新;
    其中,所述第四转发设备为多个转发设备中的任一个。
  17. 根据权利要求10所述的方法,其中,在所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息之前,还包括:
    在第五转发设备由工作状态变更为非工作状态,则删除所述第五转发设备;或者
    在第五转发设备由非工作状态变更为工作状态,则添加所述第五转发设备;
    其中,所述第五转发设备为多个转发设备中的任一个。
  18. 根据权利要求10所述的方法,其中,所述根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息,包括:
    按照复杂度取值由大到小的顺序进行排序;
    根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第二规则进行层级划分,获取层级划分信息;
    其中,所述第二规则,包括:
    将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
  19. 根据权利要求18所述的方法,其中,所述第二规则,还包括:
    若复杂度取值相同的转发设备的数量超过所述数量上限阈值,将所述复杂度取值相同的转发设备显示在多行中或将复杂度取值相同的转发设备中的至少两个转发设备显示在与其层级对应的行中的相同位置。
  20. 根据权利要求9所述的方法,其中,所述层级划分信息,包括:
    转发设备的复杂度取值、拓扑划分层数、每层转发设备的数量、每层转发设备的标识信息、同层级转发设备之间的链路信息、每层转发设备的工作状态信息、每层转发设备的链路的端口号。
  21. 一种控制器,包括存储器,收发机,处理器:
    存储器,用于存储计算机程序;收发机,用于在所述处理器的控制下收发数据;处理器,用于读取所述存储器中的计算机程序并执行以下操作:
    获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
    根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    根据所述层级划分信息,确定网络拓扑图。
  22. 根据权利要求21所述的控制器,其中,所述处理器,用于读取所述存储器中的计算机程序并执行以下操作:
    根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
    根据所述每个转发设备的复杂度取值、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息。
  23. 根据权利要求22所述的控制器,其中,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
    在第一转发设备由工作状态变更为非工作状态,则删除所述第一转发设备;或者
    在第一转发设备由非工作状态变更为工作状态,则添加所述第一转发设备;
    其中,所述第一转发设备为所述多个转发设备中的任一个。
  24. 根据权利要求22所述的控制器,其中,所述处理器,用于读取所述存储器中的计算机程序还执行以下操作:
    若第二转发设备为已经存在的转发设备,则将获取的所述第二转发设备 对应的新的复杂度取值与存储的复杂度取值进行比较;
    若新的复杂度取值与存储的复杂度取值不同,则利用新的复杂度取值对所述第二转发设备对应的复杂度取值进行更新;
    其中,所述第二转发设备为多个转发设备中的任一个。
  25. 根据权利要求22所述的控制器,其中,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
    若检测到出现第一情况,则开启第一定时器,所述第一定时器用于判断是否更新层级划分信息;
    若所述第一定时器超时且网络处于所述第一情况所对应的状态,则根据所述转发设备的链路信息,获取每个转发设备的复杂度取值;
    其中,所述第一情况,包括以下至少一项:
    处于工作状态的转发设备变更为非工作状态;
    处于非工作状态的转发设备变更为工作状态;
    转发设备之间的链路工作异常。
  26. 根据权利要求22所述的控制器,其中,所述处理器,用于读取所述存储器中的计算机程序执行以下操作:
    按照复杂度取值由大到小的顺序进行排序;
    根据复杂度取值的排序、所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值,按照第一规则进行层级划分,获取层级划分信息;
    其中,所述第一规则,包括:
    将相邻排序的复杂度取值中的取值较大者对应的转发设备作为上一层级,将相邻排序的复杂度取值中的取值较小者对应的转发设备作为下一层级。
  27. 一种核心网网元,所述核心网网元为应用层网元或管理面网元,所述核心网网元包括存储器,收发机,处理器:
    存储器,用于存储计算机程序;收发机,用于在所述处理器的控制下收发数据;处理器,用于读取所述存储器中的计算机程序并执行以下操作:
    获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路 信息以及链路端口号、所述转发设备的工作状态;
    根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    根据所述层级划分信息,确定网络拓扑图。
  28. 一种网络拓扑获取装置,应用于控制器,所述装置包括:
    第一获取单元,用于获取多个转发设备发送的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
    第二获取单元,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    第一确定单元,用于根据所述层级划分信息,确定网络拓扑图。
  29. 一种网络拓扑获取装置,应用于核心网网元,所述核心网网元为应用层网元或管理面网元,所述装置包括:
    第三获取单元,用于获取控制器发送的多个转发设备的转发信息,所述转发信息包括:所述转发设备的标识信息、邻居转发设备的标识信息、所述转发设备之间的链路信息以及链路端口号、所述转发设备的工作状态;
    第四获取单元,用于根据所述转发信息、所述转发设备的复杂度递减准则以及每个层级的转发设备的数量上限阈值进行层级划分,获取层级划分信息;
    第二确定单元,用于根据所述层级划分信息,确定网络拓扑图。
  30. 一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使所述处理器执行权利要求1至20任一项所述的方法。
PCT/CN2022/136131 2021-12-02 2022-12-02 网络拓扑获取方法、装置、控制器及核心网网元 WO2023098858A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111459203.3A CN116232902A (zh) 2021-12-02 2021-12-02 网络拓扑获取方法、装置、控制器及核心网网元
CN202111459203.3 2021-12-02

Publications (1)

Publication Number Publication Date
WO2023098858A1 true WO2023098858A1 (zh) 2023-06-08

Family

ID=86571719

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/136131 WO2023098858A1 (zh) 2021-12-02 2022-12-02 网络拓扑获取方法、装置、控制器及核心网网元

Country Status (2)

Country Link
CN (1) CN116232902A (zh)
WO (1) WO2023098858A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104824A (zh) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 一种网络拓扑确定方法和装置
US20180183676A1 (en) * 2016-01-06 2018-06-28 LiveView Technologies, LLC Dynamically mapping network addresses
CN109189720A (zh) * 2018-08-22 2019-01-11 曙光信息产业(北京)有限公司 层次化片上网络拓扑结构及其路由方法
CN113676412A (zh) * 2020-05-15 2021-11-19 大唐移动通信设备有限公司 网络控制方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180183676A1 (en) * 2016-01-06 2018-06-28 LiveView Technologies, LLC Dynamically mapping network addresses
CN107104824A (zh) * 2017-03-31 2017-08-29 紫光华山信息技术有限公司 一种网络拓扑确定方法和装置
CN109189720A (zh) * 2018-08-22 2019-01-11 曙光信息产业(北京)有限公司 层次化片上网络拓扑结构及其路由方法
CN113676412A (zh) * 2020-05-15 2021-11-19 大唐移动通信设备有限公司 网络控制方法及设备

Also Published As

Publication number Publication date
CN116232902A (zh) 2023-06-06

Similar Documents

Publication Publication Date Title
KR102448050B1 (ko) 인접 셀 구성 방법, 네트워크 기기 및 사용자 기기
EP3076709A1 (en) Zigbee network-based data transmission method, apparatus, and system
WO2020015563A1 (zh) 用于测量配置的方法、用户设备、网络设备、及存储介质
US20190191297A1 (en) Method and apparatus for managing mobility pattern of terminal
US10944667B2 (en) Loop check packets
US11206556B2 (en) Power outage processing method and connection relationship obtaining method and device
WO2021098369A1 (zh) 一种系统信息发送方法、网络设备、基站及存储介质
US11245615B2 (en) Method for determining link state, and device
US10470195B2 (en) Route selection method and apparatus
US20240073768A1 (en) Information transmission method and device thereof
EP3589008B1 (en) Method and device for subscribing to radio link failure report
WO2022028191A1 (zh) 一种监测控制信道、确定传输配置指示的方法及终端
CN109769274B (zh) 无线组网系统中信道切换的方法、设备及可读存储介质
US9326196B1 (en) Updating an out-of-date source neighbor list
CN112822102A (zh) 链路切换方法、装置、设备、系统及存储介质
US9974063B2 (en) Radio network control method and radio network controller
CN106464663B (zh) 一种数据处理方法、装置及设备
WO2023098858A1 (zh) 网络拓扑获取方法、装置、控制器及核心网网元
CN107959610B (zh) 确定虚拟网络拓扑结构的方法和运营商边缘设备
CN104967986A (zh) 管理邻区配置信息的方法和装置
EP2953299A1 (en) Protection switching method, system and node
US10616953B2 (en) Network message notification apparatus and method and communication system
CN111314272B (zh) 一种任务处理方法及装置
CN111356248B (zh) 一种接入网设备间建立连接的方法及装置
US20180109977A1 (en) Load based signaling in a communication network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22900662

Country of ref document: EP

Kind code of ref document: A1