Link discovery method and device, computer equipment and storage medium

By receiving and decoding the IP address and port information in the OTN frame in the OTN network, a bidirectional link is formed, which solves the difficulty of topology discovery between cross-vendor devices and realizes the real-time update of the OTN network and the improvement of the level of automated operation and maintenance.

CN120692170APending Publication Date: 2025-09-23CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510996394.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing OTN networks have difficulty in automated topology discovery between cross-vendor devices and are unable to reflect link changes in real time, resulting in low efficiency and prone to errors.

Method used

By receiving the IP address and port information in the OTN frame, decoding and merging them to form a bidirectional link, the management and control equipment is used to form complete topology information and realize real-time update of the network topology.

Benefits of technology

Without introducing additional protocols and bandwidth resources, the device connectivity status can be quickly and accurately obtained, improving the automated operation and maintenance level of the OTN network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692170A_ABST
    Figure CN120692170A_ABST
Patent Text Reader

Abstract

The invention relates to a link discovery method and device, computer equipment and a storage medium. The method comprises: receiving an OTN frame sent by a second OTN device, the OTN frame comprising an IP address and port information of the second OTN device, and the port information comprising a machine frame, a channel number and a port number; decoding the OTN frame and obtaining an IP address and port information of a second OTN device; and combining the IP address and the port information of the second OTN equipment with the IP address and the port information of the second OTN equipment, and sending a combined message to the management control equipment, so that the management control equipment forms a bidirectional link according to the combined message. By adopting the method, network topology discovery and real-time updating can be realized without introducing extra protocols and bandwidth resources, and the automatic operation and maintenance level of an OTN (Optical Transport Network) is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of optical transmission network planning, and in particular to a link discovery method, apparatus, computer equipment, and storage medium. Background Art

[0002] Optical transport networks (OTNs) are transport networks organized at the optical layer, based on wavelength division multiplexing technology. Existing OTN networks rely on manual configuration or upper-layer control planes for topology discovery. However, manual configuration of port connectivity is inefficient and error-prone, and it fails to reflect real-time link changes. Furthermore, different vendors' devices have inconsistent port identification formats and use proprietary protocols, making automated topology discovery across vendors difficult and interoperability poor.

[0003] Therefore, how to achieve network topology discovery and real-time updates in the OTN network while being compatible with equipment from different manufacturers and improving the level of automated operation and maintenance of the OTN network is an urgent problem that needs to be solved. Summary of the Invention

[0004] Based on this, it is necessary to provide a link discovery method, device, computer equipment, computer-readable storage medium and computer program product that can detect the connectable status of devices without introducing additional protocols and bandwidth resources, realize network topology discovery and real-time update, and improve the level of automated operation and maintenance of OTN networks in order to address the above technical problems.

[0005] In a first aspect, the present application provides a link discovery method. The method comprises:

[0006] The first OTN device receives an OTN frame sent by the second OTN device, where the OTN frame includes an Internetworking Protocol (IP) address and port information of the second OTN device, where the port information includes a chassis, a slot number, and a port number.

[0007] The first OTN device decodes the OTN frame to obtain the IP address and port information of the second OTN device;

[0008] The first OTN device merges the IP address and port information of the second OTN device with its own IP address and port information, and sends the merged message to the management and control device, so that the management and control device forms a bidirectional link according to the merged message.

[0009] In one embodiment, the first OTN device merges the IP address and port information of the second OTN device with its own IP address and port information, and sends the merged message to the management and control device, including:

[0010] If the first OTN device determines that this is the first time that the merged message is sent to the management and control device, the first OTN device sends the merged message to the management and control device. If the first OTN device determines that this is not the first time that the merged message is sent to the management and control device, the first OTN device determines whether the current IP address and port information sent by the second OTN device are consistent with the IP address and port information sent last time. If they are consistent, the first OTN device does not send the merged message to the management and control device. If they are inconsistent, the first OTN device merges the current IP address and port information with its own address and port information, and sends the merged message to the management and control device.

[0011] In one embodiment, the OTN frame includes the Internetwork Protocol (IP) address and port information of the second OTN device, the port information includes a chassis, a slot number, and a port number, including: the OTN frame includes a Time Concatenated Multiplexing (TCM2) overhead byte, the TCM2 overhead byte includes a Trace Tracking Identifier (TTI) field, the TTI field includes a format identification field and a specific format data field, the first 16 bits of the specific format data field are reserved, the middle 32 bits of the specific format data field are the IP address of the second OTN device pair, and the last 32 bits of the specific format data field are the port information of the second OTN device, wherein the chassis occupies 8 bits, the slot number occupies 8 bits, the port number occupies 8 bits, and the remaining 8 bits are reserved.

[0012] In one embodiment, the method further includes: if the first OTN device does not receive the OTN frame sent by the second OTN device for more than a first preset time period, the first OTN device determines that the connection with the second OTN device is disconnected; and the first OTN device sends a connection disconnection message to the management and control device.

