Method and apparatus for determining optical connection relationship, and computing device

By detecting the variation patterns of the light emission power and light reception power of the optical module through a network management system, the problems of high cost and low efficiency in determining optical connection relationships in existing technologies have been solved, achieving low-cost and high-efficiency determination of optical connection relationships.

WO2026103155A1PCT designated stage Publication Date: 2026-05-21HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-06-27
Publication Date
2026-05-21

Smart Images

  • Figure CN2025105060_21052026_PF_FP_ABST
    Figure CN2025105060_21052026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a method and apparatus for determining an optical connection relationship, and a computing device. The method comprises: a network management system acquires a transmit optical power of a first optical module of a first network device during a second time period, the transmit optical power during the second time period being an optical power acquired by scrambling by using a first parameter during a first time period, and the second time period comprising the first time period; the network management system acquires a receive optical power of a second optical module of a second network device during the second time period; and when the transmit optical power during the second time period and the receive optical power during the second time period have similarity, determining that the first optical module and the second optical module have an optical connection relationship. The solution of the present application can effectively determine the optical connection relationship in networks.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus and computing equipment for determining optical connectivity

[0001] This application claims priority to Chinese Patent Application No. 202411613142.5, filed on November 12, 2024, entitled "Method, Apparatus and Computing Device for Determining Optical Connectivity", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of optical communication technology, and in particular to a method, apparatus and computing device for determining optical connection relationships. Background Technology

[0003] As optical communication networks carry increasingly diverse services, efficient network fault location becomes more and more important. The prerequisite for network fault demarcation and location is to obtain the correct optical connection relationship in the network. Incorrect optical connection relationship will affect the accuracy of fault location.

[0004] To obtain the correct optical connection, the existing optical communication network practices can be summarized as follows: Network device A at the local end first superimposes a small-amplitude low-frequency signal (used to indicate port 1 of network device A) onto the optical signal of the service to be transmitted. This is equivalent to amplitude modulation on the top of the optical signal, thus obtaining a modulation top signal. The modulation top signal is then sent from the optical module on port 1 to network device B at the other end. Network device B can determine port 1 of network device A by parsing the modulation top signal. Combined with port 2 of the optical module in network device B that received the modulation top signal, it can be determined that port 1 of network device A and port 2 of network device B have an optical connection relationship.

[0005] However, the above approach has some drawbacks: first, it requires additional hardware to be added to the network equipment to generate the tuning signal, resulting in high modification costs; second, the network equipment needs to have the ability to parse the tuning signal to obtain the port information of the other end, which increases the processing pressure on the network equipment. Summary of the Invention

[0006] This application provides a method, apparatus, and computing device for determining optical connectivity relationships, which can determine optical connectivity relationships in a network in a low-cost and efficient manner.

[0007] In a first aspect, this application provides a method for determining an optical connection relationship. The method is applied to a network management system. The method includes: the network management system acquiring the emission power of a first optical module of a first network device in a second time period, wherein the emission power in the second time period is the optical power obtained after scrambling with a first parameter in the first time period, and the second time period includes the first time period; the network management system acquiring the received optical power of a second optical module of a second network device in the second time period; and determining that the first optical module and the second optical module have an optical connection relationship when the emission power in the second time period is similar to the received optical power in the second time period.

[0008] In the above scheme, the first optical module is scrambled using a first parameter in the first time period. The emission power of the first optical module in the first time period is the scrambled emission power (scrambling causes the emission power to exhibit a certain change pattern, such as increasing, decreasing, or fluctuating). In the second time period, excluding the first time period, the first parameter is not used to scramble the first optical module. Therefore, the emission power of the first optical module in the second time period, excluding the first time period, is the unscrambled emission power. For example, the emission power of an optical module represents the intensity of the optical signal output by the optical module, and the received optical power represents the intensity of the optical signal received by the optical module. Since the transmission speed of optical signals in optical fibers is very fast, the received optical power of an optical module optically connected to the first optical module in the second time period should be similar to the emission power of the first optical module in the second time period; that is, the received optical power of an optical module optically connected to the first optical module in the first time period exhibits a similar change pattern to the received optical power of the first optical module in the first time period.

[0009] Based on the above characteristics, the network management system obtains the light emission power of the first optical module in the second time period and the light reception power of the second optical module in the second time period, and then determines whether the two are similar: if they are similar, it is determined that the second optical module is an optical module with an optical connection relationship with the first optical module; if they are not similar, it is determined that the second optical module and the first optical module are not optically connected.

[0010] The aforementioned network management system can directly obtain the emitting / receiving power of the optical modules reported by the network devices, or indirectly calculate the emitting power of the optical modules using data such as input current, bias current, and temperature reported by the network devices. Since emitting power, received power, input current, bias current, and temperature are white-box indicators in communication networks, and network devices periodically report these indicators to the network management system, this solution does not require the installation of additional components on the network devices, thus avoiding modification costs. Furthermore, this solution is executed by the network management system, eliminating the need for network devices to exchange port information and parse the other end's port information, thereby not increasing the processing load on the network devices.

[0011] Based on the first aspect, in a possible implementation, the network management system sends a first command to the first network device, the first command indicating that the first parameter is a first value in a first time period; or, the network management system sends a first command to the first network device, the first command indicating that the first parameter is a first value in a first time period and a second value in a third time period included in the second time period, the first value not being equal to the second value.

[0012] Based on the first aspect, in a possible implementation, the first parameter is the bias current, which is positively correlated with the luminous power of the first optical module in the second time period; or, the first parameter is the temperature, which is positively or negatively correlated with the luminous power of the first optical module in the second time period.

[0013] For example, the bias current of the optical module (the laser within it) is positively correlated with its luminous power. Increasing the bias current increases the luminous power, while decreasing it decreases it. Therefore, by adjusting the bias current of the first optical module, the aforementioned scrambling can be achieved. Similarly, the temperature of the optical module is positively or negatively correlated with its luminous power. If the temperature is below a certain threshold, the luminous power is positively correlated; if it is above the threshold, the luminous power is negatively correlated. Therefore, by adjusting the temperature of the first optical module, the aforementioned scrambling can also be achieved.

[0014] Based on the first aspect, in a possible implementation, the network management system first obtains a similarity score between the emitted power and received power of the second time period, and then determines that the emitted power and received power of the second time period are similar based on the similarity score and a scoring threshold. In other words, the network management system can calculate a similarity score to measure the degree of similarity between the emitted power of the first optical module and the received power of the second optical module in the second time period, and then compare the similarity score with a scoring threshold to determine whether the emitted power and received power of the first optical module in the second time period are similar, thereby determining whether the first and second optical modules have an optical connection.

[0015] Based on the first aspect, in a possible implementation, the network management system first calculates one or more of the first score, second score, third score, fourth score, and fifth score, and then obtains the aforementioned similarity score based on this one or more scores.

[0016] (1) The first score is used to represent the Pearson correlation coefficient between the emitting power of the first optical module in the second time period and the receiving power of the second optical module in the second time period.

[0017] (2) The second score is used to indicate whether the direction of change of the light emission power of the first optical module in the fourth period is consistent with the direction of change of the light reception power of the second optical module in the fourth period. The fourth period is the period from time t1-k1 to time t1+k2 in the second period. t1 is the starting time of the first period. k1 and k2 are used to represent the duration. Both k1 and k2 are positive numbers.

[0018] (3) The third score is used to indicate whether the direction of change of the light emission power of the first optical module in the fifth time period is consistent with the direction of change of the light reception power of the second optical module in the fifth time period. The fifth time period is the time period from time t2-k3 to time t2+k4 in the second time period. t2 is the end time of the first time period. k3 and k4 are used to represent the duration. k3 and k4 are both positive numbers.

[0019] (4) The fourth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module in the fourth time period and the change in the received luminous power of the second optical module in the fourth time period.

[0020] (5) The fifth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module in the fifth time period and the change in the received power of the second optical module in the fifth time period.

[0021] Based on the first aspect, in a possible implementation, the network management system can receive the emission power of the first optical module in the second time period sent by the first network device, thereby directly obtaining the emission power of the first optical module in the second time period without performing additional calculations / conversions.

[0022] Based on the first aspect, in a possible implementation scheme, the network management system receives first data sent by the first network device, the first data being used to represent the emission power of the first optical module in a second time period, and then the network management system determines the emission power of the first optical module in the second time period based on the first data (i.e., the corresponding emission power is obtained by converting the first data).

[0023] Based on the first aspect, in a possible implementation, the aforementioned first data includes the input current or bias current of the first optical module in the second time period.

[0024] For example, there is a mapping relationship between the input current I of the laser in an optical module and the laser's luminous power P (called the PI characteristic of the laser). When the network management system obtains the input current of the laser in the first optical module at a certain moment from the first network device, it can determine the luminous power of the laser at that moment, i.e., the luminous power of the first optical module at that moment, by combining the PI characteristic. The input current I is obtained by superimposing the bias current and the modulation current (modulation signal). Generally, the modulation current is very small relative to the bias current. Therefore, the bias current can be used as an approximation of the input current, and the luminous power (in this case, an approximation) can be determined by combining it with the PI characteristic.

[0025] Based on the first aspect, in a possible implementation, the first optical module is inserted into the first port of the first network device, and the second optical module is inserted into the second port of the second network device. That is, the first optical module and the second optical module can be pluggable modules, inserted into the ports of the corresponding network devices. When it is determined that the light emission power of the first optical module in the second time period is similar to the light reception power of the second optical module in the second time period, it can be determined that the first port where the first optical module is located and the second port where the second optical module is located have an optical connection relationship.

