Port mode switching method and apparatus, and electronic device and storage medium

By implementing automatic switching of port mode in Ethernet network devices, the problem of managing two different networking devices in the PON and Ethernet network converged deployment is solved, reducing network complexity and maintenance difficulty, and improving network flexibility and scalability.

WO2025118545A1PCT designated stage expired Publication Date: 2025-06-12RUIJIE NETWORKS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/100163
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-06
Filing Date
2024-06-19
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

In the PON and Ethernet network converged deployment, two different networking devices need to be managed, which increases network complexity and maintenance difficulty.

Method used

By implementing the port mode switching method in an Ethernet network device, the port mode is automatically switched according to the inserted optical module characteristics, switching from PON mode to Ethernet mode or vice versa, multi-mode use of a single network device port is realized.

Benefits of technology

It reduces the complexity and maintenance difficulty of the converged network, improves the flexibility and scalability of the network, and enables a single network device port to meet users' multiple network needs for PON and Ethernet networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024100163_12062025_PF_FP_ABST
    Figure CN2024100163_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a port mode switching method and apparatus, and an electronic device and a storage medium. The method comprises: when it is determined that a target port mode corresponding to a module type is different from the current port mode, switching a port from the current port mode to the target port mode according to a port mode switching manner that is set for the corresponding module type.
Need to check novelty before this filing date? Find Prior Art

Description

Port mode switching method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on December 6, 2023, with application number 202311665913.0, and invention name “A port mode switching method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of communication technologies, and in particular to a method, device, electronic device, and storage medium for switching port modes. Background Art

[0004] Passive Optical Network (PON) supports point-to-multipoint connections. Compared to Ethernet's point-to-point connections, it saves port and optical module resources, simplifies the network architecture, and replaces active aggregation devices with passive optical splitters, reducing maintenance costs and power consumption.

[0005] However, the uplink of PON is a time-division multiplexing shared bandwidth among multiple access nodes. Therefore, compared with the point-to-point Ethernet network, it has higher latency and smaller uplink bandwidth.

[0006] Based on the above advantages and disadvantages of PON and Ethernet, in order to meet the network needs of different users under the same network, PON and Ethernet need to be integrated.

[0007] In related technologies, the deployment of PON and Ethernet networks is generally divided into two types:

[0008] 1. Deploy PON as the backbone network, install optical line terminal (OLT) equipment at the central office or data center, and transmit signals to user terminals via optical fiber. Deploy Ethernet network at the user terminals to provide LAN connection and internal communication.

[0009] 2. Deploy Ethernet as the backbone network. Ethernet switches and network equipment are deployed in central offices or data centers. The OLT equipment is then connected to the backbone network. The OLT equipment is then connected to multiple optical network units (ONUs) through the optical distribution network (ODN).

[0010] Summary of the Invention

[0011] The embodiments of the present application provide a port mode switching method, device, electronic device and storage medium. In a converged network of PON and Ethernet, only one network device port is used to meet the user's network requirements for PON and Ethernet through networking devices.

[0012] In a first aspect, an embodiment of the present application provides a method for switching a port mode, which is applied to an Ethernet device in an Ethernet network, and the method includes:

[0013] In response to the operation of inserting the optical module into the port, acquiring characteristic information of the optical module; wherein the characteristic information includes a plurality of optical module characteristics;

[0014] determining a module type of the optical module based on multiple optical module characteristics;

[0015] When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type.

[0016] Through this switching method, a network device port can be reused to simultaneously meet users' network needs for PON and Ethernet networks, reducing the complexity and maintenance and management difficulty of the converged network.

[0017] In a possible embodiment, the multiple optical module characteristics include wavelength characteristics and / or interface characteristics.

[0018] In a possible embodiment, the module type of the optical module is determined based on multiple optical module characteristics, including: the Ethernet network device determines the wavelength type corresponding to the optical module based on the obtained wavelength characteristics, and determines the interface type corresponding to the optical module based on the obtained interface characteristics; and determines the module type of the optical module based on the wavelength type and the interface type.

[0019] In a possible embodiment, the module type of the optical module is determined based on multiple optical module characteristics, including: the Ethernet network device determines the wavelength characteristic interval to which the wavelength characteristic belongs, and the interface characteristic interval to which the interface characteristic belongs; the Ethernet network device determines the module type of the optical module according to the wavelength characteristic interval and the interface characteristic interval.

[0020] In a possible embodiment, the Ethernet network device determines the module type of the optical module based on the wavelength characteristic interval and the interface characteristic interval, including: the Ethernet network device determines the wavelength type and interface type corresponding to the optical module based on the wavelength characteristic interval and the interface characteristic interval, and determines the module type of the optical module based on the wavelength type and the interface type.

[0021] In a possible embodiment, the Ethernet network device obtains characteristic information according to data acquisition devices respectively set corresponding to characteristics of multiple optical modules.

[0022] In a possible embodiment, the port mode includes a passive optical network (PON) mode and an Ethernet mode.

[0023] In an optional embodiment, if the following conditions are met, then it is determined that the target port mode corresponding to the module type is different from the current port mode:

[0024] The target port mode is Passive Optical Network (PON) mode, and the current port mode is Ethernet mode; or

[0025] The target port mode is Ethernet mode, and the current port mode is PON mode.

[0026] Through the above embodiment, when the Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can trigger the port mode switching operation, that is, switch the port from the current port mode to the target port mode, thereby providing the network service capability corresponding to the target port mode.

[0027] In an optional embodiment, the module types include a passive optical PON type and an Ethernet type.

[0028] In an optional embodiment, switching the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type includes:

[0029] If the module type is PON type, the port will be switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;

[0030] If the module type is Ethernet, the port will be switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.

[0031] Through the above embodiment, according to the port switching modes set for the corresponding PON optical module and Ethernet optical module, it is ensured that when the optical module is inserted and the target port mode is different from the current port mode, the port mode of the Ethernet device can be flexibly switched.

[0032] In an optional embodiment, switching the port from the Ethernet mode to the PON mode according to the port switching mode set corresponding to the PON type includes:

[0033] Disable the port's auto-negotiation capability and switch the port's communication state to a forced connection state. The forced connection state indicates that the port has the ability to actively send packets.

[0034] Enables the port to send Multipoint Control Protocol (MPCP) packets to the central processing unit (CPU).

[0035] According to the above embodiment, once the Ethernet device detects that the inserted optical module is a PON type optical module and the current port mode of the Ethernet device is Ethernet mode, the port mode can be quickly switched from Ethernet mode to PON mode.