[0013] In a second aspect, the present application also provides a link discovery method. The method includes:

[0014] The management and control device receives merge messages respectively sent by the first OTN device and the second OTN device, wherein the merge message includes the IP address and port information of the first OTN device and the IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number;

[0015] The management and control device forms a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

[0016] In one embodiment, the management and control device forms a bidirectional link from the first OTN device to the second OTN device based on a merge message sent by the first OTN device and a merge message sent by the second OTN device, including: the management and control device sorts the IP addresses of the first OTN device and the second OTN device in character strings, takes the IP address with the larger value as the Z end and the IP address with the smaller value as the A end, and stores the A end and the corresponding port information, and the Z end and the corresponding port information in a first mapping table, wherein the first mapping table includes the A end and the corresponding port information, and the Z end and the corresponding port information of the plurality of bidirectional links.

[0017] In one embodiment, the method further includes: the management and control device receiving a connection disconnection message sent by the first OTN device and the second OTN device respectively, the connection disconnection message including the IP address and port information of the first OTN device or the IP address and port information of the second OTN device; the management and control device searching for a bidirectional link corresponding to the connection disconnection message from the first mapping table based on the connection disconnection message sent by the first OTN device or the connection disconnection message sent by the second OTN device; and the management and control device deleting the A-end and the port information corresponding to the A-end, and the Z-end and the port information corresponding to the Z-end of the bidirectional link from the first mapping table.

[0018] In one embodiment, the method further includes: the management and control device receives the merge message sent by the A end, and searches the first mapping table for a bidirectional link matching the A end based on the IP address and port information of the A end; if the Z end information in the merge message is inconsistent with the Z end information corresponding to the matched bidirectional link, the management and control device updates the Z end information corresponding to the matched bidirectional link to the Z end information in the merge message; the management and control device receives the merge message sent by the Z end, and searches the first mapping table for a bidirectional link matching the Z end based on the IP address and port information of the Z end; if the A end information in the merge message is consistent with the A end information corresponding to the matched bidirectional link, the update process is terminated; if the A end information in the merge message is inconsistent with the A end information corresponding to the matched bidirectional link, the management and control device issues an alarm or updates the A end information corresponding to the matched bidirectional link to the A end information in the merge message.

[0019] In a third aspect, the present application further provides a link discovery device. The device includes:

[0020] A receiving module, configured to receive an OTN frame sent by a second OTN device, wherein the OTN frame includes an Internet interconnection protocol IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number;

[0021] a processing module, configured to decode the OTN frame and obtain the IP address and port information of the second OTN device;

[0022] The sending module is used to merge the IP address and port information of the second OTN device with its own IP address and port information, and send the merged message to the management and control device, so that the management and control device forms a bidirectional link according to the merged message.

[0023] In a fourth aspect, the present application further provides a link discovery device. The device includes:

[0024] a receiving module, configured to receive merge messages respectively sent by the first OTN device and the second OTN device, wherein the merge message includes the IP address and port information of the first OTN device, and the IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number;

[0025] The processing module is configured to form a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

[0026] In a fifth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] receiving an OTN frame sent by a second OTN device, wherein the OTN frame includes an Internetworking Protocol (IP) address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number;

[0028] Decoding the OTN frame to obtain the IP address and port information of the second OTN device;

[0029] The IP address and port information of the second OTN device are combined with its own IP address and port information, and the combined message is sent to the management and control device, so that the management and control device forms a bidirectional link according to the combined message.

[0030] In a sixth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Receiving merge messages sent respectively by the first OTN device and the second OTN device, the merge message including the IP address and port information of the first OTN device, and the IP address and port information of the second OTN device, the port information including a chassis, a slot number, and a port number;

[0032] A bidirectional link from the first OTN device to the second OTN device is formed based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

[0033] In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method steps described in the first aspect and any combination thereof, or the second aspect and any combination thereof.

[0034] In an eighth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the method steps described in the first aspect and any combination thereof, or the second aspect and any combination thereof.

[0035] The link discovery method, apparatus, computer device, storage medium, and computer program product described above receive OTN frames sent by peer devices to obtain the peer device's IP address and port information, thereby quickly and accurately determining the device's connectable state, conserving system resources and reducing system burden. The obtained peer device's IP address and port information are then merged with the device's own IP address and port information, and the merged message is sent to a management and control device, enabling the management and control device to obtain complete port links based on the merged message and form complete topology information. This enables network topology discovery and real-time updates without introducing additional protocols or bandwidth resources, improving the automated operation and maintenance of OTN networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A diagram illustrating an application environment of a link discovery method according to an embodiment;

[0037] Figure 2 1 is a flow chart of a link discovery method according to an embodiment;

[0038] Figure 3 FIG. 1 is a schematic diagram illustrating the principle of extending and defining the TTI overhead field in one embodiment;

[0039] Figure 4 A schematic diagram of a link information reporting scenario in one embodiment;

[0040] Figure 5 Schematic diagram of a link discovery method according to another embodiment;