[0026] Based on the first aspect, in possible implementations, the first network device where the first optical module is located and the second network device where the second optical module is located correspond to the same or different network layers.

[0027] For example, the first network device where the first optical module is located and the second network device where the second optical module is located can both correspond to optical layer networks, such as being located in the same optical transport network or optical packet switching network.

[0028] For example, the first network device containing the first optical module is located in the Internet Protocol (IP) layer network, while the second network device containing the second optical module is located in the optical layer network. The IP layer network consists of network devices such as routers, primarily focusing on user traffic processing, while the optical layer network consists of optical network devices such as wavelength division multiplexing (WDM) equipment, primarily focusing on traffic transmission. The optical layer network provides link extension functionality for the IP layer network, and the IP layer network and optical layer network support different network protocols. The optical fiber connecting the IP layer network and the optical layer network is usually called a pigtail. Based on the first aspect of the solution, the correct pigtail connection can be quickly and efficiently determined. When a fault occurs in the optical layer network, the services of the IP layer network will be affected. When the IP layer network detects the fault, it can accurately locate the fault location in the optical layer network by combining the IP layer network information with the previously determined pigtail connection.

[0029] Secondly, this application provides an apparatus for determining optical connectivity, including a module for performing a method as described in any possible embodiment of the first aspect.

[0030] Thirdly, this application also provides a chip including a processor and an interface, the interface being used to communicate with an external device or module of the chip, and the processor being used to perform a method as described in any of the embodiments of the first aspect, as can be seen in the foregoing description, which will not be repeated here.

[0031] Fourthly, this application also provides a computing device including a processor and a memory, the processor being configured to execute instructions stored in the memory to cause the computing device to perform a method as described in any embodiment of the first aspect.

[0032] Fifthly, this application also provides a computing device cluster including a plurality of computing devices, each computing device including a processor and a memory. The processors of the plurality of computing devices are used to execute instructions stored in the memory of the plurality of computing devices, so that the computing device cluster performs the method as described in any embodiment of the first aspect.

[0033] In a sixth aspect, this application also provides a computer-readable storage medium including computer program instructions that, when executed by a computing device or cluster of computing devices, cause the computing device or cluster of computing devices to perform the method as described in any embodiment of the first aspect.

[0034] In a seventh aspect, this application also provides a computer program product containing instructions. When the aforementioned instructions are executed by a computing device or cluster of computing devices, the computing device or cluster of computing devices causes the computing device or cluster of computing devices to perform the method as described in any embodiment of the first aspect. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments are briefly introduced below.

[0036] Figure 1 is a schematic diagram of a system architecture provided in this application;

[0037] Figure 2 is a schematic diagram of the optical connection relationship between the two optical modules provided in this application;

[0038] Figure 3 is a flowchart illustrating a method for determining optical connectivity provided in this application;

[0039] Figure 4 is a PI characteristic curve of an optical module provided in this application;

[0040] Figure 5 is a schematic diagram of a set of light emission power and light collection power provided in this application;

[0041] Figure 6 is a schematic diagram of a process for determining optical connection relationships by modifying the bias current according to an embodiment of this application;

[0042] Figure 7 is a schematic diagram of the structure of a device for determining optical connection relationships provided in this application;

[0043] Figure 8 is a structural schematic diagram of a computing device provided in this application;

[0044] Figure 9 is a schematic diagram of a computing device cluster provided in this application;

[0045] Figure 10 is a schematic diagram of two computing devices provided in this application interacting via a network. Detailed Implementation

[0046] To facilitate understanding of the technical solution of this application, a system architecture involved in this application will be introduced below.

[0047] Please refer to Figure 1, which is a schematic diagram of a system architecture provided in an embodiment of this application, including a network management system (hereinafter referred to as the network manager), a first network device, and a second network device. The network management system is communicatively connected to the first network device, which can be wired or wireless. The network management system is also communicatively connected to the second network device, which can be wired or wireless, and this application does not make specific limitations. The first optical module on the first network device and the second optical module on the second network device are connected via optical fiber (i.e., they have an optical connection relationship).

[0048] Regarding the type of network management system shown in Figure 1, this application does not impose specific limitations. For example, the network management system includes a controller, which is responsible for managing and controlling devices and resources in the network. Specifically, it can be a Software Defined Network Controller (SDN) controller, an Element Management System (EMS), or other controllers; this application does not limit this. The network management system may also include one or more analyzers and collectors. Specifically, the controller is responsible for managing and controlling devices and resources in the network; specifically, it can be a Software Defined Network Controller (SDN) controller, an Element Management System (EMS), or other controllers; this application does not limit this. The collector is used to collect data information in the network (including the status of network devices, performance indicators, log information, etc.) to help administrators understand the network's operation and device status. The analyzer is a tool used to analyze network data traffic and performance (such as analyzing data packets, traffic patterns, performance indicators, etc.) to help administrators understand the network's operating status and diagnose network problems.

[0049] Optionally, the network management system can be deployed on a single computing device, a cluster of multiple computing devices, or a terminal device. The computing device can be a physical server, a virtual machine, a container, or an edge computing device. A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity is used as the virtual machine's hard drive and memory capacity. Each virtual machine has an independent basic input / output system (CMOS), hard drive, and operating system, and can be operated like a physical machine. A container is a portable software unit that can combine an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, thus eliminating the need to build complex environments and simplifying the application development and deployment process. Edge computing devices refer to devices that are closer to the data source and end user, featuring low latency and high bandwidth, such as intelligent routers and edge servers; this application does not specifically limit this. Terminal devices can be desktop computers, laptops, tablets, smartphones, in-vehicle devices, or smart conferencing devices; this application does not limit this.

[0050] This application does not limit the types of network devices (first network device and second network device) in Figure 1. For example, network devices can be routers, optical switches, wavelength division multiplexing (WDM) equipment, optical transport network (OtN) equipment, servers, etc. The first optical module is located on the first network device, and the second optical module is located on the second network device. The first and second optical modules are connected by an optical fiber, which serves as the conduit (medium / transmission medium) for transmitting optical signals between the first and second optical modules. An optical module is a hardware device whose main function is to realize photoelectric conversion and electro-optic conversion in the optical communication process. An optical module may include a transmitter optical sub-assembly (tOSA) (which can also be an optical transmitter), a receiver optical sub-assembly (ROSA) (which can also be an optical receiver), and a microcontroller unit (MCU) (which can also be a functional circuit), etc. The tOSA may include a laser and a modulator, etc. The ROSA may include a photodetector (PD), etc. Depending on the type of optical module, some optical modules include an optical digital signal processor (oDSP) chip, while others do not.

[0051] This application does not specifically limit the type of optical module.

[0052] For example, the types of optical modules include, but are not limited to, normal optical modules, linear-drive pluggable optics (LPO) modules, near package optics (NPO) modules, co-packaged optics (CPO) modules, half-retimed optics (HRO) modules, linear receive optics (LRO) modules, and transmitter retimed optics (tRO) modules.

[0053] Based on transmission rate, optical modules can be classified into types such as 400GE (Gigabit Ethernet), 100GE, 40GE, 25GE, 10GE, GE, and Fast Ethernet (FE) optical modules to meet the needs of different transmission rates.

[0054] According to the packaging type, optical module 100 can be classified into small form-factor pluggable (SFP) optical modules, quad small form-factor pluggable (QSFP) optical modules, quad-small form-factor pluggable-double density (QSFP-DD) optical modules, 120Gb / s extended-capability form-factor pluggable (CXP) optical modules, CFP (centum form-factor pluggable) optical modules, CPO optical modules, LPO optical modules, etc.

[0055] This application does not specify the exact locational relationship between network devices and optical modules.

[0056] For example, assuming the optical module is a pluggable module, such as a traditional hot-pluggable optical module, or an optical module made using Linear Photonic Optical (LPO) packaging technology, then the optical module can be directly plugged into the port of the network device. Taking Figure 2 as an example, assuming that both the first and second optical modules are pluggable, the first optical module is inserted into a port of the first network device (the port in the first network device where the first optical module is placed), and the second optical module is inserted into the second network device (the port in the second network device where the second optical module is placed). The first end of an optical fiber is connected to the first optical module, and the second end of the optical fiber is connected to the second optical module, enabling optical communication between the first and second network devices.

[0057] For example, assuming the optical module is a non-pluggable module, it can be installed / integrated inside the network device. Co-Packaged Optics (CPO) is a type of packaging that packages the optical module and the switching chip together close to each other. This reduces the distance of the signal during electro-optical conversion and transmission, thereby significantly reducing power consumption, improving signal integrity, reducing latency, and reducing size. CPO optical modules packaged using CPO technology are placed inside the network device.

[0058] The quantitative and positional relationships between network devices, optical modules, ports, and optical fibers in Figures 1 and 2 are illustrative and do not constitute specific limitations. Figure 1 only illustrates the connection between the first and second network devices. In reality, both the first and second network devices can connect to more network devices, and the network management system can also connect to more network devices. The number of ports, optical modules, and optical fibers connected to each network device can be configured according to usage needs, and this application does not impose any limitations. Figures 1 and 2 use a solid line to represent an optical fiber, but this does not mean there can only be one optical fiber; there can be more optical fibers. For example, the first and second optical modules can be connected by two optical fibers. One fiber is used for the first optical module to transmit optical signals to the second optical module, in which case the first optical module is the transmitter and the second optical module is the receiver. The other fiber is used for the second optical module to send optical signals to the first optical module, in which case the second optical module is the transmitter and the first optical module is the receiver.

[0059] Based on the descriptions in Figures 1 and 2, the following describes a method for determining optical connectivity provided by this application.