[0036] In an optional embodiment, after enabling the port to send the Multipoint Control Protocol (MPCP) message to the central processing unit (CPU), the method further includes:

[0037] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;

[0038] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests;

[0039] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response.

[0040] Through the above embodiment, after the MPCP message sending capability of the port is enabled, by actively sending access detection requests of the converged network to multiple network devices to be accessed, the access registration efficiency of the network devices to be accessed that need to access the converged network can be greatly improved.

[0041] In an optional embodiment, switching the port from the PON mode to the Ethernet mode according to the port switching mode set corresponding to the Ethernet type includes:

[0042] Disable the MPCP packet receiving capability of the port;

[0043] Disable the MPCP message sending capability of the port;

[0044] Switch the communication state of the port from forced connection state to disconnected state.

[0045] According to the above embodiment, once the Ethernet device detects that the inserted optical module is an Ethernet type optical module and the current port mode of the Ethernet device is PON mode, the port mode can be quickly switched from PON mode to Ethernet mode.

[0046] In an optional embodiment, when disabling the MPCP message receiving capability of the port, the method further includes:

[0047] Disables the port's ability to upload MPCP packets to the CPU.

[0048] Through the above embodiment, while the MPCP message receiving capability of the port is closed, the port's ability to upload MPCP messages to the CPU is also closed. This saves energy consumption caused by keeping the port's ability to upload MPCP messages to the CPU open to a certain extent.

[0049] In an optional embodiment, after switching the communication state of the port from the forced connection state to the disconnected state, the method further includes:

[0050] Enable auto-negotiation on the port and, upon receiving an auto-negotiation signal, switch the port's communication state from disconnected to connected. The connected state indicates that the port has the ability to respond to messages but does not have the ability to actively send messages.

[0051] Through the above embodiment, by enabling the auto-negotiation capability of the port and switching the communication state of the port to the connection state, it can be ensured that the Ethernet network device and its port are in the Ethernet network working mode.

[0052] In a second aspect, the present application further provides a port mode switching device, which is applied to any Ethernet network device in an Ethernet network, and the device includes:

[0053] An information acquisition module, configured to acquire characteristic information of the optical module in response to an operation of inserting the optical module into the port;

[0054] a type determination module, configured to determine a module type of the optical module based on a plurality of optical module features included in the feature information;

[0055] The mode switching module is used to switch the port from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type when determining that the target port mode corresponding to the module type is different from the current port mode.

[0056] In an optional embodiment, the information acquisition module is specifically configured to acquire characteristic information according to data acquisition devices respectively provided corresponding to characteristics of a plurality of optical modules.

[0057] In an optional embodiment, the multiple optical module characteristics include wavelength characteristics and / or interface characteristics.

[0058] In an optional embodiment, if the following conditions are met, then it is determined that the target port mode corresponding to the module type is different from the current port mode:

[0059] The target port mode is Passive Optical Network (PON) mode, and the current port mode is Ethernet mode; or

[0060] The target port mode is Ethernet mode, and the current port mode is PON mode.

[0061] In an optional embodiment, when switching a port from a current port mode to a target port mode according to a port mode switching mode set for a corresponding module type, the mode switching module is specifically configured to:

[0062] If the module type is PON type, the port will be switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;

[0063] If the module type is Ethernet, the port will be switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.

[0064] In an optional embodiment, when the port is switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type, the mode switching module is specifically configured to:

[0065] Disable the port's auto-negotiation capability and switch the port's communication state to a forced connection state. The forced connection state indicates that the port has the ability to actively send packets.

[0066] Enables the port to send Multipoint Control Protocol (MPCP) packets to the central processing unit (CPU).

[0067] In an optional embodiment, after enabling the port to send the Multipoint Control Protocol (MPCP) message to the central processing unit (CPU), the mode switching module is further configured to:

[0068] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;

[0069] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests;

[0070] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response.

[0071] In an optional embodiment, when the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet network type, the mode switching module is specifically configured to:

[0072] Disable the MPCP packet receiving capability of the port;

[0073] Disable the MPCP message sending capability of the port;

[0074] Switch the communication state of the port from forced connection state to disconnected state.

[0075] In an optional embodiment, when the MPCP message receiving capability of the port is disabled, the mode switching module is further configured to:

[0076] Disables the port's ability to upload MPCP packets to the CPU.

[0077] In an optional embodiment, after the communication state of the port is switched from the forced connection state to the disconnected state, the mode switching module is further configured to:

[0078] Enable auto-negotiation on the port and, upon receiving an auto-negotiation signal, switch the port's communication state from disconnected to connected. The connected state indicates that the port has the ability to respond to messages but does not have the ability to actively send messages.

[0079] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the port mode switching method described in the first aspect above.

[0080] In a fourth aspect, the present application provides a computer-readable storage medium comprising a program code. When the program code is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the port mode switching method described in the first aspect.

[0081] In a fifth aspect, the present application provides a computer program product, which, when called by a computer, enables the computer to execute the steps of the port mode switching method as described in the first aspect.

[0082] In a sixth aspect, the present application provides a communication system, comprising: an Ethernet network device and a first network device to be accessed;

[0083] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, determine a module type of the optical module based on multiple optical module characteristics included in the characteristic information, and, when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a first network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0084] The first network device to be accessed is configured to receive an access detection request and, when determining that the target port mode is the PON mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the first network device to be accessed needs to access the converged network.

[0085] In a seventh aspect, the present application provides a communication system, comprising: an Ethernet network device and a second network device to be accessed;

[0086] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, determine a module type of the optical module based on multiple optical module characteristics included in the characteristic information, and, when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a second network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0087] The second network device to be accessed is used to receive the access detection request and, when determining that the target port mode is the Ethernet network mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the second network device to be accessed needs to access the converged network.

[0088] In an eighth aspect, the present application provides a communication system, comprising: an Ethernet network device and a third network device to be accessed;

[0089] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, determine a module type of the optical module based on multiple optical module characteristics included in the characteristic information, and, when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a third network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0090] The third network device to be accessed is used to receive an access detection request, and when it is determined that the target port mode is Ethernet network mode or PON mode, and the target port mode is the same as the device port mode of the third network device to be accessed, return an access registration response to the Ethernet network device based on the access detection request; or, when it is determined that the target port mode is Ethernet network mode or PON mode, and the target port mode is different from the device port mode of the third network device to be accessed, switch the device port mode to the target port mode, and after switching the device port mode to the target port mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the third network device to be accessed needs to access the converged network.