[0041] Figure 6 is a schematic diagram of a first mapping table in one embodiment;

[0042] Figure 7 A schematic diagram of a scenario of automatic link discovery in one embodiment;

[0043] Figure 8 is a structural block diagram of a link discovery device in one embodiment;

[0044] Figure 9 It is a structural block diagram of a link discovery device in another embodiment;

[0045] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0047] The link discovery method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, terminals 102 and 104 communicate with server 106 via a network. Terminals 102, 104, and server 106 collaborate to execute the link discovery method provided in the embodiments of the present application. Terminals 102 and 104 send OTN frames to each other. The OTN frames carry the Internet Protocol (IP) address and port information of the other end. The port information includes the chassis, slot number, and port number. After obtaining the IP address and port information of the other end, terminals 102 and 104 merge the information with their own IP address and port information, and then send the merged messages to server 106. Server 106 obtains the complete port link based on the merged messages sent by terminals 102 and 104, forming complete topology information. Terminals 102 and 104 can be, but are not limited to, various OTN devices, such as network performance analyzers. Server 106 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0048] In one embodiment, Figure 2 As shown, a link discovery method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, the computer device can be Figure 1 In the terminal or server, the link discovery method includes the following steps:

[0049] Step 202: The first OTN device receives an OTN frame sent by the second OTN device.

[0050] Messages are transmitted between different OTN devices via OTN frames. The OTN frame structure includes overhead bytes for tandem connection monitoring and time-division concatenated multiplexing (TCM) overhead. TCM overhead is part of the optical channel data unit (ODU) overhead and is used to monitor and control the time-sliced ​​connections within the ODU. In the OTN frame structure, ODU overhead includes passage monitoring (PM) overhead and TCM overhead. TCM overhead has six levels: TCM1, TCM2, TCM3, TCM4, TCM5, and TCM6.

[0051] Furthermore, the TCM2 overhead includes a trail trace identifier (TTI) field, which functions similarly to a label and is used to identify the start and end points of a transmission path. Its core function is path verification and fault location.

[0052] It should be noted that according to the ITU-T G.709 protocol, the transmission period of the TCM2 TTI overhead field is completely synchronized with the transmission period of the OTN frame. That is, each OTN frame carries and transmits the TTI field once. The TTI field is located in the TCM overhead area of ​​the ODU layer, specifically in columns 5-13 of row 2 and columns 1-9 of row 3 of the ODU frame. TCM2 occupies a fixed byte (for example, the TTI of TCM2 is located in column 8 of row 2). Each OTN frame has a fixed structure of 4 rows x 4080 bytes, including an overhead area, a payload area, and a forward error correction (FEC) area. As part of the overhead, the TTI is filled and transmitted when each OTN frame is generated.

[0053] It should be understood that the OTN frame period (i.e., the transmission time of each frame) is not fixed but varies with the nominal rate level. For example, when the nominal rate is 2.5 Gbps (approximately 20,416 frames are transmitted per second), the OTN period is 48.971 microseconds. When the nominal rate is 10 Gbps (approximately 82,037 frames are transmitted per second), the OTN period is 12.191 microseconds. When the nominal rate is 40 Gbps (approximately 329,589 frames are transmitted per second), the OTN period is 3.035 microseconds. When the nominal rate is 100 Gbps (approximately 856,164 frames are transmitted per second), the OTN period is 1.168 microseconds. G.709 stipulates that TTIs need to be sent continuously and periodically to support path tracking and connection monitoring functions. If the TTI content changes (for example, due to device restart), it must be synchronized and updated through the multi-frame mechanism, but the transmission period remains consistent with the OTN frame period. TTI contains a 16-byte source access point identifier (SAPI) and destination access point identifier (DAPI) for end-to-end connection verification, and its real-time transmission depends on the transmission of each frame. If TTIs are not sent according to the frame period (for example, with multiple frames between transmissions), path tracking will fail or monitoring will be delayed.

[0054] Specifically, before sending an OTN frame to the first OTN device, the second OTN device encodes the TCM2 TTI field of the OTN frame when generating the OTN frame. Based on the existing OTN protocol G.709, the second OTN device can periodically fill the IP address and port information of the second OTN device into the TCM2 TTI overhead field of the OTN frame to be sent. The port information includes the rack, slot number, and port number of the second OTN device. Once a set of rack, slot number, and port number is determined, the line-side port of an OTN device can be uniquely identified, and there is a one-to-one correspondence between them.