[0060] Please refer to Figure 3, which is a flowchart of a method for determining optical connectivity provided in an embodiment of this application, including the following steps S301 to S303.

[0061] S301. The network management system obtains the luminous power of the first optical module of the first network device in the second time period, wherein the luminous power of the first optical module in the second time period is the optical power obtained after scrambling with the first parameter in the first time period, and the second time period includes the first time period.

[0062] The aforementioned first optical module is located on the first network device. When the first optical module is a pluggable optical module, it can be plugged into a port of the first network device (the port is not specifically limited). When the first optical module is a non-pluggable module, it can be installed inside the first network device. This application does not limit this. For the type and positional relationship between the first optical module and the first network device, please refer to the relevant description in Figure 1, which will not be repeated here.

[0063] The luminous power (also known as emitted optical power) of the first optical module refers to the intensity of the optical signal output / emitted by the laser in the first optical module. Since the first optical module is scrambled using the first parameter during the first time period, its luminous power during this period is the scrambled luminous power. This scrambling causes the luminous power to exhibit a certain variation pattern, such as increasing, decreasing, or fluctuating. However, during the second time period (excluding the first time period), the first parameter is not used to scramble the first optical module; therefore, the luminous power of the first optical module during the second time period (excluding the first time period) is the unscrambled luminous power.

[0064] The length of the second time segment can be 30 seconds, 1 minute, or other lengths; this application does not specify a particular length. The second time segment includes the first time segment, and the length of the first time segment is shorter than the length of the second time segment; this application also does not specify a particular length for the first time segment.

[0065] Optionally, before step S301, the network management system may send a first command to the first network device. The first command is used to indicate that the first parameter is a first value in the first time period, thereby realizing the scrambling of the light emission power of the first optical module in the first time period.

[0066] Optionally, before step S301, the network management system may send a first command to the first network device. The first command indicates that the first parameter has a first value in the first time period and a second value in the third time period included in the second time period, wherein the first value is not equal to the second value, thereby scrambling the emission power of the first optical module in the first time period. The third time period and the first time period are different time periods within the second time period. The third time period can be all time periods in the second time period excluding the first time period, or it can be a portion of the second time period excluding the first time period.

[0067] Optionally, the first parameter is the bias current, which is positively correlated with the luminous power of the first optical module in the second time period; or, the first parameter is the temperature, which is positively or negatively correlated with the luminous power of the first optical module in the second time period.

[0068] For example, a positive correlation indicates a positive relationship between two variables; that is, when one variable increases, the other variable also increases, and when one variable decreases, the other variable also decreases. A negative correlation indicates a negative relationship between two variables; that is, when one variable increases, the other variable decreases, and when one variable decreases, the other variable increases. Therefore, if the first parameter is positively correlated with the luminous power of the first optical module in the second time period, then the luminous power of the first optical module in the second time period increases as the first parameter increases; if the first parameter is negatively correlated with the luminous power of the first optical module in the second time period, then the luminous power of the first optical module in the second time period decreases as the first parameter increases.

[0069] For example, Figure 4 illustrates the PI characteristics of a laser in an optical module at different temperatures. The PI characteristics refer to the mapping relationship between the input current I of the laser in the optical module and the emitting power P of the laser.

[0070] Taking the PI characteristic corresponding to 30 degrees as an example, the input current I is positively correlated with the luminous power P, and the PI characteristic exhibits a significant threshold effect: when the laser's input current is below the threshold current (the threshold current varies at different temperatures; the threshold current is the current value corresponding to the bend in the PI characteristic curve), the laser produces almost no laser output (very low luminous power). When the laser's input current exceeds the threshold current, the laser produces significant laser output, and the luminous power P increases linearly with the increase of the input current I (usually referred to as the linear operating region of the laser). The input current I is obtained by superimposing the laser's bias current with the modulation current (the two currents may be in the same or opposite directions). To ensure the laser operates in the linear operating region, the bias current is set to a value greater than the threshold current. Typically, the bias current ranges from 10% to 20% of the laser's rated current. For example, if the rated current is 30mA, the bias current ranges from 3mA to 6mA; this application does not specifically limit this range. By superimposing the modulation current on a fixed bias current, the luminous power can be made to vary with the modulation current.

[0071] The input current I = bias current + modulation current (the sum of the two). The input current I is positively correlated with the luminous power P. Therefore, the bias current and modulation current are also positively correlated with the luminous power P. However, the modulation current is service-dependent and is not suitable as the first parameter to achieve the above scrambling. Therefore, the bias current can be used as the first parameter.

[0072] For example, optical modules also exhibit temperature characteristics, with the module's temperature being positively or negatively correlated with its luminous power P. When the module's temperature is above a temperature threshold (which may be the same or different for different modules), the temperature and luminous power are negatively correlated. This is because high-temperature operation causes physical and chemical changes that affect the module, such as thermal expansion of materials and electron decay of the luminescent material. When the module's temperature is below the temperature threshold, the temperature and luminous power are positively correlated, as the module's performance is limited at low temperatures. Therefore, temperature can be used as the primary parameter; by adjusting the temperature of the first optical module, the aforementioned scrambling effect on its luminous power can be achieved.

[0073] Continuing with Figure 4 as an example, Figure 4 exemplarily shows the PI characteristics of a laser in an optical module at different temperatures. Assuming the temperature threshold of the optical module is less than -10 degrees Celsius, then when the temperature of the optical module is greater than or equal to -10 degrees Celsius, the temperature of the optical module is negatively correlated with the luminous power P of the optical module. Under the same input current I, the luminous power P of the optical module at -10 degrees Celsius > the luminous power of the optical module at 30 degrees Celsius > the luminous power of the optical module at 60 degrees Celsius.

[0074] Optionally, if the laser in the first optical module has a monitoring function, the first network device can directly obtain the emission power monitored by the laser and send the emission power to the network management system. If the laser in the first optical module does not have a monitoring function, the first network device can indirectly calculate the emission power of the laser (i.e., the emission power of the optical module) and then send the indirectly calculated emission power to the network management system.

[0075] For example, a monitor photo diode (MPD) has a monitoring function and can detect its own emission power. Therefore, if the laser in the first optical module includes an MPD, the first network device can obtain the emission power detected by the MPD in the second time period and then send it to the network management system.

[0076] For lasers lacking monitoring capabilities, their luminous power cannot be directly detected. In such cases, the luminous power can be determined indirectly. For example, by measuring physical parameters such as the laser's input current (i.e., the magnitude of the current flowing through the laser) and temperature, the first network device can indirectly deduce the laser's luminous power based on these parameters and then send it to the network management system. Alternatively, the first network device can send the aforementioned physical parameters to the network management system, which can then indirectly calculate the laser's luminous power. This application does not specifically limit the method of indirect calculation.

[0077] For example, the emission power of the first optical module in the second time period can be represented by the emission power of the first optical module at N moments in the second time period. Here, N is a positive integer greater than or equal to 1, and this application does not impose a specific limitation on the value of N. These N moments can be equally or unequally spaced. For example, assuming the N moments are equally spaced, that is, the time interval between adjacent moments in the N moments is a fixed value, this fixed value can be 1ms (millisecond level), 1s (second level), or other time lengths. This application does not impose a specific limitation on this time interval.

[0078] Regarding the acquisition of the emission power of the first optical module in the second time period by the network management system, it can include the following methods one and two.

[0079] Method 1: The first network device sends the emission power of the first optical module in the second time period to the network management system, and the network management system receives the emission power of the first optical module in the second time period sent by the first network device.

[0080] In this method, since the first network device directly sends the emission power of the first optical module in the second time period to the network device system, the first network management system can directly obtain the emission power of the first optical module in the second time period without performing additional calculations / conversions.

[0081] Optionally, the first network device can sample data of one or more indicators locally according to a set sampling interval, and report the collected data of these one or more indicators at different times to the network device according to a set reporting period. The aforementioned one or more indicators include the emitting power of the first optical module, so the network management system can directly obtain the emitting power of the first optical module in the second time period from the data reported by the first network device. In addition to emitting power, the first network device can also report one or more of the following indicators to the network management system: received power, bias current, input current, temperature, voltage, etc., and can also upload other indicators of other optical modules or the first network device; this application does not limit this.

[0082] This application does not specify the sampling interval. For example, the first network device may sample the emission power of the first optical module every 1 ms (a sampling interval on the order of milliseconds), or the first network device may sample the emission power of the first optical module every 1 second (a sampling interval on the order of seconds).

[0083] This application does not specify a particular reporting period. For example, the first network device may report data of one or more of the above indicators (including the luminous power of the first optical module) to the network management system every 5 to 10 minutes.

[0084] This application does not specify the number of time points corresponding to the indicator data reported by the first network device each time. For example, assuming N is 30, and the first network device only reports the emission power for 10 time points each time, then the emission power of the first optical module for the 30 time points in the second time period needs to be reported in three separate reports. The network management system needs to aggregate the emission power reported by the first network device in three reports to obtain the emission power of the first optical module for these 30 time points. However, if the number of time points corresponding to the indicator data reported by the first network device each time is greater than or equal to 30, then the network management system can obtain the emission power of the first optical module for these 30 time points from the indicator data reported by the first network device in a single report.

[0085] Method 2: The first network device sends first data to the network management system. The first data represents the emission power of the first optical module in the second time period. Correspondingly, the network management system receives the first data sent by the first network device and then determines the emission power of the first optical module in the second time period based on the first data.

[0086] In this method, since the first network device does not directly send the emission power of the first optical module in the second time period to the network device system, but instead sends the first data representing (indicating) the emission power in the second time period to the network management system, the network management system needs to obtain the emission power of the first optical module in the second time period through indirect calculation, that is, to obtain the emission power of the first optical module in the second time period through the first data conversion.