[0091] The beneficial effects of this application are as follows:

[0092] In the port mode switching method provided in the present application, when it is determined that the target port mode corresponding to the module type of the inserted optical module is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type; in this way, the port mode of the Ethernet network device can be flexibly and automatically switched among multiple port modes (such as PON mode and Ethernet network mode), which solves the problem of needing to manage two different networking devices in the PON and Ethernet network fusion solution, making the fusion network easier to maintain; and, due to the free switching of multiple port modes, in the fusion network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device, which further reduces the network complexity of the fusion network and the difficulty of maintenance and management of the fusion network.

[0093] In addition, other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. The objectives and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings:

[0095] FIG1 is a schematic diagram of an optional system architecture applicable to an embodiment of the present application.

[0096] FIG2 is a schematic diagram of the composition structure of an Ethernet network provided in an embodiment of the present application.

[0097] FIG3 is a schematic diagram of the composition structure of a network device cluster to be connected provided in one embodiment of the present application.

[0098] FIG4 is a schematic diagram of an implementation flow of a port mode switching method provided in an embodiment of the present application.

[0099] FIG5 is a logic diagram of a port switching mode provided in an embodiment of the present application.

[0100] FIG6 is a logical diagram of access registration for a network device to be accessed, provided by an embodiment of the present application.

[0101] FIG7 is a schematic diagram of a specific implementation process based on FIG4 provided in one embodiment of the present application.

[0102] FIG8 is a schematic structural diagram of a port mode switching device provided in an embodiment of the present application.

[0103] FIG9 is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0104] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.

[0105] It should be noted that in the description of this application, "multiple" is understood to mean "at least two." "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A and B are connected, which can mean: A and B are directly connected, and A and B are connected through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0106] It should be understood that although the various steps in the flowcharts of the present application are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of sub-steps or stages of other steps.

[0107] In addition, the collection, dissemination, and use of data in the technical solution of this application comply with the requirements of relevant national laws and regulations.

[0108] Some technical terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0109] (1) Multi-Point Control Protocol (MPCP): It is the protocol of the Media Access Control (MAC) sublayer in the Ethernet Passive Optical Network (EPON).

[0110] It should be noted that MPCP also defines a control mechanism between OLT and ONU to coordinate the effective sending and receiving of data / messages.

[0111] (2) EPON: It is a PON technology based on Ethernet. It adopts a point-to-multipoint structure and passive optical fiber transmission, and can provide a variety of services on the Ethernet network.

[0112] Furthermore, based on the above-mentioned nouns and related terminology, the following briefly introduces the design concept of the embodiments of the present application:

[0113] Currently, PON is suitable for large-scale data transmission and multimedia applications because of its high-speed and high-bandwidth transmission capabilities and its ability to provide users with stable and reliable network connections. For example, PON has been widely used in many fields such as broadband access, campus networks, and urban broadband coverage.

[0114] Ethernet is widely used in daily life, especially in local area networks (LANs), due to its mature standards and device ecosystem, easy deployment and maintenance. For example, Ethernet is suitable for various scenarios such as office networks, home networks, and data centers.

[0115] Although PON technology supports point-to-multipoint connection, it saves port resources and optical module resources compared to Ethernet's point-to-point connection, simplifies the network architecture, and can replace active aggregation devices with passive splitters, reducing maintenance costs and power consumption.

[0116] However, the uplink of PON is a time-division multiplexing shared bandwidth among multiple access nodes. Therefore, compared with the point-to-point Ethernet network, it has higher latency and smaller uplink bandwidth. It can be seen that PON and Ethernet networks have their own advantages and disadvantages in different usage scenarios.

[0117] Furthermore, based on the above advantages and disadvantages of PON and Ethernet, in order to meet the network needs of different users under the same network, it is necessary to integrate PON and Ethernet.

[0118] It should be noted that since PON and Ethernet are based on different network message encapsulation, when integrating these two networks, knowledge of both PON and Ethernet is required, which makes the deployment of such a converged network require additional learning costs.

[0119] In related technologies, the deployment of PON and Ethernet networks is generally divided into two types:

[0120] 1. Deploy PON as the backbone network, install OLT equipment in the central office or data center, and transmit signals to user terminals through optical fiber. Deploy Ethernet network in user terminals to provide LAN connection and internal communication.

[0121] 2. Deploy Ethernet as the backbone network. Ethernet switches and network equipment are deployed in the central office or data center. Then the OLT equipment is connected to the backbone network, and then the OLT equipment is connected to the ONU equipment at multiple points through the ODN.

[0122] However, both deployment methods have the disadvantage of requiring two different networking devices in the same network, which not only increases the complexity of the network but also makes network maintenance and management much more difficult. At the same time, if network requirements change, such as users' requirements for upstream bandwidth or network latency become higher, the shared upstream implementation method of PON will no longer be applicable. This will result in the deployed PON equipment being replaced by Ethernet network equipment, making it an ineffective investment.

[0123] Furthermore, current PON device port switching solutions focus on switching between different PON interfaces. Ethernet device port switching also only supports switching between ports with different speed capabilities, such as 1G / 10G. However, there is no solution that can achieve switching between different types of network device ports (Ethernet device ports and PON device ports) on the same network device port (e.g., Ethernet device port).

[0124] In view of this, if there is a networking device port that can work in both Ethernet mode and PON mode, and can automatically switch between these two port (working) modes, this will not only solve the problem of needing to manage two different networking devices in the PON and Ethernet network integration solution, making the network easier to maintain; but also because of the free switching between the two modes, network deployment will become more flexible, and the investment in networking equipment will be more scalable and flexible, that is, the investment in networking equipment will be more effectively protected.

[0125] Therefore, in an embodiment of the present application, a port mode switching method is proposed, which is applied to any Ethernet network device in an Ethernet network, specifically including: in response to the operation of inserting an optical module into the port, obtaining characteristic information of the optical module; then, determining the module type of the optical module based on multiple optical module characteristics contained in the characteristic information; when it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type, so that in a fusion network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device.

[0126] It should be noted that, in the embodiment of the present application, the target port mode is characterized by the PON mode: the operating state of the port of the Ethernet device is in the PON mode; similarly, the target port mode is characterized by the Ethernet mode: the operating state of the port of the Ethernet device is in the Ethernet mode.