[0055] For example, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram showing the principle of extending and defining the TTI overhead field in one embodiment. Figure 3 As shown, Figure 3 (A) indicates that the TCM2 TTI overhead field in the resource discovery message is encapsulated using TCM2 TTI according to the ITU G.7714.1 standard, including a format identification field and a specific format data field. The format identification field is the first 4 bits and is fixedly filled with "0010". The specific format data field includes 80 bits. Figure 3 The middle (B) indicates further division of the specific format data field. The first 16 bits are the DADCN context ID field, which is a reserved field and can be filled with all 0s. The following 32 bits in the gray area are used to fill in the IP address of the second OTN device (such as the IPv4 address). The last 32 bits in the black area are used to fill in the port information. The chassis occupies 8 bits, such as 00000001, which is converted to decimal as 01, indicating the first chassis. The slot number occupies 8 bits, such as 00000011, which is converted to decimal as 03, indicating the slot number is 3. The port number occupies 8 bits, such as 00001010, which is converted to decimal as 10, indicating the port number is 10. The last 8 bits are reserved and can be filled with all 0s.

[0056] Step 204: The first OTN device decodes the OTN frame and obtains the IP address and port information of the second OTN device.

[0057] Specifically, after receiving the OTN frame, the first OTN device decodes the OTN frame and extracts the IP address and port information of the second OTN device from the TCM2 TTI overhead field of the OTN frame.

[0058] For example, the port information portion of the TTI data obtained by decoding the first OTN device is 000000010000001000000111000000000. It is intercepted by 8 bits to obtain 00000001, 00000010, 00000111, and 00000000. Each group of binary data is converted into decimal data, and the corresponding decimal data can be obtained as 01, 02, and 07. Therefore, it can be determined that the port information is 1 frame, 2 slots, and 7 ports.

[0059] Step 206: The first OTN device merges the IP address and port information of the second OTN device with its own IP address and port information, and sends the merged message to the management and control device.

[0060] Specifically, after obtaining the IP address and port information of the other end, the first OTN device merges the information with the IP address and port information of the local end. The merged message includes not only the IP address and port information of the first OTN device, but also the IP address and port information of the second OTN device. The merged message is sent to the management and control device by calling an uplink interface, such as a simple network management protocol (SNMP) interface, a network configuration protocol (NETCONF) interface, a RESTFUL interface, etc.

[0061] In one embodiment, when the first OTN device determines that it is the first time to send a merged message to the management and control device, the first OTN device directly sends the merged message to the management and control device; when the first OTN device determines that it is not the first time to send a merged message to the management and control device, the first OTN device determines whether the current IP address and port information sent by the second OTN device are consistent with the IP address and port information sent last time. If they are consistent, the first OTN device does not send the merged message to the management and control device; if they are inconsistent, the first OTN device merges the current IP address and port information with its own IP address and port information, and sends the merged message to the management and control device.

[0062] Specifically, since the second OTN device periodically sends OTN frames to the first OTN device, each OTN frame sent carries the IP address and port information of the second OTN device. Therefore, when the first OTN device receives the OTN frame sent by the second OTN device, it will first determine whether it is the first reception. If it is the first reception, the first OTN device will record and save the IP address and port information therein, and then merge it with its own IP address and port information before sending it to the management and control device. If it is not the first reception, that is, the first OTN device has previously received OTN frames sent by the second OTN device once or more times, then the first OTN device will check whether the IP address and port information in the OTN frame received this time are consistent with the IP address and port information in the last received OTN frame that it has recorded and saved. If they are consistent, it indicates that the connection has not changed. In order to save transmission resources, the first OTN device will no longer merge messages and send the merged message to the management and control device. If they are inconsistent, it means that the connection relationship has changed, which may be the IP address (such as the connected device has changed), the port information (such as the connection cable is plugged into another port), or the IP address and port information have changed at the same time. At this time, the first OTN device merges the IP address and port information in the currently received OTN frame with its own IP address and port information, and sends the merged message to the management and control device.

[0063] In one embodiment, if the first OTN device does not receive the OTN frame sent by the second OTN device for more than a first preset time period, the first OTN device determines that the connection with the second OTN device is disconnected, and sends a connection disconnection message to the management and control device.

[0064] Specifically, since TTI needs to be sent periodically to support path tracing and connection monitoring functions, when the first OTN device does not receive the expected TTI for multiple consecutive periods, it indicates that the port connection between the first OTN device and the second OTN device has been disconnected. The first OTN device marks the connection disconnected and sends a connection disconnection message to the management and control device.

[0065] Optionally, the first OTN device sets the value of the IP address and port information of the other end to 0, and then reports it together with its own IP address and port information to the management and control device. After receiving the message reported by the first OTN device, the management and control device can determine that the first OTN device and the second OTN device are disconnected, the bidirectional link no longer exists, and delete the relevant information of the bidirectional link.

[0066] It should be noted that when the first OTN device receives an OTN frame from the second OTN device, it also sends an OTN frame to the second OTN device. The OTN frame contains the IP address and port information of the first OTN device. After receiving and decoding the OTN frame, the second OTN device obtains the IP address and port information of the first OTN device, merges it with its own IP address and port information, and sends the merged message to the management and control device. In other words, the first and second OTN devices are mirror images. They send and receive OTN frames from each other and need to report them to the management and control device. Based on the messages reported by both ends, the management and control device obtains the complete port link, thereby forming complete topology information.