[0087] Optionally, the first data includes the input current (i.e., the current through the laser in the optical module, also known as the drive current) or bias current of the first optical module in the second time period. The input current of the first optical module in the second time period can be represented by the input current of the first optical module at N times in the second time period. The bias current of the first optical module in the second time period can be represented by the bias current of the first optical module at N times in the second time period.

[0088] As introduced above, there is a mapping relationship between the input current I of the laser in the optical module and the emission power P of the laser (called the PI characteristic of the laser). When the network management system obtains the input current of the laser in the optical module at a certain moment from the first network device, it can determine the emission power of the laser at that moment by combining the PI characteristic, which is also the emission power of the optical module at that moment.

[0089] For example, Figure 4 exemplarily illustrates the PI characteristics of the laser in the first optical module at different temperatures. When the network management system receives the input current of the first optical module sent by the first network device in the second time period, the network management system can determine the emission power of the first optical module in the second time period based on the input current of the first optical module in the second time period and the PI characteristics of the first optical module.

[0090] For example, optical modules exhibit temperature effects. If the first network device also reports the temperature of the first optical module during the second time period to the network management system, the network management system can accurately calculate the luminous power of the first optical module during the second time period based on the input current of the first optical module during the second time period, the temperature of the first optical module during the second time period, and the PI characteristics of the first optical module at the corresponding temperature. If the first network device does not report the temperature of the first optical module during the second time period to the network management system, the network management system can estimate the temperature of the first optical module during the second time period based on information such as the ambient temperature of the first optical module during the second time period, the historical temperature of the first optical module, and the usage time of the first optical module. This application does not limit the specific estimation method. Then, the network management system can calculate the luminous power of the first optical module during the second time period based on the input current of the first optical module during the second time period, the estimated temperature of the first optical module during the second time period, and the PI characteristics of the first optical module at the corresponding temperature.

[0091] For example, as mentioned earlier, the input current I of an optical module equals the bias current plus the modulation current. The modulation current is typically a relatively weak current compared to the bias current; for example, the bias current might be 56mA and the modulation current 0.05mA. Therefore, the bias current of the first optical module is an approximation of its input current I. When the network management system receives the bias current of the first optical module from the first network device during the second time period, but does not obtain the input current, the network management system can approximate the input current using the bias current. Combining this with the PI characteristic of the first optical module, the luminous power of the first optical module during the second time period can be calculated. Similar to the previous example, if the network management system can obtain the temperature of the first optical module during the second time period from the first network device, it can calculate the luminous power more accurately. If the network management system does not obtain the temperature, it can estimate the temperature and thus estimate the luminous power.

[0092] Optionally, the first command may include a first value. The network management system sends a first command carrying the first value to the first network device, allowing the first network device to directly obtain the first value from the first command and then set the first parameter of the first optical module to the first value in the first time period. Alternatively, the first command may not include a first value, but instead include the difference between the first value and the default value of the first parameter, i.e., the first change in the first value relative to the default value (which can be positive or negative). The default value is stored in the first network device / first optical module. When the network management system sends a first command carrying the first change to the first network device, the first network device can obtain the first change from the first command, and then determine the first value based on the first change and the default value, thereby setting the first parameter of the first optical module to the first value in the first time period.

[0093] For example, assuming the default value is 56mA, this value is stored in the bias current register of the first optical module. By default (without scrambling), the first parameter of the first optical module satisfies this default value in the bias current register. Therefore, before the start of the first time period, the first parameter of the first optical module is stable at the default value of 56mA. When the network management system sends a first command to the first network device, the first network device sets the first parameter of the first optical module to 56.7mA according to the first value of 56.7mA carried in the first command. After the first time period ends, the first network device adjusts the first parameter of the first optical module back to the default value of 56.7mA.

[0094] For example, suppose the default value is 56mA. This value is stored in the bias current register of the first optical module. By default, the first parameter of the first optical module satisfies this default value in the bias current register. Therefore, before the start of the first time period, the first parameter of the first optical module is stable at 56mA. When the network management system sends a first command to the first network device, the first network device determines the first value to be 56mA + 0.7mA = 56.7mA based on the first change amount + 0.7mA carried in the first command and the aforementioned default value of 56mA. It then sets the first parameter of the first optical module to 56.7mA during the first time period. After the first time period ends, the first network device adjusts the first parameter of the first optical module back to the default value of 56.7mA.

[0095] For example, the bias current register of the first network device or the first optical module stores a first value and a default value. By default, the first parameter of the first optical module satisfies the default value in the bias current register. Therefore, before the start of the first time period, the first parameter of the first optical module is stable at the first value. When the network management system sends a first command to the first network device, the first network device automatically sets the first parameter of the first optical module to the first value in the bias current register during the first time period. After the first time period ends, the first network device adjusts the first parameter of the first optical module back to the default value in the bias current register.

[0096] Optionally, the first command may include a first value and a second value. The network power system sends the first command carrying the first and second values ​​to the first network device, allowing the first network device to directly obtain the first value from the first command, and then set the first parameter of the first optical module to the first value in the first time period and the second value in the third time period. Alternatively, the first command may not include the second value, but instead include the difference between the second value and the default value of the first parameter, i.e., the second change in the second value relative to the default value (which can be positive or negative). The default value is stored in the first network device / first optical module. When the network management system sends the first command carrying the second change to the first network device, the first network device can obtain the second change from the first command, and then determine the second value based on the second change and the default value, thereby setting the first parameter of the first optical module to the second value in the third time period.

[0097] Optionally, the first command may include information indicating a first time period, such as the start and end times of the first time period, or the start time and duration of the first time period. Based on this information, the first network device can determine the location of the first time period and then set the first parameter of the first optical module to a first value during the first time period. Alternatively, the first command may only carry the duration of the first time period, and the first network device automatically uses the time T or time Ti at which the first command is received as the start time of the first time period, where i is a positive number, and this application does not impose specific limitations. Similarly, the first command may also include information indicating a third time period, thereby setting the first parameter of the first optical module to a second value during the third time period. For simplicity, this will not be elaborated here.

[0098] S302, The network management system obtains the received optical power of the second optical module of the second network device in the second time period.

[0099] The aforementioned second optical module is located on the second network device. When the second optical module is a pluggable optical module, it can be plugged into a port of the second network device; when it is a non-pluggable module, it can be installed inside the second network device. This application does not limit this. For details regarding the type and positional relationship between the second optical module and the second network device, please refer to the relevant description in Figure 1, which will not be repeated here.

[0100] Optionally, the first network device and the second network device can correspond to the same or different network layers (network types). For example, both the first and second network devices can be devices in an optical communication network (optical layer). Alternatively, the first network device can be a network device in an Internet Protocol (IP) network (IP layer), while the second network device is a network device in an optical communication network (such as an optical transport network or optical packet switching network). In this case, the first and second network devices correspond to different network layers (network types).

[0101] For example, the received optical power of the second optical module refers to the intensity of the optical signal received by the second optical module. The received optical power of the second optical module in the second time period can be represented by the emitted optical power of the second optical module at N times in the second time period, that is, the intensity of the optical signal received by the second optical module at each of these N times. For details regarding the second time period and the N times, please refer to the descriptions in steps S301 and S302, which will not be repeated here.

[0102] It should be noted that this application does not limit the execution order of steps S301 and S302. They can be executed sequentially. For example, the network management system can execute S301 first and then S302, or execute S302 first and then S301. S301 and S302 can also be executed in parallel.

[0103] S303. If the light emission power of the first optical module in the second time period is similar to the light reception power of the second optical module in the second time period, the network management system determines that the first optical module and the second optical module have an optical connection relationship.

[0104] As described in step S301, the first optical module was scrambled using the first parameter in the first time period. The emission power of the first optical module in the first time period was the scrambled emission power (scrambling caused the emission power to exhibit a certain variation pattern, such as increasing, decreasing, or fluctuating). However, in the second time period, excluding the first time period, the first parameter was not used to scramble the first optical module. Therefore, the emission power of the first optical module in the second time period, excluding the first time period, was the unscrambled emission power. Since the transmission speed of optical signals in optical fibers is very fast, the time it takes for the optical signal to travel from the first optical module to an optical module optically connected to it is negligible. The received optical power of the optical module optically connected to the first optical module in the second time period should be similar to the emission power of the first optical module in the second time period; that is, the received optical power of the optical module optically connected to the first optical module in the first time period exhibits a similar variation pattern to the received optical power of the first optical module in the first time period.

[0105] Based on the above characteristics, after scrambling the emission power of the first optical module, the network management system obtains the emission power of the first optical module in the second time period (including the scrambled first time period) and the received power of the second optical module in the second time period. It then determines whether the emission power of the first optical module in the second time period (including the scrambled first time period) and the received power of the second optical module in the second time period are similar, thereby determining whether the first and second optical modules have an optical connection. If they are similar, the network management system determines that the first and second optical modules have an optical connection; if they are not similar, the network management system determines that the first and second optical modules do not have an optical connection.

[0106] Optionally, the network management system first obtains the similarity score between the emission power of the first optical module in the second time period and the light-receiving power of the second optical module in the second time period. The similarity score is used to measure the degree of similarity between the emission power of the first optical module in the second time period and the light-receiving power of the second optical module in the second time period. Then, it determines whether the first optical module and the second optical module are similar based on the similarity score and the score threshold.

[0107] This application does not specify the method for comparing similarity scores with score thresholds.