[0127] Exemplarily, the operating states of the ports of an Ethernet network device in PON mode include but are not limited to: the port does not have the ability to self-negotiate, the communication state of the port is a forced connection state, the port has the ability to receive and upload MPCP messages to the central processing unit (CPU), and the port has the ability to send MPCP messages; the operating states of the ports of an Ethernet network device in Ethernet mode include but are not limited to: the port has the ability to self-negotiate, the communication state of the port is a disconnected state or a connected state, the port does not have the ability to receive and upload MPCP messages to the CPU, and the port does not have the ability to send MPCP messages; among them, the forced connection state indicates that the port has the ability to respond to messages and has the ability to actively send messages, and the connection state indicates that the port has the ability to respond to messages and does not have the ability to actively send messages.

[0128] In particular, the preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0129] Referring to FIG. 1 , which is a schematic diagram of an optional system architecture applicable to embodiments of the present application, the system includes: an Ethernet network device group 101 and a cluster of network devices to be connected 102. Ethernet network group 101 and cluster of network devices to be connected 102 can exchange information via a communication network, wherein the communication network can use both wireless and wired communication methods.

[0130] Exemplarily, the Ethernet network 101 can access the network through cellular mobile communication technology and communicate with the network device cluster 102 to be accessed, wherein the cellular mobile communication technology, for example, includes the fifth generation mobile communication (English: 5th Generation Mobile Networks, abbreviated: 5G) technology.

[0131] Optionally, the Ethernet network 101 can access the network through short-range wireless communication to communicate with the network device cluster 102 to be accessed, wherein the short-range wireless communication method includes, for example, Wireless Fidelity (Wi-Fi) technology.

[0132] The embodiments of the present application do not impose any restrictions on the number of communication devices involved in the above system architecture. For example, there may be more network device clusters 102 to be accessed, or there may be no network device cluster 102 to be accessed, or other network devices may be included. As shown in Figure 1, only the Ethernet network 101 and the network device cluster 102 to be accessed are described as an example. The following is a brief introduction to the above-mentioned devices and their respective functions.

[0133] In the Ethernet network 101, each Ethernet network device can provide users with network service capabilities corresponding to the converged network; in particular, in the embodiment of the present application, the converged network is obtained by merging PON and Ethernet, so the converged network has PON service capabilities and Ethernet service capabilities.

[0134] Among them, PON is a communication network architecture that adopts optical fiber transmission technology. It uses optical fiber as the transmission medium to transmit optical signals to users, which can achieve high-speed data transmission and broadband access. It mainly consists of three parts: OLT, ODN and ONU. The functions are as follows:

[0135] The OLT is the core device of the PON, used for sending and receiving optical signals, converting data into optical signals and transmitting them to the user end through optical fiber. The ODN is used to transmit optical signals from the OLT to the user end, usually using a tree or star topology, transmitting signals to different user ends through optical fiber branches. The ONU is the device at the user end, used to receive optical signals and convert them into electrical signals, providing network connections to user devices such as computers, phones, routers, etc.

[0136] In addition, the characteristics and working principles of PON are as follows: 1. Fiber sharing: multiple users can transmit through the same optical fiber, that is, point-to-multipoint transmission technology, and the downlink data is physically split in the passive optical splitter and transmitted to the access terminal at the same time. The uplink data uses time division multiplexing technology to separate the signals of different users in a time-slicing manner and share the uplink link bandwidth; 2. Passive fiber distribution: The fiber distribution in PON is passive, a purely physical splitting technology that does not require additional power or signal processing equipment. This allows the network at the aggregation layer to be replaced by a passive optical splitter, reducing the power consumption and maintenance costs of the intermediate link transmission; 3. Long-distance transmission: PON uses optical fiber as the transmission medium, which can achieve long-distance transmission and generally covers a range of tens of kilometers.

[0137] Ethernet is a common communication protocol and packet-switching-based network technology, which is widely used in LANs to achieve the transmission / interaction of related data.

[0138] In addition, the characteristics and working principles of Ethernet are as follows: 1. Physical medium: Ethernet can use different physical media for data transmission, including but not limited to copper cables (such as twisted pair cables) and optical fibers. In particular, common Ethernet transmission rates include: 10Mbps, 100Mbps, 1Gbps and 10Gbps; 2. Carrier Sense Multiple Access with Collision Detection (CSMA / CD) protocol: Ethernet uses the CSMA / CD protocol to control data transmission, allowing multiple devices to share the same physical medium and detect whether the channel is idle before sending data to avoid conflicts; 3. Frame structure: Ethernet uses Ethernet frames (Ethernet Frames) Frame) is the basic unit of data transmission, where an Ethernet frame includes fields such as the destination MAC address, source MAC address, data part, and checksum, which are used to identify and transmit data in the network; 4. MAC address: Each device connected to an Ethernet network has a unique MAC address, which is used to identify the device in the network; 5. Network topology: Ethernet networks support multiple topologies, including but not limited to: bus, star, and ring. For example, Ethernet switches are widely used to build LANs with a star topology.

[0139] In addition, referring to FIG. 2 , each Ethernet network device (101a, 101b, ..., 101n) in the Ethernet network 101 can be configured to obtain characteristic information of the optical module in response to an optical module being inserted into a port, and then determine the module type of the optical module based on the characteristic intervals of the multiple optical module characteristics included in the characteristic information. When the target port mode corresponding to the module type is determined to be different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type, thereby providing a network service capability (PON service capability or Ethernet network service capability) that matches the module type of the optical module. The network service capability corresponding to the PON mode is the PON service capability, and the network service capability corresponding to the Ethernet network mode is the Ethernet network service capability.

[0140] It should be noted that, as shown in Figure 2, the optical module is one of the core accessories of network communication and can be inserted into any Ethernet device in the Ethernet network 101. Its main function is the photoelectric conversion of signals, that is, the transmitting end converts the electrical signal into an optical signal, and after transmission through the optical fiber, the receiving end converts the optical signal into an electrical signal; therefore, to put it simply, an optical module will be used wherever optical fiber is used; in addition, in the embodiment of the present application, the optical module can be a PON optical module or an Ethernet optical module.

[0141] The cluster of network devices to be accessed 102 includes: multiple network devices to be accessed (102a, 102b, ..., 102m), as shown in Figure 3. In an embodiment of the present application, each network device to be accessed can be used to receive an access detection request of the converged network sent by the corresponding Ethernet network device, and return an access registration response based on the access detection request, wherein the access registration response indicates whether the corresponding network device to be accessed needs to access the converged network, that is, whether the corresponding network device to be accessed needs to be registered for access to the converged network.

