Optical modem battery endurance prediction method and device, and router
By adopting an independent charging and discharging model in Lightmap, combining real-time voltage and load state, dynamic rendering of the power percentage, the shortcomings of power management and battery life prediction in Lightmap battery management system are solved, and a higher accuracy battery life prediction is achieved.
Patent Information
- Application Number
- CN202510479190.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-09-02
AI Technical Summary
In the prior art, Guangmao's battery management system has contradictions in equipment miniaturization and power management, resulting in unstable battery power supply, inconsistent dynamic load and battery life prediction, and lack of hybrid modeling of charge and discharge modes, resulting in low accuracy in battery life prediction.
An independent charging and discharging model is adopted to calculate the remaining time through segmented parameters, combining real-time voltage values and load states, dynamically rendering the power percentage, optimize computing resources, and avoiding predicted value jumps during state switching.
It improves the accuracy of Lightmax battery life prediction, reduces the computational complexity, ensures the continuity and accuracy of the prediction results, adapts to Lightmax's dynamic load characteristics, and extends the actual use time of the battery.
Smart Images

Figure CN120577698A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical modems, and in particular to an optical modem battery life prediction method, device, and router. Background Art
[0002] In existing technologies, there is a significant gap in the design of built-in UPS (uninterruptible power supply) for optical fiber modems (PON). Traditional UPS solutions are mostly focused on large-scale communication equipment or industrial scenarios, while battery management systems (BMS) for consumer-grade optical fiber modems face the following limitations:
[0003] The contradiction between device miniaturization and power management requires optical modems to integrate battery modules within a compact space. However, traditional UPS solutions do not optimize power sequencing for small devices. For example, prematurely enabling battery power can cause motherboard voltage fluctuations, leading to false system restarts (e.g., "voltage drop misjudgment" issues). Existing technologies lack a coordinated mechanism for delayed power supply and initialization to address these scenarios.
[0004] Dynamic load and battery life predictions are not well-matched. The load characteristics of optical modems differ significantly from those of larger devices: their power consumption fluctuates dramatically with the number of Wi-Fi connections and data transmission volume, and they must maintain the continuous operation of core functions (such as optical modules and voice services). Existing UPS solutions use a fixed load model to predict remaining time, but fail to account for the dynamic load characteristics of optical modems (such as disabling CATV modules to extend battery life). This results in predictions that deviate by over 30% from the actual available time.
[0005] Due to the lack of hybrid charge and discharge mode modeling, existing router battery management solutions are typically designed for a single charge / discharge mode (e.g., only considering power prediction during discharge). However, when an optical modem is frequently plugged in and out of the AC power source, the battery may rapidly switch between charge and discharge states. Traditional single models cannot adapt to this characteristic, resulting in jumps in predicted values during state transitions (e.g., from 100% charge to 75% discharge), resulting in a poor user experience.
[0006] Therefore, how to improve the accuracy of predicting battery life under the limited hardware resources of optical modems has become a technical problem that needs to be solved urgently.
[0007] In addition, how to combine the load characteristics of the optical modem (such as fluctuations in the number of Wi-Fi connections and the start and stop of non-core modules) to establish a dynamically calibrated remaining time prediction model has become the second technical problem that needs to be solved urgently. Summary of the Invention
[0008] Based on the above situation, the main purpose of the present invention is to provide a method, device and router for predicting the battery life of an optical modem, so as to improve the accuracy of predicting the battery life under the limited hardware resources of the optical modem.
[0009] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0010] In a first aspect, an embodiment of the present invention discloses a method for predicting the battery life of an optical modem. The optical modem is provided with a battery module for providing backup power to a main control board. The battery life prediction method includes:
[0011] Step S100, obtaining the current charge and discharge mode of the battery module, where the charge and discharge mode includes a charge mode or a discharge mode;
[0012] Step S200: Selecting a corresponding voltage segment threshold and nominal remaining time based on the charge / discharge mode. Specifically, if the mode is charging, the preset voltage threshold and the corresponding first nominal time of the charging model are loaded; if the mode is discharging, the preset voltage threshold and the corresponding second nominal time of the discharging model are loaded. The data models of the charging model and the discharging model are independent of each other.
[0013] Step S300, periodically obtaining the current real-time voltage value of the battery;
[0014] Step S400, calculating the remaining time based on the segmented model parameters of the current charge and discharge mode;
[0015] Step S500: Map the remaining time to a preset power percentage and dynamically render prompt information of the remaining time.
[0016] Optionally, in step S400, the remaining time is calculated using the following formula:
[0017] T remain =T1+(T2-T1)*(V current -V1) / (V2-V1)
[0018] Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the current power segment starting voltage, and T2 is the nominal remaining time corresponding to the current power segment ending voltage; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
[0019] Optionally, in step S400, when it is detected that the non-core load is shut down, the remaining time is corrected according to a preset weight:
[0020]
[0021] Among them, T a remainThe remaining time after correction, k is the endurance extension coefficient when the load is turned off, 0 < k ≤ 0.2; the non-core load includes at least one of the CATV module, USB peripheral service, guest service, and network protocol stack;
[0022] In step S500, map the corrected remaining time to a preset battery percentage.
[0023] Optionally, between step S100 and step S400, it further includes:
[0024] Step S110, when the battery module is currently in the discharge mode, calculate the upper limit of the system power consumption Padjust based on the dynamic power consumption model formula;
[0025] Step S120, when the real-time system power consumption exceeds the upper limit of the system power consumption Padjust, trigger the non-core load hierarchical shutdown process.
[0026] Optionally, in step S500, multiple battery percentage levels are preset. Step S500 includes mapping the remaining time to the battery percentage of the preset level, and dynamically rendering the visualization progress bar and the remaining time prompt information.
[0027] Optionally, before step S100, it further includes:
[0028] When the optical modem enters the initialization phase, cut off the power supply path of the battery module to initialize the main control chip and peripheral interfaces on the main control board, and initialize the system using the power provided by the AC adapter;
[0029] After the initialization phase ends, connect the power supply path and enable the battery module.
[0030] In a second aspect, an embodiment of the present invention discloses an optical modem battery endurance prediction device. A battery module is provided in the optical modem to provide backup power for the main control board. The endurance prediction device includes:
[0031] A mode acquisition module, configured to acquire the current charge and discharge mode of the battery module. The charge and discharge mode includes a charging mode or a discharging mode;
[0032] A segmented parameter selection module, configured to select the corresponding voltage segmented threshold and nominal remaining time according to the charge and discharge mode. Specifically, if it is the charging mode, load the preset voltage threshold of the charging model and the corresponding first nominal time; if it is the discharging mode, load the preset voltage threshold of the discharging model and the corresponding second nominal time; wherein the data models between the charging model and the discharging model are independent of each other;
[0033] A voltage acquisition module, configured to periodically acquire the real-time voltage value of the current battery;
[0034] A remaining time calculation module is used to calculate the remaining time based on the segmented model parameters of the current charge and discharge mode;
[0035] The remaining time rendering module is used to map the remaining time to a preset power percentage and dynamically render the remaining time prompt information.
[0036] Optionally, in the remaining time calculation module, the remaining time is calculated using the following formula:
[0037] T remain =T1+(T2-T1)*(V current -V1) / (V2-V1)
[0038] Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the current power segment starting voltage, and T2 is the nominal remaining time corresponding to the current power segment ending voltage; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
[0039] In a third aspect, an embodiment of the present invention discloses a computer-readable storage medium having a computer program stored thereon. The computer program stored in the storage medium is used to be executed by a processor to implement the method disclosed in the first aspect above.
[0040] In a fourth aspect, an embodiment of the present invention discloses an optical modem, comprising:
[0041] Main control board;
[0042] The battery module is built into the optical modem and is used to provide backup power to the main control board;
[0043] A processor is used to execute a program to implement the method disclosed in the first aspect above.
[0044] Beneficial effects:
[0045] According to an embodiment of the present invention, a method, device, and router for predicting the battery life of an optical modem are disclosed. The optical modem is equipped with a battery module for providing backup power to the main control board. Under the constraints of the optical modem's limited hardware resources (low-computing power main control chip, miniaturized battery module), the embodiment of the present invention uses independent charging and discharging models to load differentiated segmented parameters for different modes. Then, based on the real-time voltage value, the remaining time is calculated based on the segmented model parameters of the current charging and discharging mode. The segmented model parameters reduce the amount of data operations and the complexity of the calculation. Moreover, compared with the traditional solution that does not distinguish between charging and discharging modes, resulting in a large jump in the predicted value when the battery state switches in the scenario where the AC power is frequently plugged in and out (for example, the charging mode 12.3V displays 100%, and when switching to the discharging mode 11.9V, it drops sharply to 75%). The embodiment of the present invention realizes independent segmented parameter loading of the dual models due to the independent data models between the charging model and the discharging model, solving the problem of prediction jump during state switching, thereby improving the prediction accuracy of battery life. It can be seen that under the limited hardware resources of the optical modem, the accuracy of battery life prediction is improved.
[0046] Other beneficial effects of the present invention will be explained through the introduction of specific technical features and technical solutions in the specific implementation methods. Those skilled in the art should be able to understand the beneficial technical effects brought about by the introduction of these technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0048] Figure 1 This is a schematic diagram of the principle of an optical modem disclosed in this embodiment;
[0049] Figure 2 This is a flow chart of a method for predicting the battery life of an optical modem disclosed in this embodiment;
[0050] Figure 3 This is a schematic diagram of an example of a visual display of the remaining battery power disclosed in this embodiment;
[0051] Figure 4 This is a schematic diagram of the structure of an optical modem battery life prediction device disclosed in this embodiment. DETAILED DESCRIPTION
[0052] The present invention is described below based on the following embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail. In order to avoid obscuring the essence of the present invention, well-known methods, processes, procedures, and components are not described in detail.
[0053] Furthermore, persons of ordinary skill in the art will appreciate that the figures provided herein are for illustration purposes only and are not necessarily drawn to scale.
[0054] Unless the context clearly requires otherwise, throughout the specification and claims, the words "include," "comprising," and similar words should be construed in an inclusive sense rather than an exclusive or exhaustive sense; that is, in the sense of "including but not limited to."
[0055] In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0056] In order to improve the accuracy of battery life prediction under the limited hardware resources of the optical modem, this embodiment discloses a method for predicting the battery life of the optical modem. In this embodiment, a battery module is provided in the optical modem to provide backup power to the main control board. For details, please refer to Figure 1 , Figure 1 This is a schematic diagram of the optical modem disclosed in this embodiment. The optical modem includes a main control board 10, a battery module 20, and an AC / DC converter module 30. The AC / DC converter module 30 provides power to the main control board 10, and the battery module 20 is connected to the main control board via an FPC flexible circuit board. In a specific implementation, the AC / DC converter module 30, main control chip 11, and radio frequency circuit 12 can be partially or fully integrated into the main control board 10, or they can be provided separately from the main control board 10.
[0057] Please refer to Figure 2 , Figure 2 This is a flow chart of a method for predicting the battery life of an optical modem disclosed in this embodiment. The method includes steps S100, S200, S300, S400, and S500, wherein:
[0058] Step S100, obtaining the current charge and discharge mode of the battery module. In this embodiment, the charge and discharge mode includes a charging mode or a discharging mode. In the process of the AC adapter providing power to the mainboard, when the battery module is connected, the AC adapter can usually provide charging power to the battery module through the power supply path. At this time, the battery module operates in the charging mode; when the AC adapter is disconnected, power can be provided to the mainboard through the battery module. At this time, the battery module operates in the discharging mode. Of course, in some embodiments, the battery module can also operate in the discharging mode while the AC adapter provides power to the mainboard.
[0059] In the specific implementation process, you can use support I 2C communication battery management chip, its built-in status register (for example, address: 0x21 bit 7) is used to indicate the charge and discharge status. When the AC adapter is disconnected and the register address, for example, 0x21 bit 7 changes from 1 to 0, it is determined to enter the discharge mode; when the AC adapter is reconnected and the register 0x21 bit 7 changes from 0 to 1, it is determined to enter the charge mode. In an optional embodiment, in order to prevent misjudgment caused by transient noise, register 0x21 bit 7 can be read N times in succession. If the results are consistent N times, the mode switch is confirmed, thereby preventing misjudgment caused by transient noise and achieving de-jitter interference. It should be noted that in a preferred embodiment, I 2 C communication is activated only when switching modes (not continuous reading), and enters sleep mode under normal conditions, thereby reducing power consumption.
[0060] Step S200 selects the corresponding voltage segment threshold and nominal remaining time based on the charge / discharge mode. In this embodiment, the corresponding voltage segment threshold and nominal remaining time parameters are loaded based on the detected charge / discharge mode, achieving independent data configuration for the charge / discharge model. Specifically, if the charging mode is selected, the preset voltage threshold and corresponding first nominal time of the charging model are loaded; if the discharging mode is selected, the preset voltage threshold and corresponding second nominal time of the discharging model are loaded. The data models for the charging and discharging models are independent of each other.
[0061] During the specific implementation process, the current mode is determined by reading the battery management chip register status (for example, bit 7 of address 0x21): when register bit 7 is 1, it indicates that the current mode is charging (AC adapter powered and the battery is in charging state); when register bit 7 is 0, it indicates that the current mode is discharging (AC adapter disconnected, battery powering the mainboard).
[0062] In this embodiment, the data models between the charging model and the discharging model are independent of each other, that is, the charging model and the discharging model are established separately, and the data between the two models are independent of each other. For the charging model, based on the battery voltage characteristics under charging state, the preset segment voltage thresholds and the corresponding nominal remaining time are shown in Table 1:
[0063] Table 1: Voltage thresholds and corresponding nominal remaining time in charging state
[0064] Voltage threshold (V) Battery percentage level Nominal remaining time (hours) ≥12.3 100% 4.3 11.9~12.3 75% 3.33 11.5~11.9 50% 2.15 10.4~11.5 25% 1.67 <11 5% 0.33
[0065] For the discharge model, based on the battery voltage attenuation characteristics under discharge conditions, independent segmentation parameters are preset as shown in Table 2:
[0066] Table 2: Voltage thresholds and corresponding nominal remaining time in discharge state
[0067] Voltage threshold (V) Battery percentage level Nominal remaining time (hours) ≥11.9 100% 4.5 11.5~11.9 75% 3.33 10.8~11.5 50% 2.25 <10.8 5% 0.33
[0068] As can be seen from Tables 1 and 2, the system pre-stores two independent data tables (charging model table and discharging model table). During the specific implementation process, the corresponding table is loaded into the memory according to the current mode. During the data loading process, for the charging mode, the segmented voltage threshold (e.g., V1 = 12.3V, V2 = 11.9V, etc.) and nominal time (T1 = 4.5h, T2 = 3.33h, etc.) of the charging model can be read from the non-volatile memory (such as Flash), and the parameters are written to the cache area of the main control chip for real-time calculation and call. For the discharge mode, the segmented parameters of the discharge model (e.g., V1 = 11.9V, V2 = 11.5V, etc., T1 = 4.5h, T2 = 3.33h, etc.) can be loaded; the benchmark data required for dynamic interpolation calculation is updated synchronously.
[0069] In this embodiment, independent segmentation parameters are assigned to the charge / discharge mode to avoid the predicted value jump caused by the voltage threshold difference (such as the maximum threshold of 12.3V in the charge mode vs. the maximum threshold of 11.9V in the discharge mode) when the state switches. As an application scenario example, when the battery switches from charge to discharge mode, if the current voltage is 12.0V:
[0070] Under the charging model, this voltage belongs to the "11.9~12.3V" range, which is mapped to 75% power;
[0071] In the discharge model, since the upper threshold limit is 11.9V, it is necessary to re-match to a higher segment (≥11.9V is mapped to 100%).
[0072] In this embodiment, the independent model isolates the parameter differences between different modes to ensure the continuity of the prediction results. This step achieves the following technical effects through the collaborative design of charge and discharge mode determination → independent model parameter loading → segmented data isolation:
[0073] Improved prediction accuracy, with independent modeling of charge and discharge modes, to avoid jumps in prediction values due to threshold mismatch (e.g., a sudden drop from 100% in charge mode to 75% in discharge mode).
[0074] Resource usage optimization, pre-storage and on-demand loading of parameter tables for different modes, reducing the memory and computing power required for real-time calculations;
[0075] State switching robustness is based on register state de-jitter judgment to ensure the reliability of mode switching judgment.
[0076] Step S300: Periodically obtain the current battery's real-time voltage value. Specifically, the system triggers the voltage acquisition task based on a timer interrupt, with a default period of 10 seconds (configurable range: 5 to 60 seconds). This step periodically obtains the real-time voltage value of the battery module through the hardware interface, providing accurate data input for subsequent dynamic prediction.
[0077] Step S400: Calculate the remaining time based on the segmented model parameters of the current charge and discharge mode. This step dynamically calculates the remaining battery time based on the segmented parameters loaded by the current charge and discharge mode and the real-time voltage value.
[0078] Specifically, according to the segmented model corresponding to the current charge and discharge mode, the real-time voltage value (Vcurrent) is interval-matched with the preset voltage threshold. Taking the charging mode as an example, the voltage segments of the charging model (such as 12.3V, 11.9V, etc.) are compared in sequence to determine the starting voltage threshold V1 and the ending voltage threshold V2 where Vcurrent is located. Each voltage segment interval is associated with a preset nominal remaining time (T1 is the time corresponding to the starting threshold, and T2 is the time corresponding to the ending threshold). For example: in the charging model, if Vcurrent is in the range of 11.9V to 12.3V, then T1 = 3.33 hours (corresponding to 11.9V), and T2 = 4.5 hours (corresponding to 12.3V).
[0079] In the specific calculation process, the remaining time can be calculated proportionally based on the relative position of the current voltage value in the segmented interval. If Vcurrent is between V1 and V2, the time difference is calculated using, for example, a linear relationship between the intervals.
[0080] In order to optimize computing resources, in the specific implementation process, a mapping table of voltage threshold and nominal time of the segmented interval is pre-stored (stored in the Flash of the main control chip), and T1 and T2 are directly obtained by looking up the table to reduce the real-time calculation amount.
[0081] In this embodiment, the segmented parameters of the charge and discharge models are completely isolated, ensuring that threshold differences between modes are not confused during the calculation process. This step is achieved through the coordinated process of segmented parameter matching, linear interpolation calculation, and resource optimization design. Linear interpolation based on independent charge and discharge models can improve prediction accuracy. Table lookup and fixed-point arithmetic reduce the time required for single calculations, making it suitable for low-computing-power main control chips.
[0082] Step S500: Map the remaining time to a preset power percentage and dynamically render prompt information of the remaining time.
[0083] Specifically, based on the nonlinear characteristics of the battery discharge curve and user cognitive habits, the remaining time is mapped to five fixed percentages (100%, 75%, 50%, 25%, and 5%), covering the entire cycle of the battery from full charge to low charge. The gear matching logic is: based on the segmented model of the current charge and discharge mode, the remaining time corresponding to the real-time voltage is determined and allocated to the nearest gear according to the time range, for example:
[0084] In charging mode, if the remaining time is ≥ 4.5 hours, the battery level will be 100%; if the remaining time is 3.33 hours ≤ < 4.5 hours, the battery level will be 75%; if the remaining time is 2.15 hours ≤ < 3.33 hours, the battery level will be 50%, and so on. In discharging mode, if the remaining time is ≥ 4.5 hours, the battery level will be 100%; if the remaining time is 3.33 hours ≤ < 4.5 hours, the battery level will be 75%; if the remaining time is 2.25 hours ≤ < 3.33 hours, the battery level will be 50%, and so on.
[0085] When rendering the remaining time prompt information, you can use a visual progress bar to visualize it. Specifically, the front-end interface periodically modifies the properties of the progress bar element to reflect the change in the battery percentage with an animated transition effect. Of course, you can also display a combination of the remaining time and the percentage as needed, for example: "Remaining battery: 75% (about 3 hours and 20 minutes)". Please refer to Figure 3 , Figure 3 This is a schematic diagram of an example of a visual display of the remaining battery power disclosed in this embodiment. Figure 3 In the figure, the green progress bar indicates the remaining power percentage (i.e. "75%").
[0086] This embodiment converts the remaining time into battery status information that can be intuitively understood by the user through preset power percentage levels, and combines dynamic rendering technology to improve the readability of the user interface.
[0087] Considering that the computing power of the optical modem's main control chip is limited and traditional complex algorithms (such as neural networks) cannot be deployed, in order to achieve low-complexity calculations, in an optional embodiment, in step S400, the remaining time is calculated using the following formula:
[0088] T remain =T1+(T2-T1)*(V current -V1) / (V2-V1)……Formula 1
[0089] Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the current power segment starting voltage, and T2 is the nominal remaining time corresponding to the current power segment ending voltage; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
[0090] In this embodiment, the remaining time can be calculated by simple arithmetic operations (addition, subtraction, multiplication and division) of the segmented model parameters, without the need for floating-point arithmetic units or high computing power support. To facilitate those skilled in the art to understand the application scenarios of this formula, the calculation process of this formula is described as follows:
[0091] First, perform segmented interval matching. According to the segmented parameter table of the current charge-discharge mode, determine the voltage interval in which Vcurrent is located. For example, in the discharge mode, Vcurrent = 11.7V, and the matching interval is V1 = 11.5V, V2 = 11.9V;
[0092] Secondly, extract parameters. Read T1 (e.g., 2.25 hours) and T2 (e.g., 3.33 hours) corresponding to this interval from the segmented parameter table.
[0093] Thirdly, perform interpolation calculation. Substitute the parameters into formula 1 to calculate the remaining time T remain , and the parameters in formula 1 are: for example, T1 = 2.25 hours, T2 = 3.33 hours, V1 = 11.5V, V2 = 11.9V, Vcurrent = 11.7V, and the remaining time T can be obtained remain = 2.79 hours.
[0094] In this embodiment, the complex modeling is replaced by the segmented model parameter look-up method: directly call the pre-stored segmented parameters (T1, T2, V1, V2), avoiding the complex operations of real-time fitting of the battery charge-discharge curve, saving the computing power of the main control chip; only four arithmetic operations of addition, subtraction, multiplication, and division are required, adapting to the low-computing-power main control chip of the optical modem, and can significantly reduce the single calculation time-consuming; moreover, the formula only depends on the pre-stored parameter table and four arithmetic operations, with small memory occupancy, adapting to the limited storage resources of the optical modem
[0095] In addition, independent segmented parameters are set for different charge-discharge modes. For example, the segmented thresholds (12.3V, 11.9V) in the charging mode are isolated from those in the discharge mode (11.9V, 11.5V), avoiding cross-mode prediction deviations and also avoiding the jump of predicted values caused by model confusion when the AC power supply is frequently plugged and unplugged (such as 83% display at 12.0V in the charging mode and 100% display at 12.0V in the discharge mode); within a single voltage segmented interval, the battery voltage and the remaining time are approximately linearly related, effectively reducing the interpolation calculation error.
[0096] To achieve load linkage calibration, in an optional embodiment, in step S400, when it is detected that the non-core load is turned off, the remaining time is corrected according to a preset weight:
[0097]
[0098] where, T a remain is the corrected remaining time, k is the endurance extension coefficient when the load is turned off, 0 < k ≤ 0.2; the non-core load includes at least one of the CATV module, USB peripheral service, guest service, and network protocol stack; in step S500, the corrected remaining time is mapped to a preset power percentage.
[0099] In this embodiment, the so-called non-core load refers to non-core functional modules that can be dynamically shut down as preset by the system, including: the CATV module, USB peripheral services, guest services, network protocol stacks, etc. The CATV module provides cable TV signal forwarding services; USB peripheral services are non-real-time functions such as printer sharing and storage device mounting; guest services are guest Wi-Fi hotspots independent of the main network; the network protocol stack includes non-essential protocols (such as IPv6 transition protocols and LLDP protocols).
[0100] In the specific implementation process, k is a preset static weight value, and its value range is 0 < k ≤ 0.2. The specific value is dynamically superimposed according to the types and quantities of the loads to be shut down. If multiple non-core loads are shut down, the k values of each module are accumulated, but the total sum does not exceed 0.2. Specifically, see the following formula 3:
[0101]
[0102] In formula 3, k total is the accumulated value of the k values of each module when multiple non-core loads are shut down.
[0103] In the specific implementation process, after calculating T in step S400 remain , detect the types and quantities of the currently shut-down non-core loads; then, accumulate the k values according to the types of the loads shut down, and calculate k total ; finally, correct the remaining time according to the formula. For example: the original T remain = 3 hours, and the CATV module is shut down (k = 0.08). At this time, the corrected remaining time T a remain = 3 × 1.08 = 3.24 hours. That is, the corrected remaining time is 3.24 hours.
[0104] After that, re-match the corrected remaining time T a remain to the preset power levels (100%, 75%, 50%, etc.). For example: if the original T remain = 3 hours, corresponding to 75%, and the corrected T a remain = 3.24 hours may still belong to the 75% level (if the time threshold for the level is 3.33 hours), or be upgraded to the 100% level (depending on the segmented model parameters).
[0105] In this embodiment, the remaining time is dynamically calibrated in combination with the load status, thereby reducing the prediction error and improving the prediction accuracy. The visual prompt helps the user understand the impact of load shutdown on battery life and guides reasonable usage habits (such as actively shutting down the guest Wi-Fi to extend battery life). In short, by dynamically coupling the load status with the battery model, the problem of prediction deviation caused by ignoring load fluctuations in the prior art is solved.
[0106] In order to realize dynamic management of the system's power consumption, in an optional embodiment, between step S100 and step S400, it also includes: step S110, when the battery module is currently in discharge mode, calculating the system power consumption upper limit Padjust based on the dynamic power consumption model formula; step S120, when the real-time system power consumption exceeds the system power consumption upper limit Padjust, triggering the non-core load classification shutdown process.
[0107] During the process of triggering the non-core load hierarchical shutdown process, the following non-core loads can be shut down according to priority:
[0108] Close the USB peripheral service and cut off the power supply to the storage device;
[0109] Disable the guest wireless access point while maintaining the main wireless access point's transmit power on both the 2.4GHz and 5GHz bands;
[0110] Disable the IPv6 protocol processing thread and keep the full functionality of the IPv4 protocol stack running, ensuring that the ARP resolution, NAT forwarding, and DHCPv4 services of the IPv4 protocol are not affected, and the packet processing delay is ≤5ms.
[0111] In the specific implementation process, the dynamic power consumption model formula is to calculate the allowable system power consumption upper limit Padjust based on the real-time battery voltage Vreal and temperature T. Specifically:
[0112]
[0113] Where Padjust is the upper limit of the allowed system power consumption, Pbase is the initial system power consumption baseline value, Vnominal is the nominal battery voltage, Vreal is the real-time battery voltage, T0 is the ambient reference temperature, T is the ambient temperature, and k1 is the power consumption reduction coefficient. When the real-time system power consumption exceeds the upper limit of the system power consumption Padjust, the non-core load hierarchical shutdown process is triggered.
[0114] As an example, the initial power consumption reference value Pbase can be set to, for example, 11.8W; the battery nominal voltage Vnominal is, for example, 11.1V; the ambient reference temperature T0 is 25°C; and the power consumption reduction coefficient k1 is, for example, 0.015 / °C, indicating that for every 1°C increase in temperature, the power consumption is allowed to decrease by 1.5% to offset the internal resistance loss and prevent the battery from overheating.
[0115] In this formula, is the voltage correction term, thus achieving linear compensation of voltage for power. Specifically, the actual output voltage (Vreal) of the battery gradually decreases during the discharge process. When Vreal < Vnominal (nominal voltage, such as 11.1V), the system needs to reduce the load power consumption to avoid current overload. Specifically, according to the formula I = P / V, when the voltage V decreases and the power P remains unchanged, the current I will increase. Through the voltage correction term, the adaptation of the battery discharge curve is achieved. Specifically, the discharge platform of the lithium-ion battery is not completely flat. This correction term scales the base power consumption (Pbase) proportionally to make the load power consumption dynamically match the current actual power supply capacity of the battery. As an example, when the nominal voltage Vnominal = 11.1V and the actual voltage Vreal = 10.8V, the correction coefficient is 10.8 / 11.1 ≈ 0.973, and the system needs to reduce the power consumption by about 2.7%.
[0116] In this formula, 1 - k1(T - T0) is the temperature correction term, which achieves compensation of the battery internal resistance by temperature. Specifically, the battery internal resistance increases with the increase of temperature (especially when T > 25°C), resulting in a reduction of available energy. The coefficient 0.015 / °C means that for every 1°C increase in temperature, the allowed power consumption is reduced by 1.5% to offset the internal resistance loss and prevent the battery from overheating.
[0117] It can be seen that through this formula, dynamic load regulation can be achieved. One is the voltage-dominated power consumption baseline, that is, the upper limit of the current power supply capacity is determined through the voltage correction term. The other is the temperature-driven derating adjustment. When the temperature effect is superimposed, the power consumption is further limited to ensure the battery life and system stability.
[0118] In this embodiment, through the voltage-temperature dual-factor correction, the error of the traditional remaining power estimation is avoided, and the accuracy of triggering the shutdown operation is improved.
[0119] In order to avoid service interruption of the optical modem when power is off while avoiding failure of the optical modem to start up and reducing the damage rate of the power amplifier chip, in an optional embodiment, before step S100, it further includes: when the optical modem enters the initialization stage, cutting off the power supply path of the battery module to initialize the main control chip and peripheral interfaces on the main control board and initialize the system with the power provided by the AC adapter; after the initialization stage ends, connecting the power supply path and enabling the battery module.
[0120] Specifically, the hardware-level power supply isolation mechanism can be used to ensure that the initialization process is completed exclusively by the AC power supply. Specifically, during the entire system initialization cycle (from bootloader loading to system service readiness), the battery power supply path is completely cut off through the physical switch circuit to eliminate the risk of power competition between AC and battery. In the specific implementation process, the hardware switching circuit can be implemented through a MOS tube array, for example, the switching of the power supply path is achieved through a main control switch and an isolation switch group. By achieving bidirectional blocking of the battery path through the MOS tube array, power competition can be eliminated from the physical level, and the isolation action can be ensured to be real-time based on the direct connection of the hardware signal.
[0121] Under the premise that the battery power supply path is hardware-isolated, the system initialization is completed using the exclusive AC power supply. In other words, the system initialization is completed in an environment that completely eliminates battery power interference. The initialization of the main control chip includes hard reset and memory initialization.
[0122] In this embodiment, by building a security baseline for optical modem power management, the startup conflict and hardware damage problems caused by battery integration are fundamentally solved.
[0123] In this embodiment, after system initialization is complete, a controlled power path switching and battery management strategy achieve a seamless transition from AC power to battery power. This ensures that even if the AC adapter loses power, the battery module can still provide backup power to the main control board, thereby ensuring uninterrupted network operation.
[0124] In a home application scenario, when a sudden mains outage (such as a lightning storm) causes a power outage, the system seamlessly switches to battery power within 10ms. Mobile devices like phones and tablets used by family members experience no lag (packet loss rate <0.01%) during real-time services like video calls and online classes. Battery-powered IoT devices like children's smartwatches and home security cameras also remain online, preventing the risk of security interruptions.
[0125] This embodiment also discloses a device for predicting the battery life of an optical modem. A battery module is provided in the optical modem to provide a backup power supply to the main control board. Figure 4 , Figure 4 This is a schematic diagram of the structure of a battery life prediction device for an optical modem disclosed in this embodiment. The battery life prediction device includes: a mode acquisition module 100, a segmented parameter selection module 200, a voltage acquisition module 300, a remaining time calculation module 400, and a remaining time rendering module 500, wherein:
[0126] The mode acquisition module 100 is used to obtain the current charge and discharge mode of the battery module, which includes a charging mode or a discharging mode; the segmented parameter selection module 200 is used to select the corresponding voltage segmentation threshold and nominal remaining time according to the charge and discharge mode. Specifically, if it is a charging mode, the preset voltage threshold of the charging model and the corresponding first nominal time are loaded; if it is a discharging mode, the preset voltage threshold of the discharge model and the corresponding second nominal time are loaded; wherein the data models between the charging model and the discharging model are independent of each other; the voltage acquisition module 300 is used to periodically obtain the real-time voltage value of the current battery; the remaining time calculation module 400 is used to calculate the remaining time based on the segmented model parameters of the current charge and discharge mode; the remaining time rendering module 500 is used to map the remaining time to a preset percentage of power and dynamically render the prompt information of the remaining time.
[0127] In an optional embodiment, in the remaining time calculation module 400, the remaining time is calculated using the following formula:
[0128] T remain =T1+(T2-T1)*(V current -V1) / (V2-V1)
[0129] Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the current power segment starting voltage, and T2 is the nominal remaining time corresponding to the current power segment ending voltage; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
[0130] This embodiment also discloses an optical modem, comprising: a main control board, a battery module, and a processor, wherein:
[0131] The battery module is built into the optical modem and is used to provide backup power to the main control board;
[0132] The processor is used to execute the program to implement the method disclosed in the above embodiment.
[0133] According to an embodiment of the present invention, a method, device, and router for predicting the battery life of an optical modem are disclosed. The optical modem is equipped with a battery module for providing backup power to the main control board. Under the constraints of the optical modem's limited hardware resources (low-computing power main control chip, miniaturized battery module), the embodiment of the present invention uses independent charging and discharging models to load differentiated segmented parameters for different modes. Then, based on the real-time voltage value, the remaining time is calculated based on the segmented model parameters of the current charging and discharging mode. The segmented model parameters reduce the amount of data operations and the complexity of the calculation. Moreover, compared with the traditional solution that does not distinguish between charging and discharging modes, resulting in a large jump in the predicted value when the battery state switches in the scenario where the AC power is frequently plugged in and out (for example, the charging mode 12.3V displays 100%, and when switching to the discharging mode 11.9V, it drops sharply to 75%). The embodiment of the present invention realizes independent segmented parameter loading of the dual models due to the independent data models between the charging model and the discharging model, solving the problem of prediction jump during state switching, thereby improving the prediction accuracy of battery life. It can be seen that under the limited hardware resources of the optical modem, the accuracy of battery life prediction is improved.
[0134] In addition, the present invention also provides a computer-readable storage medium, such as a chip, an optical disc, etc., on which an execution program is stored. When the execution program is executed, any of the methods described above is implemented.
[0135] It should be noted that the computer-readable storage medium described in the embodiments of the present disclosure is not limited to the embodiments given above, and can also be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0136] It will be understood by those skilled in the art that, under the premise of no conflict, the above-mentioned preferred embodiments can be freely combined and superimposed. Among them, the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. The numbering of each step in this article is only for the convenience of description and reference, and is not used to limit the order of execution. The specific execution order is determined by the technology itself, and those skilled in the art can determine various allowable and reasonable orders based on the technology itself.
[0137] It should be noted that the use of step numbers (letters or numbers) to refer to certain specific method steps in the present invention is solely for the purpose of descriptive convenience and brevity, and is in no way intended to limit the order of these method steps. Those skilled in the art will appreciate that the order of the relevant method steps is determined by the technology itself and should not be unduly limited by the presence of step numbers. Those skilled in the art can determine various permissible and reasonable step orders based on the technology itself.
[0138] Those skilled in the art will appreciate that, provided there is no conflict, the above preferred solutions can be freely combined and superimposed.
[0139] It should be understood that the above-mentioned embodiments are merely illustrative and non-restrictive. Without departing from the basic principles of the present invention, various obvious or equivalent modifications or substitutions that can be made by those skilled in the art to the above-mentioned details will be included in the scope of the claims of the present invention.
Claims
1. A method for predicting the battery life of an optical modem, characterized in that: The optical modem is provided with a battery module for providing backup power to the main control board. The battery life prediction method includes: Step S100, obtaining the current charge and discharge mode of the battery module, where the charge and discharge mode includes a charge mode or a discharge mode; Step S200, selecting a corresponding voltage segment threshold and nominal remaining time according to the charge and discharge mode. Specifically, if the mode is charging, the preset voltage threshold and the corresponding first nominal time of the charging model are loaded; if the mode is discharging, the preset voltage threshold and the corresponding second nominal time of the discharging model are loaded; wherein the data models of the charging model and the discharging model are independent of each other; Step S300, periodically obtaining the current real-time voltage value of the battery; Step S400, calculating the remaining time based on the segmented model parameters of the current charge and discharge mode; Step S500: Map the remaining time to a preset power percentage and dynamically render prompt information of the remaining time.
2. The optical modem battery life prediction method according to claim 1, wherein: In step S400, the remaining time is calculated using the following formula: T remain =T1+(T2-T1)*(V current -V1) / (V2-V1) Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the starting voltage of the current power segment, and T2 is the nominal remaining time corresponding to the ending voltage of the current power segment; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
3. The optical modem battery life prediction method according to claim 2, wherein: In step S400, when it is detected that the non-core load is turned off, the remaining time is corrected according to a preset weight: Among them, T a remain is the remaining time after correction, k is the endurance extension coefficient when the load is turned off, and 0 < k ≤ 0.2; the non-core load includes at least one of the CATV module, USB peripheral service, guest service, and network protocol stack; In step S500 , the corrected remaining time is mapped to a preset power percentage.
4. The optical modem battery life prediction method according to claim 3, wherein: The method further includes between step S100 and step S400: Step S110 , when the battery module is currently in the discharge mode, calculating the system power consumption upper limit Padjust based on the dynamic power consumption model formula; Step S120 : When the real-time system power consumption exceeds the system power consumption upper limit Padjust, a non-core load hierarchical shutdown process is triggered.
5. The optical modem battery life prediction method according to any one of claims 1 to 4, characterized in that: In the step S500, a plurality of power percentage levels are preset, and the step S500 includes mapping the remaining time to the power percentage of the preset level, and dynamically rendering a visual progress bar and remaining time prompt information.
6. The optical modem battery life prediction method according to any one of claims 1 to 4, characterized in that: Before step S100, the method further includes: When the optical modem enters the initialization phase, the power supply path of the battery module is cut off, so as to use the power provided by the AC adapter to initialize the main control chip and the peripheral interface on the main control board, and initialize the system; After the initialization phase is completed, the power supply path is connected and the battery module is enabled.
7. A device for predicting battery life of an optical modem, characterized in that: The optical modem is provided with a battery module for providing backup power to the main control board. The battery life prediction device includes: A mode acquisition module (100) is used to acquire the current charge and discharge mode of the battery module, wherein the charge and discharge mode includes a charge mode or a discharge mode; A segmentation parameter selection module (200) is used to select a corresponding voltage segmentation threshold and a nominal remaining time according to the charge and discharge mode. Specifically, if it is a charge mode, the preset voltage threshold and the corresponding first nominal time of the charge model are loaded; if it is a discharge mode, the preset voltage threshold and the corresponding second nominal time of the discharge model are loaded; wherein the data models between the charge model and the discharge model are independent of each other; A voltage acquisition module (300) is used to periodically obtain the current real-time voltage value of the battery; A remaining time calculation module (400) is used to calculate the remaining time based on the segmented model parameters of the current charge and discharge mode; The remaining time rendering module (500) is used to map the remaining time to a preset power percentage and dynamically render prompt information of the remaining time.
8. The optical modem battery life prediction device according to claim 7, wherein: In the remaining time calculation module (400), the remaining time is calculated using the following formula: T remain =T1+(T2-T1)*(V current -V1) / (V2-V1) Among them, T remain is the remaining time, T1 is the nominal remaining time corresponding to the starting voltage of the current power segment, and T2 is the nominal remaining time corresponding to the ending voltage of the current power segment; V current is the current real-time voltage of the battery, V1 is the starting voltage threshold of the current power segment, and V2 is the ending voltage threshold of the current power segment.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program stored in the storage medium is used to be executed by a processor to implement the method according to any one of claims 1 to 6.
10. An optical modem, characterized in that: include: Main control board; A battery module, built into the optical modem, for providing backup power to the main control board; A processor, configured to execute a program to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Estimating method and device for remaining time of battery, battery cell, battery and aircraft
CN108896928A
Electric quantity display method and device and electronic equipment
CN110579712A
Lithium battery electric quantity measuring method and system
CN111289909A
Discharge remaining time calculation method and device and computer equipment
CN113640691A
Optical storage system control method, control circuit, optical storage system and electronic equipment
CN114336821A