[0108] One possible comparison method is as follows: if the similarity score is greater than or equal to the score threshold, it is determined that the emission power of the first optical module in the second time period and the light-receiving power of the second optical module in the second time period are similar, and thus it is determined that the first optical module and the second optical module have an optical connection relationship; if the similarity score is less than the score threshold, it is determined that the emission power of the first optical module in the second time period and the light-receiving power of the second optical module in the second time period are not similar, and thus it is determined that the first optical module and the second optical module have no optical connection relationship.

[0109] This application does not limit the specific value of the aforementioned scoring threshold. For example, multiple possible values ​​(randomly or manually selected) can be set for the scoring threshold. Then, the prediction accuracy (i.e., the accuracy of determining the optical connection relationship between optical modules) that the network management system can obtain under each value of the scoring threshold can be evaluated. Finally, the value with the highest prediction accuracy can be used as the final scoring threshold.

[0110] Regarding the evaluation of the prediction accuracy of a network management system at a certain value of a score threshold, one possible implementation is as follows: First, obtain a sample set for training the artificial intelligence model. The sample set includes multiple positive samples and multiple negative samples; this application does not specify the number of positive and negative samples. Each positive sample represents the emission and received power of two optical modules with an optical connection relationship during the same time period (including the period during which the emission power of the receiving optical module is scrambled, similar to the first time period described above). Negative samples represent the emission and received power of two optical modules without an optical connection relationship during the same time period (including the period during which the emission power of the receiving optical module is scrambled). Different samples correspond to the same or different two optical modules, with each sample containing two optical modules acting as the transmitter and receiver, respectively. The judgment logic of the artificial intelligence model is as follows: for any two optical modules, first calculate the similarity score of their received and emission power during the same time period, and then determine whether the two optical modules have an optical connection relationship based on the similarity score and the score threshold. The network management system can use the above sample set to train the artificial intelligence model and evaluate the prediction accuracy of the model at a certain value of the first threshold.

[0111] Another possible comparison method is as follows: if the similarity score is less than or equal to the score threshold, it is determined that the emission power of the first optical module in the second time period and the received power of the second optical module in the second time period are similar, thus determining that the first optical module and the second optical module have an optical connection relationship; if the similarity score is greater than the score threshold, it is determined that the emission power of the first optical module in the second time period and the received power of the second optical module in the second time period are not similar, thus determining that the first optical module and the second optical module do not have an optical connection relationship. The method for determining the score threshold can be referred to the previous introduction, and will not be repeated here.

[0112] Optionally, the network management system first calculates one or more of the following scores—a first score, a second score, a third score, a fourth score, and a fifth score—based on the emission power of the first optical module in the second time period (including the first time period) and the received optical power of the second optical module in the second time period, and then obtains a similarity score based on these one or more scores. The similarity score can be the average of these one or more scores, a weighted sum, or a value obtained through other calculation methods; this application does not impose specific limitations on this.

[0113] (1) The first score is used to represent the Pearson correlation coefficient between the emitting power of the first optical module in the second time period and the receiving power of the second optical module in the second time period.

[0114] The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient, is a linear correlation coefficient used to determine the strength and direction of the linear relationship between two variables. See equation (1). Specifically, the Pearson correlation coefficient is defined as the quotient of the covariance and standard deviation between two variables X and Y, denoted as ρ. X,Y Its value ranges between -1 and 1; the larger the absolute value, the stronger the correlation between the two variables. ρ X,Y The absolute value of ρ is used to represent the strength of the linear correlation between two variables; the larger the absolute value, the stronger the linear correlation. X,Y The magnitude relationship between ρ and 0 is used to indicate the direction of a linear correlation between two variables. When ρ X,Y When ρ > 0, it indicates that X and Y are positively correlated (i.e., when one variable increases, the other variable also tends to increase); when ρ X,Y When ρ < 0, it indicates that X and Y are negatively correlated (i.e., when one variable increases, the other variable tends to decrease); when ρ X,Y When = 0, it indicates that X and Y have no linear correlation.

[0115] For example, assuming the first parameter of the first optical module is the bias current, and the bias current is positively correlated with the emission power of the first optical module, the first network device sets the bias current of the first optical module to a first value in the first time period (i.e., the scrambling time period) according to the first command sent by the network management system. In the second time period, the bias current of the first optical module is a second value in other time periods besides the first time period, and the first value is greater than the second value, so as to achieve scrambling of the emission power of the first optical module.

[0116] Figure 5 shows the emission power of the first optical module and the received power of the optical module optically connected to the first optical module. Due to the aforementioned scrambling, the emission power of the first optical module in the first time period is greater than the emission power of the first optical module in the second time period excluding the first time period. Furthermore, there is a strong positive correlation between the emission power of the first optical module in the second time period (including the first time period) and the received power of the optical module connected to the first optical module in the second time period.

[0117] Based on the above characteristics, in order to determine whether the second optical module is connected to the first optical module, the network management system can obtain the emission power of the first optical module in the second time period and the received power of the second optical module in the second time period. The second time period includes the first time period. Then, according to formula (1), the Pearson correlation coefficient between the emission power of the first optical module in the second time period (as variable X) and the received power of the second optical module in the second time period (as variable Y) is calculated. The Pearson correlation coefficient is used to measure the linear correlation between the emission power of the first optical module in the second time period and the received power of the second optical module in the second time period. Then, the first score is determined according to the Pearson correlation coefficient to determine whether the first optical module and the second optical module have an optical connection relationship.

[0118] Assuming the first score ranges from 0 to 1, the Pearson correlation coefficient ρ X,Y The specific positive correlation between the first score (score1) and the first score (score1) is: score1 = ρ X,Y If the Pearson correlation coefficient calculated in the above manner is 0.8, then the first score can be determined to be 0.8.

[0119] The relationship between the Pearson correlation coefficient and the first score mentioned above is only an example and does not constitute a limitation. In practical applications, the two can also have other forms of positive correlation or negative correlation.

[0120] (2) The second score is used to indicate whether the direction of change of the light emission power of the first optical module in the fourth time period is consistent with the direction of change of the light reception power of the second optical module in the fourth time period.

[0121] The fourth time period is the period from time t1-k1 to time t1+k2 within the second time period. t1 is the starting time of the first time period, and k1 and k2 are used to represent the duration (the unit of duration can be milliseconds, seconds, etc., which are not specifically limited in this application). Both k1 and k2 are positive numbers, and k1 and k2 may be the same or different. That is, time t1-k1 is a time before time t1, and time t1-k2 is a time after time t1. In other words, the time range of the fourth time period is from time t1-k1 to time t1+k2, that is, the fourth time period is a period before and after the starting time t1 of the first time period (inclusive of the starting time t1).

[0122] For example, if the network management system scrambles the emitting power of the first optical module in the first time period, the direction of change of the received power of the optical module connected to the first optical module in the fourth time period should be consistent with the direction of change of the emitting power of the first optical module in the fourth time period. The two should show a consistent change of rising / falling at the same time.

[0123] Based on the above characteristics, if the direction of change of the received power of the second optical module in the fourth time period is consistent with the direction of change of the emitted power of the first optical module in the fourth time period, then the second optical module is very likely to have an optical connection with the first optical module. Conversely, if the direction of change of the received power of the second optical module in the fourth time period is inconsistent with the direction of change of the emitted power of the first optical module, then the second optical module is unlikely to have an optical connection with the first optical module. The second score calculated here indicates whether the direction of change of the received power of the second optical module in the fourth time period is consistent with the direction of change of the emitted power of the first optical module in the fourth time period, and thus determines whether the first and second optical modules have an optical connection.

[0124] The following example illustrates a specific method for determining the direction (trend) of change.

[0125] Continuing with Figure 5 as an example, Figure 5 shows the emitting power of the first optical module and the receiving power of the optical module optically connected to the first optical module. For ease of description, the starting time of the first time period is denoted as t1. The fourth time period is the time from time t1-k1 to time t1+k2 within the second time period. k1 and k2 are used to represent the duration, and both k1 and k2 are positive numbers. The direction of change of the emitting power of the first optical module in the fourth time period can be calculated using the emitting power P1 of the first optical module at time t1-k1 and the emitting power P2 of the first optical module at time t1+k2. If P2-P1 > 0, it indicates that the direction of change is positive (upward trend); if P2-P1 < 0, it indicates that the direction of change is negative (downward trend).

[0126] Similarly, the direction of change of the received light power of the second optical module in the fourth time period can be calculated by the received light power P3 of the second optical module at time t1-k1 and the received light power P4 of the second optical module at time t1+k2. If P4-P3>0, it means that the direction of change is positive (upward trend), and if P4-P3<0, it means that the direction of change is negative (downward trend).

[0127] Based on the above characteristics, if (P2-P1)×(P4-P3)>0, it can be determined that the emitting power of the first optical module and the receiving power of the second optical module have the same direction of change in the fourth time period, thus obtaining the corresponding second score, denoted as Score2-1. If (P2-P1)×(P4-P3)<0, it can be determined that the emitting power of the first optical module and the receiving power of the second optical module have opposite directions of change in the fourth time period, thus obtaining the corresponding second score, denoted as Score2-2. This application does not specifically limit the specific values ​​of Score2-1 and Score2-2; Score2-1 can be greater than or less than Score2-2.

[0128] (3) The third score is used to indicate whether the direction of change of the light emission power of the first optical module in the fifth time period is consistent with the direction of change of the light reception power of the second optical module in the fifth time period.

[0129] The fifth time period is the period from time t2-k3 to time t2+k4 within the second time period. t2 is the end time of the first time period. k3 and k4 are used to represent the duration (the unit of duration can be milliseconds, seconds, etc., which are not specifically limited in this application). k3 and k4 are both positive numbers, and k3 and k4 may be the same or different. That is, time t2-k3 is a time before time t2, and time t2-k4 is a time after time t2. In other words, the time range of the fifth time period is from time t2-k3 to time t2+k4, that is, the fifth time period is a period before and after the end time t2 of the first time period (including the end time t2).