[0142] Exemplarily, the above-mentioned network device to be accessed may specifically be: a user terminal device of a single network mode (e.g., PON mode or Ethernet mode), or a user terminal device of a dual mode (e.g., PON mode and Ethernet mode), and of course, a user terminal device of more modes; therefore, the user terminal device of the above-mentioned single network mode may be: an ONU device in PON mode; wherein, since PON includes ONU, the ONU device may also be referred to as a PON device.

[0143] Among them, when the network device to be connected determines that the target port mode is the same as its own device port mode, there is no need to switch the port mode of its own port, that is, it only needs to maintain its own device port mode; on the contrary, when it is determined that the target port mode is different from its own device port mode, it needs to switch its own port mode to the target port mode, that is, switch the device port mode to the target port mode.

[0144] The following describes the port mode switching method provided by the exemplary embodiment of the present application in combination with the above-mentioned system architecture and with reference to the accompanying drawings. It should be noted that the above-mentioned system architecture is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.

[0145] Referring to FIG. 4 , which is a schematic diagram illustrating an implementation flow of a port mode switching method provided in an embodiment of the present application, the execution subject is any Ethernet network device on the central office side of an Ethernet network, for example, the first Ethernet network device is the execution subject. The specific implementation flow of the method is as follows:

[0146] S401: In response to an operation of inserting an optical module into a port, acquiring characteristic information of the optical module.

[0147] Exemplarily, when executing step S401, the first Ethernet network device will detect the optical module insertion event according to the set optical module insertion detection period (e.g., 2 seconds). When it is detected that an optical module is inserted into the (network) port of the first Ethernet network device, it will trigger the acquisition of characteristic information of the optical module, that is, in response to the operation of inserting the optical module into the port, thereby acquiring the characteristic information.

[0148] It should be noted that the first Ethernet network device may obtain the characteristic information by using data acquisition devices such as sensors that are respectively provided according to the characteristics of the multiple optical modules included in the corresponding characteristic information.

[0149] S402: Determine the module type of the optical module based on the multiple optical module features included in the feature information and the feature intervals to which the features belong.

[0150] The above-mentioned multiple optical module characteristics include but are not limited to: wavelength characteristics and / or interface characteristics.

[0151] For example, when executing step S402, assuming that the optical module characteristics included in the characteristic information are wavelength characteristics and interface characteristics, the first Ethernet network device can determine the wavelength characteristic interval to which the wavelength characteristic belongs, and the interface characteristic interval to which the interface characteristic belongs. Based on the obtained wavelength characteristic interval and interface characteristic interval, the wavelength type and interface type corresponding to the optical module are determined, and thus the module type of the optical module is determined. Although the example is based on the use of both wavelength characteristics and interface characteristics to determine the optical module type, this application is not limited to this. Based on the logic of the example, embodiments that use only wavelength characteristics or interface characteristics to determine the optical module type can be inferred, and such embodiments remain within the scope of protection of this application.

[0152] Furthermore, the first Ethernet network device may determine the wavelength type and interface type corresponding to the optical module according to the wavelength characteristic interval to which the wavelength characteristic belongs and the interface characteristic interval to which the interface characteristic belongs, thereby determining whether the module type of the optical module is a PON type or an Ethernet network type. For example, the correspondence between the wavelength characteristic interval and the interface characteristic interval and the PON type and the Ethernet network type is shown in Table 1:

[0153] Table 1

[0154] In the table, Wave.Cha.Int represents the wavelength characteristic value, and In.Cha.Int represents the interface characteristic value.

[0155] Optionally, the first Ethernet network device may directly determine the wavelength type corresponding to the optical module based on the obtained wavelength characteristics, and determine the interface type corresponding to the optical module based on the obtained interface characteristics, thereby determining the module type of the optical module based on the wavelength type and interface type corresponding to the optical module. For example, the correspondence between the wavelength type and interface type and the PON type and Ethernet network type is shown in Table 2:

[0156] Table 2

[0157] In this way, the first Ethernet network identification reads the characteristic information to identify the wavelength type and interface type corresponding to the optical module, and can distinguish whether the optical module is a PON optical module or an Ethernet optical module, so as to subsequently switch the (network) port working mode according to the module type of the optical module.

[0158] S403: When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type.

[0159] Specifically, when executing step S403, after determining the module type of the optical module, the first Ethernet device may determine whether the target port mode corresponding to the module type is consistent with the current port mode of the first Ethernet device / port.

[0160] In an optional implementation, if the following conditions are met, it can be determined that the target port mode corresponding to the module type is different from the current port mode: the target port mode is PON mode, and the current port mode is Ethernet mode; or, the target port mode is Ethernet mode, and the current port mode is PON mode; in this way, when the first Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can trigger the port mode switching operation of the port, that is, switch the port from the current port mode to the target port mode, thereby providing network service capabilities corresponding to the target port mode.

[0161] It should be noted that since the execution subject is the first Ethernet device, the current port mode is usually the Ethernet mode, that is, the port of the first Ethernet device can be set to the Ethernet mode by default. However, it is understandable that the port of the first Ethernet device can also be set to other modes by default.

[0162] Furthermore, when the first Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can switch the port from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type.

[0163] Exemplarily, the module type of the optical module can be a PON type or an Ethernet type. Referring to Figure 5, if the module type is a PON type, the port is switched from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type; if the module type is an Ethernet type, the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet type; in this way, according to the port switching modes set for the corresponding PON optical module and the Ethernet optical module, it is ensured that when the optical module is inserted and the target port mode is different from the current port mode, the port mode of the first Ethernet device can be flexibly switched.

[0164] In an optional implementation, the first Ethernet network device switches the port mode of the port from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type, and needs to perform the following operations:

[0165] 1. Disable the auto-negotiation capability of the port and switch the communication state of the port to the forced connection state, also known as the Force link up state.

[0166] The mandatory connection state indicates that the port has the ability to respond to messages and actively send messages.

[0167] Exemplarily, the contents of the auto-negotiation mainly include: (half) duplex mode, operating rate, and flow control. Once the auto-negotiation is passed, the devices at both ends of the link will be locked in this operating mode.

[0168] 2. Enable the port to send MPCP packets to the CPU.

[0169] It should be noted that since the converged network is a network with PON service capabilities and Ethernet service capabilities, MPCP must be used when the port switches from Ethernet mode to PON mode; and since the switching of port modes belongs to the data processing of the control plane, the MPCP messages related to the port mode switching need to be set to be sent to the CPU.

