Method and apparatus for adaptive setting of passive optical network mode, electronic device and medium
By judging the optical fiber connection status and light source type of the optical network unit, the passive optical network mode is automatically set, which solves the problem of low efficiency of optical network unit software setting in the existing technology and realizes adaptive switching and efficient adaptation of the passive optical network mode.
Patent Information
- Application Number
- CN202211415025.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-11-11
AI Technical Summary
Existing optical network unit software requires compiling different software versions and manually selecting and debugging in different PON network environments, resulting in low efficiency in passive optical network mode setting.
By judging the optical fiber connection status and light source type of the optical network unit, it automatically sets the Ethernet passive optical network or gigabit passive optical network mode and runs the corresponding network environment, including detecting and killing unnecessary processes to achieve adaptive mode switching.
Improves the setup efficiency of optical network unit software in different PON network environments, avoiding the tedious process of manually selecting and compiling different versions.
Smart Images

Figure CN115914893B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of fiber optical communication network, and particularly relates to a method and device for setting passive optical network mode adaptively, an electronic device and a medium. BACKGROUND
[0002] With the large layout of various passive optical network (PON) networks in modern society, the demand for optical network unit (ONU) software is more and more diversified. The current ONU software generally adopts a single mode running mode, that is, a set of ONU software can only support one of GPON (Gigabit Passive Optical Network) mode and EPON (Ethernet Passive Optical Network) mode. In different PON network environments in actual application, different ONU software versions need to be compiled to adapt to the current PON network, and the user needs to manually select and debug, which is very cumbersome, thus leading to low efficiency of setting PON mode of ONU software. SUMMARY
[0003] The main purpose of the present application is to provide a method and device for setting passive optical network mode adaptively, an electronic device and a medium, aiming at solving the technical problem of low efficiency of setting PON mode of ONU software.
[0004] To achieve the above purpose, the present application provides a method for setting passive optical network mode adaptively, which comprises the following steps:
[0005] judging whether the optical fiber corresponding to the ONU is in a connected state;
[0006] If yes, setting the PON mode according to the light source type in the optical module of the ONU, and running the network environment corresponding to the PON mode;
[0007] If no, detecting the mode type of the ONU currently;
[0008] If the mode type is a default PON mode, running the network environment corresponding to the default PON mode;
[0009] If the mode type is an AUTO mode, returning to the step of setting the PON mode according to the light source type in the optical module of the ONU, and running the network environment corresponding to the PON mode.
[0010] Optionally, the PON mode includes an EPON mode and a GPON mode, the step of setting the PON mode according to the light source type in the optical module of the ONU and running a network environment corresponding to the PON mode includes:
[0011] if the light source type is an EPON type, setting the PON mode as the EPON mode through an application layer of the ONU;
[0012] when the application layer detects that the EPON mode has been set, running a network environment corresponding to the EPON mode;
[0013] if the light source type is a GPON type, setting the PON mode as the GPON mode through the application layer;
[0014] when the application layer detects that the GPON mode has been set, running a network environment corresponding to the GPON mode.
[0015] Optionally, the step of running the network environment corresponding to the EPON mode includes:
[0016] running an EPON_OAM process corresponding to the EPON mode;
[0017] detecting whether an OMCI process exists, and killing the OMCI process if the OMCI process exists.
[0018] Optionally, the step of running the network environment corresponding to the GPON mode includes:
[0019] running an OMCI process corresponding to the GPON mode;
[0020] detecting whether an EPON_OAM process exists, and killing the EPON_OAM process if the EPON_OAM process exists.
[0021] Optionally, the default PON mode is the EPON mode or the GPON mode, and the step of running a network environment corresponding to the default PON mode includes:
[0022] if the default PON mode is the EPON mode, running a network environment corresponding to the EPON mode;
[0023] if the default PON mode is the GPON mode, running a network environment corresponding to the GPON mode.
[0024] Optionally, the step of judging whether the optical fiber corresponding to the optical network unit is in a connection state comprises:
[0025] When the optical module in the optical network unit is started, judging whether there is an optical signal in the optical module;
[0026] If there is an optical signal, determining that the optical fiber is in a connection state;
[0027] Otherwise, judging that the optical fiber is in a disconnection state.
[0028] Optionally, the passive optical network mode adaptive setting method further comprises:
[0029] Detecting, by an application layer of the optical network unit, whether the mode corresponding to the passive optical network is set up;
[0030] If the passive optical network mode is set up, saving the current passive optical network mode, wherein the current passive optical network mode is used to adapt to the current network environment for optical fiber signal transmission.
[0031] The application further provides a passive optical network mode adaptive setting device, which is applied to a passive optical network mode adaptive setting equipment, and comprises:
[0032] A connection judgment module, configured to judge whether the optical fiber corresponding to the optical network unit is in a connection state;
[0033] A mode setting module, configured to set the passive optical network mode according to the light source type in the optical module of the optical network unit, and run the network environment corresponding to the passive optical network mode;
[0034] An environment running module, configured to detect the mode type of the optical network unit, and if the mode type is a default passive optical network mode, run the network environment corresponding to the default passive optical network mode;
[0035] A setting return module, configured to if the mode type of the optical network unit is an automatic mode, return to execute the step of setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode.
[0036] Optionally, the mode setting module is further configured to if the light source type is an Ethernet passive optical network type, set the passive optical network mode as the Ethernet passive optical network mode through the application layer of the optical network unit;
[0037] When the application layer detects that the Ethernet passive optical network mode is set, run the network environment corresponding to the Ethernet passive optical network mode;
[0038] if the light source type is a gigabit passive optical network type, setting a passive optical network mode to a gigabit passive optical network mode through the application layer;
[0039] when the application layer detects that the gigabit passive optical network mode has been set, running a network environment corresponding to the gigabit passive optical network mode.
[0040] Optionally, the mode setting module is further configured to:
[0041] running an EPON_OAM process corresponding to the Ethernet passive optical network mode;
[0042] detecting whether there is an OMCI process, and if the OMCI process exists, killing the OMCI process.
[0043] Optionally, the mode setting module is further configured to:
[0044] running an OMCI process corresponding to the gigabit passive optical network mode;
[0045] detecting whether there is an EPON_OAM process, and if the EPON_OAM process exists, killing the EPON_OAM process.
[0046] Optionally, the environment running module is further configured to:
[0047] if the default passive optical network mode is an Ethernet passive optical network mode, running a network environment corresponding to the Ethernet passive optical network mode;
[0048] if the default passive optical network mode is a gigabit passive optical network mode, running a network environment corresponding to the gigabit passive optical network mode.
[0049] Optionally, the connection judging module is further configured to:
[0050] when the optical module in the optical network unit is started, judging whether there is an optical signal in the optical module;
[0051] if there is an optical signal, determining that the optical fiber is in a connected state;
[0052] otherwise, determining that the optical fiber is in a disconnected state.
[0053] Optionally, the mode setting module is further configured to:
[0054] when the optical module in the optical network unit is started, judging whether there is an optical signal in the optical module;
[0055] if there is an optical signal, determining that the optical fiber is in a connected state;
[0056] Otherwise, it is determined that the optical fiber is in a disconnected state.
[0057] The application further provides an electronic device, which is a physical device, and comprises a memory, a processor, and a program of the PON mode adaptive setting method stored in the memory and executable on the processor, which can realize the steps of the PON mode adaptive setting method when executed by the processor.
[0058] The application further provides a computer readable storage medium, which stores a program of the PON mode adaptive setting method, which can realize the steps of the PON mode adaptive setting method when executed by the processor.
[0059] The application further provides a computer program product, which comprises a computer program, which can realize the steps of the PON mode adaptive setting method when executed by the processor.
[0060] The application provides a PON mode adaptive setting method and device, an electronic device, and a medium. First, it is determined whether an optical fiber corresponding to an optical network unit is in a connected state. If yes, a PON mode is set according to a light source type in an optical module of the optical network unit, and a network environment corresponding to the PON mode is run. If no, a current mode type of the optical network unit is detected. If the mode type is a default PON mode, a network environment corresponding to the default PON mode is run. If the mode type is an automatic mode, the step of setting a PON mode according to a light source type in an optical module of an optical network unit and running a network environment corresponding to the PON mode is returned to be executed. The application sets a PON mode adaptively according to a light source type in an optical module or a current mode type in optical network unit software, overcomes technical defects of needing to compile different optical network unit software versions to adapt to a current PON network and manually selecting and debugging, and solves the problem of low PON mode setting efficiency of optical network unit software. BRIEF DESCRIPTION OF DRAWINGS
[0061] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles behind the application.
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0063] Figure 1 A flowchart of a first embodiment of the passive optical network mode adaptive setting method of the present application;
[0064] Figure 2 A flowchart of steps S21 to S24 in the first embodiment of the passive optical network mode adaptive setting method of the present application;
[0065] Figure 3 A flowchart of steps S11 to S13 in the first embodiment of the passive optical network mode adaptive setting method of the present application;
[0066] Figure 4 A structural diagram of the passive optical network mode adaptive setting device in the embodiments of the present application;
[0067] Figure 5 A device structural diagram of the hardware running environment involved in the passive optical network mode adaptive setting method in the embodiments of the present application.
[0068] The purposes, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0069] In order to make the above purposes, features and advantages of the present application more apparent and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0070] Embodiment one
[0071] In the era of global informationization, FTTx (Fiber-to-the-x) construction is in full swing. PON is the key technology to solve the last mile of optical access, and is the most attractive solution to achieve FTTx. PON technology is mainly EPON and GPON, and its commercial network construction has been fully launched. With the large application of fiber network in modern society and the large layout of various PON networks, the demand for optical network unit software is also more and more diversified. The current optical network unit software can generally only support one of the gigabit passive optical network mode and the Ethernet passive optical network mode, and in different PON network environments in actual application, different optical network unit software versions need to be compiled to adapt to the current PON network, and the user needs to manually select and debug, which is very cumbersome, so it leads to the low efficiency of passive optical network mode setting of optical network unit software, so it is urgent to provide a passive optical network mode setting method which can detect and adapt in different PON network environments, switch the passive optical network mode, and thus adapt to the current PON network environment, so as to improve the setting efficiency of the passive optical network mode.
[0072] The embodiment of the application provides a passive optical network mode adaptive setting method, in the first embodiment of the passive optical network mode adaptive setting method of the application, referring to Figure 1 , the passive optical network mode adaptive setting method comprises:
[0073] Step S10, judging whether the optical fiber corresponding to the optical network unit is in a connected state;
[0074] Step S20, if yes, setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode;
[0075] Step S30, if no, detecting the mode type of the optical network unit;
[0076] Step S40, if the mode type is a default passive optical network mode, running the network environment corresponding to the default passive optical network mode;
[0077] Step S50, if the mode type is an automatic mode, returning to execute the step of setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode.
[0078] In the embodiment of the present application, it should be noted that when the optical fiber is in a connected state, the light source in the optical module is an optical signal, wherein the optical network unit is an optical network unit software, that is, an optical network unit software, and the optical module is an optoelectronic device that performs photoelectric and electro-optical conversion in the optical network unit software. The transmitting end of the optical module converts the electrical signal into an optical signal, and the receiving end converts the optical signal into an electrical signal to perform conversion and transmission of the optical fiber signal; the optical signal comes from the transmission of the optical fiber. When the optical fiber is not in a connected state and the default passive optical network mode is not configured, that is, the current mode type is automatic mode, and the automatic mode is in the ON state, the optical module also has a light source, so the passive optical network mode can be set according to the light source type.
[0079] As an example, steps S10 to S50 include: detecting the optical signal in the optical module in the optical network unit software; if there is an optical signal, determining that the optical fiber is in a connected state; detecting the type of light source corresponding to the optical signal; if the light source type is an Ethernet passive optical network type, setting the passive optical network mode to the Ethernet passive optical network mode, and running the network environment corresponding to the Ethernet passive optical network mode; if the light source type is a gigabit passive optical network type, setting the passive optical network mode to the gigabit passive optical network mode, and running the network environment corresponding to the gigabit passive optical network mode; if there is no optical signal, detecting the current mode type of the optical network unit; if the mode type is the Ethernet passive optical network mode and the gigabit passive optical network mode, and running the network environment corresponding to the passive optical network mode; if the mode type is the automatic mode, returning to the execution step: setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode.
[0080] Among them, reference Figure 2 The passive optical network mode includes an Ethernet passive optical network mode and a gigabit passive optical network mode. The steps of setting the passive optical network mode according to the light source type in the optical module of the optical network unit and running the network environment corresponding to the passive optical network mode include:
[0081] Step S21, if the light source type is an Ethernet passive optical network type, setting the passive optical network mode to the Ethernet passive optical network mode through the application layer of the optical network unit;
[0082] Step S22, when the application layer detects that the Ethernet passive optical network mode has been set, running the network environment corresponding to the Ethernet passive optical network mode;
[0083] Step S23: If the light source type is a gigabit passive optical network type, setting the passive optical network mode to the gigabit passive optical network mode through the application layer;
[0084] Step S24, when the application layer detects that the gigabit passive optical network mode has been set, running the network environment corresponding to the gigabit passive optical network mode.
[0085] As an example, steps S21 to S24 include: if the type corresponding to the light source in the optical module is detected as an Ethernet passive optical network type, setting the passive optical network mode of the optical network unit to an Ethernet passive optical network mode through the application layer of the optical network unit; detecting the progress of setting the passive optical network mode of the optical network unit through the application layer; when the application layer detects that the Ethernet passive optical network mode of the optical network unit has been set, running the EPON_OAM process corresponding to the EOPN mode; if the type corresponding to the light source in the optical module is detected as a gigabit passive optical network type, setting the passive optical network mode of the optical network unit to a gigabit passive optical network mode through the application layer of the optical network unit; detecting the progress of setting the passive optical network mode of the optical network unit through the application layer; when the application layer detects that the gigabit passive optical network mode of the optical network unit has been set, running the OMCI process corresponding to the GOPN mode.
[0086] The step of running the network environment corresponding to the Ethernet passive optical network mode includes:
[0087] Step S221, running the EPON_OAM process corresponding to the Ethernet passive optical network mode;
[0088] Step S222, detecting whether there is an OMCI process, and if the OMCI process exists, killing the OMCI process.
[0089] In the embodiments of the present application, it should be noted that the EPON_OAM process is the implementation of the OAM protocol in the Ethernet passive optical network mode in the optical network unit software, and specifically includes the construction of the OAM channel. The existence of the OMCI process indicates that the process of the gigabit passive optical network mode in the optical network unit is also running, which creates the running environment for the EPON_OAM process, so the OMCI process needs to be killed.
[0090] As an example, steps S221 to S222 include: when the Ethernet passive optical network mode is set, starting the EPON_OAM process corresponding to the Ethernet passive optical network mode; detecting the running process through the application layer to determine whether there is an OMCI process; and if the OMCI process exists, killing the OMCI process.
[0091] The step of running the network environment corresponding to the Ethernet passive optical network mode includes:
[0092] Step S241, running the OMCI process corresponding to the gigabit passive optical network mode;
[0093] Step S242, detecting whether the EPON_OAM process exists, and killing the EPON_OAM process if the EPON_OAM process exists.
[0094] In the embodiments of the present application, it should be noted that the OMCI process is the implementation of the OMCI protocol in the gigabit passive optical network mode in the optical network unit software, and specifically includes the construction of the OMCI channel. The existence of the EPON_OAM process indicates that the process of the Ethernet passive optical network mode in the optical network unit is running, and the running environment of the OMCI process is created, so the EPON_OAM process needs to be killed.
[0095] As an example, steps S241 to S242 include: starting the OMCI process corresponding to the gigabit passive optical network mode when the gigabit passive optical network mode is set; detecting the running process through the application layer to determine whether the EPON_OAM process exists; and killing the EPON_OAM process if the EPON_OAM process exists.
[0096] The default passive optical network mode is an Ethernet passive optical network mode or a gigabit passive optical network mode, and the step of running the network environment corresponding to the default passive optical network mode includes:
[0097] Step S41, if the default passive optical network mode is an Ethernet passive optical network mode, running the network environment corresponding to the Ethernet passive optical network mode;
[0098] Step S42, if the default passive optical network mode is a gigabit passive optical network mode, running the network environment corresponding to the gigabit passive optical network mode.
[0099] In the embodiments of the present application, it should be noted that the default passive optical network mode is used to indicate that the optical network unit software has been configured with a passive optical network mode, so the adaptive setting step only needs to run the running environment corresponding to the passive optical network mode.
[0100] As an example, the step S41 to the step S42 include: if the default passive optical network mode is an Ethernet passive optical network mode, starting an EPON_OAM process corresponding to the Ethernet passive optical network mode; detecting, by an application layer, a running process, and judging whether there is an OMCI process; if there is the OMCI process, killing the OMCI process; if the default passive optical network mode is a gigabit passive optical network mode, starting an OMCI process corresponding to the gigabit passive optical network mode; detecting, by the application layer, the running process, and judging whether there is an EPON_OAM process; if there is the EPON_OAM process, killing the EPON_OAM process.
[0101] wherein, referring to Figure 3 , the step of judging whether the optical fiber corresponding to the optical network unit is in a connection state includes:
[0102] The step S11, when the optical module in the optical network unit is started, judging whether there is an optical signal in the optical module;
[0103] The step S12, if there is the optical signal, determining that the optical fiber is in the connection state;
[0104] The step S13, otherwise, judging that the optical fiber is in a disconnected state.
[0105] In the embodiments of the present application, it should be noted that the standard of judging whether the optical fiber corresponding to the optical network unit software is in the connection state is based on whether there is an optical signal, that is, whether the optical module receiving the optical network unit software receives the optical signal transmitted by the optical fiber; when the optical fiber is in the disconnected state, the optical network unit is in the default passive optical network mode or the automatic mode.
[0106] As an example, the step S11 to the step S13 include: detecting, by an application layer, whether the optical module in the optical network unit is started; when the optical module is started, judging, by the application layer, whether there is an optical signal in the optical module; if there is the optical signal in the optical module, determining that the optical fiber is in the connection state; if there is no optical signal in the optical module, determining that the optical fiber is not in the connection state, that is, the optical fiber is in the disconnected state.
[0107] In addition, the passive optical network mode adaptive setting method further includes:
[0108] The step A10, detecting, by an application layer of the optical network unit, whether the mode corresponding to the passive optical network is set up;
[0109] Step A20, if set, save the current passive optical network mode, wherein the current passive optical network mode is used to adapt to the current network environment for fiber signal transmission.
[0110] As an example, steps A10 to A20 include: detecting by the application layer of the optical network unit whether the mode corresponding to the PON and the corresponding network environment are successfully set; if the passive optical network mode and the corresponding network environment are successfully set, saving the respective parameters corresponding to the current passive optical network mode and the current network environment, wherein the current passive optical network mode is used to adapt to the current network environment for fiber signal transmission.
[0111] The embodiment of the present application provides a passive optical network mode adaptive setting method, first judging whether the fiber corresponding to the optical network unit is in a connection state; if yes, setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode; if no, detecting the mode type of the optical network unit; if the mode type is a default passive optical network mode, running the network environment corresponding to the default passive optical network mode; if the mode type is an automatic mode, returning to execute the step of setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode. The embodiment of the present application overcomes the technical defects of needing to compile different optical network unit software versions to adapt to the current PON network and manual selection and debugging, and solves the problem of low passive optical network mode setting efficiency of the optical network unit software, by adaptively setting the passive optical network mode according to the light source type or the current mode type of the optical module in the optical network unit software.
[0112] Embodiment two
[0113] The embodiment of the present application also provides a passive optical network mode adaptive setting device, which is applied to a passive optical network mode adaptive setting equipment, and refers to Figure 4 , the passive optical network mode adaptive setting device comprises:
[0114] A connection judgment module is configured to judge whether the fiber corresponding to the optical network unit is in a connection state.
[0115] A mode setting module is configured to set the passive optical network mode according to the light source type in the optical module of the optical network unit, and run the network environment corresponding to the passive optical network mode.
[0116] An environment running module is configured to detect the mode type of the optical network unit, and run the network environment corresponding to the default passive optical network mode if the mode type is a default passive optical network mode.
[0117] The returning module is configured to return to execute the step of setting the PON mode according to the light source type in the light module of the optical network unit and running the network environment corresponding to the PON mode, if the current mode type of the optical network unit is the automatic mode.
[0118] Optionally, the mode setting module is further configured to set the PON mode as the EPON mode through the application layer of the optical network unit, if the light source type is the EPON type.
[0119] The application layer detects that the EPON mode has been set, and the network environment corresponding to the EPON mode is run.
[0120] The application layer detects that the GPON mode has been set, and the network environment corresponding to the GPON mode is run.
[0121] The application layer detects that the GPON mode has been set, and the network environment corresponding to the GPON mode is run.
[0122] Optionally, the mode setting module is further configured to:
[0123] The EPON_OAM process corresponding to the EPON mode is run.
[0124] It is detected whether the OMCI process exists, and the OMCI process is killed if the OMCI process exists.
[0125] Optionally, the mode setting module is further configured to:
[0126] The OMCI process corresponding to the GPON mode is run.
[0127] It is detected whether the EPON_OAM process exists, and the EPON_OAM process is killed if the EPON_OAM process exists.
[0128] Optionally, the environment running module is further configured to:
[0129] The network environment corresponding to the EPON mode is run, if the default PON mode is the EPON mode.
[0130] The network environment corresponding to the GPON mode is run, if the default PON mode is the GPON mode.
[0131] Optionally, the connection judging module is further configured to:
[0132] When the optical module in the optical network unit is started, it is judged whether there is an optical signal in the optical module;
[0133] If there is an optical signal, it is determined that the optical fiber is in a connected state;
[0134] Otherwise, it is determined that the optical fiber is in a disconnected state.
[0135] Optionally, the mode setting module is further configured to:
[0136] When the optical module in the optical network unit is started, it is judged whether there is an optical signal in the optical module;
[0137] If there is an optical signal, it is determined that the optical fiber is in a connected state;
[0138] Otherwise, it is determined that the optical fiber is in a disconnected state.
[0139] The passive optical network mode adaptive setting device provided by the application adopts the passive optical network mode adaptive setting method in the above embodiment, and solves the technical problem of low passive optical network mode setting efficiency of the optical network unit software. Compared with the prior art, the passive optical network mode adaptive setting device provided by the embodiment of the application has the same beneficial effects as the passive optical network mode adaptive setting method provided by the above embodiment, and other technical features in the passive optical network mode adaptive setting device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0140] Embodiment three
[0141] The embodiment of the application provides an electronic device, which comprises at least one processor and a memory communicatively linked with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the passive optical network mode adaptive setting method in the above embodiment one.
[0142] Reference will now be made to Figure 5 which shows a structural schematic diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 5 The electronic device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0143] As Figure 5As shown, the electronic device can include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded into a random access memory (RAM) from a storage device. In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also linked to the bus.
[0144] Generally, the following systems can be linked to the I / O interface: input devices including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication devices can allow the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the electronic device having various systems is shown in the drawing, it is understood that all of the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0145] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices, or installed from the storage devices, or installed from the ROM. When the computer program is executed by the processing device, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0146] The electronic device provided in the present application adopts the passive optical network mode adaptive setting method in the above embodiment, which solves the technical problem of low efficiency of passive optical network mode setting of the optical network unit software. Compared with the prior art, the electronic device provided in the embodiments of the present application has the same beneficial effects as the passive optical network mode adaptive setting method provided in the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0147] It should be understood that parts of the present disclosure can be realized in hardware, software, firmware, or a combination thereof. In the description of the above-described embodiments, specific features, structures, materials, or characteristics can be combined in any appropriate manner in one or more embodiments or examples.
[0148] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
[0149] Embodiment Four
[0150] The embodiment provides a computer readable storage medium having computer readable program instructions stored thereon, and the computer readable program instructions are used for executing the method for setting the passive optical network mode adaptively in the above embodiment one.
[0151] The computer readable storage medium provided by the embodiment of the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric link having one or more conductive lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (radio frequency), etc., or any suitable combination of the above.
[0152] The above computer readable storage medium can be contained in an electronic device; or can exist separately without being assembled into an electronic device.
[0153] The above computer readable storage medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device is caused to: determine whether an optical fiber corresponding to an optical network unit is in a connected state; if yes, set a passive optical network mode according to a light source type in an optical module of the optical network unit, and run a network environment corresponding to the passive optical network mode; if no, detect a current mode type of the optical network unit; if the mode type is a default passive optical network mode, run a network environment corresponding to the default passive optical network mode; and if the mode type is an automatic mode, return to execute the step of setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode.
[0154] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be linked to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0155] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0156] The modules involved in the embodiments of the present disclosure can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0157] The computer readable storage medium provided by the present application stores computer readable program instructions for executing the above-mentioned passive optical network mode adaptive setting method, and solves the technical problem of low efficiency of passive optical network mode setting of optical network unit software. Compared with the prior art, the computer readable storage medium provided by the embodiments of the present application has the same beneficial effects as the passive optical network mode adaptive setting method provided by the above-mentioned embodiments, and will not be described here.
[0158] Embodiment five
[0159] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method for adaptively setting a PON mode as described above.
[0160] The computer program product provided by the application solves the technical problem of low efficiency of PON mode setting of optical network unit software. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the application are the same as those of the method for adaptively setting a PON mode provided by the above-mentioned embodiment, and are not described here.
[0161] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, and any equivalent structure or equivalent flow transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent processing scope of the application.
Claims
1. A method for adaptively setting a passive optical network mode, characterized in that: The passive optical network mode adaptive setting method includes: Determine whether the optical fiber corresponding to the optical network unit is in a connected state; If so, detecting the light source type corresponding to the optical signal; setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode; If not, detecting the current mode type of the optical network unit; If the mode type is a default passive optical network mode, wherein the default passive optical network mode is a passive optical network mode configured by the optical network unit, then running the network environment corresponding to the default passive optical network mode; If the mode type is automatic mode, wherein the automatic mode is that the optical network unit is not configured with a passive optical network mode, then return to the execution step: setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode; the passive optical network mode includes an Ethernet passive optical network mode and a gigabit passive optical network mode, and setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode, including: if the light source type is an Ethernet passive optical network type, setting the passive optical network mode to the Ethernet passive optical network mode, and running the network environment corresponding to the Ethernet passive optical network mode; if the light source type If the type is a gigabit passive optical network type, the passive optical network mode is set to the gigabit passive optical network mode, and the network environment corresponding to the gigabit passive optical network mode is run; the step of running the network environment corresponding to the Ethernet passive optical network mode includes: running the EPON_OAM process corresponding to the Ethernet passive optical network mode; detecting whether there is an OMCI process, and if the OMCI process exists, killing the OMCI process; the step of running the network environment corresponding to the gigabit passive optical network mode includes: running the OMCI process corresponding to the gigabit passive optical network mode; detecting whether there is an EPON_OAM process, and if the EPON_OAM process exists, killing the EPON_OAM process.
2. The method for adaptively setting a passive optical network mode according to claim 1, wherein: The default passive optical network mode is Ethernet passive optical network mode or gigabit passive optical network mode; The step of running the network environment corresponding to the default passive optical network mode includes: If the default passive optical network mode is the Ethernet passive optical network mode, running the network environment corresponding to the Ethernet passive optical network mode; If the default passive optical network mode is a gigabit passive optical network mode, a network environment corresponding to the gigabit passive optical network mode is run.
3. The method for adaptively setting a passive optical network mode according to claim 1, wherein: The step of determining whether the optical fiber corresponding to the optical network unit is in a connected state comprises: After the optical module in the optical network unit is started, determining whether there is an optical signal in the optical module; If there is an optical signal, it is determined that the optical fiber is in a connected state; Otherwise, it is determined that the optical fiber is in a disconnected state.
4. The method for adaptively setting a passive optical network mode according to claim 1, wherein: The passive optical network mode adaptive setting method also includes: Detecting, by the application layer of the optical network unit, whether the mode corresponding to the passive optical network is set; If the settings are completed, the current passive optical network mode is saved, wherein the current passive optical network mode is used to adapt to the current network environment to perform optical fiber signal transmission.
5. A passive optical network mode adaptive setting device, characterized in that: The passive optical network mode adaptive setting device includes: A connection judgment module is used to judge whether the optical fiber corresponding to the optical network unit is in a connected state; A mode setting module is used to detect the light source type corresponding to the optical signal; a passive optical network mode is set according to the light source type in the optical module of the optical network unit, and a network environment corresponding to the passive optical network mode is run; the mode setting module is further used to set the passive optical network mode to the Ethernet passive optical network mode if the light source type is an Ethernet passive optical network type, and run the network environment corresponding to the Ethernet passive optical network mode; if the light source type is a gigabit passive optical network type, the passive optical network mode is set to the gigabit passive optical network mode, and run the network environment corresponding to the gigabit passive optical network mode; the mode setting module is further used to run the EPON_OAM process corresponding to the Ethernet passive optical network mode; detect whether an OMCI process exists, and if so, kill the OMCI process; the mode setting module is further used to run the OMCI process corresponding to the gigabit passive optical network mode; detect whether an EPON_OAM process exists, and if so, kill the EPON_OAM process; An environment operation module is used to detect the current mode type of the optical network unit, and if the mode type is a default passive optical network mode, wherein the default passive optical network mode is a passive optical network mode configured for the optical network unit, then run the network environment corresponding to the default passive optical network mode; A return module is set to return to the execution step if the current mode type of the optical network unit is automatic mode, wherein the automatic mode means that the optical network unit is not configured with a passive optical network mode: setting the passive optical network mode according to the light source type in the optical module of the optical network unit, and running the network environment corresponding to the passive optical network mode.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively linked to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the passive optical network mode adaptive setting method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program for implementing a method for adaptively setting a passive optical network mode, and the program for implementing a method for adaptively setting a passive optical network mode is executed by a processor to implement the steps of the method for adaptively setting a passive optical network mode as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for achieving intelligent ONU double-light source adaptation based on optical network unit
CN104540046A
Method for self-adaptively accessing a passive optical network by a gateway
CN109819353A
Plug-and-play PON systems with autonomous boot mode
US20200120408A1