Method and device for realizing adaptation of different services based on optical module
The business configuration negotiation is carried out through the TX Disable and LOS pins of the optical module, which solves the problem of service type inappropriate service when accessing the aggregation equipment by multi-mode integrated access equipment, and realizes the activation of the shutdown-free station, reduces construction costs and improves product competitiveness.
Patent Information
- Application Number
- CN202510597302.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional multi-mode integrated edge access equipment does not adapt to the service type when accessing the aggregation equipment, resulting in the failure of the first connection and need to re-down the station and adjust the adaptation port, increasing construction costs.
Business configuration negotiation is carried out through the TX Disable and LOS pins of the optical module to realize business type negotiation between the master and slave devices. If the negotiation successfully enters the normal working mode, a fault alarm signal will be generated.
It has realized the opening of shutdown-free stations in different business scenarios, reducing construction costs and increasing product competitiveness.
Smart Images

Figure CN120499532A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical communication technology, and in particular to a method and device for implementing adaptation of different services based on an optical module. Background Art
[0002] In communications networks, multi-mode edge access devices typically connect to aggregation devices using dual uplinks and are managed in-band. Multi-mode edge access devices primarily include SD-WAN edge devices, controllers, security devices, and backup network equipment. Aggregation devices primarily include Layer 3 switches and broadband access servers.
[0003] Traditional multi-mode edge access devices usually do not have the service type adaptation function, and aggregation devices are usually unable to manage these access devices. If the service types of the two are incompatible, the service cannot be activated during the first connection. It is necessary to manually adjust the adapter port again at the site, and then manage the access device and activate the service remotely, which will increase construction costs. Summary of the Invention
[0004] The embodiments of the present invention provide a method and device for implementing different service adaptation based on optical modules to solve the technical problem in the related art that when the existing multi-mode access device is connected to the aggregation device, if the service types of the two are not compatible, it is necessary to re-download and adjust the adaptation port, resulting in high construction costs.
[0005] In a first aspect, a method for implementing different service adaptation based on an optical module is provided, comprising the following steps:
[0006] When the master device fails to communicate with the slave device for the first time, the optical module connected to the master device enters the service configuration negotiation mode and negotiates the service configuration with the slave device.
[0007] If the negotiation is successful, the optical module connected to the control master device enters normal working mode; if the negotiation fails, a service adaptation failure alarm signal is generated.
[0008] In some embodiments, when the master device fails to communicate with the slave device for the first time, the step of controlling the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device includes:
[0009] Change the default functions of the TX Disable and LOS pins of the optical module connected to the master device;
[0010] The master device sends a negotiation signal containing the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device.
[0011] In some embodiments, the step of sending a negotiation signal including a service type of the master device to the slave device through a TX Disable pin of an optical module connected to the master device, then receiving a response signal from the slave device through a LOS pin of the optical module connected to the master device, and performing service configuration negotiation with the slave device includes:
[0012] Send a negotiation signal containing the service type of the master device to the slave device, causing the slave device to change its service type:
[0013] If a response signal is received from the slave device that the service type has been changed, a negotiation success signal is sent to the slave device;
[0014] If no response signal indicating consistent service type change from the slave device is received, a negotiation failure signal is sent to the slave device, and the steps of sending negotiation signals and receiving response signals are repeated until a response signal indicating consistent service type change from the slave device is received or the number of repetitions reaches a preset number.
[0015] In some embodiments, when the master device fails to communicate with the slave device for the first time, the step of controlling the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device includes:
[0016] When the master device and the slave device are connected for the first time, determine whether there is a link layer fault alarm signal;
[0017] If so, it is confirmed that the initial communication connection between the master device and the slave device has failed.
[0018] In some embodiments, the link layer fault alarm signal includes a LINK_LOS alarm signal of an Ethernet service, an RS_LOF alarm signal of an SDH service, an OTUk_LOF alarm signal of an OTN service, or an optical module not in place signal.
[0019] In a second aspect, a device for implementing different service adaptation based on an optical module is provided, including an optical module management module connected to the optical module, the optical module management module including:
[0020] A first control unit, configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails;
[0021] The second control unit is configured to control the optical module connected to the master device to enter a normal working mode if the negotiation is successful; and to generate a service adaptation failure alarm signal if the negotiation fails.
[0022] In some embodiments, the apparatus for implementing different service adaptation based on an optical module further includes:
[0023] A selection unit, the selection unit being arranged between the optical module and the optical module management module;
[0024] The first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time, including:
[0025] Controlling the action of the selection unit to change the default defined functions of the TX Disable pin and the LOS pin of the optical module connected to the master device;
[0026] The master device sends a negotiation signal containing the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device.
[0027] In some embodiments, the sending of a negotiation signal including a service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, receiving a response signal from the slave device through the LOS pin of the optical module connected to the master device, and performing service configuration negotiation with the slave device include:
[0028] Send a negotiation signal containing the service type of the master device to the slave device, causing the slave device to change its service type:
[0029] If a response signal is received from the slave device that the service type has been changed, a negotiation success signal is sent to the slave device;
[0030] If no response signal indicating consistent service type change from the slave device is received, a negotiation failure signal is sent to the slave device, and the steps of sending negotiation signals and receiving response signals are repeated until a response signal indicating consistent service type change from the slave device is received or the number of repetitions reaches a preset number.
[0031] In some embodiments, the first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the first communication connection between the master device and the slave device fails, including:
[0032] When the master device and the slave device are connected for the first time, determine whether there is a link layer fault alarm signal;
[0033] If so, it is confirmed that the initial communication connection between the master device and the slave device has failed.
[0034] In some embodiments, the link layer fault alarm signal includes a LINK_LOS alarm signal of an Ethernet service, an RS_LOF alarm signal of an SDH service, an OTUk_LOF alarm signal of an OTN service, or an optical module not in place signal.
[0035] The beneficial effects brought about by the technical solution provided by the present invention include:
[0036] Embodiments of the present invention provide a method and apparatus for implementing different service adaptations based on optical modules. The method first controls the optical module connected to the master device to enter a service configuration negotiation mode and conduct service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails. Based on the negotiation results, the optical module is then controlled to enter a normal operating mode or generate a service adaptation failure alarm signal. This method can meet the diverse service adaptation requirements of communication devices, enabling the activation of master and slave devices in different service scenarios without requiring a site visit. This method offers the advantage of a single device for multiple uses, reduces construction costs, and increases product competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flowchart of a method for implementing different service adaptation based on an optical module provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram showing a master device and a slave device connected via an optical module according to an embodiment of the present invention;
[0040] Figure 3 Implementation provided by the embodiment of the present invention Figure 1 A flow chart of step S10;
[0041] Figure 4 Implementation provided by the embodiment of the present invention Figure 3 A flow chart of step S102;
[0042] Figure 5 A schematic structural diagram of a device for implementing different service adaptation based on an optical module provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0044] The embodiment of the present invention provides a method for implementing different service adaptation based on optical modules, which can solve the technical problem that when the existing multi-mode access device is connected to the aggregation device, if the service types of the two are not compatible, the adaptation port needs to be re-adjusted at the next station, resulting in high construction costs.
[0045] See also Figure 1 As shown, a method for implementing different service adaptation based on an optical module, wherein the service types include OTN services, PTN services, SDH services, Ethernet services, etc., the method comprises the following steps:
[0046] Step S10: When the master device fails to communicate with the slave device for the first time, the optical module connected to the master device is controlled to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device.
[0047] Specifically, see Figure 2 As shown in the figure, when a slave device accesses a communication network, it undergoes initial adaptation with the master device. The master device can be understood as the aggregation device, and the slave device as the access device. The master and slave devices are connected via an optical module. An optical module consists of optoelectronic components, functional circuits, and an optical interface. The optoelectronic components include both transmitting and receiving components. The function of an optical module is to perform photoelectric and electro-optical conversion. The transmitting end of the optical module converts electrical signals into optical signals, and the receiving end converts optical signals into electrical signals.
[0048] See also Figure 3 As shown, when the master device fails to communicate with the slave device for the first time, the steps of controlling the optical module connected to the master device to enter the service configuration negotiation mode and perform service configuration negotiation with the slave device include:
[0049] Step S101: Change the default functions of the TX Disable pin and the LOS pin of the optical module connected to the master device. After entering the service configuration negotiation mode, the control signal TX Disable of the TX Disable pin is used as the output data signal, and the LOS signal of the LOS pin is used as the input data signal.
[0050] Step S102: Send a negotiation signal containing the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, then receive a response signal from the slave device through the LOS pin of the optical module connected to the master device, and negotiate service configuration with the slave device.
[0051] Specifically, the master device's transmitter controls the TX Disable signal on the optical module's TX Disable pin to switch its internal laser on and off, generating an optical pulse signal. When TX Disable is low, the optical module emits laser light, indicating a state of 0. When TX Disable is high, the optical module shuts off the laser, indicating a state of 1. The combination of 0s and 1s generated by turning the laser on and off at a certain frequency transmits a negotiation signal containing the master device's service type to the slave device. The bit sequence of 0s and 1s represents the master device's service type. By controlling the TX Disable signal on and off the optical module's laser, a Loss of Sight (LOS) signal can theoretically be generated on the slave device. After receiving the service type information, the slave device uses the same method to control the TX Disable pin of the slave device's optical module to generate a new sequence of 0s and 1s in response. The optical module connected to the master device detects the 0s and 1s in response to the LOS signal on the LOS pin, and the master and slave device negotiate service configurations. When the LOS signal is low, there is light on the receiving end, indicating a state of 0. When the LOS signal is high, there is no light on the receiving end, indicating a state of 1.
[0052] Step S20: If the negotiation succeeds, the optical module connected to the master device is controlled to enter a normal working mode; if the negotiation fails, a service adaptation failure alarm signal is generated.
[0053] If the service configuration negotiation between the master and slave devices succeeds, the optical module connected to the master device enters normal operating mode and the optical module's TX Disable and LOS pins are reset to their factory default settings. If the service configuration negotiation between the master and slave devices fails, a service adaptation failure alarm is generated, alerting personnel to check the communication network or take other measures.
[0054] The method for implementing different service adaptation based on optical modules in an embodiment of the present invention first controls the optical module connected to the master device to enter a service configuration negotiation mode and conduct service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails. Then, based on the judgment result, the optical module is controlled to enter a normal operation mode or generate a service adaptation failure alarm signal. In other words, the present invention can meet the different service adaptation requirements of communication equipment and achieve the activation of master and slave devices (or central office devices and remote devices) in different service scenarios without leaving the station. This method has the advantage of a single device for multiple uses, reduces construction costs, and increases product competitiveness.
[0055] As an optional implementation, in one embodiment of the invention, see Figure 4 As shown, the step of sending a negotiation signal including the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, and then receiving a response signal from the slave device through the LOS pin of the optical module connected to the master device includes:
[0056] Step 1021: Send a negotiation signal containing the service type of the master device to the slave device, so that the slave device changes its service type.
[0057] Specifically, after the communication connection fails, the master device enters the service configuration negotiation mode through the optical module:
[0058] A: The master device sends the master device service type to the slave device, and the bit sequence is defined in accordance with the agreement in Table 1.
[0059] Type (4 bits): 0x0110, negotiation communication starts;
[0060] Negotiation mode (1 bit): 0, master device;
[0061] Command code (3 bits): 001, notification service type;
[0062] Service type (4 bits): 0001, assuming the service type is STM-1;
[0063] CRC (4 bits): CRC-4 checksum.
[0064] B: The slave device notifies the slave device service type to the master device, and the bit sequence is defined in accordance with the agreement in Table 1.
[0065] Type (4 bits): 0x0110, negotiation communication starts;
[0066] Negotiation mode (1 bit): 1, slave device;
[0067] Command code (3 bits): 001, notification service type;
[0068] Service type (4 bits): 0010, assuming the service type is STM-4; (assuming the service types of the master and slave devices are different)
[0069] CRC (4 bits): CRC-4 checksum.
[0070] C: The master device sends a negotiation request, and the bit sequence is defined in accordance with the agreement in Table 1.
[0071] Type (4 bits): 0x0110, negotiation communication starts;
[0072] Negotiation mode (1 bit): 0, master device;
[0073] Command code (3 bits): 010, negotiation request;
[0074] Service type (4 bits): 0001, assuming the service type is STM-1;
[0075] CRC (4 bits): CRC-4 checksum.
[0076] Step 1022: If a response signal indicating that the service type of the slave device has been changed is received, a negotiation success signal is sent to the slave device.
[0077] D: After receiving the negotiation request from the master device, the slave device changes its service type to be consistent with that of the master device, and sends a response signal to the master device at the same time. The bit sequence is defined in accordance with the agreement in Table 1.
[0078] Type (4 bits): 0x0110, negotiation communication starts;
[0079] Negotiation mode (1 bit): 1, slave device;
[0080] Command code (3 bits): 011, negotiation response;
[0081] Service type (4 bits): 0001, the service configuration after modification is STM-1;
[0082] CRC (4 bits): CRC-4 checksum.
[0083] E: After receiving the response from the slave, the master device sends a successful negotiation reply. After receiving the successful negotiation instruction from the slave, the negotiation process ends and the slave device saves the service type configuration. The bit sequence is defined in accordance with the agreement in Table 1.
[0084] Type (4 bits): 0x0110, negotiation communication starts;
[0085] Negotiation mode (1 bit): 0, master device;
[0086] Command code (3 bits): 100, negotiation successful (if failed, reply 101);
[0087] Service type (4 bits): 0001. It has been confirmed that the services of both the local and remote slave devices are STM-1.
[0088] In step 1023, if a response signal indicating a consistent change in the service type of the slave device is not received, a negotiation failure signal is sent to the slave device, and the steps of sending the negotiation signal and receiving the response signal are repeated until a response signal indicating a consistent change in the service type of the slave device is received or the number of repetitions reaches a preset number.
[0089] For example, when no response signal indicating a consistent change in the service type of the slave device is received, the command code of the negotiation signal is set to 101 and sent to the slave device. The negotiation signal is sent and the response signal is received three times. If it still fails after three times, the service configuration negotiation fails. The purpose of setting the repetition three times is to reduce the probability of misjudgment.
[0090] Table 1
[0091]
[0092] As an optional implementation manner, in one embodiment of the invention, when the initial communication connection between the master device and the slave device fails, the step of controlling the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device further includes:
[0093] Determine whether there is a link layer fault alarm signal.
[0094] If not, confirm that the optical module is successfully adapted to the slave device; if so, confirm that the communication connection between the optical module and the slave device fails.
[0095] Link layer fault alarm signals include the LINK_LOS alarm signal for Ethernet services, the RS_LOF alarm signal for SDH services, the OTUk_LOF alarm signal for OTN services, or the optical module not in place signal. That is, after an optical module is connected to a communication network, if the optical module displays any of the following signals: the LINK_LOS alarm signal for Ethernet services, the RS_LOF alarm signal for SDH services, the OTUk_LOF alarm signal for OTN services, or the optical module not in place signal, it indicates that the communication connection between the optical module and the slave device has failed. If the optical module does not display any of the following signals: the LINK_LOS alarm signal for Ethernet services, the RS_LOF alarm signal for SDH services, the OTUk_LOF alarm signal for OTN services, or the optical module not in place signal, it indicates that the optical module has successfully adapted to the slave device.
[0096] See also Figure 5 As shown, an embodiment of the present invention further provides a device for implementing different service adaptation based on an optical module, including:
[0097] A first control unit, configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails;
[0098] The second control unit is configured to control the optical module connected to the master device to enter a normal working mode if the negotiation is successful; and to generate a service adaptation failure alarm signal if the negotiation fails.
[0099] Specifically, the device for implementing adaptation of different services based on an optical module further includes: a selection unit, which is arranged between the optical module and the optical module management module.
[0100] The first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time, including:
[0101] Control the action of the selection unit to change the default definition of the TX Disable pin and LOS pin of the optical module connected to the main device. Figure 5 As shown, when the optical module is in non-service configuration negotiation mode, the SELs at A1 / B1 / C1 select the default optical module signal definition, namely, A2, B2, and C2, respectively. When the optical module enters service configuration negotiation mode, the SELs at A1 / B1 / C1 redefine their functions, namely, A3 and C3, respectively. At this time, B3 is not used, and the control signal TX Disable of the optical module's TX Disable pin and the LOS signal of the LOS pin are processed as data signals, that is, the control signal TX Disable of the TX Disable pin is used as the output data signal, and the LOS signal of the LOS pin is used as the input data signal. This embodiment of the present invention utilizes the TX Disable and LOS pins of the optical module to provide a service configuration negotiation method for the optical module, solving the service adaptation negotiation problem. The pins are compatible with existing protocols.
[0102] The master device transmits a negotiation signal containing the master device's service type to the slave device through the TX Disable pin of the optical module connected to the master device, and then receives the slave device's response signal through the LOS pin of the optical module connected to the master device. Specifically, the master device's transmitter controls the TX Disable signal on the optical module's TX Disable pin to turn the internal laser on and off, generating an optical pulse signal. When TX Disable is low, the optical module emits laser light, indicating a state of 0; when TX Disable is high, the optical module turns the laser off, indicating a state of 1. The combination of 0s and 1s generated by turning the laser on and off at a certain frequency transmits the negotiation signal containing the master device's service type to the slave device. The bit sequence of 0s and 1s contains the master device's service type. By controlling the TX Disable signal on and off of the optical module's laser, a Loss of Situation (LOS) signal can theoretically be generated on the slave device. After receiving the service type information, the slave device uses the same method to control the TX Disable pin of the slave device's optical module to generate a new sequence of 0s and 1s in response. The optical module connected to the master device detects the 0s and 1s in response to the LOS signal on the LOS pin, and the master and slave device negotiate service configurations. Among them, when the LOS signal is low, there is light at the receiving end and the state is 0; when the LOS signal is high, there is no light at the receiving end and the state is 1.
[0103] As an optional implementation manner, in one embodiment of the invention, the TXDisable pin of the optical module connected to the master device sends a negotiation signal including the service type of the master device to the slave device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device, and performs service configuration negotiation with the slave device, including:
[0104] Send a negotiation signal containing the master device's service type to the slave device, causing the slave device to change its service type:
[0105] If a response signal is received from the slave device that the service type has been changed, a negotiation success signal is sent to the slave device;
[0106] If no response signal indicating consistent service type change from the slave device is received, a negotiation failure signal is sent to the slave device, and the steps of sending negotiation signals and receiving response signals are repeated until a response signal indicating consistent service type change from the slave device is received or the number of repetitions reaches a preset number.
[0107] As an optional implementation manner, in one embodiment of the invention, the first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails, including:
[0108] When the master device and the slave device are connected for the first time, determine whether there is a link layer fault alarm signal;
[0109] If so, it is confirmed that the initial communication connection between the master device and the slave device has failed.
[0110] As an optional implementation manner, in an embodiment of the invention, the link layer fault alarm signal includes a LINK_LOS alarm signal of an Ethernet service, an RS_LOF alarm signal of an SDH service, an OTUk_LOF alarm signal of an OTN service, or an optical module not in place signal.
[0111] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0112] It should be noted that, in the present invention, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0113] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features of the present invention.
Claims
1. A method for implementing different service adaptation based on an optical module, characterized in that: The following steps are involved: When the master device fails to communicate with the slave device for the first time, the optical module connected to the master device enters the service configuration negotiation mode and negotiates the service configuration with the slave device. If the negotiation is successful, the optical module connected to the control master device enters normal working mode; If the negotiation fails, a service adaptation failure alarm signal is generated.
2. The method for implementing different service adaptation based on optical modules according to claim 1, characterized in that: The step of controlling the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time comprises: Change the default functions of the TX Disable and LOS pins of the optical module connected to the master device; The master device sends a negotiation signal containing the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device.
3. The method for implementing different service adaptation based on optical modules according to claim 2, characterized in that: The step of sending a negotiation signal including the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, receiving a response signal from the slave device through the LOS pin of the optical module connected to the master device, and performing service configuration negotiation with the slave device includes: Send a negotiation signal containing the service type of the master device to the slave device, causing the slave device to change its service type: If a response signal is received from the slave device that the service type has been changed, a negotiation success signal is sent to the slave device; If no response signal indicating consistent service type change from the slave device is received, a negotiation failure signal is sent to the slave device, and the steps of sending negotiation signals and receiving response signals are repeated until a response signal indicating consistent service type change from the slave device is received or the number of repetitions reaches a preset number.
4. The method for implementing different service adaptation based on optical modules according to claim 1, characterized in that: The step of controlling the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time includes: When the master device and the slave device are connected for the first time, determine whether there is a link layer fault alarm signal; If so, it is confirmed that the initial communication connection between the master device and the slave device has failed.
5. The method for implementing different service adaptation based on an optical module according to claim 4, characterized in that: The link layer fault alarm signal includes a LINK_LOS alarm signal of an Ethernet service, an RS_LOF alarm signal of an SDH service, an OTUk_LOF alarm signal of an OTN service, or an optical module not in place signal.
6. A device for implementing different service adaptation based on an optical module, characterized in that: An optical module management module connected to the optical module is included, and the optical module management module includes: A first control unit, configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the initial communication connection between the master device and the slave device fails; The second control unit is configured to control the optical module connected to the master device to enter a normal working mode if the negotiation is successful; and to generate a service adaptation failure alarm signal if the negotiation fails.
7. The device for implementing different service adaptation based on an optical module according to claim 6, characterized in that: Also includes: A selection unit, the selection unit being arranged between the optical module and the optical module management module; The first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time, including: Controlling the action of the selection unit to change the default defined functions of the TX Disable pin and the LOS pin of the optical module connected to the master device; The master device sends a negotiation signal containing the service type of the master device to the slave device through the TX Disable pin of the optical module connected to the master device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device.
8. The device for implementing different service adaptation based on an optical module according to claim 7, characterized in that: The TX Disable pin of the optical module connected to the master device sends a negotiation signal containing the service type of the master device to the slave device, and then receives a response signal from the slave device through the LOS pin of the optical module connected to the master device, and negotiates service configuration with the slave device, including: Send a negotiation signal containing the master device's service type to the slave device, causing the slave device to change its service type: If a response signal is received from the slave device that the service type has been changed, a negotiation success signal is sent to the slave device; If no response signal indicating consistent service type change from the slave device is received, a negotiation failure signal is sent to the slave device, and the steps of sending negotiation signals and receiving response signals are repeated until a response signal indicating consistent service type change from the slave device is received or the number of repetitions reaches a preset number.
9. The device for implementing different service adaptation based on an optical module according to claim 6, characterized in that: The first control unit is configured to control the optical module connected to the master device to enter a service configuration negotiation mode and perform service configuration negotiation with the slave device when the master device fails to communicate with the slave device for the first time, including: When the master device and the slave device are connected for the first time, determine whether there is a link layer fault alarm signal; If so, it is confirmed that the initial communication connection between the master device and the slave device has failed.
10. The device for implementing different service adaptation based on an optical module according to claim 9, characterized in that: The link layer fault alarm signal includes a LINK_LOS alarm signal of an Ethernet service, an RS_LOF alarm signal of an SDH service, an OTUk_LOF alarm signal of an OTN service, or an optical module not in place signal.