[0170] Illustratively, the first Ethernet network device may receive message information sent by other Ethernet network devices in the Ethernet network using MPCP, and send the received message information to the CPU of the first Ethernet network device itself to implement interaction between MPCP messages.

[0171] 3. Enable the MPCP message sending capability of the port, and refer to Figure 6. You can also send an access detection request for the converged network, thereby receiving access registration responses returned by multiple network devices to be accessed based on the access detection request. If there is an access registration response among the multiple access registration responses that indicates the need to access the converged network, then the access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response. It should be noted that the access registration response may be an access registration for the corresponding network device to be accessed that requires access registration for the converged network, or it may be an access registration for the corresponding network device to be accessed that does not require access registration for the converged network.

[0172] Obviously, based on the above method, once the first Ethernet network device detects that the inserted optical module is a PON type optical module and the current port mode of the first Ethernet network device is Ethernet mode, it can quickly switch the port mode from Ethernet mode to PON mode.

[0173] In an optional implementation, the first Ethernet network device switches the port mode of the port from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet network type, and needs to perform the following operations:

[0174] 1. Disable the MPCP message receiving capability of the port.

[0175] Specifically, after the port mode of the port is switched from the PON mode to the Ethernet mode, the first Ethernet device no longer has the ability to receive MPCP messages.

[0176] In an optional implementation, when the first Ethernet network device turns off the MPCP message receiving capability of the port, it also turns off the port's ability to upload MPCP messages to the CPU; in this way, the energy consumption caused by always keeping the port's ability to upload MPCP messages to the CPU open is saved to a certain extent.

[0177] It should be noted that the first Ethernet network device can close the port's ability to upload MPCP messages to the CPU after uploading all the unuploaded MPCP messages, or it can directly close the port's ability to upload MPCP messages to the CPU, that is, it will not upload the unuploaded MPCP messages.

[0178] 2. Disable the MPCP message sending capability of the port.

[0179] Disabling the MPCP message sending capability of a port also means disabling MPCP, that is, not supporting MPCP.

[0180] 3. Switch the communication status of the port from the forced connection state to the disconnected state, also known as the Link down state.

[0181] 4. Enable the auto-negotiation capability of the port, and when it is determined that the port receives the auto-negotiation signal, switch the communication state of the port from the disconnected state to the connected state, that is, the Link up state.

[0182] The connection status indicates that the port has the ability to respond to messages but does not have the ability to actively send messages. In other words, it needs to receive a signal before it can send a message / signal.

[0183] It should be noted that receiving the auto-negotiation signal on a port indicates that the port is in a normal auto-negotiation state.

[0184] Similarly, based on the above method, once the first Ethernet device detects that the inserted optical module is an Ethernet type optical module and the current port mode of the first Ethernet device is PON mode, it can quickly switch the port mode from PON mode to Ethernet mode.

[0185] Based on the port mode switching method described in steps S401 to S103 above, assuming that the network device to be connected is an ONU device, referring to FIG7 , the first Ethernet network device may execute the following specific method flow:

[0186] S701: Detecting an optical module insertion event.

[0187] Specifically, when executing step S701, the first Ethernet network device triggers acquisition of feature information when detecting that an optical module is inserted into the port.

[0188] S702: Read characteristic information.

[0189] Specifically, when executing step S702, the first Ethernet network device distinguishes whether the optical module is a PON module or an Ethernet optical module by identifying the wavelength type and interface type of the optical module.

[0190] Furthermore, if it is determined that the optical module is a PON optical module, the process proceeds to step S703a and executes the method flow of switching the port corresponding to steps S704a to S707a from the Ethernet mode to the PON mode.

[0191] If it is determined that the optical module is a PON optical module, the process proceeds to step S703b and executes the method flow of switching the corresponding port from the PON mode to the Ethernet mode in steps S704b to S707b.

[0192] It should be noted that the port mode of the first Ethernet network device defaults to the Ethernet mode.

[0193] S703a: Determine that the optical module is a PON optical module.

[0194] Therefore, assuming that the current port mode is the default mode, that is, Ethernet mode, when the port switches from Ethernet mode to PON mode, steps S704a to S707a to be executed are as follows:

[0195] S704a: Disable the auto-negotiation capability of the port.

[0196] S705a: Change the port to Force link up state.

[0197] It should be noted that after the port communication state of the first Ethernet network device is converted to the Force link up state, the first Ethernet network device can actively send packets, that is, it has the ability to actively send messages / signals.

[0198] S706a: Set the received MPCP message to be sent to the CPU for processing.

[0199] In this way, interaction between MPCP messages related to port mode switching can be achieved.

[0200] S707a: Start the MPCP message to implement the access registration of the ONU device.

[0201] S703b: Determine that the optical module is an Ethernet optical module.

[0202] Furthermore, assuming that the current port mode is PON mode, when the port switches from PON mode to Ethernet mode, steps S704b to S707b to be executed are as follows:

[0203] S704b: Disable the ability to receive MPCP messages and send them to the CPU for processing.

[0204] In this way, the port's ability to send received MPCP packets to the CPU for processing is disabled, and MPCP packets are no longer received.

[0205] S705b: Disable the ability to send MPCP messages.

[0206] It should be noted that, by executing step S705b, the first Ethernet network device no longer actively sends MPCP messages to detect the access registration of the ONU device.

[0207] S706b: Disable the Force link up state of the port.

[0208] At this time, the port is in Link Down state and cannot actively send or receive messages, and has no message response capability.

[0209] S707b: Enable auto-negotiation capability.

[0210] It should be noted that, by executing step S706b, the port can enter the signal detection state, and only after receiving a normal auto-negotiation signal can the communication state of the port be switched to the Link up state and messages can be sent and received.

[0211] Based on the above method and steps, the ports of all Ethernet network devices in the Ethernet network can be flexibly switched between PON mode and Ethernet network mode based on the inserted optical modules, thereby realizing the integration of PON network and Ethernet network on the same device, reducing the difficulty and workload of management and maintenance, improving the flexibility of device use, and protecting the investment in networking equipment.

[0212] To sum up, in the port mode switching method provided in the present application, when it is determined that the target port mode corresponding to the module type of the inserted optical module is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type; in this way, the port mode of the Ethernet network device can be flexibly and automatically switched among multiple port modes (such as PON mode and Ethernet network mode), which solves the problem of needing to manage two different networking devices in the PON and Ethernet network fusion solution, making the fused network easier to maintain; and, due to the free switching of multiple port modes, in the fused network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device, which further reduces the network complexity of the fused network and the difficulty of maintenance and management of the fused network.

