Method, device and equipment for selecting uplink working mode of optical network device
Patent Information
- Application Number
- CN202610799187.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-09-01
AI Technical Summary
[0003]现有技术中,由于应用场景不同,需研发不同的ONU软件版本或产品,根据应用需求量分批生产指定上行模式的ONU,使用时根据用户场景使用对应上行模式的ONU,导致出现ONU的差异化需求,进而导致统一管理的难度较大
Smart Images

Figure CN122679352A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a method, apparatus, and device for selecting the uplink operating mode of an optical network device. Background Technology
[0002] Currently, with the increasing prevalence and sophistication of fiber optic broadband, telecom operators are increasingly demanding the use of Optical Network Units (ONUs) for broadband deployment. Furthermore, unified management of ONU devices through an ONU management platform facilitates broadband operation. It's important to note that telecom broadband deployment varies depending on the user's environment, generally falling into two application scenarios: fiber-to-the-home (FTTH) and cable-to-the-home (CTH).
[0003] In existing technologies, due to different application scenarios, different ONU software versions or products need to be developed. ONUs with specified uplink modes are produced in batches according to application demand. When in use, the corresponding uplink mode ONU is used according to the user scenario, resulting in differentiated ONU requirements, which in turn makes unified management difficult. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, and device for selecting the uplink working mode of an optical network device, which solves the above-mentioned problems existing in the prior art. It enables the ONU (Optical Network Unit) to adapt to two different user access environments, namely fiber-to-the-home and cable-to-the-home, thereby eliminating the need to differentiate ONU products in the production and delivery stage and to prepare the differentiated requirements of the corresponding uplink mode ONU in advance in the installation and deployment stage, and it can be used plug and play.
[0005] Firstly, a method for selecting the uplink operating mode of an optical network device is provided, the method including: Detect whether a valid optical signal exists at the first uplink interface of the optical network device; If a valid optical signal is present, the uplink working mode of the optical network device is switched to PON uplink mode; If no valid optical signal is found, the second uplink interface of the optical network device is checked to see if it is connected to a valid uplink device. If a connection to the valid uplink device is confirmed, the uplink operating mode of the optical network device is switched to LAN uplink mode.
[0006] Secondly, a device for selecting the uplink operating mode of an optical network device is provided, the device including: The first detection module is used to detect whether there is a valid optical signal at the first uplink interface of the optical network device; The first switching module is used to switch the uplink working mode of the optical network device to PON uplink mode if a valid optical signal is present. The second detection module is used to detect whether the second uplink interface of the optical network device is connected to a valid uplink device if no valid optical signal is present. The second switching module is used to switch the uplink operating mode of the optical network device to LAN uplink mode if it is determined that the connection to the valid uplink device is established.
[0007] Thirdly, an optical network device is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0008] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0009] This application provides a method, apparatus, and device for selecting the uplink operating mode of an optical network device. The method detects whether a valid optical signal exists on the first uplink interface of the optical network device. If a valid optical signal exists, the uplink operating mode of the optical network device is switched to PON uplink mode. If no valid optical signal exists, the method detects whether the second uplink interface of the optical network device is connected to a valid uplink device. If it is determined that the device is connected to a valid uplink device, the uplink operating mode of the optical network device is switched to LAN uplink mode. In this solution, the ONU automatically matches the applicable uplink operating mode (PON uplink mode or LAN uplink mode) based on the signal parameters of the detected uplink interfaces (first uplink interface and second uplink interface), achieving adaptive switching across heterogeneous interface types (PON port and LAN port). This allows for plug-and-play functionality, ensuring the ONU provides normal network functions. It eliminates the need to differentiate ONU products during production and shipping, thus avoiding the need for pre-preparation of ONUs with corresponding uplink modes during installation and deployment, greatly facilitating broadband deployment for telecom operators. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating a method for selecting the uplink working mode of an optical network device, provided in an embodiment of this application; Figure 2 A flowchart illustrating another method for selecting the uplink working mode of an optical network device provided in this application embodiment; Figure 3 A flowchart illustrating another method for selecting the uplink working mode of an optical network device provided in this application embodiment; Figure 4 A schematic diagram of the structure of an uplink working mode selection device for an optical network device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an optical network device provided in an embodiment of this application. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The words "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The words "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but do not exclude other elements or objects. The words "connected," "coupled," or "connected," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up," "down," "left," "right," etc., are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0013] For ease of understanding, the terms used in the embodiments of this application are explained below: DHCP: Dynamic Host Configuration Protocol.
[0014] The uplink operating mode selection method for optical network devices provided in this application embodiment can be applied to optical network devices, terminal devices, uplink operating mode selection devices for optical network devices, or other devices or equipment capable of executing this embodiment, without limitation. This embodiment focuses on the optical network device as the executing entity.
[0015] The terminal can be a user equipment (UE) such as a mobile phone, smartphone, laptop computer, digital broadcast receiver, personal digital assistant (PDA), or tablet computer (PAD), handheld device, in-vehicle device, wearable device, computing device, or other processing device connected to a wireless modem, mobile station (MS), or mobile terminal. This terminal has the ability to communicate with one or more core networks via a radio access network (RAN).
[0016] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0017] Figure 1 This is a flowchart illustrating a method for selecting the uplink operating mode of an optical network device, as provided in an embodiment of this application. Figure 1 As shown, the method may include: Step S101: Detect whether there is a valid optical signal on the first uplink interface of the optical network device.
[0018] For example, initially, the first uplink interface and / or the second uplink interface of the optical network device (ONU) are connected. After the ONU is powered on, it automatically detects the fiber optic signal parameters of the first uplink interface. If the fiber optic signal is normal, it indicates that there is a valid optical signal on the first uplink interface, and the detection of a valid optical signal stops. The first uplink interface is a Passive Optical Network port (PON port).
[0019] Step S102: If a valid optical signal exists, switch the uplink working mode of the optical network device to PON uplink mode.
[0020] For example, if a valid optical signal is present, the selected optical network device switches its uplink operating mode to PON uplink mode (Passive Optical Network uplink mode) to connect to the optical fiber and realize the transmission and reception of optical signals. This is the core interface for the ONU to access the operator's network uplink. If no normal optical fiber signal is detected, proceed to the next step.
[0021] Step S103: If there is no valid optical signal, then detect whether the second uplink interface of the optical network device is connected to a valid uplink device.
[0022] For example, if no valid optical signal is found, the system further checks whether the second uplink interface of the optical network device is connected to a valid uplink device. The second uplink interface is a Local Area Network (LAN) port, typically a standard Ethernet interface used to connect user-side computers, routers, switches, and other devices to provide LAN communication capabilities; the valid uplink device refers to a Cable Modem.
[0023] Step S104: If it is determined that the connection to a valid uplink device is valid, switch the uplink operating mode of the optical network device to LAN uplink mode.
[0024] For example, if a connection to a valid uplink device is determined, the uplink operating mode of the optical network device is switched to LAN uplink mode (Local Area Network uplink mode).
[0025] The method provided in this application embodiment detects whether a valid optical signal exists on the first uplink interface of an optical network device. If a valid optical signal exists, the uplink operating mode of the optical network device is switched to PON uplink mode. If no valid optical signal exists, it detects whether the second uplink interface of the optical network device is connected to a valid uplink device. If it is determined that the device is connected to a valid uplink device, the uplink operating mode of the optical network device is switched to LAN uplink mode. In this solution, the ONU automatically matches the applicable uplink operating mode (PON uplink mode or LAN uplink mode) based on the signal parameters of the detected uplink interfaces (first uplink interface and second uplink interface), realizing adaptive switching across heterogeneous interface types (PON port and LAN port), ensuring that the ONU provides normal network functions; there is no need to differentiate ONU products during the production and delivery process, and there is no need to prepare ONUs with corresponding uplink modes in advance according to the user environment during the installation and deployment process, which greatly facilitates broadband deployment by telecom operators.
[0026] Figure 2 A flowchart illustrating another method for selecting the uplink operating mode of an optical network device provided in this application is shown below. Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, the method is described in detail below, and the method includes: Step S201: Detect whether there is a valid optical signal on the first uplink interface of the optical network device.
[0027] In one example, S201 includes: reading the optical fiber signal parameters of the first uplink interface; if the optical fiber signal parameters are within a first threshold range, then determining that the optical fiber signal parameters are valid optical signals.
[0028] For example, in practical applications, fiber optic signals typically adopt the Class B+ standard, and the optical power corresponding to normal optical signal parameters should be [-27, -8] dBm. The determination of whether fiber optic signal parameters are normal is based on whether the read optical power parameter falls within this range. Specifically, the fiber optic signal parameters of the first uplink interface are read, and it is determined whether the fiber optic signal parameters are within the first threshold range [-27, -8]. If the fiber optic signal parameters are within the first threshold range, then the fiber optic signal parameters are determined to be valid optical signals.
[0029] Step S202: If a valid optical signal exists, switch the uplink working mode of the optical network device to PON uplink mode.
[0030] For example, if a valid optical signal is present, the selected optical network device switches its uplink operating mode to PON uplink mode (Passive Optical Network uplink mode) to connect to the optical fiber and realize the transmission and reception of optical signals. This is the core interface for the ONU to access the operator's network uplink. If no normal optical fiber signal is detected, proceed to the next step.
[0031] Step S203: If there is no valid optical signal, then detect whether the second uplink interface of the optical network device is connected to a valid uplink device.
[0032] In one example, detecting whether a preset second uplink interface is connected to a valid uplink device includes: running a DHCP client on the second uplink interface and broadcasting a discovery message to the connected uplink device through the DHCP client; the discovery message is used to generate a response message; if a response message is received from the uplink device within a preset time period, it is determined that the second uplink interface is connected to a valid uplink device.
[0033] For example, when a network cable connection is detected on the second uplink interface, a DHCP client runs on the second uplink interface and broadcasts a DHCP DISCOVER request packet. The DHCP DISCOVER request packet includes a discovery message, and the system probes for a DHCP SERVER response based on the DHCP DISCOVER request packet. If a response message from the uplink device is received within a preset time period, it is determined that a valid uplink device has been connected, i.e., the uplink cable modem device, and the probe stops.
[0034] Optionally, the Cable Modem device has DHCP SERVER service enabled (i.e., a service based on the DHCP protocol), and the ONU starts DHCP CLIENT service (i.e., a DHCP client). When the Cable Modem and the ONU's second uplink interface are connected using a network cable, the DHCP DISCOVER message sent by the ONU is received by the Cable Modem. According to the DHCP protocol, the Cable Modem replies with a DHCP OFFER message. Upon receiving the reply message (DHCP OFFER message), the ONU can determine that the corresponding second uplink interface (i.e., the LAN port) has been connected to the Cable Modem device based on the receiving address of the DHCP OFFER message, and should switch its working mode to LAN uplink mode. If other user terminal devices, such as computers and set-top boxes, are connected to the ONU's LAN port, these terminal devices will not have DHCP SERVER service enabled and will not respond to or reply to the ONU's discovery messages, thus not affecting the ONU's detection of the Cable Modem device.
[0035] Step S204: If it is determined that the connection to a valid uplink device is valid, switch the uplink operating mode of the optical network device to LAN uplink mode.
[0036] In one example, automatically switching the uplink working mode to PON uplink mode or LAN uplink mode includes: calling the mode switching interface of the chip SDK in the optical network device, shutting down the protocol stack of the uplink interface corresponding to the non-working mode, and starting the protocol stack of the uplink interface corresponding to the current working mode.
[0037] For example, if a connection to a valid uplink device is determined, the uplink operating mode of the optical network device is switched to LAN uplink mode. If the ONU does not receive a DHCP OFFER message, it repeatedly sends DHCP DISCOVER request packets and waits for a response. If no response is received after the number of repetitions reaches a set threshold, it is determined that the cable modem is not connected. Alternatively, if no DHCP OFFER message is detected within a preset time period, it is determined that the LAN port is not connected to the cable modem. When it is determined that the LAN port is not connected to the cable modem, the system returns to step S201 after a preset time period to begin signal detection in the next cycle. For example, after a 6-second delay, it returns to step S201 to begin signal detection in the next cycle.
[0038] Optionally, the uplink working mode can be automatically switched to PON uplink mode or LAN uplink mode, including: calling the mode switching interface of the chip SDK in the optical network device, shutting down the protocol stack of the uplink interface corresponding to the non-working mode, and starting the protocol stack of the uplink interface corresponding to the current working mode.
[0039] Optionally, in traditional solutions, the handover is accompanied by service interruptions of tens of milliseconds or even seconds. This application addresses this by proactively... Passive dual-protocol stack parallel maintenance, combined with NFV (Network Functions Virtualization) lightweight proxy, achieves zero packet loss and seamless user experience during uplink mode switching. Specifically, the active protocol stack of the first uplink interface and the shadow protocol stack of the second uplink interface are maintained in parallel operation. Before the switchover is triggered, the shadow protocol stack has already obtained a valid network layer configuration. During the switchover execution, the data plane is instantaneously remapped from the first uplink interface to the second uplink interface via atomic flow table update instructions, while existing connections are migrated using tunneling mechanisms. Therefore, when the switchover conditions are met, the shadow protocol stack already holds a valid IP address (or PPPoE session), and the switchover time is shortened to only requiring modification of the data plane flow table, without the need to re-initiate detection packets.
[0040] Optionally, after receiving the response message, the ONU further parses the server identification option or router option in the message. If the IP address of the server identification option or router option matches the preset cable modem management address range, it determines that it is connected to the cable modem; otherwise, it continues to probe or regards it as an invalid device.
[0041] Optionally, when the ONU receives a response message, it verifies whether the transaction ID in the message matches the transaction ID in the DHCPDISCOVER request packet it sent, and verifies whether the target MAC address is the MAC address of the ONU's LAN port. If both match, it is determined to be a valid Cable Modem response.
[0042] Step S205: Set a delay timer; start the timer after no valid optical signal is detected and no response message is received within a preset time period, and record the number of consecutive unsuccessful detection cycles; if the number of detection cycles exceeds the second threshold, stop executing the step of detecting whether there is a valid optical signal on the first uplink interface of the optical network device.
[0043] For example, to reduce invalid probes, and considering the actual installation of the ONU, the probe is terminated if the number of probe cycles exceeds a preset number, for example, 20 probe cycles. First, a delay timer is set. When no valid optical signal is detected for the first time and no response message is received within a preset time period, the timer is started and its initial value is updated to 1, resulting in a probe cycle count of 1. For each subsequent unsuccessful probe operation, the probe cycle count is incremented by 1, and the number of consecutive unsuccessful probe cycles is monitored during the recording process. If the probe cycle count exceeds a preset second threshold, step S201 is stopped.
[0044] Step S206: In response to the manual locking operation, switch the operating mode to manual locking mode; the manual locking mode is either forced PON mode, forced LAN mode, or automatic mode; forced PON mode is used to execute PON uplink mode; forced LAN mode is used to execute LAN uplink mode; automatic mode is used to switch between PON uplink mode and LAN uplink mode.
[0045] For example, in response to a manual locking operation, the operating mode is switched to manual locking mode. Manual locking mode can be forced PON mode, forced LAN mode, or automatic mode. Both forced PON mode and forced LAN mode are used to disable automatic link detection and mode switching logic; forced PON mode is used to execute PON uplink mode, and forced LAN mode is used to execute LAN uplink mode. Automatic mode is used to execute automatic link detection and mode switching logic, i.e., switching between PON uplink mode and LAN uplink mode.
[0046] Step S207: If it is determined that there is no valid optical signal on the first uplink interface and the physical port type of the first uplink interface is an optical port, and / or the physical port type of the second uplink interface is an electrical port and is not connected to a valid uplink device, then refuse to enter any working mode and output a wiring error message; the wiring error message is output through different flashing modes of the status indicator light of the optical network device, or through push notifications from the mobile application paired with the optical network device, or through the voice broadcast module of the optical network device.
[0047] For example, when the first uplink interface (PON port) is incorrectly plugged into a network cable, and / or the second uplink interface (LAN port) is incorrectly plugged into an optical fiber, the communication failure caused by the difference in ONU hardware port configuration is used to trigger mode switching: if the initial detection of the first uplink interface fails and the physical port type is optical, while the physical port type of the second uplink interface is electrical but no Cable Modem is detected, the ONU refuses to enter any operating mode and outputs a wiring error message. The wiring error message is output through different flashing patterns of the status indicator lights of the optical network device, or through push notifications from a mobile application paired with the optical network device, or through the voice broadcast module of the optical network device.
[0048] Therefore, to address extreme wiring errors that may occur during on-site installation, such as "fiber optic cable plugged into LAN port, network cable plugged into PON port," a clear error diagnosis mechanism can be provided based on wiring error prompts. This facilitates on-site location of wiring errors and improves installation efficiency.
[0049] Optionally, when the ONU's LAN port is in LAN uplink mode, the only valid uplink device is a Cable Modem. If an abnormal data packet (not a DHCP Offer message) is detected on the LAN port, traffic suppression or shutdown of the LAN port is automatically implemented, and an abnormal access alarm is reported to the network management platform. Therefore, timely isolation when an incorrect network device is connected to the LAN port and generates unexpected traffic can prevent broadcast storms or loops.
[0050] Optionally, due to potential fiber optic signal quality degradation or interruption in PON uplink scenarios and potential cable modem disconnection in LAN uplink scenarios, continuous monitoring and active fallback are required during the mode maintenance period. Specifically, when the ONU is currently operating in PON uplink mode, it continuously monitors the optical power value of the PON port. When the optical power value falls below the lower threshold of the effective optical signal multiple times consecutively, the ONU actively enters the LAN detection phase. If a successful connection to the cable modem is established at this time, the uplink mode is triggered to fall back from PON uplink to LAN uplink. Therefore, the ONU "operates and detects simultaneously" in PON uplink mode, achieving active redundancy switching and improving reliability.
[0051] When the ONU is currently operating in LAN uplink mode, it monitors the connection status with the Cable Modem by periodically sending DHCP DISCOVER request packets. If it fails to receive a DHCP Offer response multiple times consecutively, the ONU enters the PON detection phase to detect the fiber optic signal. The threshold number of consecutive failures is a configurable parameter. If the number of consecutive failures does not reach the threshold, the ONU maintains its current operating mode and does not switch modes to avoid mode oscillations caused by momentary signal jitter.
[0052] Optionally, while adaptive switching of a single ONU solves the device-level problem, the operator's operation and maintenance management requires supporting capabilities on the network management platform side. Specifically, after the ONU completes the uplink working mode switch, it reports the current working mode information and uplink interface connection status to the superior network management platform via the TR-069 or OMCI protocol. The network management platform then updates the ONU's device file and user access environment type record accordingly. Based on the received working mode information, the network management platform statistically analyzes and predicts the distribution of user access environments within the deployment area. When the reported proportion of a certain working mode exceeds a preset threshold, the platform automatically sends a deployment plan adjustment suggestion for that area to the operation and maintenance center. Therefore, extending from the adaptive switching of a single ONU to data support for operation and maintenance decisions forms a closed loop of "adaptive switching, data reporting, statistical analysis, and deployment decision-making," facilitating operation and maintenance management on the network management platform side.
[0053] Optionally, when the ONU switches between PON uplink mode and LAN uplink mode, network access parameters such as IP address, routing table, and DNS will change, potentially causing interruptions to established upper-layer sessions (such as IPTV streaming and VoIP calls). To address the issue of a smooth service transition after switching, the following steps are performed: When the ONU's uplink operating mode is switched, the ONU automatically initiates a DHCP request to obtain new network parameters after the switch is completed, and refreshes the routing table, DNS cache, and ARP entries based on the new network parameters; upper-layer service applications automatically resume sessions after detecting network connection reconnection. Therefore, automatically refreshing network parameters after mode switching ensures that upper-layer services can resume operation.
[0054] The steps for automatically refreshing network parameters include: clearing the original WAN port IP address and routing information, re-executing the entire DHCP process from the new uplink to obtain the IP address, default gateway, and DNS server address, and updating the ONU's local time synchronization source and NTP server address to a configuration that matches the current working mode.
[0055] Optionally, repeatedly entering the probe loop mode indicates that the ONU cannot currently find a valid uplink connection. For installers, it is necessary to quickly determine whether the problem is a loose connection or a different user environment. Therefore, cloud-based knowledge bases and rule-based experience can be used to improve the intelligence of fault diagnosis. Specifically, when multiple attempts to return to step S201 fail to enter any uplink working mode, and the probe cycle count reaches the second threshold and exits the probe, the ONU determines that it is currently in an "undeployable state" and prompts the on-site installers to check the lines via indicator light combinations or a push notification from a mobile application.
[0056] Therefore, if the detection fails after more than 20 cycles (about 2 minutes), it indicates that the user's environment may be a non-standard scenario (such as the same location lacking both fiber optic cable and cable modem, or the cable modem being disconnected and fiber optic cable not being installed). You can directly prompt the installer to check the line.
[0057] After entering a "non-deployable state," the ONU packages the fiber optic power readings and DHCP interaction logs from the last probe cycle into a fault report, which is then reported to the network management platform via the management channel or 4G backup channel. The network management platform matches the characteristic data in this fault report with a pre-set fault knowledge base, automatically generates diagnostic suggestions, and returns them to the terminal equipment of the on-site installation personnel. Therefore, by structurally reporting the failed probe data and matching it with the knowledge base, intelligent fault diagnosis is achieved.
[0058] The method provided in this application embodiment detects whether a valid optical signal exists on the first uplink interface of an optical network device. If a valid optical signal exists, the uplink operating mode of the optical network device is switched to PON uplink mode. If no valid optical signal exists, it detects whether the second uplink interface of the optical network device is connected to a valid uplink device. If it is determined that the device is connected to a valid uplink device, the uplink operating mode of the optical network device is switched to LAN uplink mode. A delay timer is set; the timer is started after no valid optical signal is detected and no response message is received within a preset time period, and the number of consecutive unsuccessful detection cycles is recorded; if the number of detection cycles exceeds a second threshold, the step of detecting whether a valid optical signal exists on the first uplink interface of the optical network device is stopped. In response to a manual locking operation, the operating mode is switched to manual locking mode; the locking flag includes forced PON mode and forced LAN mode; forced PON or forced LAN is used to block the automatic link detection and mode switching logic. If it is determined that there is no valid optical signal on the first uplink interface and the physical port type of the first uplink interface is an optical port, and / or the physical port type of the second uplink interface is an electrical port and not connected to a valid uplink device, then entering any working mode will be refused and a wiring error message will be output. The wiring error message will be output through different flashing patterns of the status indicator light of the optical network device, or through a push notification from a mobile application paired with the optical network device, or through the voice broadcast module of the optical network device. In this solution, the ONU automatically matches the applicable uplink working mode (PON uplink mode or LAN uplink mode) based on the signal parameters of the detected uplink interfaces (first uplink interface and second uplink interface), realizing adaptive switching across heterogeneous interface types (PON port and LAN port), which can be plugged and played and ensures that the ONU provides normal network functions. There is no need to differentiate ONU products in the production and delivery stage, and there is no need to prepare ONUs with corresponding uplink modes in advance according to the user environment in the installation and deployment stage, which greatly facilitates the broadband deployment of telecom operators.
[0059] In one embodiment, Figure 3 This is a flowchart illustrating another method for selecting the uplink operating mode of an optical network device provided in an embodiment of this application. Figure 3 The process includes: reading the input optical power parameters; determining if the input optical power is within the range of [-27, -8]; if within the range, stopping the probe and setting the PON uplink mode; if not within the range, reading the LAN port connection status and determining if the LAN port is connected; if the LAN port is connected, sending a DHCPDISCOVER message; listening for response messages with a 6-second timeout; determining if a DHCP OFFER message has been received; if a DHCP OFFER message is received, stopping the probe and setting the LAN uplink mode; if the LAN port is not connected, incrementing the detection count by 1 and delaying for 6 seconds to enter the next detection cycle; if no DHCP OFFER message is received, incrementing the detection count by 1 and determining if the detection count is >= 20; if the detection count is >= 20, ending the detection.
[0060] Corresponding to the above method, embodiments of this application also provide an uplink operating mode selection device for optical network devices, such as... Figure 4 As shown, the device includes: The first detection module 41 is used to detect whether there is a valid optical signal at the first uplink interface of the optical network device; The first switching module 42 is used to switch the uplink working mode of the optical network device to PON uplink mode if a valid optical signal is present. The second detection module 43 is used to detect whether the second uplink interface of the optical network device is connected to a valid uplink device if there is no valid optical signal. The second switching module 44 is used to switch the uplink operating mode of the optical network device to LAN uplink mode if it is determined that the connection to a valid uplink device is valid.
[0061] The functions of each functional unit of the uplink working mode selection device for optical network equipment provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the uplink working mode selection device for optical network equipment provided in the embodiments of this application will not be repeated here.
[0062] This application also provides an optical network device, such as... Figure 5 As shown, it includes a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540.
[0063] Memory 530 is used to store computer programs; The processor 510 performs the above steps when executing the program stored in the memory 530.
[0064] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0065] The communication interface is used for communication between the aforementioned optical network devices and other devices.
[0066] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0067] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0068] The implementation methods and beneficial effects of the various components of the optical network device in the above embodiments for solving the problem can be found in [reference needed]. Figure 1 The steps in the illustrated embodiments are used to implement the process. Therefore, the specific working process and beneficial effects of the optical network device provided in this application will not be repeated here.
[0069] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the uplink operating mode selection method of any of the optical network devices described in the above embodiments.
[0070] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the uplink operating mode selection method of any of the optical network devices described in the above embodiments.
[0071] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0073] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0074] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0075] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0076] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.
Claims
1. A method for selecting the uplink operating mode of an optical network device, characterized in that, include: Detect whether a valid optical signal exists at the first uplink interface of the optical network device; If a valid optical signal is present, the uplink working mode of the optical network device is switched to PON uplink mode; If no valid optical signal is found, the second uplink interface of the optical network device is checked to see if it is connected to a valid uplink device. If a connection to the valid uplink device is confirmed, the uplink operating mode of the optical network device is switched to LAN uplink mode.
2. The method as described in claim 1, characterized in that, Detecting whether the preset second uplink interface is connected to a valid uplink device includes: A DHCP client is run on the second uplink interface, and a discovery message is broadcast to the connected uplink device via the DHCP client; the discovery message is used to generate a response message. If a response message is received from the uplink device within a preset time period, it is determined that the second uplink interface is connected to a valid uplink device.
3. The method as described in claim 1, characterized in that, Detecting whether a valid optical signal exists on the first uplink interface of the optical network device includes: Read the fiber optic signal parameters of the first uplink interface; If the optical fiber signal parameters are within the first threshold range, then the optical fiber signal parameters are determined to be valid optical signals.
4. The method as described in claim 1, characterized in that, Automatically switching the uplink operating mode to PON uplink mode or LAN uplink mode includes: The mode switching interface of the chip SDK in the optical network device is invoked to shut down the protocol stack of the uplink interface corresponding to the non-working mode and start the protocol stack of the uplink interface corresponding to the current working mode.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Set a delay timer; The timer is started after no valid light signal is detected and no response message is received within a preset time period, and the number of consecutive unsuccessful detection cycles is recorded. If the number of detection cycles exceeds the second threshold, the step of detecting whether there is a valid optical signal at the first uplink interface of the optical network device is stopped.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to a manual locking operation, the operating mode is switched to manual locking mode; the manual locking mode is either forced PON mode, forced LAN mode, or automatic mode. The forced PON mode is used to execute the PON uplink mode; the forced LAN mode is used to execute the LAN uplink mode; and the automatic mode is used to switch between the PON uplink mode and the LAN uplink mode.
7. The method according to any one of claims 1-4, characterized in that, The method further includes: If it is determined that there is no valid optical signal on the first uplink interface and the physical port type of the first uplink interface is an optical port, and / or the physical port type of the second uplink interface is an electrical port and is not connected to a valid uplink device, then entering any working mode will be refused and a wiring error message will be output. The wiring error message is output through different flashing modes of the status indicator light of the optical network device, or pushed through a mobile application paired with the optical network device, or output through the voice broadcast module of the optical network device.
8. A device for selecting the uplink operating mode of an optical network device, characterized in that, The device includes: The first detection module is used to detect whether there is a valid optical signal at the first uplink interface of the optical network device; The first switching module is used to switch the uplink working mode of the optical network device to PON uplink mode if a valid optical signal is present. The second detection module is used to detect whether the second uplink interface of the optical network device is connected to a valid uplink device if no valid optical signal is present. The second switching module is used to switch the uplink operating mode of the optical network device to LAN uplink mode if it is determined that the connection to the valid uplink device is established.
9. An optical network device, characterized in that, The optical network device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.