[0067] For example, see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a link information reporting scenario in an embodiment. Figure 4 As shown, device A and device Z are directly connected through ports. They send OTN frames to each other. The IP address of device A is 10.0.10.5, and the port information is 011301, that is, 1 frame, 13 slots, 1 port. The IP address of device Z is 10.0.10.6, and the port information is 011201, that is, 1 frame, 12 slots, 1 port. Device A receives and decodes the OTN frame from device Z, obtains the IP address and port information of device Z, merges them, and then reports the merged message to the management and control device. Among them, local represents the A end itself, and remote represents the opposite end (that is, the Z end). Similarly, device Z receives and decodes the OTN frame from device A, obtains the IP address and port information of device A, merges them, and then reports the merged message to the management and control device.

[0068] In the above link discovery method, by receiving the OTN frame sent by the second OTN device and containing the IP address and port information of the second OTN device, the IP address and port information of the second OTN device can be obtained through decoding, thereby quickly and accurately obtaining the device's connection readiness status in disguise, saving system resources and reducing the system burden. In addition, by using the TTI overhead to carry the IP address and port information, the use of the TTI overhead is reconstructed from a unidirectional connectivity detection to a bidirectional topology information carrier, and the information is updated by using the TCM's own monitoring. The topology discovery capability can be realized without the need for additional protocols or bandwidth resources, thereby improving the level of automated operation and maintenance of the OTN network.

[0069] In one embodiment, Figure 5 As shown, a link discovery method is provided, which includes the following steps:

[0070] Step 502: The management and control device receives merge messages respectively sent by the first OTN device and the second OTN device.

[0071] Specifically, the merge message sent by the first OTN device and the second OTN device includes the IP address and port information of the first OTN device, and the IP address and port information of the second OTN device. The port information includes a chassis, a slot number, and a port number.

[0072] Step 504: The management and control device forms a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

[0073] Specifically, when the management and control device receives the merge message sent by the first OTN device, it can be determined that the first OTN device is connected to the second OTN device in a unidirectional direction. Similarly, when the management and control device receives the merge message sent by the second OTN device, it can be determined that the second OTN device is connected to the first OTN device in a unidirectional direction. This is consistent in link connection logic and does not conflict. Therefore, a bidirectional link from the first OTN device to the second OTN device can be formed.

[0074] In one embodiment, the management and control device sorts the IP addresses of the first OTN device and the second OTN device in character strings, takes the larger IP address as the Z end and the smaller IP address as the A end, and stores the A end and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end in a first mapping table. The first mapping table includes the A end and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end, corresponding to multiple bidirectional links.

[0075] Specifically, when the management and control device receives a merge message sent by the first OTN device or the second OTN device for the first time, the management and control device will query the first mapping table based on the IP address and port information of the first OTN device or the IP address and port information of the second OTN device in the merge message as a key. If there is no matching record in the first mapping table, the two IPs will be sorted by character string, the smaller IP will be used as the A end, and the larger IP will be used as the Z end. If the two IPs are the same, the two port information can be further compared, the value of the smaller port information will be used as the A end, and the value of the larger port information will be used as the Z end, and then inserted into the first mapping table. The first mapping table includes the A end corresponding to multiple bidirectional links and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end.

[0076] For example, see Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a first mapping table in an embodiment. Figure 6As shown in the figure, each row corresponds to a bidirectional link. For example, in the first row, the IP address of end A is 10.0.20.2, the port address is 011101, and the IP address of end Z is 10.0.20.3, the port address is 011202. This indicates that port 1 of frame 11 of the first OTN device is bidirectionally connected to port 2 of frame 12 of the second OTN device. The meanings of other rows are similar to those of the first row and are not repeated here.

[0077] It can be seen that after the management and control device receives the merge message sent by the two devices, it determines the AZ end by comparing the two IPs, and then stores it in the first mapping table, which is equivalent to storing only one matching record, which can save storage resources and improve resource utilization.

[0078] In one embodiment, a management and control device receives a connection disconnection message sent by a first OTN device and a second OTN device, respectively, where the connection disconnection message includes the IP address and port information of the first OTN device or the IP address and port information of the second OTN device. The management and control device searches a first mapping table for a bidirectional link corresponding to the connection disconnection message based on the connection disconnection message sent by the first OTN device or the connection disconnection message sent by the second OTN device, and deletes the A-end and the port information corresponding to the A-end, and the Z-end and the port information corresponding to the Z-end, corresponding to the bidirectional link, from the first mapping table.

[0079] Specifically, when a connection failure occurs between the first OTN device and the second OTN device (eg, fiber breakage), both ends cannot receive TTI information sent by the other end. In this case, both ends need to send a connection disconnection message to notify the management and control device.

[0080] Optionally, each end may include only the IP address and port information of the local end in the disconnection message sent to the management and control device, and set the values ​​of the IP address and port information of the other end to 0. For example, end A may include only the IP address and port information of end A in the disconnection message sent to the management and control device, and set the IP address and port information of end Z to 0.

