Dynamic cpu frequency energy saving system and method based on cooperation of onu and router
Patent Information
- Application Number
- CN202611129617.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-16
AI Technical Summary
[0006]本发明的目的是提供一种基于ONU与路由器联动的动态CPU频率节能系统、方法,以解决现有技术中ONU与路由器之间缺乏联动节能机制,导致设备在无用户使用或局端服务中断时仍保持高功耗运行,进而造成大量电能浪费的技术问题
1)本发明通过在ONU设备与路由器设备之间双向传输目标频率等级信息,使任一设备均能够根据自身检测到的运行状态发起协同调频,解决ONU设备与路由器设备分别独立调频而无法相互配合的问题;
Smart Images

Figure CN122932813A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy-saving technology for communication network equipment, and in particular to a dynamic CPU frequency energy-saving system and method based on the linkage between ONU and router. Background Technology
[0002] With the widespread adoption of fiber optic access networks, optical network units (ONUs) and routers are typically installed together in user-side networks. The ONU establishes an optical link with the central office optical line terminal (OLT) via a PON interface, while the router connects to the ONU via a WAN interface and provides network access services to user terminals via a LAN or WiFi interface.
[0003] Currently, optical network units (ONUs) and routers typically run their own control programs and independently control their internal CPUs according to preset operating frequencies. While some devices possess dynamic frequency adjustment capabilities, capable of reducing CPU operating frequencies based on local load, there is a lack of coordinated interaction between the ONU and router regarding operating status and target frequency levels. When all user terminals are disconnected or network traffic remains at a low level for an extended period, the ONU and router may still maintain high CPU operating frequencies, resulting in unnecessary power consumption.
[0004] Furthermore, when the optical line terminal at the local end stops working or a signal is lost in the PON optical link, the optical network unit can detect the optical link anomaly, but the downstream router usually cannot be aware of this anomaly in time, and therefore may still maintain its normal operating frequency. Correspondingly, when there are no wired or wireless terminals connected to the router, the optical network unit also has difficulty adjusting its own CPU operating frequency according to the actual usage status on the router side.
[0005] Therefore, existing technologies are insufficient to comprehensively utilize the PON optical link status, user terminal connection status, and interface traffic status to bidirectionally and collaboratively adjust the CPU operating frequency of optical network units and routers. It is necessary to provide a dynamic CPU frequency energy-saving system and method that can reduce the idle power consumption of equipment while ensuring network services. Summary of the Invention
[0006] The purpose of this invention is to provide a dynamic CPU frequency energy-saving system and method based on the linkage between ONU and router, so as to solve the technical problem that the lack of linkage energy-saving mechanism between ONU and router in the prior art causes the device to maintain high power consumption when there are no users or when the local service is interrupted, thus causing a lot of power waste.
[0007] To achieve the above objectives, the following technical solution is adopted: A dynamic CPU frequency energy-saving system based on ONU and router linkage includes an ONU device and a router device with communication connection. The ONU device includes a PON interface module, at least one first user-side communication interface, a first operating status detection module, a first CPU frequency control module, and a first protocol communication module. The first operating status detection module is used to obtain the optical link status information of the PON interface module and the interface status information of the first user-side communication interface. The interface status information includes at least one of terminal connection status information and data traffic status information. The router device includes a WAN interface module that is communicatively connected to the ONU device, at least one second user-side communication interface, a second operating status detection module, a second CPU frequency control module, and a second protocol communication module. The second operating status detection module is used to obtain the interface status information of the second user-side communication interface. The first protocol communication module and the second protocol communication module are used for bidirectional transmission of target frequency level information between the ONU device and the router device; The first CPU frequency control module and the second CPU frequency control module are respectively used to adjust the CPU operating frequency of the corresponding device to one of at least two preset frequency levels; When either the ONU device or the router device acts as a frequency modulation initiating device, the frequency modulation initiating device determines the target frequency level based on its own optical link status information and / or interface status information, controls its local CPU to operate according to the target frequency level, and sends the target frequency level information to the other device. The device that receives the target frequency level information acts as a frequency modulation receiving device. Based on the received target frequency level information and its own optical link status information and / or interface status information, it determines its own target frequency level and controls its own CPU to operate according to the determined target frequency level.
[0008] Furthermore, the first user-side communication interface and the second user-side communication interface respectively include a LAN interface and a WiFi interface; the first operating status detection module determines the operating status of the ONU device by reading the optical signal loss status of the PON interface module, the physical link status of the LAN interface, and the terminal association status of the WiFi interface; the second operating status detection module determines the operating status of the router device by reading the physical link status of the LAN interface and the terminal association status of the WiFi interface; when the ONU device detects a PON optical link abnormality, or detects that there are no terminal connections on all of its first user-side communication interfaces, the ONU device determines the lowest frequency level as the target frequency level; when the router device detects that there are no terminal connections on all of its second user-side communication interfaces, the router device determines the lowest frequency level as the target frequency level.
[0009] Furthermore, the first and second operation status detection modules are respectively configured to read the message transceiver counters of the corresponding communication interfaces and calculate the data traffic of the corresponding communication interfaces according to the sliding time window; when the data traffic of all user-side communication interfaces of the frequency modulation initiating device is lower than the preset low traffic threshold and continues for a preset period of time, the frequency modulation initiating device determines the energy-saving frequency level lower than the highest frequency level as the target frequency level; after receiving the corresponding target frequency level information, the frequency modulation receiving device determines whether to adjust its own CPU to the energy-saving frequency level according to the data traffic status of its own communication interfaces.
[0010] Furthermore, the preset frequency levels include high frequency levels, medium frequency levels, and low frequency levels; ONU devices and router devices at the low frequency level maintain at least the ability to detect operating status and the ability to communicate with each other; when a device at the medium or low frequency level detects that the corresponding frequency reduction trigger condition has disappeared, the device directly restores its local CPU to the high frequency level and sends the target frequency level information corresponding to the high frequency level to another device; when multiple frequency modulation trigger conditions are met simultaneously and correspond to different target frequency levels, the target frequency level with the lower CPU operating frequency is determined as the final target frequency level.
[0011] Furthermore, the first protocol communication module and the second protocol communication module establish a persistent communication connection based on the TCP protocol and through port 65000; the control message transmitted through the persistent communication connection has a 48-byte payload, wherein the payload includes: A 4-byte pattern field, where the pattern field uses ASCII-encoded get\0 to represent a query operation, or ASCII-encoded set\0 to represent a set operation; A 4-byte function enable field, where the function enable field uses ASCII-encoded enab to indicate enable, or ASCII-encoded disa to indicate disable; A 4-byte current frequency field stores an integer value representing the current CPU operating frequency level in network byte order; A 4-byte configuration frequency field stores an integer value in network byte order to represent the target CPU operating frequency level; A 32-byte configuration reason field is used to store a string indicating the reason for the frequency level change.
[0012] A dynamic CPU frequency power-saving method based on ONU and router linkage, using the above-mentioned system, includes the following steps: S1: The ONU device obtains the PON optical link status information and the interface status information of the first user-side communication interface, and the router device that communicates with the ONU device obtains the interface status information of the second user-side communication interface. S2: Either the ONU device or the router device is used as the frequency modulation initiating device. The frequency modulation initiating device determines the target frequency level from at least two preset frequency levels based on the optical link status information and / or interface status information it has acquired. S3: The frequency modulation initiating device adjusts its local CPU to the target frequency level and sends the target frequency level information to the other party, which is the frequency modulation receiving device, through the communication connection between the ONU device and the router device. S4: The frequency modulation receiving device determines its own target frequency level based on the received target frequency level information and its own optical link status information and / or interface status information, and adjusts its own CPU to the determined target frequency level.
[0013] By adopting the above solution, the beneficial effects of the present invention are: 1) This invention enables each device to initiate coordinated frequency modulation based on its detected operating status by bidirectionally transmitting target frequency level information between the ONU device and the router device, thus solving the problem that the ONU device and the router device cannot cooperate with each other due to independent frequency modulation. 2) This invention comprehensively utilizes the PON optical link status, user terminal connection status, and data traffic status to determine the target frequency level, which can adapt to different network states such as optical link interruption, no terminal connection, low traffic operation, and service recovery, thereby improving the matching degree between CPU frequency adjustment results and actual network load. 3) The frequency modulation receiving device does not unconditionally execute the received target frequency level, but verifies it in combination with its own operating status and performs the corresponding frequency modulation operation within the candidate frequency range allowed by its own service status, thereby avoiding the impact on the network services still being carried by the local device due to another device unilaterally initiating frequency reduction. 4) By setting high frequency, medium frequency and low frequency levels, ONU devices and router devices can be adjusted in stages between normal service, low traffic service and idle or abnormal link status; when in low frequency level, they still retain the ability to detect operating status and protocol communication, and can be upgraded in time after the link or terminal is restored. 5) When multiple frequency reduction trigger conditions are met simultaneously and different target frequency levels are generated, the target frequency level with the lower CPU operating frequency is given priority among the candidate frequency levels that have passed the local service status verification. This can further reduce the power consumption of the device without affecting the existing services. At the same time, the ONU device and the router device exchange control messages containing information such as the current frequency, the configured frequency and the configuration reason based on the TCP protocol. This facilitates the query of frequency adjustment status, the configuration of target frequency, the start and stop of energy-saving function and the recording of frequency adjustment reason, which is beneficial to system operation and maintenance and cross-device adaptation. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the system architecture of the present invention; Figure 2 This is a schematic diagram of the internal functional modules of an ONU device; Figure 3 This is a schematic diagram of the internal functional modules of a router device; Figure 4 This is a schematic diagram of the data fields of the protocol control message of the present invention; Figure 5 This is a flowchart of one embodiment of the method of the present invention; Figure 6 This is a flowchart of a second embodiment of the method of the present invention; Figure 7 The flowchart is for Embodiment 3 of the method of the present invention; Figure 8 This is a flowchart of a fourth embodiment of the method of the present invention. Detailed Implementation
[0015] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0016] It should be noted that the following embodiments are used to illustrate the technical solution of the present invention, and are not intended to limit the scope of protection of the present invention. Without departing from the concept of the present invention, those skilled in the art can make adaptive adjustments to the communication interface type, number of frequency levels, frequency values, traffic thresholds, and detection cycles.
[0017] In this invention, ONU stands for Optical Network Unit, OLT for Optical Line Terminal, PON for Passive Optical Network, LAN for Local Area Network, WAN for Wide Area Network, WiFi for Wireless Local Area Network, LOS for Loss of Signal, CPU for Central Processing Unit, TCP for Transmission Control Protocol, and ASCII for Standard Code for Information Exchange. All these abbreviations use their common meanings in the field of communication networks.
[0018] Reference Figures 1 to 8As shown, this embodiment provides a dynamic CPU frequency energy-saving system based on ONU and router linkage, including an ONU device and a router device connected by communication, wherein, The ONU device includes a PON interface module, at least one first user-side communication interface, a first operating status detection module, a first CPU frequency control module, and a first protocol communication module. The first operating status detection module is used to obtain the optical link status information of the PON interface module and the interface status information of the first user-side communication interface. The interface status information includes at least one of terminal connection status information and data traffic status information. The router device includes a WAN interface module that is communicatively connected to the ONU device, at least one second user-side communication interface, a second operating status detection module, a second CPU frequency control module, and a second protocol communication module. The second operating status detection module is used to obtain the interface status information of the second user-side communication interface. The first protocol communication module and the second protocol communication module are used for bidirectional transmission of target frequency level information between the ONU device and the router device; The first CPU frequency control module and the second CPU frequency control module are respectively used to adjust the CPU operating frequency of the corresponding device to one of at least two preset frequency levels; When either the ONU device or the router device acts as a frequency modulation initiating device, the frequency modulation initiating device determines the target frequency level based on its own optical link status information and / or interface status information, controls its local CPU to operate according to the target frequency level, and sends the target frequency level information to the other device. The device that receives the target frequency level information acts as a frequency modulation receiving device. Based on the received target frequency level information and its own optical link status information and / or interface status information, it determines its own target frequency level and controls its own CPU to operate according to the determined target frequency level.
[0019] In this embodiment, the ONU device includes a PON interface module, at least one first user-side communication interface, a first operating status detection module, a first CPU frequency control module, and a first protocol communication module.
[0020] The PON interface module is used to establish an optical link with the central office OLT and to perform optical signal transmission and reception as well as GPON or EPON protocol processing. The first user-side communication interface may include one or more LAN interfaces or WiFi interfaces. The specific interface combination can be configured according to whether the ONU device integrates home gateway functions.
[0021] The first operational status detection module can read the LOS status register of the PON interface module to determine whether the PON optical link is in a signal loss state; it can also read the physical layer link status register of the LAN interface to determine whether the corresponding LAN interface has established a physical connection; for ONU devices with WiFi interfaces, the first operational status detection module can also read the wireless terminal association list to determine whether there are wireless terminals associated with the WiFi interface.
[0022] Meanwhile, the first operating status detection module can also obtain the number of messages received and sent within a preset detection period by reading the message transmission and reception counters of each communication interface, and calculate the data traffic of each communication interface using a sliding time window. The use of a sliding time window can reduce the impact of instantaneous traffic fluctuations on the frequency level judgment results.
[0023] The first CPU frequency control module is used to call the CPU frequency adjustment interface provided by the ONU device's operating system to adjust the ONU device's CPU to a specified target frequency level. For example, in an ONU device using a Linux operating system, CPU frequency switching can be performed through the cpufreq subsystem.
[0024] The first protocol communication module is used to establish a communication connection between the ONU device and the router device, and to perform the encapsulation, sending, receiving, and parsing of control messages. The first operating status detection module, the first CPU frequency control module, and the first protocol communication module can exchange data through the system bus, inter-process communication interface, or internal message queue.
[0025] Furthermore, the router device includes a WAN interface module, at least one second user-side communication interface, a second operating status detection module, a second CPU frequency control module, and a second protocol communication module.
[0026] The WAN interface module communicates with the LAN interface of the ONU device; the second user-side communication interface may include one or more LAN interfaces and a WiFi interface; the second operation status detection module can read the physical layer link status register of each LAN interface and the wireless terminal association list of the WiFi interface to determine the terminal connection status of each second user-side communication interface; the second operation status detection module can also read the message transceiver counter of the corresponding communication interface and calculate the data traffic of each communication interface using a sliding time window.
[0027] The second CPU frequency control module is used to call the CPU frequency modulation interface of the router device operating system to adjust the CPU of the router device to a determined target frequency level; the second protocol communication module is used to exchange target frequency level information and other frequency modulation control information with the first protocol communication module.
[0028] In this embodiment, the CPU's preset frequency levels include a high frequency level (level 1), a mid frequency level (level 2), and a low frequency level (level 3). As a non-limiting example, the high frequency level can correspond to 1.2 GHz, the mid frequency level can correspond to 600 MHz, and the low frequency level can correspond to 200 MHz. The specific frequency values corresponding to different frequency levels can be set according to the CPU model, device forwarding capability, and power consumption characteristics, and are not limited to the values mentioned above.
[0029] The high-frequency level is used to ensure the processing needs of normal network services; the medium-frequency level is suitable for situations where there are terminal connections but low data traffic; and the low-frequency level is suitable for situations where there are no terminal connections or the PON optical link is abnormal. When the device is at the low-frequency level, it must at least maintain the ability to detect the operating status and the protocol communication capability between the ONU device and the router device, so as to detect service recovery conditions and receive upsampling information.
[0030] Reference Figure 4 As shown, the ONU device and the router device establish a communication connection through the TCP protocol; the first protocol communication module and the second protocol communication module respectively listen to TCP port 65000 and establish a continuous communication connection for exchanging frequency modulation control messages. When the continuous communication connection is broken, the protocol communication module initiates a reconnection to restore the frequency modulation information exchange capability.
[0031] In this embodiment, the control message has a 48-byte payload. The control message payload includes, in order of field, a 4-byte mode field, a 4-byte function enable field, a 4-byte current frequency field, a 4-byte configuration frequency field, and a 32-byte configuration reason field.
[0032] The pattern field uses ASCII encoding. get\0 represents a query operation, used to query the current CPU operating frequency level of the receiving device; set\0 represents a setting operation, used to send target frequency level information to the receiving device.
[0033] The function enable field indicates whether the cooperative frequency modulation (CFM) function is enabled. `enab` enables the CFM function, and `disa` disables it. Using `enab` and `disa` allows the corresponding encoding to be adapted to a 4-byte field length.
[0034] The current frequency field uses network byte order to store an integer value representing the current CPU operating frequency level, while the configuration frequency field uses network byte order to store an integer value representing the target CPU operating frequency level. For example, integer values 1, 2, and 3 can represent high frequency level, mid frequency level, and low frequency level, respectively.
[0035] The configuration reason field is used to store a readable string indicating the reason for the frequency level change. The configuration reason can include the detection of optical signal loss, no user terminal connection, low traffic state, user terminal connection recovery, optical link recovery, or service traffic recovery, etc.
[0036] When the transmitting device needs to initiate frequency modulation control, it first checks the TCP connection status. When the TCP connection is valid, the transmitting device encapsulates the operating mode, current frequency level, target frequency level, and frequency modulation reason into a control message and sends it to the receiving device through a continuous communication connection. After parsing the control message, the receiving device extracts the target frequency level and frequency modulation reason, and performs service status verification in conjunction with its own operating status.
[0037] Service status verification is used to determine whether the received target frequency level belongs to the frequency level currently allowed by the local device. For example, when a router requests the ONU device to enter a low frequency level, and other user-side communication interfaces of the ONU device are still carrying network services, the ONU device can maintain its current frequency level; when none of the user-side communication interfaces of the ONU device have services, and its status detection and protocol communication functions can operate normally at a low frequency level, the ONU device can perform the corresponding frequency reduction operation.
[0038] When multiple frequency modulation triggering conditions are met simultaneously and generate different target frequency levels, the device first determines the permissible candidate frequency levels based on its own service status, and then selects the frequency level with the lower corresponding CPU operating frequency from the candidate frequency levels as the final target frequency level. This can improve energy efficiency without affecting existing services.
[0039] Meanwhile, in one embodiment, a dynamic CPU frequency power saving method based on ONU and router linkage is also provided. The system described above includes the following steps: S1: The ONU device obtains the PON optical link status information and the interface status information of the first user-side communication interface, and the router device that communicates with the ONU device obtains the interface status information of the second user-side communication interface. S2: Either the ONU device or the router device is used as the frequency modulation initiating device. The frequency modulation initiating device determines the target frequency level from at least two preset frequency levels based on the optical link status information and / or interface status information it has acquired. S3: The frequency modulation initiating device adjusts its local CPU to the target frequency level and sends the target frequency level information to the other party, which is the frequency modulation receiving device, through the communication connection between the ONU device and the router device. S4: The frequency modulation receiving device determines its own target frequency level based on the received target frequency level information and its own optical link status information and / or interface status information, and adjusts its own CPU to the determined target frequency level.
[0040] The following provides supplementary explanations using typical energy-saving linkage processes and application scenarios: This embodiment illustrates four frequency modulation procedures: ONU-side optical link anomaly or no terminal connection, router-side no terminal connection, router-side low traffic, and ONU-side low traffic. The traffic detection period and low traffic threshold can be configured according to the network service type. As a non-limiting example, the detection period can be set to 30 seconds, and the low traffic threshold can be set to 100Kbps.
[0041] Implementation Method 1: Frequency modulation procedure triggered by ONU-side optical link abnormality or no terminal connection Reference Figure 5 As shown, the process includes: A1: The ONU device continuously monitors the PON optical link status, the physical connection status of the LAN interface, and the terminal association status of the WiFi interface.
[0042] A2: When the ONU device detects that the PON interface has entered the LOS state, or detects that there are no terminal connections on all first user-side communication interfaces, it determines the low frequency level as the target frequency level of the device, adjusts the local CPU to the low frequency level through the first CPU frequency control module, and sends the target frequency level information corresponding to the low frequency level to the router device.
[0043] A3: After receiving the target frequency level information, the router device verifies the connection status of its LAN interface, the terminal association status of its WiFi interface, and the interface traffic status. If the current service status of the device allows it to enter a low frequency level, the router adjusts its CPU to a low frequency level; if the device still has local network services that need to be processed, it can maintain the current frequency level or determine another frequency level that can meet the current service requirements.
[0044] A4: ONU devices and router devices entering the low-frequency level continuously maintain operational status monitoring and protocol communication between them.
[0045] A5: When the ONU device detects that the PON optical link has returned to normal or that any first user-side communication interface has restored the terminal connection, it will directly restore the local CPU to the high frequency level and send the target frequency level information corresponding to the high frequency level to the router device.
[0046] A6: After receiving the frequency increase information, the router determines its target frequency level based on its own service status. When it needs to restore normal network service, it adjusts its CPU to a higher frequency level.
[0047] This procedure is applicable to scenarios where the central office OLT stops working, the fiber optic link fails, or all user-side communication interfaces of the ONU device are idle.
[0048] Implementation Method 2: Frequency modulation process triggered by no terminal connection on the router side Reference Figure 6 The process includes: B1: The router continuously monitors the physical connection status of each LAN interface and the terminal association status of the WiFi interface.
[0049] B2: When the router device detects that there are no terminal connections on all second user-side communication interfaces, it determines the low frequency level as the target frequency level of the local machine, adjusts the local CPU to the low frequency level, and sends the target frequency level information corresponding to the low frequency level to the ONU device.
[0050] B3: After receiving the target frequency level information, the ONU device verifies the PON optical link status, the terminal connection status of the first user-side communication interface, and the interface traffic status. When the ONU device does not have other network services to process, it adjusts its local CPU to a low frequency level; when other user-side communication interfaces of the ONU device are still carrying network services, the ONU device maintains its current frequency level or adopts a frequency level that meets the current service requirements.
[0051] B4: When the router detects that any LAN interface has restored physical connection or a new wireless terminal has been associated with the WiFi interface, it will directly restore the local CPU to a high frequency level and send the target frequency level information corresponding to the high frequency level to the ONU device.
[0052] B5: After receiving the frequency upsampling information, the ONU device determines its target frequency level based on its own service status, and adjusts its CPU to a high frequency level when it needs to restore network forwarding capabilities.
[0053] This process is suitable for scenarios where users turn off wired and wireless terminals, and the router only needs to maintain basic status detection and protocol communication.
[0054] Implementation Method 3: Frequency Tuning Process Triggered by Low Traffic on the Router Side Reference Figure 7 The process includes: C1: The router device reads the packet transceiver counters of each LAN interface and WiFi interface according to a preset detection cycle, and calculates the data traffic of each interface using a sliding time window.
[0055] C2: When the data traffic of all second user-side communication interfaces of the router device is lower than the preset low traffic threshold for a preset period of time, the medium frequency level is determined as the target frequency level of the local device, the local CPU is adjusted to the medium frequency level, and the target frequency level information corresponding to the medium frequency level is sent to the ONU device.
[0056] C3: After receiving the target frequency level information, the ONU device detects the data traffic of its various communication interfaces. When the interface traffic status of the ONU device allows it to enter the medium frequency level, it adjusts its local CPU to the medium frequency level; when the ONU device is still carrying high-traffic services through other interfaces, it maintains the current frequency level.
[0057] C4: When the router device detects that the data traffic of any communication interface exceeds the preset low traffic threshold, it will directly restore the local CPU to a high frequency level and send the target frequency level information corresponding to the high frequency level to the ONU device.
[0058] C5: After receiving the frequency upsampling information, the ONU device determines its target frequency level based on its own interface traffic status, and restores to a higher frequency level when it needs to improve data processing capabilities.
[0059] This process is suitable for scenarios where there is only message push, status synchronization, or other low-traffic background business.
[0060] Implementation Method 4: Frequency Modulation Process Triggered by Low Flow on the ONU Side Reference Figure 8 The process includes: D1: The ONU device reads the message transceiver counters of each LAN interface and WiFi interface according to the preset detection cycle, and calculates the data traffic of each interface using a sliding time window.
[0061] D2: When the data traffic of all first user-side communication interfaces of the ONU device is lower than the preset low traffic threshold and continues for a preset period of time, the medium frequency level is determined as the target frequency level of the local device, the local CPU is adjusted to the medium frequency level, and the target frequency level information corresponding to the medium frequency level is sent to the router device.
[0062] D3: After receiving the target frequency level information, the router device detects the data traffic of each user-side communication interface. When the interface traffic status of the router device allows it to enter the medium frequency level, it adjusts its local CPU to the medium frequency level; when the router device is still carrying high-traffic local network services, it maintains the current frequency level.
[0063] D4: When the ONU device detects that the data traffic of any communication interface exceeds the preset low traffic threshold, it will directly restore the local CPU to the high frequency level and send the target frequency level information corresponding to the high frequency level to the router device.
[0064] D5: After receiving the upsampling information, the router device determines its target frequency level based on its own interface traffic status, and restores to a higher frequency level when it needs to improve data processing capabilities.
[0065] In this embodiment, the switching between high-frequency, medium-frequency, and low-frequency levels is jointly determined by the PON optical link status, terminal connection status, and data traffic status. When the device is at a high-frequency level, it can switch to a medium-frequency level after detecting a continuous low traffic state. When the device is at a high-frequency or medium-frequency level, it can switch to a low-frequency level after detecting a PON optical link anomaly or no terminal connection on all user-side communication interfaces. When the device is at a medium-frequency or low-frequency level, it can directly recover to a high-frequency level after detecting that the corresponding frequency reduction trigger condition has disappeared.
[0066] The four processes described above can run independently or in parallel. When multiple frequency adjustment conditions are met simultaneously, each device first eliminates frequency levels that cannot meet current service requirements based on its own service status, and then selects the frequency level with the lower corresponding CPU operating frequency from the remaining candidate frequency levels as the final target frequency level. This achieves dynamic CPU frequency collaborative control between ONU devices and router devices, balancing service assurance and energy saving.
[0067] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic CPU frequency energy-saving system based on ONU and router linkage, comprising an ONU device and a router device connected by communication, characterized in that, The ONU device includes a PON interface module, at least one first user-side communication interface, a first operating status detection module, a first CPU frequency control module, and a first protocol communication module. The first operating status detection module is used to obtain the optical link status information of the PON interface module and the interface status information of the first user-side communication interface. The interface status information includes at least one of terminal connection status information and data traffic status information. The router device includes a WAN interface module that is communicatively connected to the ONU device, at least one second user-side communication interface, a second operating status detection module, a second CPU frequency control module, and a second protocol communication module. The second operating status detection module is used to obtain the interface status information of the second user-side communication interface. The first protocol communication module and the second protocol communication module are used for bidirectional transmission of target frequency level information between the ONU device and the router device; The first CPU frequency control module and the second CPU frequency control module are respectively used to adjust the CPU operating frequency of the corresponding device to one of at least two preset frequency levels; When either the ONU device or the router device acts as a frequency modulation initiating device, the frequency modulation initiating device determines the target frequency level based on its own optical link status information and / or interface status information, controls its local CPU to operate according to the target frequency level, and sends the target frequency level information to the other device. The device that receives the target frequency level information acts as a frequency modulation receiving device. Based on the received target frequency level information and its own optical link status information and / or interface status information, it determines its own target frequency level and controls its own CPU to operate according to the determined target frequency level.
2. The dynamic CPU frequency energy-saving system based on ONU and router linkage according to claim 1, characterized in that, The first user-side communication interface and the second user-side communication interface respectively include a LAN interface and a WiFi interface; the first operating status detection module determines the operating status of the ONU device by reading the optical signal loss status of the PON interface module, the physical link status of the LAN interface, and the terminal association status of the WiFi interface. The second operating status detection module determines the operating status of the router device by reading the physical link status of the LAN interface and the terminal association status of the WiFi interface. When the ONU device detects an abnormal PON optical link or detects that none of its first user-side communication interfaces have terminal connections, the ONU device determines the lowest frequency level as the target frequency level. When the router device detects that none of its second user-side communication interfaces have terminal connections, the router device determines the lowest frequency level as the target frequency level.
3. The dynamic CPU frequency energy-saving system based on ONU and router linkage according to claim 2, characterized in that, The first and second operation status detection modules are respectively configured to read the message transmission and reception counters of the corresponding communication interfaces and calculate the data traffic of the corresponding communication interfaces according to the sliding time window; When the data traffic of all user-side communication interfaces of the frequency modulation initiating device is lower than the preset low traffic threshold and continues for a preset period of time, the frequency modulation initiating device determines the energy-saving frequency level lower than the highest frequency level as the target frequency level; after receiving the corresponding target frequency level information, the frequency modulation receiving device determines whether to adjust its local CPU to the energy-saving frequency level according to the data traffic status of its own communication interfaces.
4. The dynamic CPU frequency energy-saving system based on ONU and router linkage according to claim 3, characterized in that, The preset frequency levels include high frequency level, medium frequency level, and low frequency level; ONU devices and router devices at the low frequency level must at least maintain operational status detection capabilities and protocol communication capabilities between them; when a device at the medium or low frequency level detects that the corresponding frequency reduction trigger condition has disappeared, the device will directly restore its local CPU to the high frequency level and send the target frequency level information corresponding to the high frequency level to another device; when multiple frequency modulation trigger conditions are simultaneously met and correspond to different target frequency levels, the target frequency level with the lower CPU operating frequency is determined as the final target frequency level.
5. The dynamic CPU frequency energy-saving system based on ONU and router linkage according to claim 4, characterized in that, The first protocol communication module and the second protocol communication module establish a continuous communication connection based on the TCP protocol and through port 65000. Control messages transmitted over a persistent communication connection have a 48-byte payload, wherein the payload includes: A 4-byte pattern field, where the pattern field uses ASCII-encoded get\0 to represent a query operation, or ASCII-encoded set\0 to represent a set operation; A 4-byte function enable field, where the function enable field uses ASCII-encoded enab to indicate enable, or ASCII-encoded disa to indicate disable; A 4-byte current frequency field stores an integer value representing the current CPU operating frequency level in network byte order; A 4-byte configuration frequency field stores an integer value in network byte order to represent the target CPU operating frequency level; A 32-byte configuration reason field is used to store a string indicating the reason for the frequency level change.
6. A dynamic CPU frequency energy-saving method based on ONU and router linkage, employing the system described in any one of claims 1 to 5, characterized in that, Includes the following steps: S1: The ONU device obtains the PON optical link status information and the interface status information of the first user-side communication interface, and the router device that communicates with the ONU device obtains the interface status information of the second user-side communication interface. S2: Either the ONU device or the router device is used as the frequency modulation initiating device. The frequency modulation initiating device determines the target frequency level from at least two preset frequency levels based on the optical link status information and / or interface status information it has acquired. S3: The frequency modulation initiating device adjusts its local CPU to the target frequency level and sends the target frequency level information to the other party, which is the frequency modulation receiving device, through the communication connection between the ONU device and the router device. S4: The frequency modulation receiving device determines its own target frequency level based on the received target frequency level information and its own optical link status information and / or interface status information, and adjusts its own CPU to the determined target frequency level.