[0130] For example, if the network management system scrambles the emitting power of the first optical module in the first time period, the direction of change of the received power of the optical module connected to the first optical module in the fifth time period should be consistent with the direction of change of the emitting power of the first optical module in the fifth time period. The two should show a consistent change of rising / falling at the same time.

[0131] Based on the above characteristics, if the direction of change of the received light power of the second optical module in the fifth time period is consistent with the direction of change of the emitted light power of the first optical module in the fifth time period, then the second optical module is very likely to have an optical connection with the first optical module. Conversely, if the direction of change of the received light power of the second optical module in the fifth time period is inconsistent with the direction of change of the emitted light power of the first optical module in the fifth time period, then the second optical module is unlikely to have an optical connection with the first optical module. The third score calculated here is used to indicate whether the direction of change of the received light power of the second optical module in the fifth time period is consistent with the direction of change of the emitted light power of the first optical module in the fifth time period, and thus to determine whether the first and second optical modules have an optical connection.

[0132] The following example illustrates a specific method for determining the direction (trend) of change.

[0133] Continuing with Figure 5 as an example, Figure 5 shows the emitting power of the first optical module and the receiving power of the optical module optically connected to the first optical module. For ease of description, the end time of the first time period is denoted as t2. The fifth time period is the time from time t2-k3 to time t2+k4 within the second time period. k3 and k4 are used to represent the duration, and both k3 and k4 are positive numbers. The direction of change of the emitting power of the first optical module in the fifth time period can be calculated using the emitting power P5 of the first optical module at time t2-k3 and the emitting power P6 of the first optical module at time t2+k4. If P6-P5 > 0, the direction of change is positive (upward trend); if P6-P5 < 0, the direction of change is negative (downward trend).

[0134] Similarly, the direction of change of the received optical power of the second optical module in the fifth time period can be calculated by the received optical power P7 of the second optical module at time t2-k3 and the received optical power P8 of the second optical module at time t2+k4. If P8-P7>0, the direction of change is positive (upward trend); if P8-P7<0, the direction of change is negative (downward trend).

[0135] Based on the above characteristics, if (P6-P5)×(P8-P7)>0, it can be determined that the emitting power of the first optical module and the receiving power of the second optical module have the same direction of change in the fifth time period, thus obtaining the corresponding third score, denoted as Score3-1. If (P6-P5)×(P8-P7)<0, it can be determined that the emitting power of the first optical module and the receiving power of the second optical module have opposite directions of change in the fifth time period, thus obtaining the corresponding third score, denoted as Score3-2. This application does not specifically limit the specific values ​​of Score3-1 and Score3-2; Score3-1 can be greater than or less than Score3-2.

[0136] (4) The fourth score is positively or negatively correlated with the difference between the change in the emitting power of the first optical module in the fourth time period and the change in the receiving power of the second optical module in the fourth time period. The fourth time period can be referred to the previous introduction, and will not be repeated here.

[0137] For example, if the network management system scrambles the emission power of the first optical module in the first time period, the change in the received power of the optical module connected to the first optical module in the fourth time period should be similar to the change in the emission power of the first optical module in the fourth time period.

[0138] Based on the above characteristics, if the change in the received power of the second optical module in the fourth time period is similar to the change in the emitted power of the first optical module in the fourth time period, then the second optical module is very likely to have an optical connection with the first optical module. Conversely, if the change in the received power of the second optical module in the fourth time period is not similar to the change in the emitted power of the first optical module in the fourth time period, then the second optical module is unlikely to have an optical connection with the first optical module. The fourth score calculated here indicates whether the change in the received power of the second optical module in the fourth time period is similar to the change in the emitted power of the first optical module in the fourth time period, and thus determines whether the first and second optical modules have an optical connection.

[0139] The following example illustrates a specific method for determining the magnitude of change.

[0140] Continuing with Figure 5 as an example, Figure 5 shows the emitting power of the first optical module and the receiving power of the optical module optically connected to the first optical module. For ease of description, the start time of the first time period is denoted as t1, and the fourth time period is the time from time t1-k1 to time t1+k2 within the second time period. k1 and k2 are used to represent the duration, and both k1 and k2 are positive numbers. The variation range of the emitting power of the first optical module in the fourth time period can be calculated using the emitting power P1 of the first optical module at time t1-k1 and the emitting power P2 of the first optical module at time t1+k2, i.e., |P2-P1|. Similarly, the variation range of the receiving power of the second optical module in the fourth time period can be calculated using the receiving power P3 of the second optical module at time t1-k1 and the receiving power P4 of the second optical module at time t1+k2, i.e., |P4-P3|. As introduced above, the fourth score is positively or negatively correlated with the difference between the change in the emitting power of the first optical module in the fourth time period |P2-P1| and the change in the receiving power of the second optical module in the fourth time period |P4-P3|. Therefore, the corresponding fourth score can be determined based on the calculated |P2-P1| and |P4-P3|.

[0141] This application does not limit the specific relationship between the fourth score and the differences between |P2-P1| and |P4-P3|. Assuming the negative correlation between the fourth score and the aforementioned differences is specifically: Fourth score = 1 - the absolute value of the aforementioned differences ÷ max(|P2-P1|,|P4-P3|), then the corresponding fourth score can be determined based on |P4-P3| and |P2-P1|.

[0142] (5) The fifth score is positively or negatively correlated with the difference between the change in the emitting power of the first optical module and the change in the receiving power of the second optical module during the fifth time period. The fifth time period can be referred to the previous introduction, and will not be repeated here.

[0143] For example, if the network management system scrambles the emission power of the first optical module in the first time period, the change in the received power of the optical module connected to the first optical module in the fifth time period should be similar to the change in the emission power of the first optical module in the fifth time period.

[0144] Based on the above characteristics, if the change in the received power of the second optical module in the fifth time period is similar to the change in the emitted power of the first optical module in the fifth time period, then the second optical module is very likely to have an optical connection with the first optical module. Conversely, if the change in the received power of the second optical module in the fifth time period is not similar to the change in the emitted power of the first optical module in the fifth time period, then the second optical module is unlikely to have an optical connection with the first optical module. The fifth score calculated here indicates whether the change in the received power of the second optical module in the fifth time period is similar to the change in the emitted power of the first optical module in the fifth time period, and thus determines whether the first and second optical modules have an optical connection.

[0145] The following example illustrates a specific method for determining the magnitude of change.

[0146] Continuing with Figure 5 as an example, Figure 5 shows the emitting power of the first optical module and the receiving power of the optical module optically connected to the first optical module. For ease of description, the end time of the first time period is denoted as t2. The fifth time period is the time from t2-k3 to t2+k4 within the second time period, where k3 and k4 represent durations, and both k3 and k4 are positive numbers. The variation in the emitting power of the first optical module in the fifth time period can be calculated using the emitting power P5 of the first optical module at t2-k3 and the emitting power P6 of the first optical module at t2+k4, i.e., |P6-P5|. Similarly, the variation in the receiving power of the second optical module in the fifth time period can be calculated using the receiving power P7 of the second optical module at t2-k3 and the receiving power P8 of the second optical module at t2+k4, i.e., |P8-P7|. As introduced above, the fifth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module in the fifth time period |P6-P5| and the change in the received light power of the second optical module in the fifth time period |P8-P7|. Therefore, the corresponding fifth score can be determined based on the calculated |P6-P5| and |P8-P7|.

[0147] This application does not limit the specific relationship between the fifth score and the differences between |P6-P5| and |P8-P7|. Assuming the negative correlation between the fifth score and the aforementioned differences is specifically: Fifth score = 1 - the absolute value of the aforementioned differences ÷ max(|P6-P5|, |P8-P7|), then the corresponding fifth score can be determined based on |P6-P5| and |P8-P7|.

[0148] After the network management system calculates the first, second, third, fourth, and fifth scores as described above, it can average, sum, or perform a weighted sum (this application does not specify the weight of each score) to obtain a similarity score. Then, the similarity score is compared with a score threshold; the specific comparison method can be found in the previous description, thereby determining whether the first optical module and the second optical module have an optical connection.

[0149] Optionally, the first optical module can be a pluggable optical module, inserted into the first port of the first network device. The first network device can send the port information of the first port (physical port) corresponding to the first optical module to the network management system. Similarly, the second optical module can also be a pluggable optical module, inserted into the second port of the second network device. The second network device can send the port information of the second port corresponding to the second optical module to the network management system. The network device can send the port information and the indicator data of the optical module corresponding to the port (see above description) together to the network management system, that is, the port information is reported to the network management system along with the indicator data, or the port information can be sent to the network management system separately. This application does not specifically limit the reporting method and timing of port information.

[0150] When the network management system determines that the first optical module and the second optical module are optically connected in the manner described above, it can determine that the first port and the second port are optically connected by combining the port information of the first port corresponding to the first optical module and the port information of the second port corresponding to the second optical module. In other words, if the first optical module is inserted into the first port of the first network device and the second optical module is inserted into the second port of the second network device, and it is determined that the light emission power of the first optical module and the light reception power of the second optical module are similar in the second time period, then it can be determined that the first port and the second port are optically connected.

[0151] The network management system can store the defined optical connection relationships between optical modules and / or between ports, and can also present these relationships to the user. The presentation format can be text, tables, images, or other formats; this application does not limit this. This application also does not limit the specific format of port information, as long as it can identify the corresponding port.