[0081] Furthermore, regardless of whether the management and control device receives the disconnection message from the first OTN device or the second OTN device first, the management and control device will perform a deletion operation until there are no relevant matching records in the first mapping table. For example, assuming that the management and control device first receives the disconnection message from the first OTN device, it can obtain the IP and port information of the first OTN device from the message. It then performs a query based on the IP and port information to find a matching bidirectional link. It then deletes the data corresponding to the bidirectional link from the first mapping table. The deleted data includes the IP address and port information of the first OTN device and the IP address and port information of the second OTN device. The management and control device then receives the disconnection message from the second OTN device and performs another query based on the IP and port information of the second OTN device in the message. Since the bidirectional link between the first and second OTN devices has been deleted, the management and control device no longer finds a relevant matching record when it performs the query again, indicating that the deletion has been successful.

[0082] In one embodiment, the management device receives a merge message sent by end A, and searches for a bidirectional link matching end A from a first mapping table based on the IP address and port information of end A; if the Z-end information in the merge message is inconsistent with the Z-end information corresponding to the matched bidirectional link, the Z-end information corresponding to the matched bidirectional link is updated to the Z-end information in the merge message; receives a merge message sent by end Z, and searches for a bidirectional link matching end Z from a first mapping table based on the IP address and port information of end Z; if the A-end information in the merge message is consistent with the A-end information corresponding to the matched bidirectional link, the update process is terminated; if the A-end information in the merge message is inconsistent with the A-end information corresponding to the matched bidirectional link, the management control device issues an alarm or updates the A-end information corresponding to the matched bidirectional link to the A-end information in the merge message.

[0083] Specifically, when the management and control device first receives the merge message from end A, it needs to search based on the IP address and port information to determine whether there is a matching bidirectional link in the first mapping table. If so, it further determines whether the Z-end information corresponding to the bidirectional link is consistent with the Z-end information in the merge message. If they are consistent, it means that the AZ-end connection relationship has not changed and the bidirectional link does not need to be updated. If they are inconsistent, it means that the AZ-end connection relationship has changed, and the Z-end information corresponding to the bidirectional link needs to be updated to the Z-end information in the merge message, indicating that a new bidirectional link has been established.

[0084] Furthermore, the management and control device receives the merge message from the Z end and performs a search based on the IP address and port information of the Z end. If an updated matching record is found and the A end information in the record is the same as the A end information in the merge message, no subsequent operations will be performed and the update process will be ended directly. If they are not the same, the management device can issue an alarm according to the actual business, or update the A end information in the record to the A end information in the merge message.

[0085] It is easy to understand that if the management and control device first receives the merge message sent by the Z end, it will search based on the IP address and port information of the Z end. If no relevant matching record is found, it will search based on the IP address and port information of the A end in the merge message. After finding the relevant matching record, the Z end information in the record will be updated to the Z end information in the merge message.

[0086] In the above link discovery method, the management and control device can directly obtain the complete port link by receiving the merged message sent by both ends, forming complete topology information, and can realize self-verification of the connection relationship. After the verification is completed, only one matching record is stored, thereby saving storage resources and improving resource utilization. In addition, on the basis of realizing network topology discovery, conflict detection can be performed, and the connection relationship of the link can be updated in real time. According to the fiber break message reported by the device, the relevant matching records can be deleted in time to release storage resources. The entire process does not require additional protocols or bandwidth resources, which improves the level of automated operation and maintenance of the OTN network.

[0087] In one specific embodiment, Figure 7 The following is a schematic diagram of a link automatic discovery scenario, including:

[0088] The line-side ports of two OTN devices are connected by optical fiber and are each connected to a management and control device. Port 1, slot 11, of one OTN device is connected to port 2, slot 12, of the other OTN device. The IP addresses of the two OTN devices are 10.0.20.2 and 10.0.20.3, respectively, and both are reachable on the LAN. When two OTN devices are powered on and their ports are activated, a TTI stream containing local information is automatically generated. The two devices each generate their own IP and port information and fill in the TCM2 TTI field. For example, the TTI stream of one device (end A) is: 00001010 00000000 00010100 000000100000000100001011 000000001 00000000, and the TTI stream of the other device (end Z) is: 00001010 0000000000010100000000011 000000001 00001100 00000001 00000000, after each receives the TTI stream sent by the other end, it parses and obtains the IP address and port information of the other end, and determines whether it has saved the IP address and port information of the other end before. If it has been saved, it is compared with the most recently received (i.e. the last) IP address and port information. If there is no change, it is not reported. If there is a change, it is processed in the same way as the unsaved one, and it is spliced ​​with its own IP address and port information and sent to the management and control device. After the management and control device receives the messages sent by each of the two devices, it compares and stores them. It uses the IP and port information as the key to query whether there are records in the mapping table based on the A end and the Z end respectively. When registering for the first time, there is no matching record. The data can be directly sorted in the string order of the IP and port information and then inserted. After the management and control device completes the data insertion, it can read the data in the mapping table and perform a topology display.