[0213] In addition, this approach also allows the port of a networking device to freely / automatically switch between the two port modes, providing a simpler and easier-to-use networking method for the integration of PON and Ethernet networks, making network deployment more flexible and the investment in networking equipment more scalable and flexible, which effectively protects the investment in networking equipment.

[0214] Furthermore, based on the same technical concept, an embodiment of the present application provides a port mode switching device, which is applied to any Ethernet device in an Ethernet network. The port mode switching device is used to implement the above-mentioned method flow of the embodiment of the present application. Referring to Figure 8, the port mode switching device includes: an information acquisition module 801, a type determination module 802, and a mode switching module 803, wherein:

[0215] The information acquisition module 801 is configured to acquire characteristic information of the optical module in response to the operation of inserting the optical module into the port;

[0216] A type determination module 802 is configured to determine a module type of the optical module based on the characteristic intervals to which the multiple optical module characteristics included in the characteristic information belong;

[0217] The mode switching module 803 is configured to switch the port from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type when determining that the target port mode corresponding to the module type is different from the current port mode.

[0218] In an optional embodiment, if the following conditions are met, then it is determined that the target port mode corresponding to the module type is different from the current port mode:

[0219] The target port mode is Passive Optical Network (PON) mode, and the current port mode is Ethernet mode; or

[0220] The target port mode is Ethernet mode, and the current port mode is PON mode.

[0221] In an optional embodiment, when switching a port from a current port mode to a target port mode according to a port mode switching mode set for a corresponding module type, the mode switching module 803 is specifically configured to:

[0222] If the module type is PON type, the port will be switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;

[0223] If the module type is Ethernet, the port will be switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.

[0224] In an optional embodiment, when the port is switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type, the mode switching module 803 is specifically configured to:

[0225] Disable the port's auto-negotiation capability and switch the port's communication state to a forced connection state. The forced connection state indicates that the port has the ability to actively send packets.

[0226] Enables the port to send Multipoint Control Protocol (MPCP) packets to the central processing unit (CPU).

[0227] In an optional embodiment, after enabling the port to send the Multipoint Control Protocol (MPCP) message to the central processing unit (CPU), the mode switching module 803 is further configured to:

[0228] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;

[0229] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests;

[0230] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response.

[0231] In an optional embodiment, when the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet type, the mode switching module 803 is specifically configured to:

[0232] Disable the MPCP packet receiving capability of the port;

[0233] Disable the MPCP message sending capability of the port;

[0234] Switch the communication state of the port from forced connection state to disconnected state.

[0235] In an optional embodiment, when the MPCP message receiving capability of the port is disabled, the mode switching module 803 is further configured to:

[0236] Disables the port's ability to upload MPCP packets to the CPU.

[0237] In an optional embodiment, after the communication state of the port is switched from the forced connection state to the disconnected state, the mode switching module 803 is further configured to:

[0238] Enable auto-negotiation on the port and, upon receiving an auto-negotiation signal, switch the port's communication state from disconnected to connected. The connected state indicates that the port has the ability to respond to messages but does not have the ability to actively send messages.

[0239] Based on the same technical concept, an embodiment of the present application further provides an electronic device that can implement the port mode switching method provided in the above embodiment of the present application. In one embodiment, the electronic device can be a server, a terminal device, or other electronic device. Referring to FIG9 , the electronic device may include:

[0240] At least one processor 901, and a memory 902 connected to at least one processor 901. In the embodiments of the present application, the specific connection medium between the processor 901 and the memory 902 is not limited. FIG9 takes the connection between the processor 901 and the memory 902 via the bus 900 as an example. The bus 900 is represented by a bold line in FIG9, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 900 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG9 only uses a bold line to represent it, but this does not mean that there is only one bus or one type of bus. Alternatively, the processor 901 can also be called a controller, and there is no limitation on the name.

[0241] In this embodiment of the present application, memory 902 stores instructions executable by at least one processor 901. At least one processor 901 can execute the port mode switching method discussed above by executing the instructions stored in memory 902. Processor 901 can implement the functions of each module in the apparatus shown in FIG8.

[0242] Among them, the processor 901 is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory 902 and calling data stored in the memory 902, the various functions of the device and processing data.

[0243] In one possible design, processor 901 may include one or more processing units. Processor 901 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 901. In some embodiments, processor 901 and memory 902 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.

[0244] The processor 901 can be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the port mode switching method disclosed in the embodiments of this application can be directly implemented as a hardware processor, or can be implemented using a combination of hardware and software modules in the processor.

[0245] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, abbreviated: RAM), a static random access memory (English: Static Random Access Memory, abbreviated: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, abbreviated: PROM), a read-only memory (English: Read Only Memory, abbreviated: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0246] By designing and programming the processor 901, the code corresponding to the port mode switching method described in the aforementioned embodiment can be embedded in the chip, thereby enabling the chip to execute the steps of the port mode switching method of the embodiment shown in FIG4 during operation. Designing and programming the processor 901 is well known to those skilled in the art and will not be further described here.

[0247] Based on the same inventive concept, an embodiment of the present application further provides a communication system, comprising: an Ethernet network device and a first network device to be accessed;

[0248] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, and determine a module type of the optical module based on characteristic intervals of a plurality of optical module characteristics included in the characteristic information, and, when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a first network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0249] The first network device to be accessed is configured to receive an access detection request and, when determining that the target port mode is the PON mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the first network device to be accessed needs to access the converged network.

[0250] Based on the same inventive concept, an embodiment of the present application further provides a communication system, comprising: an Ethernet network device and a second network device to be accessed;

[0251] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, and determine a module type of the optical module based on characteristic intervals to which multiple optical module characteristics included in the characteristic information belong, and when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a second network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0252] The second network device to be accessed is used to receive the access detection request and, when determining that the target port mode is the Ethernet network mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the second network device to be accessed needs to access the converged network.

[0253] Based on the same inventive concept, an embodiment of the present application further provides a communication system, comprising: an Ethernet network device and a third network device to be accessed;

[0254] An Ethernet network device, configured to, in response to an operation of inserting an optical module into a port, obtain characteristic information of the optical module, and determine a module type of the optical module based on characteristic intervals of a plurality of optical module characteristics included in the characteristic information, and, when a target port mode corresponding to the module type is determined to be different from a current port mode, switch the port from the current port mode to the target port mode according to a port mode switching method set for the corresponding module type, and send an access detection request for a converged network to a third network device to be accessed; wherein the converged network has PON service capabilities and Ethernet network service capabilities;