[0152] For example, a first network device includes multiple slots, each with a different slot number. Each slot has multiple ports, and different ports within the same slot have different port numbers. Assume a first optical module is inserted into the first port of the first network device, the slot number of which is Slot2, and the port number of the first port is Port1. If the corresponding port on the network device is identified using device identifier + slot number + port number, then the port information for the first port would be "first network device identifier + Slot2 + Port1".

[0153] Optionally, to improve the accuracy of determining optical connectivity, the network management system can scramble the first optical module multiple times. Each scrambling corresponds to a scrambling time period. Each scrambling operation acquires the emitted power of the first optical module within that time period (including the corresponding scrambling period) and calculates a similarity score with the received power of the second optical module during the same time period. The average of the multiple similarity scores from the multiple scrambling operations is then used as the actual score for the second optical module. The actual score is compared with a score threshold to determine whether the second and first optical modules have an optical connectivity relationship. The comparison method with the score threshold is described above and will not be repeated here.

[0154] Referring to the method described above for determining whether there is an optical connection between the first optical module and the second optical module, the network management system can also determine whether there is an optical connection between other optical modules, which will not be discussed in detail here.

[0155] Optionally, the network management system can obtain the emission power of the first optical module in the second time period and the received optical power of multiple optical modules different from the first optical module in the second time period. These multiple optical modules can be all or some of the optical modules in the optical communication network other than the first optical module. Then, the network management system calculates the similarity score between the received optical power of these multiple optical modules in the second time period and the emission power of the first optical module in the same time period, referring to the method described above. Then, it determines the optical module with the highest similarity score from these multiple optical modules, and considers that the received optical power of the optical module with the highest score in the second time period is similar to the emission power of the first optical module in the second time period. Therefore, the optical module with the highest score is determined as the optical module connected to the first optical module, and the two have an optical connection relationship.

[0156] The method provided in Figure 3 will be illustrated below with reference to Figure 6.

[0157] Please refer to Figure 6, which is a schematic flowchart of a process for determining optical connection relationship by modifying bias current according to an embodiment of this application, including the following steps 1 to 6.

[0158] Step 1: The network management system sends a bias current modification command to the first network device.

[0159] The bias current modification command corresponds to the first command described above, and the first parameter here is specifically the bias current, which is positively correlated with the emission power of the first optical module. The bias current modification command instructs the first network device to set the bias current of the first optical module to a first value in the first time period and a second value in the second time period excluding the first time period, where the second value is different from the first value.

[0160] For ease of description, the following text will use the first value of 56.7mA and the second value of 56mA for explanation.

[0161] Figure 6 shows the first optical module and the first network device separately. However, in reality, the first optical module is located on the first network device. The first optical module can be inserted into a port of the first network device or located inside the first network device. For details, please refer to the previous introduction, which will not be repeated here.

[0162] Step 2: Modify the bias current of the first optical module in the first network device.

[0163] Assume that before the bias current command is issued, the bias current value stored in the bias current register of the first optical module is 56mA (i.e., the second value), and the bias current of the first optical module meets the requirement of the second value. When the first network device receives the bias current modification command issued by the network management system, the first network device sets the bias current of the first optical module to 56.7mA (i.e., the first value) in the first time period according to the bias current command, thereby achieving scrambling of the emission power of the first optical module in the first time period. When the bias current is increased, the emission power of the first optical module will also increase (the specific increase depends on the PI characteristics of the first optical module), and here we assume an increase of 0.07dB.

[0164] For example, suppose the first optical module has a bias current register to store the bias current value of the first optical module. When the first network device receives a bias current modification command, the first network device adjusts the bias current value stored in the bias current register from 56mA to 56.7mA. Alternatively, the bias current register can store a first value and a second value of the bias current. When the first network device does not receive a bias current modification command, the first optical module generates a corresponding bias current based on the second value in the bias current register. When the first network device receives a bias current modification command, the first network device instructs the first optical module to generate a corresponding bias current based on the first value in the bias current register, thereby scrambling the emission power of the first optical module in the first time period. That is to say, the first value can be sent to the first network device with the bias current modification command, or it can be preset in the first optical module; this application does not specifically limit this. At the end of the first time period, the first network device can automatically change the bias current of the first optical module from the first value back to the second value, or the network management system can send a recovery command to the first network device, and then the first network device changes the bias current of the first optical module from the first value back to the second value according to the recovery command.

[0165] Step 3: The first network device collects the indicator data of the first optical module.

[0166] The data collected here may or may not include luminous power (in which case it is necessary to include data of other indicators that can represent luminous power, please refer to the first data introduced above).

[0167] Step 4: The first network device reports the indicator data of the first optical module (including luminous power / data representing luminous power) to the network management system.

[0168] In other words, after modifying the bias current of the first optical module, the first network device can collect data on the luminous power of the first optical module / other indicators representing the luminous power (corresponding to the first data in step S302), and then send the collected indicator data to the network management system so that the network management system can determine whether the luminous power of the first optical module is similar to the luminous power of other optical modules in the second time period (including the scrambled first time period).

[0169] Step 5: The network management system obtains the luminous power of the first optical module in the second time period based on the index data of the first optical module.

[0170] For example, if the indicator data reported by the first network device to the network management system includes the luminous power, then the luminous power of the first optical module in the second time period can be obtained directly. However, if the indicator data reported by the first network device to the network management system does not include the luminous power, then the luminous power of the first optical module in the second time period needs to be indirectly determined by data of other indicators that represent (indicate) the luminous power (refer to the first data introduced above).

[0171] Step 6: The network management system determines the optical connection relationship based on the light emission power of the first optical module in the second time period and the light reception power of the second optical module in the second time period.

[0172] The emission power of the second optical module in the second time period is also obtained by the network management system. Please refer to step S303 for details, which will not be repeated here. Regarding how to determine the optical connection relationship in step 6, please refer to the relevant description in step S303, which will not be repeated here either.

[0173] In summary, in the method for determining optical connectivity provided in this application, the first optical module is scrambled using a first parameter during the first time period, resulting in a scrambled power output (scrambling causes the power output to exhibit a certain variation pattern, such as increasing, decreasing, or fluctuating). However, during the second time period, the first parameter is not used to scramble the first optical module for periods other than the first time period. Therefore, the power output of the first optical module during the second time period, excluding the first time period, is an unscrambled power output. Since the power output of an optical module represents the intensity of the optical signal output by the module, and the power received by the optical module represents the intensity of the optical signal received by the module, and the transmission speed of optical signals in optical fibers is very fast, the power received by an optical module optically connected to the first optical module during the second time period should be similar to the power output of the first optical module during the second time period. That is, the power received by an optical module optically connected to the first optical module during the first time period exhibits a similar variation pattern to the power received by the first optical module during the first time period.

[0174] Based on the above characteristics, the network management system obtains the light emission power of the first optical module in the second time period (including the scrambled first time period) and the light reception power of the second optical module in the second time period, and then determines whether the two are similar: if they are similar, it is determined that the second optical module is an optical module with an optical connection relationship with the first optical module; if they are not similar, it is determined that the second optical module and the first optical module are not optically connected.

[0175] The network management system can directly obtain the emitting / receiving power of the optical modules reported by the network devices, or indirectly calculate the emitting power of the optical modules from the input current, bias current, temperature, and other data reported by the network devices. Since emitting power, received power, input current, bias current, and temperature are white-box indicators in communication networks, and network devices periodically report these indicators to the network management system, this solution does not require the installation of additional components on the network devices, thus avoiding modification costs. Furthermore, this solution is executed by the network management system, eliminating the need for network devices to exchange port information and resolve each other's port information, thereby not increasing the processing load on the network devices.

[0176] Please refer to Figure 7, which is a schematic diagram of the structure of a device 700 for determining optical connectivity provided in this application, including an acquisition module 701 and a determination module 702.

[0177] The acquisition module 701 is used to: acquire the emission power of the first optical module of the first network device in a second time period, wherein the emission power in the second time period is the optical power acquired after scrambling with the first parameter in the first time period, and the second time period includes the first time period;

[0178] The acquisition module 701 is also used to: acquire the received optical power of the second optical module of the second network device in the second time period.

[0179] The determination module 702 is used to determine that the first optical module and the second optical module have an optical connection relationship when the light emission power in the second time period is similar to the light reception power in the second time period.

[0180] Optionally, the above-mentioned device 700 further includes a sending module 703, which is used to: send a first command to the first network device, the first command being used to indicate that the first parameter is a first value in a first time period; or, send a first command to the first network device, the first command being used to indicate that the first parameter is a first value in a first time period and a second value in a third time period included in the second time period, wherein the first value is not equal to the second value.

[0181] Optionally, the first parameter is the bias current, which is positively correlated with the luminous power of the first optical module; or, the first parameter is the temperature, which is positively or negatively correlated with the luminous power of the first optical module.

[0182] Optionally, the determining module 702 is further configured to: obtain a similarity score between the luminous power and the received power in the second time period, and determine that the luminous power and the received power in the second time period are similar based on the similarity score and a score threshold.

[0183] Optionally, the determining module 702 is specifically used to: calculate one or more of the first score, second score, third score, fourth score, and fifth score, and obtain a similarity score based on the above one or more scores.

[0184] The first score is used to represent the Pearson correlation coefficient between the luminous power and the received power in the second time period.

[0185] The second score is used to indicate whether the direction of change of the light emission power of the first optical module in the fourth time period is consistent with the direction of change of the light reception power of the second optical module in the fourth time period. The fourth time period is the period from time t1-k1 to time t1+k2 within the second time period. t1 is the starting time of the first time period. k1 and k2 are used to represent the duration, and both k1 and k2 are positive numbers.