[0089] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0090] Based on the same inventive concept, embodiments of the present application also provide a link discovery device for implementing the aforementioned link discovery method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more link discovery device embodiments provided below can be found in the limitations of the link discovery method described above and will not be repeated here.

[0091] In one embodiment, Figure 8 As shown, a link discovery device 800 is provided, including: a receiving module 802, a processing module 804 and a sending module 806, wherein:

[0092] A receiving module 802 is configured to receive an OTN frame sent by a second OTN device, wherein the OTN frame includes an Internet Protocol (IP) address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number.

[0093] The processing module 804 is configured to decode the OTN frame and obtain the IP address and port information of the second OTN device;

[0094] The sending module 806 is configured to merge the IP address and port information of the second OTN device with its own IP address and port information, and send the merged message to the management and control device, so that the management and control device forms a bidirectional link according to the merged message.

[0095] In one embodiment, the sending module 806 is specifically configured to, if it is determined that this is the first time that the merged message is sent to the management and control device, send the merged message to the management and control device; if it is determined that this is not the first time that the merged message is sent to the management and control device, determine whether the current IP address and port information sent by the second OTN device is consistent with the IP address and port information sent last time; if they are consistent, not send the merged message to the management and control device; if they are inconsistent, merge the current IP address and port information with the second OTN device's own IP address and port information, and send the merged message to the management and control device.

[0096] In one embodiment, the OTN frame includes a time-concatenated multiplexing (TCM2) overhead byte, the TCM2 overhead byte includes a trace tracking identifier (TTI) field, the TTI field includes a format identification field and a specific format data field, the first 16 bits of the specific format data field are a reserved field, the middle 32 bits of the specific format data field are the IP address of the second OTN device pair, and the last 32 bits of the specific format data field are the port information of the second OTN device, wherein the chassis occupies 8 bits, the slot number occupies 8 bits, the port number occupies 8 bits, and the remaining 8 bits are reserved.

[0097] In one embodiment, the sending module 806 is further configured to, if no OTN frame sent by the second OTN device is received for a first preset time period, determine that the connection with the second OTN device is disconnected, and send a connection disconnection message to the management and control device.

[0098] Each module in the above-mentioned communication device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0099] In one embodiment, Figure 9 As shown, another link discovery device 900 is provided, including: a receiving module 902 and a processing module 904, wherein:

[0100] A receiving module 902 is configured to receive merge messages sent by a first OTN device and a second OTN device, respectively, where the merge message includes the IP address and port information of the first OTN device, and the IP address and port information of the second OTN device, where the port information includes a chassis, a slot number, and a port number.

[0101] The processing module 904 is configured to form a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

[0102] In one embodiment, the processing module 904 is specifically configured to sort the IP addresses of the first OTN device and the second OTN device according to character strings, use the larger IP address as the Z end and the smaller IP address as the A end, and store the A end and the corresponding port information, and the Z end and the corresponding port information in a first mapping table. The first mapping table includes the A end and the corresponding port information, and the Z end and the corresponding port information for multiple bidirectional links.

[0103] In one embodiment, the receiving module 902 is further configured to receive a disconnection message sent by the first OTN device and the second OTN device, respectively, where the disconnection message includes the IP address and port information of the first OTN device or the IP address and port information of the second OTN device. The processing module 904 is further configured to, based on the disconnection message sent by the first OTN device or the disconnection message sent by the second OTN device, search the first mapping table for a bidirectional link corresponding to the disconnection message, and delete the A-end and port information corresponding to the A-end, and the Z-end and port information corresponding to the Z-end of the bidirectional link from the first mapping table.

[0104] In one embodiment, the receiving module 902 is also used to receive the merge message sent by the A end, and search the first mapping table for the bidirectional link matching the A end according to the IP address and port information of the A end; the processing module 904 is also used to update the Z end information corresponding to the matching bidirectional link to the Z end information in the merge message if the Z end information in the merge message is inconsistent with the Z end information corresponding to the matching bidirectional link; the receiving module 902 is also used to receive the merge message sent by the Z end, and search the first mapping table for the bidirectional link matching the Z end according to the IP address and port information of the Z end; the processing module 904 is also used to end the update process if the A end information in the merge message is consistent with the A end information corresponding to the matching bidirectional link, and if the A end information in the merge message is inconsistent with the A end information corresponding to the matching bidirectional link, issue an alarm or update the A end information corresponding to the matching bidirectional link to the A end information in the merge message.

[0105] Each module in the above-mentioned communication device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0106] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for converting speech timbre is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0107] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0108] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0109] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0110] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of each of the above-described method embodiments.