[0255] The third network device to be accessed is used to receive an access detection request, and when it is determined that the target port mode is Ethernet network mode or PON mode, and the target port mode is the same as the device port mode of the third network device to be accessed, return an access registration response to the Ethernet network device based on the access detection request; or, when it is determined that the target port mode is Ethernet network mode or PON mode, and the target port mode is different from the device port mode of the third network device to be accessed, switch the device port mode to the target port mode, and after switching the device port mode to the target port mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the third network device to be accessed needs to access the converged network.

[0256] Based on the same inventive concept, an embodiment of the present application further provides a storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer executes a port mode switching method discussed above.

[0257] In some possible implementations, the present application also provides various aspects of a port mode switching method, which can also be implemented in the form of a program product, which includes program code. When the program product is run on the device, the program code is used to enable the control device to execute the steps of a port mode switching method according to various exemplary embodiments of the present application described above in this specification.

[0258] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.

[0259] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0260] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0261] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a server, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0262] The program code used to perform the operations of the present application may be written using any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0263] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0264] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A port mode switching method, applied to an Ethernet device in an Ethernet network, comprising: In response to the operation of inserting the optical module into the port, acquiring characteristic information of the optical module, wherein the characteristic information includes a plurality of optical module characteristics; Determining a module type of the optical module based on the plurality of optical module characteristics; and When it is determined that the target port mode corresponding to the module type is different from the current port mode of the port, the port is switched from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type.

2. The method of claim 1, wherein: The plurality of optical module characteristics include wavelength characteristics and / or interface characteristics.

3. The method of claim 2, wherein: The determining the module type of the optical module based on the multiple optical module features includes: The Ethernet network device determines the wavelength type corresponding to the optical module according to the obtained wavelength characteristics, and determines the interface type corresponding to the optical module according to the obtained interface characteristics; and determines the module type of the optical module according to the wavelength type and the interface type.

4. The method of claim 2, wherein: The determining the module type of the optical module based on the multiple optical module features includes: The Ethernet network device determines the wavelength characteristic interval to which the wavelength characteristic belongs, and the interface characteristic interval to which the interface characteristic belongs; and The Ethernet network device determines the module type of the optical module according to the wavelength characteristic interval and the interface characteristic interval.

5. The method of claim 4, wherein: The Ethernet network device determines the module type of the optical module according to the wavelength characteristic interval and the interface characteristic interval, including: The Ethernet network device determines the wavelength type and the interface type corresponding to the optical module according to the wavelength characteristic interval and the interface characteristic interval; and The module type of the optical module is determined according to the wavelength type and the interface type.

6. The method according to any one of claims 1 to 5, wherein: The Ethernet network device acquires characteristic information according to data acquisition devices respectively arranged corresponding to the characteristics of the plurality of optical modules.

7. The method according to any one of claims 1 to 6, wherein: The port modes include passive optical network (PON) mode and Ethernet mode.

8. The method of claim 7, wherein: If the following conditions are met, it is determined that the target port mode corresponding to the module type is different from the current port mode: The target port mode is the PON mode, and the current port mode is the Ethernet mode; or, The target port mode is the Ethernet mode, and the current port mode is the PON mode.

9. The method of claim 7, wherein: The module types include passive optical PON type and Ethernet type.

10. The method of claim 9, wherein: The step of switching the port from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type includes: If the module type is the PON type, switching the port from the Ethernet mode to the PON mode according to the port switching mode set corresponding to the PON type; and / or If the module type is the Ethernet type, the port is switched from the PON mode to the Ethernet mode according to the port switching mode set corresponding to the Ethernet type.

11. The method of claim 10, wherein: The step of switching the port from the Ethernet mode to the PON mode according to the port switching mode set corresponding to the PON type includes: Turn off the auto-negotiation capability of the port, and switch the communication state of the port to a forced connection state; wherein the forced connection state indicates that the port has the ability to actively send messages; and Enable the port to send multi-point control protocol MPCP messages to the central processing unit CPU.

12. The method of claim 11, wherein: After enabling the ability of the port to send a multi-point control protocol MPCP message to a central processing unit CPU, the method further comprises: Enabling the MPCP message sending capability of the port and sending an access detection request of the converged network; wherein the converged network has PON service capability and Ethernet network service capability; receiving access registration responses returned by a plurality of network devices to be accessed based on the access detection requests; and If, among the multiple access registration responses, there is an access registration response indicating a need to access the converged network, access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response.

13. The method of claim 10, wherein: The step of switching the port from the PON mode to the Ethernet mode according to the port switching mode set corresponding to the Ethernet type includes: Disable the MPCP message receiving capability of the port; Disabling the MPCP message sending capability of the port; and The communication state of the port is switched from a forced connection state to a disconnected state.

14. The method of claim 13, wherein: The shutting down of the MPCP message receiving capability of the port further includes: Disable the port's ability to upload MPCP messages to the CPU.

15. The method of claim 13, wherein: After the communication state of the port is switched from the forced connection state to the disconnected state, the method further includes: The auto-negotiation capability of the port is enabled, and when it is determined that the port receives an auto-negotiation signal, the communication state of the port is switched from a disconnected state to a connected state; wherein the connected state indicates that the port has a message response capability but does not have an ability to actively send messages.

16. A port mode switching device, wherein: Any Ethernet device used in Ethernet networking, including: An information acquisition module, configured to acquire characteristic information of the optical module in response to the operation of inserting the optical module into the port; the characteristic information includes a plurality of optical module characteristics; A type determination module, configured to determine a module type of the optical module based on the plurality of optical module features; The mode switching module is used to switch the port from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type when it is determined that the target port mode corresponding to the module type is different from the current port mode.

17. The switching device according to claim 16, wherein: The information acquisition module is specifically used to acquire characteristic information according to data acquisition devices respectively arranged corresponding to the characteristics of the plurality of optical modules.

18. The switching device according to claim 16, wherein: The plurality of optical module characteristics include wavelength characteristics and / or interface characteristics.

19. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 15 is implemented.

20. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Passive optical network mode switching method and device as well as passive optical network equipment and system

    CN107529100A

  • Configuration method and device of passive optical network and storage medium

    CN109698981A

  • Mode self-adaption method, device and equipment and computer readable storage medium

    CN111541629A

  • PON optical module automatic detection configuration method and system, and storage medium

    CN114745619A

  • Method and apparatus for implementing trunk optical fiber protection in ethernet passive optical network (EPON)

    US20120045199A1