[0186] The third score is used to indicate whether the direction of change of the light emission power of the first optical module in the fifth time period is consistent with the direction of change of the light reception power of the second optical module in the fifth time period. The fifth time period is the period from time t2-k3 to time t2+k4 within the second time period. t2 is the end time of the first time period. k3 and k4 are used to represent the duration, and both k3 and k4 are positive numbers.

[0187] The fourth score is positively or negatively correlated with the difference between the change in the emitting power of the first optical module in the fourth time period and the change in the receiving power of the second optical module in the fourth time period.

[0188] The fifth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module in the fifth time period and the change in the received light power of the second optical module in the fifth time period.

[0189] Optionally, the acquisition module 701 is specifically used to: receive the emission power of the second time period sent by the first network device.

[0190] Optionally, the acquisition module 701 is specifically used to: receive first data sent by the first network device, the first data being used to represent the emission power of the first optical module in the second time period, and then determine the emission power of the first optical module in the second time period based on the first data.

[0191] Optionally, the first data includes the input current or bias current of the first optical module in the second time period.

[0192] Optionally, the first optical module is inserted into the first port of the first network device, and the second optical module is inserted into the second port of the second network device. The determining module 702 is specifically used to: determine that the first port and the second port have an optical connection relationship when it is determined that the light emission power of the first optical module in the second time period and the light reception power of the first optical module in the second time period are similar.

[0193] The device 700 in Figure 7 can be used to perform the steps in the method for determining the optical connection relationship in Figure 3, as described above, and will not be repeated here. Figure 7 is merely an example of dividing the device into an acquisition module 701, a determination module 702, and a transmission module 703 based on function. In reality, the device 700 may contain more or fewer modules. For example, one of the above modules can be split into multiple functional modules, or two or more of the above modules can be merged into one functional module. Other functional modules can also be added to the device 700. This application does not limit this. The acquisition module 701, the determination module 702, and the transmission module 703 can all be implemented by software and / or hardware, and this application does not limit this either.

[0194] Referring to Figure 8, this application also provides a computing device 800, including a bus 802, a processor 804, a memory 806, and a communication interface 808. The processor 804, the memory 806, and the communication interface 808 communicate with each other via the bus 802. The computing device 800 can be a server, laptop, tablet, desktop computer, edge device, smartphone, smart screen, etc., and this application does not specifically limit it, nor does it limit the number of processors and memories in the computing device 800.

[0195] Bus 802 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 8, but this does not imply that there is only one bus or one type of bus. Bus 802 can include pathways for transmitting information between various components of computing device 800 (e.g., memory 806, processor 804, communication interface 808).

[0196] Processor 804 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0197] The memory 806 may include volatile memory, such as random access memory (RAM). The processor 804 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0198] The memory 806 stores executable program code. The processor 804 executes the executable program code to implement the functions of the acquisition module 701, the determination module 702, and the transmission module 703 in FIG7, respectively, thereby implementing the operation steps in the method for determining the optical connection relationship in FIG3 of this application.

[0199] The communication interface 808 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 800 and other devices or communication networks.

[0200] For example, the computing device 800 of this application may correspond to the network management system shown in Figure 1 of this application, or it may correspond to the device 700 for determining optical connection relationships in Figure 7. The specific functions of each module in the device 700 are not described in detail here for the sake of brevity.

[0201] As one possible implementation, the computing device 800 may also include a chip system, which includes a processor and a power supply circuit. The power supply circuit supplies power to the processor, which performs the operational steps in the method for determining the optical connection relationship shown in Figure 3. For simplicity, details are omitted here. The processor can be implemented using a CPU, or it can be implemented using computing devices or AI chips such as GPUs, DPUs, NPUs, XPUs, SoCs, offloading cards, or accelerator cards.

[0202] As one possible implementation, the computing device 800 may include various types of processors 804, i.e., the computing device 800 is a heterogeneous device. For example, the computing device 800 may include a CPU and a GPU, and the operational steps in the method for determining the optical connection relationship in FIG3 may be executed by at least one of the processors 804. For the sake of brevity, further details are omitted here.

[0203] As shown in Figure 9, this application also provides a computing device cluster, which includes multiple computing devices 800. The memory 806 of the multiple computing devices 800 in the computing device cluster can store the same instructions for implementing the method of Figure 3.

[0204] In some possible implementations, the memory 806 of one or more computing devices 800 in the computing device cluster may also store partial instructions for implementing the method of Figure 3 above. In other words, a combination of one or more computing devices 800 can jointly execute the instructions for implementing the method of Figure 3.

[0205] The memories 806 in the different computing devices 800 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the device 700 for determining optical connectivity in FIG8. That is, the instructions stored in the memories 806 of the different computing devices 800 can implement the functions of one or more modules among the acquisition module 701, the determination module 702, and the transmission module 703.

[0206] In some possible implementations, the computing devices 800 in the computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 10 illustrates one possible implementation where two computing devices 800A and 800B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 806 in computing device 800A stores instructions for executing the functions of the acquisition module 701 and the determination module 702. Simultaneously, the memory 806 in computing device 800B stores instructions for executing the functions of the transmission module 703.

[0207] For example, the function of computing device 800A shown in Figure 10 can also be performed by multiple computing devices 800. Similarly, the function of computing device 800B can also be performed by multiple computing devices 800.

[0208] This application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection method of the computing device cluster shown in Figure 10. The difference is that the memory 806 of one or more computing devices 800 in this computing device cluster can store the same instructions for implementing the method of Figure 3 above.

[0209] In some possible implementations, the memory 806 of one or more computing devices 800 in the computing device cluster may also store partial instructions for implementing the method of FIG3. In other words, a combination of one or more computing devices 800 can jointly execute the instructions for implementing the method of FIG3.

[0210] This application also provides a chip including a processor and an interface for communicating with an external device or module of the chip. The processor is used to execute the operation steps in the method of FIG3, as described above, and will not be repeated here.

[0211] This application also provides a computer-readable storage medium, which can be any available medium capable of being stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions for directing a computing device or cluster of computing devices to perform the operational steps in the method shown in Figure 3.

[0212] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any available medium. When the computer program product is run on a computing device or cluster of computing devices, it causes the computing device or cluster of computing devices to perform the operational steps in the method shown in FIG3.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application. The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order.

Claims

1. A method of determining an optical connection relationship, characterized by, The method is applied to a network management system, and the method includes: The emission power of the first optical module of the first network device in the second time period is obtained. The emission power in the second time period is the optical power obtained after scrambling with the first parameter in the first time period. The second time period includes the first time period. Obtain the received optical power of the second optical module of the second network device during the second time period; If the light emission power in the second time period is similar to the light reception power in the second time period, it is determined that the first optical module and the second optical module have an optical connection relationship.

2. The method of claim 1, wherein, The method further includes: Send a first command to the first network device, the first command being used to indicate that the first parameter is a first value in the first time period; or, send a first command to the first network device, the first command being used to indicate that the first parameter is a first value in the first time period and a second value in the third time period included in the second time period, the first value being not equal to the second value.

3. The method according to claim 1 or 2, characterized in that, The first parameter is the bias current, and the first parameter is positively correlated with the luminous power in the second time period; Alternatively, the first parameter may be temperature, and the first parameter may be positively or negatively correlated with the luminous power during the second time period.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain the similarity score between the luminous power and the received power in the second time period; The similarity score and the score threshold determine that the luminous power of the second time period is similar to the luminous power of the second time period.

5. The method of claim 4, wherein, The similarity score for obtaining the luminous power and the received power in the second time period includes: Calculate one or more of the first score, second score, third score, fourth score, and fifth score; The similarity score is obtained based on one or more of the aforementioned items; The first score is used to represent the Pearson correlation coefficient between the luminous power and the received power in the second time period; The second score is used to indicate whether the direction of change of the light emission power of the first optical module in the fourth time period is consistent with the direction of change of the light reception power of the second optical module in the fourth time period. The fourth time period is the period from time t1-k1 to time t1+k2 in the second time period. t1 is the starting time of the first time period. k1 and k2 are used to represent the duration. k1 and k2 are positive numbers. The third score is used to indicate whether the direction of change of the light emission power of the first optical module in the fifth time period is consistent with the direction of change of the light reception power of the second optical module in the fifth time period. The fourth time period is the time period from time t2-k3 to time t2+k4 in the second time period. t2 is the end time of the first time period. k3 and k4 are used to represent the duration. Both k3 and k4 are positive numbers. The fourth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module and the change in the luminous power of the second optical module during the fourth time period. The fifth score is positively or negatively correlated with the difference between the change in the luminous power of the first optical module and the change in the received power of the second optical module during the fifth time period.

6. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the luminous power of the first optical module of the first network device in the second time period includes: receiving the luminous power of the second time period sent by the first network device.

7. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the luminous power of the first optical module of the first network device in the second time period includes: receiving first data sent by the first network device, the first data being used to represent the luminous power in the second time period; and determining the luminous power in the second time period based on the first data.

8. The method of claim 7, wherein, The first data includes the input current or bias current of the first optical module during the second time period.

9. The method according to any one of claims 1 to 8, characterized in that, The first optical module is inserted into the first port of the first network device, and the second optical module is inserted into the second port of the second network device. Determining that the first optical module and the second optical module have an optical connection includes: It is determined that the first port and the second port have an optical connection.

10. A device for determining optical connectivity, characterized in that, Includes a module for performing the method as described in any one of claims 1-9.

11. A computing device, comprising: It includes a processor and a memory, the processor being configured to execute instructions stored in the memory, causing the computing device to perform the method as described in any one of claims 1-9.