[0111] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0112] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A link discovery method, characterized in that: Applied to optical transport network (OTN) equipment, the method includes: The first OTN device receives an OTN frame sent by the second OTN device, where the OTN frame includes an Internetworking Protocol (IP) address and port information of the second OTN device, where the port information includes a chassis, a slot number, and a port number. The first OTN device decodes the OTN frame to obtain the IP address and port information of the second OTN device; The first OTN device merges the IP address and port information of the second OTN device with its own IP address and port information, and sends the merged message to the management and control device, so that the management and control device forms a bidirectional link according to the merged message.

2. The method according to claim 1, characterized in that The first OTN device merges the IP address and port information of the second OTN device with its own IP address and port information, and sends the merged message to the management and control device, including: In a case where the first OTN device determines that it is the first time to send the merged message to the management and control device, the first OTN device sends the merged message to the management and control device; When the first OTN device determines that this is not the first time that the merged message is sent to the management and control device, the first OTN device determines whether the current IP address and port information sent by the second OTN device are consistent with the IP address and port information sent last time. If they are consistent, the first OTN device does not send the merged message to the management and control device. If they are inconsistent, the first OTN device merges the current IP address and port information with its own IP address and port information, and sends the merged message to the management and control device.

3. The method according to claim 1 or 2, characterized in that The OTN frame includes the Internet Protocol IP address and port information of the second OTN device, and the port information includes a chassis, a slot number, and a port number, including: The OTN frame includes a time-concatenated multiplexing (TCM2) overhead byte, the TCM2 overhead byte includes a trace tracking identifier (TTI) field, the TTI field includes a format identification field and a specific format data field, the first 16 bits of the specific format data field are a reserved field, the middle 32 bits of the specific format data field are the IP address of the second OTN device pair, and the last 32 bits of the specific format data field are the port information of the second OTN device, wherein the chassis occupies 8 bits, the slot number occupies 8 bits, the port number occupies 8 bits, and the remaining 8 bits are reserved.

4. The method according to claim 3, characterized in that The method further comprises: If the first OTN device does not receive the OTN frame sent by the second OTN device within a first preset time period, the first OTN device determines that the connection with the second OTN device is disconnected; The first OTN device sends a connection disconnected message to the management and control device.

5. A link discovery method, characterized in that: A management and control device applied to an optical transport network (OTN), the method comprising: The management and control device receives merge messages respectively sent by the first OTN device and the second OTN device, wherein the merge message includes the IP address and port information of the first OTN device and the IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number; The management and control device forms a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

6. The method according to claim 5, characterized in that The management and control device forms a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device, including: The management and control device sorts the IP addresses of the first OTN device and the second OTN device according to character strings, uses the larger IP address as the Z end and the smaller IP address as the A end, and stores the A end and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end in a first mapping table. The first mapping table includes the A end and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end, corresponding to multiple bidirectional links.

7. The method according to claim 6, characterized in that The method further comprises: The management and control device receives a connection disconnection message sent by the first OTN device and the second OTN device respectively, where the connection disconnection message includes the IP address and port information of the first OTN device or the IP address and port information of the second OTN device; The management and control device searches the first mapping table for a bidirectional link corresponding to the disconnection message based on the disconnection message sent by the first OTN device or the disconnection message sent by the second OTN device; The management and control device deletes the A end corresponding to the bidirectional link and the port information corresponding to the A end, and the Z end and the port information corresponding to the Z end from the first mapping table.

8. The method according to claim 6, characterized in that The method further comprises: The management and control device receives the merge message sent by the A end, and searches the first mapping table for a bidirectional link matching the A end according to the IP address and port information of the A end; If the Z-end information in the merge message is inconsistent with the Z-end information corresponding to the matched bidirectional link, the management and control device updates the Z-end information corresponding to the matched bidirectional link to the Z-end information in the merge message; The management and control device receives the merge message sent by the Z terminal, and searches the first mapping table for a bidirectional link matching the Z terminal according to the IP address and port information of the Z terminal; If the A-end information in the merged message is consistent with the A-end information corresponding to the matched bidirectional link, the update process is terminated; if the A-end information in the merged message is inconsistent with the A-end information corresponding to the matched bidirectional link, the management and control device issues an alarm or updates the A-end information corresponding to the matched bidirectional link to the A-end information in the merged message.

9. A link discovery device, characterized in that: The device comprises: A receiving module, configured to receive an OTN frame sent by a second OTN device, wherein the OTN frame includes an Internet interconnection protocol IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number; a processing module, configured to decode the OTN frame and obtain the IP address and port information of the second OTN device; The sending module is used to merge the IP address and port information of the second OTN device with its own IP address and port information, and send the merged message to the management and control device, so that the management and control device forms a bidirectional link according to the merged message.

10. A link discovery device, characterized in that: The device comprises: a receiving module, configured to receive merge messages respectively sent by the first OTN device and the second OTN device, wherein the merge message includes the IP address and port information of the first OTN device, and the IP address and port information of the second OTN device, wherein the port information includes a chassis, a slot number, and a port number; The processing module is configured to form a bidirectional link from the first OTN device to the second OTN device based on the merge message sent by the first OTN device and the merge message sent by the second OTN device.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 5 to 8 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.