ONU management mode and port state switching method based on hardware button
By using a hardware button-based ONU management mode and port status switching method, rapid switching between remote management mode and local management mode, as well as port isolation/interoperability status, was achieved. This solved the problem of insufficient reliability of ONU devices during channel switching and improved the reliability and configuration consistency of the devices.
Patent Information
- Application Number
- CN202511332581.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-12-23
AI Technical Summary
Existing ONU devices lack reliability during channel switching, especially when the initial OAM channel is connected to the OLT, policy issuance failures, conflicts, or partial effectiveness lead to device reliability issues.
The system adopts a hardware button-based management mode and port status switching method. By distinguishing between the first trigger duration and the second trigger duration, it realizes the switching between remote management mode and local management mode, as well as the switching between port isolation state and port interconnection state. The switching results are directly written to non-volatile memory.
It improves the reliability of ONU devices, reduces the probability of misoperation, ensures configuration consistency and service continuity, reduces fault handling time, and improves human-machine interaction efficiency and equipment operation stability.
Smart Images

Figure CN121194089A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to an ONU management mode and port state switching method based on a hardware button. BACKGROUND
[0002] In the field of optical network communication, as a key device at the user end, the management mode and flexible configuration of the port state of the ONU (optical network unit) are crucial to the network operation efficiency. At present, the management mode of mainstream ONU devices is divided into a remote management mode and a local management mode. In the remote management mode, the OMCI protocol allows the OLT to centrally manage the ONU, and the configuration and management work is completely responsible by the OLT. The OLT will issue configuration information to the ONU, and monitor the state and performance of the ONU. The configuration and operation of the ONU are subject to the configuration of the OLT, which ensures the unified management and control of the network. In the local management mode, the configuration and management work of the ONU is responsible by the local, rather than the remote OLT, and can be configured and managed independently of the OLT, allowing more localized control and autonomy. The local configuration is prior to the remote configuration of the OLT, and can be operated according to the strategy and demand of the local network administrator.
[0003] A Chinese patent with publication number CN112449256A discloses a channel switching method, device and system, and storage medium. The above method includes that the ONU sends a first SN registration message to the OLT through an initial OAM channel, wherein the first SN registration message is used to instruct the OLT to determine the channel switching strategy of the ONU according to the hardware rate information corresponding to the initial OAM channel and the bandwidth occupation information of each channel; a first response message sent by the OLT is received, wherein the first response message carries the channel switching strategy of the ONU; and channel switching is performed according to the channel switching strategy, solving the problem that the 100G PON system cannot dynamically perform channel management. However, the above scheme must be connected to the OLT through the initial OAM channel, and waits for the OLT to calculate and issue the strategy. If the strategy fails to be issued, conflicts or partial effectiveness, it is easy to cause insufficient reliability of the ONU device. Therefore, it is necessary to provide an ONU management mode and port state switching method based on a hardware button to improve the reliability of the ONU device. SUMMARY
[0004] Therefore, the present application provides an ONU management mode and port state switching method based on a hardware button.
[0005] The present application provides an ONU management mode and port state switching method based on a hardware button, which comprises the following steps: collecting a trigger duration of a MOD button in an ONU device, wherein the trigger duration comprises a first trigger duration in a first time period and a second trigger duration in a second time period, and the first time period is longer than the second time period; when the trigger duration of the MOD button is the first trigger duration, causing the ONU device to perform a management mode switching operation to switch between a remote management mode and a local management mode; when the trigger duration of the MOD button is the second trigger duration, causing the ONU device to perform a switching operation between a port isolation state and a port intercommunication state in the local management mode, and directly writing a switching result into a non-volatile memory.
[0006] On the basis of the above technical solutions, preferably, the management mode switching operation comprises a current configuration clearing operation, an update management mode identification operation, a trigger ONU device restart operation, and a default configuration loading operation.
[0007] On the basis of the above technical solutions, preferably, the current configuration clearing operation comprises clearing a management configuration of the ONU device in a current management mode, wherein the management configuration comprises a configuration issued by an optical line terminal in a remote management mode or a local configuration in a local management mode; the update management mode identification operation comprises writing a management mode identification into a system register and completing a mode parameter switching record.
[0008] Further preferably, the trigger ONU device restart operation comprises sending a termination signal to all processes to close a network interface and then triggering a device automatic restart; the default configuration loading operation comprises reading the mode identification in the system register during a restart process and loading a default configuration corresponding to the mode, wherein if the ONU device is switched to the remote management mode, a configuration adapted by the optical line terminal through an OMCI protocol is loaded; if the ONU device is switched to the local management mode, a local default configuration is loaded.
[0009] Further preferably, the switching operation between the port isolation state and the port intercommunication state comprises: causing the ONU device to read a current port state identification and inversing the port state identification; directly writing the inverted port state identification into the non-volatile memory for saving.
[0010] Further preferably, the method further comprises: in the remote management mode, causing a MOD indicator light corresponding to the MOD button and a RUN indicator light in the ONU device to flash at the same frequency, wherein the RUN indicator light flashes at a preset frequency when the ONU device operates normally; In local management mode, the MOD indicator light is always on when the ONU device is in port isolation mode, and off when the ONU device is in port interconnection mode.
[0011] More preferably, when the trigger duration of the MOD button is detected to be the second trigger duration and the ONU device is in remote management mode, the ONU device is made to ignore the port state switching request.
[0012] A second aspect of this application provides an ONU management mode and port status switching system based on a hardware button. The ONU management mode and port status switching device includes a signal acquisition module and a mode switching module, wherein... The signal acquisition module is used to initialize the first counter and the second counter configured in the energy-saving unit of the ONU device, and to acquire the periodic detection signal of the human body detection sensor in the ONU device. The periodic detection signal includes a first detection signal and a second detection signal. The first detection signal is the detection signal when a human body is detected, and the second detection signal is the detection signal when no human body is detected. The counting processing module is used to receive the first detection signal, increment the current value of the first counter and reset the second counter, or receive the second detection signal, increment the current value of the second counter and reset the first counter. The mode switching module is used to switch the ONU device to energy-saving mode if the current value of the first counter is greater than the first threshold and less than the second threshold, or if the current value of the second counter is greater than the second threshold; and to switch the ONU device to standard mode if the current value of the first counter is greater than the second threshold.
[0013] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory.
[0014] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of a hardware button-based ONU management mode and port state switching method.
[0015] The ONU management mode and port status switching method based on hardware buttons provided by this invention has the following advantages over the prior art: (1) By distinguishing between the first trigger duration and the second trigger duration, a single physical button is used to achieve multi-functional operation, reducing the number of buttons and panel complexity. Long press is used for mode switching, and short press is used for port isolation / interoperability switching, reducing the probability of misoperation. In addition, under the first trigger duration, the remote management mode and local management mode can be quickly switched, which is convenient to quickly enter the local mode when the network is abnormal or on-site maintenance is required. After the problem is resolved, the remote mode can be switched back, shortening the fault handling time. At the same time, under the second trigger duration, the port isolation / interoperability switching is one-click, improving the processing efficiency. The port isolation / interoperability switching result is directly written to the non-volatile memory to ensure that the configuration is not lost after the device restarts or is powered off, improving configuration consistency and service continuity. Immediate disk write avoids the operational risks and rollback problems caused by the inconsistency between RAM state and persistent state. By setting the duration threshold of the first time period being longer than the second time period, a natural foolproof mechanism is formed. The mode switching with a larger impact must be confirmed for a longer time, reducing the probability of mistriggered operation. Port isolation can be achieved by default through a shorter trigger, meeting the on-site emergency isolation needs, reducing the risk of lateral propagation and security incident expansion, thereby improving the reliability of the ONU device.
[0016] (2) By reading, reversing and writing the port status identifier in an atomic process, the single-step switching of port isolation / interoperability is realized, avoiding complex condition judgment and multi-step configuration, improving the efficiency of human-computer interaction. The current identifier is read first and then reversed to ensure that the switching action is aligned with the actual state of the device, avoiding repeated switching or erroneous switching due to inconsistent state perception. The reversed state is directly written to non-volatile memory to ensure that the port state is consistent with the state before switching after power failure and restart, avoiding drift between running state and persistent state. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating an ONU management mode and port status switching method based on a hardware button provided by the present invention; Figure 2 A schematic diagram of the ONU management mode and port status switching device provided by the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention.
[0019] Explanation of reference numerals in the attached diagram: 1. ONU management mode and port status switching device; 11. Signal acquisition module; 12. Mode switching module; 2. Electronic equipment; 21. Processor; 22. Communication bus; 23. User interface; 24. Network interface; 25. Memory. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] This invention discloses an ONU management mode and port status switching method based on a hardware button, referencing... Figure 1 The steps of this method include S1 to S3.
[0022] Step S1: Collect the trigger duration of the MOD button in the ONU device. The trigger duration includes the first trigger duration in the first time period and the second trigger duration in the second time period, and the first time period is longer than the second time period.
[0023] In this step, the MOD button pin level is continuously monitored, waiting for a stable press edge indication. Upon detection of a press, debounce timing begins. If the button remains pressed within the debounce time, a valid press is confirmed; otherwise, the system returns to idle. After confirming a valid press, the press start time is recorded and timing begins. If a release indication is detected during this period, release debounce is initiated. If the press continues beyond the long press limit protection, it is handled according to a strategy, such as being treated as invalid and the state machine reset. Upon detection of a release, debounce confirmation is performed. If the release continues within the debounce time, the release time is recorded and a judgment is entered. If release debounce fails or the button is pressed again, the system returns to timing to continue accumulating the press duration. The press duration is obtained by subtracting the press time from the release time. Based on a preset range, it is determined whether it belongs to the first time period (long press) or the second time period (short press). If it is in the gray area or exceeds the limit, no function is triggered; only a log or count is recorded. Finally, the system returns to idle to wait for the next press.
[0024] The trigger duration of the MOD button can be accurately collected using a button state machine method. Using a hardware timer or system clock as a millisecond-level time base, the press and release are first debounced and confirmed. After the press is confirmed, the start time is recorded and the timer is continuously kept running. After the release is detected, debounce is performed again and the release time is recorded. The total press duration is calculated. Two non-overlapping time intervals are preset. The second time interval is a shorter short press interval, and the first time interval is a longer long press interval. The lower limit of the first time interval is greater than the upper limit of the second time interval. The current duration is classified into the second trigger duration or the first trigger duration according to the interval. Cases that fall into the gray area or exceed the upper limit are treated as invalid or abnormal, thereby stably distinguishing the two types of trigger durations and providing reliable input for subsequent function triggers.
[0025] Step S2: When the trigger duration of the MOD button is the first trigger duration, the ONU device performs a management mode switching operation to switch between remote management mode and local management mode.
[0026] In this step, the management mode switching operation includes clearing the current configuration, updating the management mode identifier, triggering the ONU device restart, and loading the default configuration.
[0027] Furthermore, the clearing old configuration operation includes clearing the management configuration of the ONU device in the current management mode, where the management configuration includes the configuration issued by the optical line terminal in remote management mode or the local configuration in local management mode; the updating management mode identifier operation includes writing the management mode identifier into the system register and completing the mode parameter switching record.
[0028] In this embodiment, the management configuration under the current management mode is cleared before switching, including configurations issued by the remote OLT and local configurations. This effectively eliminates policy overlap, priority confusion, and unpredictable behavior caused by residual policies across modes, ensuring that the new mode starts with a clean baseline. The management mode identifier is written into the system register as a unified and trusted identifier within the system, ensuring that the kernel, business processes, and driver layer have consistent perceptions of the current mode, avoiding discrepancies in mode status among multiple modules. Switching mode parameters are recorded, facilitating rapid backtracking of change paths in on-site and remote operations and maintenance, shortening fault location time, and supporting audit compliance requirements. The old configuration is cleared before loading the new mode parameters, reducing boundary states and race conditions during runtime hot switching, and lowering the risk of session interruption, business jitter, and temporary failure of security policies. The mode status exposure centered on the register identifier facilitates reading and verification of production testing, scripting, and self-testing processes, improving automated test coverage and maintenance efficiency.
[0029] In one example, this solution is applied to a multi-port MDU series ONU device. The core hardware includes a MOD button, an indicator light module, a main control chip, and a FLASH storage module. The MOD button is located on the front panel of the device and is responsible for triggering management mode switching and port isolation state switching. The indicator light module includes a MOD indicator light (green) and a RUN indicator light (green) to provide feedback on the current mode status. The main control chip is responsible for parsing button signals, executing mode switching logic, and configuration management. The FLASH storage module is used to persistently store port isolation configuration without relying on the write command.
[0030] The mode switching logic and configuration management of the main control chip are fully automated. Users only need to trigger it with a hardware button, and subsequent operations such as configuration cleanup, identifier update, restart loading, and state storage are all completed automatically by the chip. No manual intervention is required in the switching process or additional configuration steps, greatly simplifying the operation process. The aforementioned FLASH storage module does not directly achieve persistent storage of port isolation configuration on its own. Instead, it combines its own storage characteristics, internal write mechanism, and collaborative work with the main control chip to achieve the function of persistent storage of port isolation configuration without relying on additional commands.
[0031] The management mode switching is triggered by pressing and holding the MOD button for more than 10 seconds. After the main control chip detects a high-level signal for 10 seconds, it triggers the management mode switching process. The execution steps include: the main control chip clearing all configurations under the current management mode; updating the management mode identifier (0 for remote mode, 1 for local mode) and writing it to the system register; triggering an automatic device restart, during which the default configuration of the new management mode is loaded; after restarting, the MOD indicator light switches its state according to the new mode: flashing in remote mode, and constantly lit or off in local mode depending on the port status. This achieves seamless switching between remote and local management. In remote mode, the ONU is centrally managed by the OLT via the OMCI protocol, and it is displayed as 25 ports. In local mode, the ONU operates independently, and it is displayed as a single port.
[0032] Understandably, the trigger signal detection operation involves the user pressing and holding the MOD button on the front panel of the device for more than 10 seconds. After the main control chip continuously detects a high-level signal for 10 seconds or more, it automatically initiates the management mode switching process. The "Clear Old Configuration" operation involves the main control chip actively clearing all configurations under the current management mode. This includes configurations issued by the OLT in remote management mode or local configurations in local management mode, avoiding conflicts between old and new configurations and freeing up system process resources. The "Update Mode Identifier" operation writes the management mode identifier to the system register; the remote management mode identifier is 0, and the local management mode identifier is 1, completing the mode parameter switching record. The "Trigger System Reboot" operation involves the main control chip sending a termination signal to all processes, closing the network interface, and triggering an automatic device reboot to ensure the new mode configuration is fully loaded. The "Load New Mode Default Configuration" operation involves the main control chip reading the mode identifier in the system register during the reboot process and automatically loading the default configuration for the corresponding mode: if switching to remote management mode, loading the configuration adapted by the OLT via the OMCI protocol, displaying 25 ports, centrally managed by the OLT; if switching to local management mode, loading the local default configuration, displaying a single port, supporting independent configuration. After the status indicator lights are synchronized and the restart is complete, the MOD indicator light switches its status according to the new mode: in remote management mode, it flashes at a frequency of 1Hz in sync with the RUN indicator light; in local management mode, it remains on or off depending on the port isolation status, providing intuitive feedback on the switching result.
[0033] Through the above steps, the automatic switching between the two management modes is achieved. During the switching process, automatic configuration cleanup, restart loading, and status feedback are all seamlessly connected without the need for manual configuration or confirmation, thus achieving a seamless switching effect.
[0034] Step S3: When the trigger duration of the MOD button is the second trigger duration, the ONU device performs a switching operation between port isolation state and port interconnection state in local management mode, and writes the switching result directly to non-volatile memory.
[0035] This step also includes steps S31 to S32.
[0036] Step S31: The ONU device reads the current port status flag and reverses the port status flag. Step S32: Write the inverted port status flag directly into the non-volatile memory for storage.
[0037] In this step, the trigger condition for port isolation state switching is that, in local management mode, the MOD button is pressed and held for more than 3 seconds. After the main control chip detects a high-level signal for 3-10 seconds, it triggers the port isolation state switching. Port isolation state switching only takes effect in local management mode. The execution steps include: the main control chip reads the current port status, such as isolated / interconnected; inverts the port status flag (isolated → interconnected, interconnected → isolated); directly writes the new status to the FLASH storage module without a write command, ensuring immediate effect and persistence; and synchronously updates the MOD indicator light status, keeping it constantly lit during isolation and off during interconnection. This allows for quick switching of communication permissions between ports, with automatic configuration saving to prevent data loss after restarts or re-entry. When the MOD button trigger duration is the second trigger duration and the ONU device is in remote management mode, the ONU device ignores the port state switching request.
[0038] Understandably, in traditional technologies, port isolation configurations require specific commands to be saved, which can easily lead to configuration loss due to missed operations. However, in this invention, the main control chip automatically writes the new port isolation state directly to the FLASH storage module when switching port isolation states, eliminating the need for manual save commands and fundamentally preventing configuration loss due to forgotten operations. The writing process is synchronized with the state switching operation; once the new port isolation state is determined, it is immediately written to FLASH without waiting for additional processes. This ensures that the configuration takes effect immediately after the switch, and even if the device restarts or reconnects, the configuration stored in FLASH will not be lost, achieving a highly efficient mechanism of saving upon switching. This writing process only takes effect in local management mode, avoiding conflicts between OLT-issued configurations and locally stored configurations in remote management mode, further ensuring the consistency and stability of system configurations.
[0039] In this embodiment, a single-step switching of port isolation / interoperability is achieved through an atomic process of reading, reversing, and writing the port status identifier. This avoids complex condition judgments and multi-step configurations, improving human-machine interaction efficiency. Reading the current identifier before reversing it ensures that the switching action aligns with the actual device state, preventing duplicate or erroneous switching due to inconsistent state perception. The reversed state is directly written to non-volatile memory, ensuring that the port state remains consistent with the state before the switch after power failure and restart, avoiding drift between runtime and persistent states. Using Boolean identifier reversal instead of multi-branch judgments reduces code complexity and execution path length, which is beneficial for operation in resource-constrained embedded environments. The state embedded in the NVM provides a "single source of fact" for diagnostics, facilitating rapid reading and verification for production line testing, on-site maintenance, and remote auditing. The immediate disk write strategy to the NVM reduces intermediate state caching and synchronization waiting, improving switching response speed and user experience.
[0040] The method also includes: in remote management mode, the MOD indicator light corresponding to the MOD button and the RUN indicator light in the ONU device flash at the same frequency, wherein the RUN indicator light flashes at a preset frequency when the ONU device is operating normally; in local management mode, the MOD indicator light is always on when the ONU device is in port isolation state, and the MOD indicator light is off when the ONU device is in port interconnection state.
[0041] In one example, the MOD indicator flashes synchronously with the RUN indicator in remote management mode, with a flashing frequency of 1Hz. In local management mode, it remains constantly lit when ports are isolated and turns off when ports are interconnected. The RUN indicator flashes continuously when the device is operating normally, with a flashing frequency of 1Hz, providing complementary status feedback to the MOD indicator.
[0042] In this embodiment, by distinguishing between the first and second trigger durations, a single physical button enables multi-functional operation, reducing the number of buttons and panel complexity. A long press switches modes, while a short press switches between port isolation and interoperability, reducing the probability of accidental operation. The first trigger duration enables rapid switching between remote and local management modes, facilitating quick entry into local mode in case of network anomalies or on-site maintenance. After troubleshooting, the system switches back to remote mode, shortening fault handling time. The second trigger duration enables one-click switching between port isolation and interoperability, improving processing efficiency. The switching results are directly written to non-volatile memory, ensuring configuration is not lost after device restarts or power outages, enhancing configuration consistency and service continuity. Immediate disk write-to-disk avoids operational risks and rollback issues caused by inconsistencies between RAM and persistent states. By setting a threshold where the first time period is longer than the second time period, a natural error-proofing mechanism is formed. Mode switching with a wider impact requires longer confirmation time, reducing the probability of accidental triggering. Port isolation can be achieved by default with a shorter trigger, meeting emergency isolation needs on-site, reducing the risk of lateral propagation and security incident escalation, thereby improving the reliability of the ONU device.
[0043] Based on the above method, this application discloses an ONU management mode and port status switching system based on hardware buttons, referencing... Figure 2 The ONU management mode and port status switching device 1 includes a signal acquisition module 11 and a mode switching module 12, wherein, The signal acquisition module 11 is used to acquire the trigger duration of the MOD button in the ONU device. The trigger duration includes a first trigger duration in a first time period and a second trigger duration in a second time period, and the first time period is longer than the second time period. The mode switching module 12 is used to enable the ONU device to perform a management mode switching operation when the trigger duration of the MOD button is the first trigger duration, and to switch between remote management mode and local management mode. When the trigger duration of the MOD button is the second trigger duration, the ONU device performs a switching operation between port isolation state and port interconnection state in local management mode, and writes the switching result directly to non-volatile memory.
[0044] In one example, the management mode switching operation includes clearing the current configuration, updating the management mode identifier, triggering an ONU device restart, and loading the default configuration.
[0045] In one example, the clear old configuration operation includes clearing the management configuration of the ONU device in the current management mode, where the management configuration includes the configuration issued by the optical line terminal in the remote management mode or the local configuration in the local management mode; the update management mode identifier operation includes writing the management mode identifier into the system register and completing the mode parameter switching record.
[0046] In one example, triggering the ONU device restart operation includes sending a termination signal to all processes to shut down the network interface and trigger the device to restart automatically; loading the default configuration operation includes reading the mode identifier in the system register during the restart process and loading the default configuration for the corresponding mode. If the ONU device switches to remote management mode, the configuration adapted by the optical line terminal through the OMCI protocol is loaded; if the ONU device switches to local management mode, the local default configuration is loaded.
[0047] In one example, the mode switching module 12 is used to enable the ONU device to read the current port status identifier and reverse the port status identifier; the reversed port status identifier is then directly written into the non-volatile memory for storage.
[0048] In one example, the method further includes: in remote management mode, the MOD indicator corresponding to the MOD button flashes at the same frequency as the RUN indicator in the ONU device, wherein the RUN indicator flashes at a preset frequency when the ONU device is operating normally; in local management mode, the MOD indicator is always on when the ONU device is in port isolation state, and the MOD indicator is off when the ONU device is in port interconnection state.
[0049] In one example, when the trigger duration of the MOD button is detected to be the second trigger duration and the ONU device is in remote management mode, the ONU device is made to ignore the port state switching request.
[0050] Please see Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3As shown, the electronic device 2 may include: at least one processor 21, at least one network interface 24, user interface 23, memory 25, and at least one communication bus 22.
[0051] The communication bus 22 is used to enable communication between these components.
[0052] The user interface 23 may include a display screen and a camera. Optionally, the user interface 23 may also include a standard wired interface and a wireless interface.
[0053] The network interface 24 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0054] The processor 21 may include one or more processing cores. The processor 21 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 25, and by calling data stored in the memory 25. Optionally, the processor 21 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 21 and may be implemented as a separate chip.
[0055] The memory 25 may include random access memory (RAM) or read-only memory. Optionally, the memory 25 may include non-transitory computer-readable storage medium. The memory 25 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 25 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 25 may also be at least one storage device located remotely from the aforementioned processor 21. Figure 3 As shown, the memory 25, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for switching ONU management modes and port states based on hardware buttons.
[0056] exist Figure 3 In the electronic device 2 shown, the user interface 23 is mainly used to provide an input interface for the user and obtain the user input data; while the processor 21 can be used to call an application stored in the memory 25 that is a hardware button-based ONU management mode and port state switching method. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.
[0057] A computer-readable storage medium storing instructions that, when executed by one or more processors, cause a computer to perform one or more methods as described in the embodiments above.
[0058] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0059] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0060] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.
[0061] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0062] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0063] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0064] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.
[0065] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for ONU management mode and port status switching based on hardware buttons, characterized in that, The method includes: The trigger duration of the MOD button in the ONU device is collected, wherein the trigger duration includes a first trigger duration in a first time period and a second trigger duration in a second time period, and the first time period is longer than the second time period; When the trigger duration of the MOD button is the first trigger duration, the ONU device performs a management mode switching operation to switch between remote management mode and local management mode. When the trigger duration of the MOD button is the second trigger duration, the ONU device performs a switching operation between port isolation state and port interconnection state in local management mode, and writes the switching result directly to non-volatile memory.
2. The ONU management mode and port status switching method based on hardware buttons as described in claim 1, characterized in that, The management mode switching operation includes clearing the current configuration, updating the management mode identifier, triggering the ONU device restart, and loading the default configuration.
3. The ONU management mode and port status switching method based on hardware buttons as described in claim 2, characterized in that, The clear old configuration operation includes clearing the management configuration of the ONU device in the current management mode, wherein the management configuration includes the configuration issued by the optical line terminal in the remote management mode or the local configuration in the local management mode; the update management mode identifier operation includes writing the management mode identifier into the system register and completing the mode parameter switching record.
4. The ONU management mode and port status switching method based on hardware buttons as described in claim 3, characterized in that, The ONU device restart trigger operation includes sending a termination signal to all processes to shut down the network interface and trigger the device to restart automatically; the default configuration loading operation includes reading the mode identifier in the system register during the restart process and loading the default configuration of the corresponding mode. If the ONU device switches to remote management mode, the configuration adapted by the optical line terminal through the OMCI protocol is loaded; if the ONU device switches to local management mode, the local default configuration is loaded.
5. The ONU management mode and port status switching method based on hardware buttons as described in claim 1, characterized in that, The switching operation between the port isolation state and the port interconnection state includes: The ONU device reads the current port status identifier and inverts the port status identifier. The inverted port status identifier is directly written into the non-volatile memory for storage.
6. The ONU management mode and port status switching method based on hardware buttons as described in claim 1, characterized in that, The method further includes: In remote management mode, the MOD indicator light corresponding to the MOD button and the RUN indicator light in the ONU device flash at the same frequency, wherein the RUN indicator light flashes at a preset frequency when the ONU device is operating normally; In local management mode, the MOD indicator light is always on when the ONU device is in port isolation state, and off when the ONU device is in port interconnection state.
7. The ONU management mode and port status switching method based on hardware buttons as described in claim 1, characterized in that, When the trigger duration of the MOD button is detected to be the second trigger duration and the ONU device is in remote management mode, the ONU device is made to ignore the port state switching request.
8. A device for switching ONU management modes and port states based on hardware buttons, characterized in that, The ONU management mode and port status switching device (1) includes a signal acquisition module (11) and a mode switching module (12), wherein, The signal acquisition module (11) is used to acquire the trigger duration of the MOD button in the ONU device, wherein the trigger duration includes a first trigger duration in a first time period and a second trigger duration in a second time period, and the first time period is longer than the second time period; The mode switching module (12) is used to enable the ONU device to perform a management mode switching operation when the trigger duration of the MOD button is the first trigger duration, and to switch between remote management mode and local management mode. When the trigger duration of the MOD button is the second trigger duration, the ONU device performs a switching operation between port isolation state and port interconnection state in local management mode, and writes the switching result directly into non-volatile memory.
9. An electronic device, characterized in that, The device includes a processor (21), a memory (25), a user interface (23), and a network interface (24). The memory (25) is used to store instructions. The user interface (23) and the network interface (24) are used to communicate with other devices. The processor (21) is used to execute the instructions stored in the memory (25) to cause the electronic device (2) to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.
Citation Information
Patent Citations
Channel switching method, device and system and storage medium
CN112449256A
Cited By
Embedded intelligent internet-of-things edge computing terminal and monitoring method thereof in communication base station environment
CN121619257A