Electronic equipment control method and device, electronic equipment and readable storage medium

By determining the second voltage threshold in the electronic device based on the battery internal resistance and the voltage threshold of UVLO shutdown, and performing the shutdown operation when the battery voltage reaches this threshold, data loss and hardware damage caused by UVLO shutdown are solved, and better protection of the electronic device is achieved.

CN120238607APending Publication Date: 2025-07-01VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510448984.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the prior art, electronic devices are prone to triggering undervoltage lockout (UVLO) shutdown in low voltage states, resulting in data loss, file corruption, shortened memory chip life and battery aging, and lack of effective solutions.

Method used

By introducing a control method in the electronic device, a second voltage threshold is determined based on the internal resistance of the battery and a third voltage threshold for triggering the UVLO shutdown, and a shutdown operation is performed when the battery voltage reaches or is lower than the second voltage threshold to avoid the occurrence of the UVLO shutdown.

Benefits of technology

This method performs a shutdown operation before triggering the UVLO shutdown, thereby protecting the software and hardware of the electronic device and reducing the damage to the electronic device by the UVLO shutdown.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238607A_ABST
    Figure CN120238607A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic equipment control method and device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment. The method comprises the following steps: when the battery voltage of the electronic equipment is less than or equal to a first voltage threshold, determining a second voltage threshold according to the battery internal resistance of the electronic equipment and a third voltage threshold; the third voltage threshold is used for triggering undervoltage locking shutdown, and the second voltage threshold is greater than the third voltage threshold; and executing shutdown operation under the condition that the battery voltage and the second voltage threshold meet the first condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of electronic devices, and particularly relates to a method and device for controlling an electronic device, an electronic device, and a readable storage medium. Background Art

[0002] When the battery of an electronic device is in a low-voltage state, the impedance of the battery is relatively high. When obtaining power from a battery with a relatively high impedance, the voltage of the battery will drop significantly, such that a slightly larger load may trigger an Undervoltage Lockout (UVLO) shutdown, automatically cutting off the power supply to protect the circuit and other components from potential damage.

[0003] However, UVLO shutdowns can cause damage at both the software level and the hardware level, such as data loss, file corruption, shortened storage chip lifespan, and battery aging. Currently, there is no effective solution to UVLO shutdowns, resulting in frequent occurrences of UVLO shutdowns, causing long-term damage to both the software and hardware levels of the electronic device. Summary of the Invention

[0004] The objective of the embodiments of this application is to provide a method and device for controlling an electronic device, an electronic device, and a readable storage medium, which can reduce the damage caused by UVLO shutdowns to the electronic device at both the software level and the hardware level.

[0005] In a first aspect, the embodiments of this application provide a method for controlling an electronic device. The method includes: when the battery voltage of the electronic device is less than or equal to a first voltage threshold, determining a second voltage threshold according to the internal resistance of the battery of the electronic device and a third voltage threshold; the third voltage threshold is used to trigger an undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold; when the battery voltage and the second voltage threshold meet a first condition, performing a shutdown operation.

[0006] In a second aspect, the embodiments of this application provide a device for controlling an electronic device. The device includes: a determination module and an execution module; the determination module is configured to, when the battery voltage of the electronic device is less than or equal to a first voltage threshold, determine a second voltage threshold according to the internal resistance of the battery of the electronic device and a third voltage threshold; the third voltage threshold is used to trigger an undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold; the execution module is configured to perform a shutdown operation when the battery voltage and the second voltage threshold meet a first condition.

[0007] In a third aspect, the embodiments of this application provide an electronic device. The electronic device includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0008] Fourthly, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] Fifthly, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0010] Sixthly, an embodiment of the present application provides a computer program / program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0011] In an embodiment of the present application, when the battery voltage of the electronic device is less than or equal to the first voltage threshold, the second voltage threshold is determined according to the battery internal resistance of the electronic device and the third voltage threshold. When the battery voltage and the second voltage threshold meet the first condition, a shutdown operation is performed, where the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold. Through this solution, a shutdown operation can be performed before triggering UVLO shutdown, protecting the electronic device at both the software level and the hardware level, thereby reducing the damage to the electronic device at the software level and the hardware level caused by UVLO shutdown. Description of the Drawings

[0012] Figure 1 is one of the flowcharts of the electronic device control method provided by the embodiment of the present application;

[0013] Figure 2 is another flowchart of the electronic device control method provided by the embodiment of the present application;

[0014] Figure 3 is a third flowchart of the electronic device control method provided by the embodiment of the present application;

[0015] Figure 4 is a fourth flowchart of the electronic device control method provided by the embodiment of the present application;

[0016] Figure 5 is a fifth flowchart of the electronic device control method provided by the embodiment of the present application;

[0017] Figure 6 is a schematic diagram of the electronic device control device provided by the embodiment of the present application;

[0018] Figure 7 is a schematic diagram of the electronic device provided by the embodiment of the present application;

[0019] Figure 8It is a schematic diagram of the hardware of the electronic device provided by the embodiments of the present application. Detailed implementation manners

[0020] Next, the technical solutions in the embodiments of the present application will be clearly described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.

[0021] The terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.

[0022] The term "indication" in the present application can be either a direct indication (or an explicit indication) or an indirect indication (or an implicit indication). Among them, a direct indication can be understood as that the sender clearly informs the receiver of specific information, operations to be performed, or request results, etc. in the sent indication; an indirect indication can be understood as that the receiver determines the corresponding information according to the indication sent by the sender, or makes a judgment and determines the operations to be performed or request results, etc. according to the judgment result.

[0023] The terms "at least one (item)", "at least one of", etc. in the description and claims of the present application refer to any one, any two, or a combination of two or more of the included objects. For example, at least one (item) of a, b, and c can represent: "a", "b", "c", "a and b", "a and c", "b and c", and "a, b, and c", where a, b, and c can be single or multiple. Similarly, "at least two (items)" means two or more, and its expressed meaning is similar to that of "at least one (item)".

[0024] Next, some concepts and terms involved in the electronic device control method, device, electronic device, and readable storage medium provided by the embodiments of the present application will be explained.

[0025] UVLO: For the normal operation of electronic components, there are certain requirements for the minimum voltage. When the power supply voltage is lower than the preset threshold, the UVLO function will automatically cut off the power supply to protect the circuit and components from potential damage.

[0026] Among them, the hazards of UVLO shutdown include:

[0027] I. Hazards at the software level:

[0028] 1. If the current operations of the user, such as editing documents, inputting information, etc., are not saved before the electronic device shuts down, it may lead to data loss.

[0029] 2. If the power failure occurs exactly during the process of file reading and writing, it may cause file corruption.

[0030] 3. The power failure may cause the application process to abort abnormally; when the application is restarted, it may behave abnormally and the application needs to be reinstalled or reset.

[0031] 4. Frequent abnormal shutdowns may have a long-term impact on the operating system, increasing system instability and even causing more system crashes or startup problems.

[0032] II. Hazards at the hardware level:

[0033] 1. The sudden power-off of the electronic device may cause the flash write to be interrupted, leading to file system corruption or shortening of the storage chip lifespan.

[0034] 2. The battery voltage frequently dropping to the critical point that triggers UVLO shutdown will accelerate the aging and capacity loss of the battery.

[0035] 3. The current surges during operation at extremely low voltages or during the secondary sudden power recovery process may put pressure on some sensitive components on the circuit board in the electronic device.

[0036] Non-Volatile Random Access Memory (NVRAM): A storage medium that can be repeatedly erased and written and retains data when powered off.

[0037] PID: Generates a control quantity through weighted summation (P + I + D), dynamically adjusts the controlled object, and makes the system output approach the set value.

[0038] Battery Internal Resistance: It refers to the resistance that the battery generates to the flow of current during operation. It is the sum of various internal impedances of the battery, reflecting the magnitude of energy loss during battery discharge or charge. The existence of internal resistance causes the output voltage of the battery to be lower than its ideal electromotive force and generates heat during high-current operation. Understanding battery internal resistance helps optimize battery design, evaluate battery health status, and predict device battery life, etc.

[0039] Software Shutdown: It refers to the process of shutting down an electronic device through operating system or related software instructions, which can ensure the safe preservation of data and the stable shutdown of the system.

[0040] Among them, the software shutdown process involves the coordinated work of multiple steps and components to ensure that the device can safely close all activities and save data before power-off. Specifically, it includes:

[0041] 1. User triggers the shutdown request: The shutdown process is usually triggered by the user's operation, which can be done in the following ways:

[0042] Long press the power button: When the user long presses the power button, the system will pop up a shutdown dialog box, and the user selects shutdown;

[0043] Shutdown option in system settings: The user selects shutdown in the settings;

[0044] ADB command: Developers or debuggers trigger shutdown through ADB commands, such as adb shell reboot -p.

[0045] 2. PowerManagerService receives and processes the shutdown request: The shutdown request is received and processed by PowerManagerService. PowerManagerService is the core service for power management in the system, responsible for managing operations such as device power-on, power-off, sleep, and wake-up. When PowerManagerService receives a shutdown request, it calls the shutdownOrReboot() method and creates a shutdown thread ShutdownThread according to the type of request (shutdown or reboot), and enters the shutdown process.

[0046] 3. Start the shutdown thread (ShutdownThread): ShutdownThread is the main executor of the shutdown process. Its main steps include:

[0047] Display shutdown prompt: ShutdownThread first displays a shutdown prompt interface to notify the user that the device is shutting down. It usually includes a shutdown animation or a static shutdown progress interface to avoid accidental misoperations.

[0048] Stop application processes: Before performing the actual shutdown operation, the ShutdownThread notifies the system management service, ActivityManagerService, to stop all non-critical application processes. This includes calling the stopNonSystemProcesses() method of ActivityManagerService to gradually shut down each process, ensuring that the applications stop and release resources before shutdown.

[0049] Synchronize file system data: To ensure data consistency, the ShutdownThread synchronizes the stored data through the StorageManagerService, ensuring that all unwritten data is written to the file system before shutdown.

[0050] Through the above steps, the software shutdown process ensures that the device can safely close all activities and save data before power-off, thus protecting user data and device hardware.

[0051] The following will, with reference to the accompanying drawings, explain in detail the electronic device control method, device, electronic device, and readable storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.

[0052] The electronic device control method provided by the embodiments of the present application can be applied to scenarios where an electronic device is used under conditions such as low voltage, low temperature, and heavy load.

[0053] Exemplarily, when a user is using an electronic device to edit a document, if the battery voltage of the electronic device is less than or equal to voltage threshold A, the electronic device can determine voltage threshold B based on the battery internal resistance of the electronic device and voltage threshold C, where voltage threshold C is used to trigger UVLO shutdown and voltage threshold B is greater than voltage threshold C; and when the battery voltage and voltage threshold B meet specific conditions (for example, the number of times the battery voltage is less than or equal to voltage threshold B reaches a preset number of times), a shutdown operation is performed to avoid triggering UVLO shutdown and prevent data loss of the document edited by the user.

[0054] Exemplarily, when a user is using an electronic device to copy a file, if the battery voltage of the electronic device is less than or equal to voltage threshold a, the electronic device can determine voltage threshold b based on the battery internal resistance of the electronic device and voltage threshold c, where voltage threshold c is used to trigger UVLO shutdown and voltage threshold b is greater than voltage threshold c; and when the battery voltage and voltage threshold b meet specific conditions (for example, the number of times the battery voltage is less than or equal to voltage threshold b reaches a preset number of times), a shutdown operation is performed to avoid triggering UVLO shutdown and prevent damage to the file copied by the user.

[0055] It should be noted that the above application scenarios are only used to illustrate the electronic device control method provided by the embodiments of the present application. In actual implementation, the electronic device control method provided by the embodiments of the present application can also be applied to any scenario where an electronic device is used, and the embodiments of the present application do not make any limitations.

[0056] Through the electronic device control method provided by the embodiments of the present application, when the battery voltage is less than or equal to the first voltage threshold, a second voltage threshold greater than the third voltage threshold can be determined first based on the battery internal resistance and the third voltage threshold for triggering undervoltage lockout (UVLO) shutdown, and then a shutdown operation is performed when the battery voltage and the second voltage threshold meet specific conditions. Thus, software shutdown can be triggered before triggering UVLO shutdown, and through software shutdown, the electronic device can be protected at both the software level and the hardware level, so that the damage to the electronic device caused by UVLO shutdown can be reduced.

[0057] It should be noted that for the electronic device control method provided by the embodiments of the present application, the execution subject can be an electronic device control device, an electronic device, or a functional module in the electronic device, etc. In some embodiments of the present application, the example of an electronic device executing the electronic device control method is used to illustrate the electronic device control method provided by the embodiments of the present application.

[0058] Figure 1 The flowchart of the electronic device control method provided by the embodiments of the present application is shown. As Figure 1 shown, the electronic device control method provided by the embodiments of the present application may include the following steps 101 and 102.

[0059] Step 101: When the battery voltage of the electronic device is less than or equal to the first voltage threshold, the electronic device determines a second voltage threshold according to the battery internal resistance of the electronic device and the third voltage threshold.

[0060] Among them, the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold.

[0061] Optionally, in the embodiments of the present application, the first voltage threshold may be preset by the system or may be arbitrarily set by the user according to actual usage requirements.

[0062] It can be understood that when the battery voltage is less than or equal to the first voltage threshold, it can be considered that the battery of the electronic device is in a low voltage state. At this time, the electronic device control method provided by the embodiments of the present application can be executed to avoid the occurrence of UVLO shutdown.

[0063] Exemplarily, taking the first voltage threshold as preset by the system as an example, the electronic device can preset the first voltage threshold as shown in the following table:

[0064] Table 1

[0065] Temperature / cycle 0~300 300~600 600~900 900~1200 >1200 59°~50° 3.5V 3.54V 3.58V 3.6V 3.65V 50°~40° 3.5V 3.54V 3.58V 3.6V 3.65V 40°~30° 3.5V 3.54V 3.58V 3.6V 3.65V 30°~20° 3.51V 3.55V 3.59V 3.61V 3.63V 20°~10° 3.54V 3.58V 3.62V 3.64V 3.65V 10°~0° 3.56V 3.6V 3.64V 3.67V 3.69V 0°~-10° 3.6V 3.64V 3.68V 3.69V 3.71V -10°~-20° 3.7V 3.67V 3.71V 3.73V 3.74V

[0066] As can be seen from the above table, the first voltage threshold increases as the temperature decreases and increases as the battery aging cycle increases. The reason is that the impedance of the battery is strongly correlated with these two factors. The lower the battery temperature, the greater its impedance, and the more charge-discharge cycles the battery has, the greater its impedance. Since most of the shutdown voltages of graphite batteries are set at 3.4V, the first voltage threshold of a new battery at room temperature is set at 3.5V. Because the impedance of a new battery at room temperature is often very low, it can be considered that there is no UVLO risk in the system before 3.5V. Of course, this value is not fixed and can be appropriately designed according to the actual impedance of the battery and the magnitude of the system peak load.

[0067] Optionally, in the embodiments of the present application, the second voltage threshold can be a voltage threshold for triggering software shutdown determined according to the internal resistance of the battery of the electronic device and the third voltage threshold.

[0068] Optionally, in the embodiments of the present application, the first voltage threshold can be greater than the second voltage threshold, or the first voltage threshold can be equal to the second voltage threshold, or the first voltage threshold can be less than the second voltage threshold. That is, the embodiments of the present application do not limit the magnitude relationship between the first voltage threshold and the second voltage threshold.

[0069] Optionally, in the embodiments of the present application, the third voltage threshold can also be referred to as the UVLO shutdown voltage, and when the battery voltage reaches the third voltage threshold, UVLO shutdown is triggered. The specific value of the third voltage threshold depends on the circuit design and is usually between 2.65V and 3.05V.

[0070] For example, in some platform devices, when the battery voltage is lower than 2.65V for more than 2ms, the hardware power-off process will be triggered, that is, UVLO shutdown is triggered.

[0071] It can be understood that the second voltage threshold being greater than the third voltage threshold can enable the electronic device to trigger software shutdown before triggering UVLO shutdown, thereby avoiding the harm caused by UVLO shutdown.

[0072] Optionally, in the embodiments of the present application, the internal resistance of the battery can be obtained by detecting the battery through the AC method or the DC method.

[0073] Among them, the above AC method measures the impedance spectrum by applying an AC signal, for example, an electrochemical impedance spectrum. The above DC method calculates the internal resistance through the voltage change during charging and discharging, for example, the pulsed current method.

[0074] The following details the specific method for the electronic device to determine the second voltage threshold according to the internal resistance of the battery of the electronic device and the third voltage threshold.

[0075] Optionally, in the embodiments of the present application, in combination with Figure 1 , as Figure 2 shown, step 101 above can be specifically implemented by the following step 101a.

[0076] Step 101a: When the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected, the electronic device determines the sum of the first voltage value and the third voltage threshold as the second voltage threshold.

[0077] Wherein, the first voltage value is the product of the first internal resistance value and the additional load current; the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, and the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold.

[0078] Optionally, in the embodiments of the present application, the application startup event is used to represent that the electronic device starts a new application. When no application startup event is detected, it can be considered that the electronic device has not started a new application.

[0079] Optionally, in the embodiments of the present application, the electronic device can start detecting the application startup event when it detects that the battery voltage is less than or equal to the first voltage threshold, and determine the sum of the first voltage value and the third voltage threshold as the second voltage threshold when no application startup event is detected.

[0080] Optionally, in the embodiments of the present application, the above internal resistance compensation value can be: a value obtained by compensating the internal resistance of the battery based on the temperature of the environment where the electronic device is located and the degree of battery aging.

[0081] Optionally, in the embodiments of the present application, the above internal resistance compensation value can be preset by the system, or can be arbitrarily set by the user according to actual usage requirements, or can be determined based on the temperature of the environment where the electronic device is located and the degree of battery aging.

[0082] Optionally, in the embodiments of the present application, when determining the above internal resistance compensation value based on the temperature of the environment where the electronic device is located and the degree of battery aging, the impedance from the battery protection board to the system power supply voltage can also be considered.

[0083] For the specific method of determining the above internal resistance compensation value, reference can be made to the specific description in the related art. To avoid repetition, it will not be elaborated here.

[0084] Optionally, in the embodiments of the present application, if the current battery voltage is to reach the third voltage threshold, a load current needs to be increased, and this load current is the above-mentioned additional load current. For this additional load current, it will be described in detail in the following embodiments. To avoid repetition, it will not be elaborated here.

[0085] Optionally, in the embodiments of the present application, when the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected, the electronic device may first add the battery internal resistance to the above internal resistance compensation value to obtain a first internal resistance value; then multiply the first internal resistance value by the above additional load current to obtain a first voltage value; and finally determine the sum of the first voltage value and the third voltage threshold as the second voltage threshold.

[0086] In the embodiments of the present application, since in the case where the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected, the electronic device may determine the sum of the first voltage value and the third voltage threshold as the second voltage threshold, and the first voltage value is calculated from the battery internal resistance, the internal resistance compensation value, and the additional load current, the second voltage threshold can be determined based on the current system load condition of the electronic device, so that the electronic device can trigger software shutdown based on the current system load condition.

[0087] Optionally, in the embodiments of the present application, in combination with Figure 1 , as Figure 3 shown, step 101 above may be specifically implemented by the following step 101b.

[0088] Step 101b: When the battery voltage is less than or equal to the first voltage threshold and an application startup event is detected, the electronic device determines the sum of the first voltage value, the second voltage value, and the third voltage threshold as the second voltage threshold.

[0089] Wherein, the first voltage value is the product between the first internal resistance value and the additional load current; the second voltage value is the product between the first internal resistance value and the peak power current of the first application; wherein, the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold, and the first application corresponds to the application startup event.

[0090] Optionally, in the embodiments of the present application, when an application startup event is detected, it may be considered that the electronic device has started a new application.

[0091] Optionally, in the embodiments of the present application, the electronic device may start detecting the application startup event when it detects that the battery voltage is less than or equal to the first voltage threshold, and determine the sum of the first voltage value, the second voltage value, and the third voltage threshold as the second voltage threshold when the application startup event is detected.

[0092] Optionally, in the embodiments of the present application, the first application corresponds to the application startup event, which may be understood as that the first application is the newly started application of the electronic device characterized by the detected application startup event.

[0093] Optionally, in the embodiments of the present application, when the number of newly started application programs of the electronic device characterized by the application program startup event is multiple, the first application program may be the most recently started application program among the multiple application programs, that is, the application program most recently started before the current moment of the system.

[0094] For example, assume that in the case where the battery voltage is less than or equal to the first voltage threshold, if an application program startup event is detected when the battery voltage is less than or equal to the first voltage threshold, and the detected application program startup event characterizes that application program 1 and application program 2 are newly started in sequence, then application program 2 is the first application program.

[0095] Optionally, in the embodiments of the present application, for commonly used application programs, the peak power current of each application program can be obtained through in-factory measurement and pushed by Over-the-Air Technology (OTA), so that the electronic device can obtain the peak power current of each application program.

[0096] It should be noted that for the peak power current of application programs that have not been obtained through in-factory measurement, the peak power current can be detected locally on the client side, and the application program and the detected peak power current of the application program can be saved locally.

[0097] For other descriptions in step 101b, reference can be made to the relevant descriptions in step 101a above. To avoid repetition, they will not be elaborated here.

[0098] In the embodiments of the present application, since in the case where the battery voltage is less than or equal to the first voltage threshold and an application program startup event is detected, the electronic device can determine the sum of the first voltage value, the second voltage value, and the third voltage threshold as the second voltage threshold, and the first voltage value is calculated from the battery internal resistance, the internal resistance compensation value, and the additional load current, and the second voltage value is calculated from the battery internal resistance, the internal resistance compensation value, and the peak power current of the most recently started first application program. Therefore, the second voltage threshold can be determined based on the current system load condition of the electronic device and the peak power current of the newly started application program, so that the electronic device can trigger software shutdown based on the current system load condition and the peak power current of the newly started application program.

[0099] The method for determining the additional load current in the above step 101a and step 101b will be described in detail below.

[0100] Optionally, in the embodiments of the present application, the above additional load current may be a preset load current, or may be a load current determined based on the battery current and the remaining battery capacity of the electronic device.

[0101] Optionally, in the embodiments of the present application, when the above additional load current is a preset load current, the additional load current can be any possible load current such as 1A, 1.5A, or 2A set according to actual usage requirements.

[0102] Optionally, in the embodiments of the present application, when the above additional load current is a load current determined based on the above battery current and battery remaining capacity, anti-fooling and compensation for the additional load current can be achieved based on the battery current and battery remaining capacity.

[0103] Optionally, in the embodiments of the present application, the above battery current and battery remaining capacity can be the current of the battery and the remaining capacity of the battery at the current moment of the system.

[0104] The following is an exemplary description of the specific method for the electronic device to determine the above additional load current based on the above battery current and battery remaining capacity.

[0105] Exemplarily, assume that the above additional load current is ΔI uvlo , the above battery current is I 当前 , and the above battery remaining capacity is SOC. Then the electronic device can determine the additional load current through the following formula (1):

[0106] ΔI uvlo = ω1·ΔI uvlo + ω2·I 当前 + ω3·SOC; (1)

[0107] Wherein, Here, Q represents the battery capacity, that is, the integral of the current, which can be completed by a fuel gauge or obtained by software through polling current integration; Q full represents the full charge capacity of the battery and is the capacity considering aging factors, which can be obtained by a battery health algorithm, Q passed represents the consumed capacity, then SOC represents the remaining capacity of the battery; ω1, ω2, and ω3 respectively represent the corresponding weights.

[0108] From the above formula (1) and the determination method of the above second voltage threshold V shut , it can be seen that:

[0109] The larger the current I 当前 of the current battery, the larger ΔI uvlo and V shut are, and the easier it is to trigger software shutdown, indicating that the larger the load, the easier it is to reach UVLO;

[0110] The larger the remaining capacity SOC, the smaller ΔI uvlo and V shut are, indicating that when the remaining capacity of the battery is relatively large, V needs to be loweredshut Prevent shutdown from being triggered when there is still a relatively large capacity, which affects the user's usage duration;

[0111] The weight coefficients ω2 and ω3 change with the remaining capacity of the battery. When the remaining capacity is relatively large, the weight corresponding to SOC, that is, SOC, should be the main one; conversely, when the remaining capacity is small, the weight of the current magnitude ω2 is the main one.

[0112] ω1 is affected by the battery aging factor. As the battery ages, ω1 is amplified according to a certain proportion with reference to the battery impedance size, but attention should be paid to the boundary.

[0113] Do a foolproof design for the parameters of ω1, ω2, ω3, and ΔI uvlo and V shut to prevent the calculation of unexpected results in extreme cases, which may lead to premature shutdown or trigger a real UVLO shutdown.

[0114] Evaluate the effectiveness of SOC. If SOC is distorted, it may also cause premature shutdown or UVLO. Calculate the ZCV voltage through the loaded voltage, loaded current, and internal resistance of the battery, and then reverse-lookup the ZCV table to obtain the corresponding SOC ZCV If the difference between SOC and SOC ZCV is relatively large, then SOC cannot be used as a judgment condition.

[0115] Optionally, in the embodiments of the present application, generally, ω1, ω2, and ω3 can be initialized with an empirical value (also called an expert value). However, during the actual operation of the algorithm logic, overshoot or undershoot results may occur. In the shutdown operation method provided by the embodiments of the present application, the extreme test method can be used to optimize these three parameters. The specific steps are as follows:

[0116] Step A: Prepare two groups of batteries for the same project. One group is a new battery, and the other group is an aged battery after 1000 charge-discharge cycles.

[0117] Step B: Test the two groups of batteries respectively in two dimensions: battery temperature and system load.

[0118] Step C: Let UVLO occur through extreme testing, and retain the data at the scene where the UVLO problem occurs to adjust the ω series parameters until UVLO just does not occur. On this basis, leave some margin as the final setting value.

[0119] Step D: Perform linear interpolation calculation on the ω series data of the new battery and the old battery measured in the two dimensions of battery temperature and system load to obtain the values of the ω series parameters corresponding to other cycles.

[0120] Assume that when an additional 1A load current is added and it reaches just before UVLO, the software initiates the software shutdown process in advance to avoid accidental shutdown caused by increased load or continuous load leading to the battery voltage dropping below the UVLO voltage. From the above algorithm, it can be seen that there are three situations that are likely to trigger the software shutdown process (that is, the factors causing V shut to increase):

[0121] I peak The larger it is, the more likely it is to trigger;

[0122] ΔI uvlo The larger it is, the more likely it is to trigger;

[0123] The larger the sum of the battery internal resistance and the above internal resistance compensation value is, the more likely it is to trigger. When the internal resistance increases, a slight increase in load will result in a greater voltage drop.

[0124] As known from the above algorithm, the second voltage threshold V shut is directly affected by the battery internal resistance, the above internal resistance compensation value, the third voltage threshold, I 当前 and SOC, and indirectly affected by the parameters ω1, ω2, and ω3; as long as these parameters are reasonably designed and the boundary condition judgment is done well, the obtained V shut can be directly used as the judgment condition for the shutdown voltage. However, to avoid accidents, anti-fooling needs to be done for V shut because this is the most important variable in the entire solution and affects the final result. The following are several points to note:

[0125] V shut needs to be greater than the third voltage threshold;

[0126] V shut is allowed to be greater than the first voltage threshold, preferably not exceeding 100mV. In this scenario, the shutdown will be triggered immediately after the monitoring process is started;

[0127] V shut It is best to make multiple judgments. When the current battery voltage value reaches V shut three times in a row, the software can initiate the shutdown process.

[0128] In the embodiments of the present application, since the above additional load current can be a preset load current or a load current determined based on the battery current and the remaining battery capacity, the additional load current can be determined by different methods, thereby improving the flexibility of determining the additional load current.

[0129] Step 102: When the battery voltage and the second voltage threshold meet the first condition, the electronic device performs a shutdown operation.

[0130] Optionally, in the embodiments of the present application, for the battery voltage and the second voltage threshold to satisfy the first condition may include: the number of times the battery voltage is less than or equal to the second voltage threshold reaches a preset number of times.

[0131] Optionally, in the embodiments of the present application, the above preset number of times may be preset by the system or may be arbitrarily set by the user according to actual usage requirements.

[0132] For example, taking the above preset number of times as arbitrarily set by the user according to actual usage requirements as an example, the preset number of times may be 1, 3, or 4 set by the user according to actual usage requirements, etc.

[0133] It can be understood that when the above preset number of times is 1, as long as it is detected that the voltage of the battery is less than or equal to the second voltage threshold, the electronic device will perform a software shutdown, thereby protecting the electronic device to a greater extent. When the above preset number of times is greater than 1, it is necessary to detect that the number of times the voltage of the battery is less than or equal to the second voltage threshold reaches multiple times before the electronic device will perform a software shutdown, thereby avoiding software shutdown caused by false detection or voltage jump, etc., to improve the accuracy of performing software shutdown.

[0134] Optionally, in the embodiments of the present application, if within a preset duration, the number of times the voltage of the battery is less than or equal to the second voltage threshold does not reach the preset number of times, the electronic device may delete the relevant data for performing the above electronic device control method this time and re-perform the electronic device control method provided in the embodiments of the present application.

[0135] In the electronic device control method provided in the embodiments of the present application, when the battery voltage is less than or equal to the first voltage threshold, the second voltage threshold greater than the third voltage threshold may be first determined based on the battery internal resistance and the third voltage threshold for triggering UVLO shutdown, and then a shutdown operation is performed when the battery voltage and the second voltage threshold satisfy a specific condition. Thus, software shutdown can be triggered before triggering UVLO shutdown, and the electronic device can be protected at the software level and the hardware level through software shutdown, so as to reduce the damage to the electronic device at the software level and the hardware level caused by UVLO shutdown.

[0136] Optionally, in the embodiments of the present application, in combination with Figure 3 , as Figure 4 shown, before the above step 101b, the electronic device control method provided in the embodiments of the present application may further include the following steps 103 to 105.

[0137] It should be noted that Figure 4 only the following steps 103 to 105 are taken as an example for illustration when executed before the above step 101b. In actual implementation, the execution timing of steps 103 to 105 is not limited.

[0138] Step 103: When the electronic device is in the first state, the electronic device measures the first current of the battery of the electronic device.

[0139] Wherein, in the first state, the application programs of the electronic device are in the closed state, and the screen brightness of the electronic device is the maximum brightness.

[0140] Optionally, in the embodiments of the present application, the screen brightness of the electronic device is the maximum brightness, that is, the screen of the electronic device is in the lit state and the screen brightness is set to the maximum brightness.

[0141] Optionally, in the embodiments of the present application, the application programs of the electronic device are in the closed state, that is, all application programs in the electronic device are in the closed state.

[0142] Optionally, in the embodiments of the present application, the first current may be the current of the battery measured after all application programs are closed and the screen brightness is adjusted to the maximum brightness and the current is stable.

[0143] Step 104: When the electronic device is in the second state, the electronic device measures the second current of the battery of the electronic device.

[0144] Wherein, in the second state, the first application program is in the first running state.

[0145] Optionally, in the embodiments of the present application, the above-mentioned first running state may be a state of running with the maximum load as much as possible. For example, the audio application program plays at the maximum volume, and the video application program plays at the maximum volume and the highest brightness.

[0146] Optionally, in the embodiments of the present application, the second current may be the maximum current among the battery currents measured within a preset duration after the electronic device is in the second state.

[0147] Optionally, in the embodiments of the present application, the above-mentioned preset duration may be preset by the system or may be arbitrarily set by the user according to actual usage requirements.

[0148] For example, taking the above-mentioned preset duration as being preset by the system as an example, the preset duration may be any duration such as 30 seconds, 1 minute, or 2 minutes preset by the system.

[0149] Optionally, in the embodiments of the present application, the above-mentioned maximum current may be the maximum current after removing the current spikes generated by environmental interference.

[0150] Step 105: The electronic device determines the difference between the second current and the first current as the peak power current of the first application program.

[0151] Optionally, in the embodiments of the present application, after determining the peak power current of the first application, the electronic device may store the peak power current of the first application in the NVRAM.

[0152] It should be noted that measuring the peak power current of the application is to calculate whether the "future" will trigger the shutdown voltage value (i.e., the second voltage threshold) set by the software when the application is just added to the running, and if so, execute the software shutdown process in advance. For example, when an application is opened, the power at the beginning of operation is definitely not the maximum, but it may run near its peak power later. Since the peak power time point is unpredictable and it is too late when it actually reaches, it is only possible to make calculations in advance when the application is just opened and make the worst preparations.

[0153] Exemplarily, the specific process for the electronic device to determine the peak power current of the first application is as follows:

[0154] Step 1: Use a programmable power supply with good performance and capable of supplying a large current as a fake battery to supply power to the electronic device system, and connect an oscilloscope to the ibat (battery charging control circuit) of the electronic device to monitor the battery current.

[0155] Step 2: Close all applications in the electronic device, turn on the screen of the electronic device and adjust the screen brightness to the maximum brightness. After the current is stable, measure the current I1 of the battery.

[0156] Step 3: Start the first application and open all functions of the first application to run. Record the highest current of the battery within one minute (the above preset duration) (the current after removing the current spikes generated by environmental interference) as I2.

[0157] Step 4: Calculate the peak power current I of the first application peak = I2 - I1, and store this difference in the NVRAM.

[0158] Optionally, the electronic device may test the peak power currents of other applications according to the above steps, establish a corresponding relationship similar to key-value (key-value pair), and store it in the NVRAM, so as to dynamically determine the second voltage threshold according to the running conditions of different applications.

[0159] In the embodiments of the present application, since the difference between the second current and the first current can be determined as the peak power current of the first application before determining the second voltage threshold, the peak power current of the first application can be accurately determined based on the state of the electronic device first, so that the peak power current can be obtained and used in a timely manner when determining the second voltage threshold, shortening the process of determining the second voltage threshold.

[0160] Optionally, in the embodiments of the present application, in combination with Figure 1 , such as Figure 5 shown, before the above step 101, the electronic device control method provided by the embodiments of the present application may further include the following steps 106 to 109.

[0161] It should be noted that Figure 5 only the following steps 106 to 109 are taken as an example for illustration when they are executed before the above step 101. In actual implementation, the execution timing of steps 106 to 109 is not limited.

[0162] Step 106: When the electronic device is in a stationary state, the electronic device obtains a first voltage of the battery of the electronic device.

[0163] It can be understood that the first voltage is the voltage of the battery when the electronic device is in a stationary state.

[0164] For example, when the electronic device can first turn off the screen and standby for a certain period of time, and the standby average current is relatively stable, it can be considered that the electronic device is in a stationary state. At this time, the voltage of the battery, that is, the first voltage, can be obtained.

[0165] Step 107: The electronic device applies a pulsed current to the battery and obtains at least two voltages of the battery within a first duration.

[0166] It can be understood that the above pulsed current is a current with a fixed magnitude.

[0167] Optionally, in the embodiments of the present application, the electronic device can apply a pulsed current to the battery through an internal current source of the electronic device.

[0168] Optionally, in the embodiments of the present application, the first duration can be preset by the system or can be arbitrarily set by the user according to actual usage requirements.

[0169] For example, taking the first duration as being arbitrarily set by the user according to actual usage requirements as an example, the first duration can be any duration such as 45 seconds, 1 minute, or 1 minute and 30 seconds set by the user according to actual usage requirements.

[0170] Optionally, in the embodiments of the present application, an analog-to-digital converter (ADC) inside the electronic device for collecting the battery voltage can perform continuous sampling and reading of vbat within the first duration, so as to obtain the above at least two voltages.

[0171] Step 108: When the standard deviation of the at least two voltages is less than or equal to a standard deviation threshold, the electronic device subtracts the first voltage from a second voltage among the at least two voltages to obtain a voltage transient change value.

[0172] Optionally, in the embodiments of the present application, the above standard deviation threshold may be preset by the system or may be arbitrarily set by the user according to actual usage requirements.

[0173] Optionally, in the embodiments of the present application, the above standard deviation threshold may be used to evaluate the consistency of a set of data.

[0174] Optionally, in the embodiments of the present application, the second voltage may be any one of the above at least two voltages.

[0175] Optionally, in the embodiments of the present application, the above voltage transient change value may be used to characterize the transient change of the battery terminal voltage caused by the current jump.

[0176] Optionally, in the embodiments of the present application, after the electronic device obtains the above at least two voltages, it may first calculate the standard deviation of the at least two voltages to evaluate the consistency of the at least two voltages. Then, when the standard deviation of the at least two voltages is less than or equal to the standard deviation threshold, it may be considered that the consistency of the at least two voltages is good, and thus the second voltage minus the first voltage in the at least two voltages is used to obtain the voltage transient change value.

[0177] Optionally, in the embodiments of the present application, if the standard deviation of the above at least two voltages is greater than the above standard deviation threshold, it may be considered that the consistency of the at least two voltages is poor. At this time, the at least two voltages may be discarded, and step 107 may be re-executed to obtain a set of voltages until a set of voltages with good consistency is obtained, and the above voltage transient change value is determined according to the set of voltages.

[0178] Step 109: The electronic device determines the battery internal resistance by dividing the voltage transient change value by the amplitude of the pulsed current.

[0179] Optionally, in the embodiments of the present application, after the electronic device determines the battery internal resistance, it may store the battery internal resistance in the NVRAM.

[0180] Optionally, in the embodiments of the present application, the electronic device may perform a detection every predetermined number of charge-discharge cycle times by using the above steps 106 to 109, and store the charge-discharge cycle times and the battery internal resistance measured this time in the form of key-value in the NVRAM.

[0181] Exemplarily, the specific process for the electronic device to determine the battery internal resistance is as follows:

[0182] Prerequisite conditions: The electronic device is in the screen-off standby state for 20 minutes, and the standby average current is relatively stable, and the battery power is sufficient.

[0183] Step a: Read the voltage vbat (the first voltage) of the current battery.

[0184] Step b: Apply a current of a fixed magnitude, i.e., ΔI, to the battery through an internal current source of the electronic device, or generate a load of a fixed magnitude.

[0185] Step c: The ADC that collects the battery voltage inside the electronic device continuously samples and reads vbat within a specified time (the first duration) to obtain the above at least two voltages.

[0186] Step d: Calculate the standard deviation of the above at least two voltages to evaluate the consistency of the data. If the standard deviation is relatively large, discard this set of data, and then re-measure after the conditions are met. If the standard deviation is relatively small, subtract the battery voltage vbat before applying the pulsed current from the voltage with smaller error (the second voltage) collected to obtain ΔV (the voltage transient change value).

[0187] Step e: Divide ΔV by ΔI to obtain the battery internal resistance and save it to the NVRAM.

[0188] Optionally, the electronic device can perform a detection every thirty charge and discharge cycles (cycle = 30), and save the cycle and the rated internal resistance of the battery in the form of key-value to the NVRAM, so as to continuously update the battery internal resistance in the current environment.

[0189] Optionally, in the embodiments of the present application, the key parameters in the method for the electronic device to determine the battery internal resistance are designed as shown in Table 2:

[0190] Table 2

[0191]

[0192] It should be noted that the voltage sampling requires high precision and high speed (microsecond-level response), and the current pulse needs to be short enough (millisecond-level) to avoid the influence of the battery polarization effect on the measurement.

[0193] In the embodiments of the present application, since the battery internal resistance can be determined by the pulsed current method before determining the second voltage threshold, the battery internal resistance can be accurately determined first, so as to obtain the internal resistance of the battery in a timely manner when determining the second voltage threshold, and shorten the process of determining the second voltage threshold.

[0194] Next, the electronic device control method provided by the embodiments of the present application will be exemplarily described.

[0195] Exemplarily, as can be seen from the above analysis, ΔI uvloThe final value determines when to initiate the software shutdown process. The larger the value, the easier it is to trigger. Its final result is affected by the current current, remaining capacity, battery aging factors, and relevant weighting factors. These parameters and coefficients are weighed against each other to evaluate the risk of UVLO occurrence. Similar to the proportional, integral, and differential ideas in the PID algorithm, it can more accurately predict the next condition for UVLO occurrence. Before the condition is reached, the software actively initiates a shutdown to avoid the risk of sudden power-off of the hardware. First, the software can use a kernel thread to monitor UVLO. Through the polling plus event-triggered method. Secondly, considering the system power consumption problem, when the remaining capacity is still very high, the risk of UVLO occurrence is very low. In this case, the monitoring thread can be not enabled to save energy. When the remaining capacity is small, such as when there are only five battery percentage points left or the voltage is lower than the set value, the thread is enabled to monitor and execute the software algorithm. When the battery voltage is getting closer to the shutdown voltage or the load current is larger, the polling speed needs to be increased, especially in low-voltage, low-temperature, and heavy-load scenarios. The software design can be carried out according to the following process:

[0196] 1. Read the internal resistance and peak power current of the battery from NVRAM at startup.

[0197] 2. Register a callback function to the power supply subsystem for listening to event notifications such as battery voltage and battery level.

[0198] 3. Register a callback function for listening to whether there is a new process joining event.

[0199] 4. Create a kernel thread and block it.

[0200] 5. When the power supply change event is issued, judge whether the battery voltage reaches the first voltage threshold in the callback function.

[0201] 6. If the vbat reaches the first voltage threshold, wake up the thread (otherwise continue to block the thread), execute the algorithm logic of the electronic device control method provided in the embodiment of the present application, and calculate the second voltage threshold according to the current system load condition and the internal resistance and peak power current obtained in step 1.

[0202] 7. Judge whether the current battery voltage vbat reaches the second voltage threshold.

[0203] 8. If the vbat reaches the second voltage threshold three times in a row, that is, when trigger_count++ is 3 (with a 1s delay for each polling), execute the software shutdown process. Otherwise, clear trigger_count and continue to detect.

[0204] 9. Monitor the event of a new program being added. When a new program is added, obtain the corresponding peak power current, substitute it into the above algorithm formula to calculate the corresponding second voltage threshold, then execute steps 6 and 7 and forcibly set trigger_count to 3, and then execute step 8.

[0205] The pseudo-code corresponding to the above method is as follows:

[0206]

[0207]

[0208]

[0209]

[0210]

[0211] In this way, when the battery voltage is less than or equal to the first voltage threshold, the second voltage threshold greater than the third voltage threshold can be determined based on the battery internal resistance and the third voltage threshold for triggering UVLO shutdown first, and then the shutdown operation is executed when the battery voltage and the second voltage threshold meet specific conditions. Thus, software shutdown can be triggered before triggering UVLO shutdown, and the electronic device can be protected at the software level and the hardware level through software shutdown, so as to reduce the damage to the electronic device at the software level and the hardware level caused by UVLO shutdown.

[0212] It should be noted that the electronic device control method provided in the embodiments of the present application is also applicable to other electronic products such as tablets, smart watches, earphones and other intelligent terminals. At the same time, functions such as PPB / PT function and performance management function can be combined to perform load management on the operation of the mobile phone when the power is low, and initiate the normal software shutdown process at an appropriate time, which is crucial for the battery safety, data protection and hardware protection of the mobile phone.

[0213] Each of the above method embodiments, or various possible implementation manners in each method embodiment, can be executed alone, or, on the premise of no contradiction, can also be executed in combination with each other, which can be specifically determined according to actual usage requirements, and the embodiments of the present application do not limit this.

[0214] For the electronic device control method provided in the embodiments of the present application, the execution subject can be an electronic device control device. In the embodiments of the present application, taking the electronic device control device executing the electronic device control method as an example, the electronic device control device provided in the embodiments of the present application is described.

[0215] As Figure 6As shown in the figure, an embodiment of the present application provides an electronic device control device 60, which may include: a determination module 61 and an execution module 62.

[0216] Among them, the determination module 61 can be used to determine a second voltage threshold according to the battery internal resistance of the electronic device and a third voltage threshold when the battery voltage of the electronic device is less than or equal to the first voltage threshold; the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold. The execution module 62 can be used to perform a shutdown operation when the battery voltage and the second voltage threshold meet the first condition.

[0217] In a possible implementation, the determination module 61 can specifically be used to determine the sum of the first voltage value and the third voltage threshold as the second voltage threshold when the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected; where the first voltage value is: the product of the first internal resistance value and the additional load current; the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, and the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold.

[0218] In a possible implementation, the determination module 61 can specifically be used to determine the sum of the first voltage value, the second voltage value, and the third voltage threshold as the second voltage threshold when the battery voltage is less than or equal to the first voltage threshold and an application startup event is detected; where the first voltage value is: the product of the first internal resistance value and the additional load current; the second voltage value is: the product of the first internal resistance value and the peak power current of the first application; where the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold, and the first application corresponds to the application startup event.

[0219] In a possible implementation, the electronic device control device 60 may further include a measurement module. The measurement module can be used to measure the first current of the battery of the electronic device when the electronic device is in the first state; in the first state, the application of the electronic device is in the off state and the screen brightness of the electronic device is the maximum brightness; and when the electronic device is in the second state, measure the second current of the battery of the electronic device; in the second state, the first application is in the first running state. The determination module 61 can also be used to determine the difference between the second current and the first current as the peak power current of the first application.

[0220] In a possible implementation, the above additional load current can be a preset load current, or can be a load current determined based on the battery current and the remaining battery capacity of the electronic device.

[0221] In a possible implementation, the electronic device control device 60 may further include an acquisition module. The acquisition module may be configured to, when the electronic device is in a stationary state, acquire a first voltage of the battery of the electronic device; apply a pulsed current to the battery, and acquire at least two voltages of the battery within a first duration; and when the standard deviation of the at least two voltages is less than or equal to a standard deviation threshold, subtract the first voltage from a second voltage among the at least two voltages to obtain a voltage transient change value. The determination module 61 may further be configured to determine the quotient of the voltage transient change value and the amplitude of the pulsed current as the internal resistance of the battery described above.

[0222] In the electronic device control device provided in the embodiments of the present application, when the battery voltage is less than or equal to a first voltage threshold, the electronic device control device may first determine a second voltage threshold greater than a third voltage threshold based on the internal resistance of the battery and the third voltage threshold for triggering UVLO shutdown, and then perform a shutdown operation when the battery voltage and the second voltage threshold meet specific conditions. Thus, software shutdown can be triggered before UVLO shutdown, and through software shutdown, the electronic device can be protected at both the software level and the hardware level, so that the damage to the electronic device caused by UVLO shutdown at the software level and the hardware level can be reduced.

[0223] The electronic device control device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0224] The electronic device control device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0225] The electronic device control device provided by the embodiments of the present application can implement each process implemented by the above method embodiments, achieving the same technical effects. To avoid repetition, it will not be elaborated here.

[0226] As Figure 7 shown, the embodiments of the present application further provide an electronic device 100, including a processor 101 and a memory 102. A program or instruction that can run on the processor 101 is stored on the memory 102. When the program or instruction is executed by the processor 101, it implements each step of the above-mentioned electronic device control method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0227] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.

[0228] Figure 8 It is a schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.

[0229] As Figure 8 shown, the electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0230] Those skilled in the art can understand that the electronic device 1000 may further include a power source (such as a battery) for supplying power to each component. The power source can be logically connected to the processor 1010 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0231] Among them, the processor 1010 can be used to determine a second voltage threshold according to the internal resistance of the battery of the electronic device and a third voltage threshold when the battery voltage of the electronic device is less than or equal to the first voltage threshold; the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold; and perform a shutdown operation when the battery voltage and the second voltage threshold meet the first condition.

[0232] In a possible implementation, the processor 1010 can be specifically configured to determine the second voltage threshold as the sum of the first voltage value and the third voltage threshold when the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected; where the first voltage value is the product of the first internal resistance value and the additional load current; the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, and the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold.

[0233] In a possible implementation, the processor 1010 can be specifically configured to determine the second voltage threshold as the sum of the first voltage value, the second voltage value and the third voltage threshold when the battery voltage is less than or equal to the first voltage threshold and an application startup event is detected; where the first voltage value is the product of the first internal resistance value and the additional load current; the second voltage value is the product of the first internal resistance value and the peak power current of the first application; where the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold, and the first application corresponds to the application startup event.

[0234] In a possible implementation, the processor 1010 can also be configured to measure the first current of the battery of the electronic device when the electronic device is in the first state; in the first state, the application of the electronic device is in the off state and the screen brightness of the electronic device is the maximum brightness; and measure the second current of the battery of the electronic device when the electronic device is in the second state; in the second state, the first application is in the first running state; and determine the difference between the second current and the first current as the peak power current of the first application.

[0235] In a possible implementation, the above additional load current can be a preset load current, or can be a load current determined based on the battery current and the remaining battery capacity of the electronic device.

[0236] In a possible implementation, the processor 1010 can also be configured to obtain the first voltage of the battery of the electronic device when the electronic device is in the stationary state; apply a pulsed current to the battery and obtain at least two voltages of the battery within the first time period; and when the standard deviation of the at least two voltages is less than or equal to the standard deviation threshold, subtract the first voltage from the second voltage among the at least two voltages to obtain the voltage transient change value; and determine the quotient of the voltage transient change value and the amplitude of the pulsed current as the above battery internal resistance.

[0237] In the electronic device provided in the embodiment of the present application, when the battery voltage is less than or equal to the first voltage threshold, the electronic device may first determine a second voltage threshold greater than the third voltage threshold based on the battery internal resistance and the third voltage threshold for triggering UVLO shutdown, and then perform a shutdown operation when the battery voltage and the second voltage threshold meet specific conditions. Thus, software shutdown can be triggered before UVLO shutdown, and through software shutdown, the electronic device can be protected at the software level and the hardware level, so that the damage to the electronic device caused by UVLO shutdown at the software level and the hardware level can be reduced.

[0238] It should be understood that in the embodiment of the present application, the input unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. The other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.

[0239] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 1009 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.

[0240] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 1010 either.

[0241] The embodiments of the present application further provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiments of the electronic device control method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0242] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0243] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the electronic device control method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0244] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0245] The embodiments of the present application provide a computer program / program product. The program / program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the electronic device control method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0246] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed. It may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0247] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0248] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. A method for controlling an electronic device, characterized in that: The method comprises: When the battery voltage of the electronic device is less than or equal to the first voltage threshold, determining the second voltage threshold according to the internal resistance of the battery of the electronic device and the third voltage threshold; the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold; When the battery voltage and the second voltage threshold satisfy a first condition, a shutdown operation is performed.

2. The method according to claim 1, characterized in that The method of determining the second voltage threshold according to the internal resistance of the battery of the electronic device and the third voltage threshold when the battery voltage of the electronic device is less than or equal to the first voltage threshold comprises: When the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected, determining the sum of the first voltage value and the third voltage threshold as the second voltage threshold; Among them, the first voltage value is: the product of the first internal resistance value and the additional load current; the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, and the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold.

3. The method according to claim 1, characterized in that The method of determining the second voltage threshold according to the internal resistance of the battery of the electronic device and the third voltage threshold when the battery voltage of the electronic device is less than or equal to the first voltage threshold comprises: When the battery voltage is less than or equal to the first voltage threshold and an application startup event is detected, determining the sum of the first voltage value, the second voltage value and the third voltage threshold as the second voltage threshold; Among them, the first voltage value is: the product of the first internal resistance value and the additional load current; the second voltage value is: the product of the first internal resistance value and the peak power current of the first application; wherein, the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold, and the first application corresponds to the application startup event.

4. The method according to claim 3, characterized in that The method further comprises: When the electronic device is in a first state, measuring a first current of a battery of the electronic device; in the first state, an application of the electronic device is closed, and the screen brightness of the electronic device is at maximum brightness; When the electronic device is in a second state, measuring a second current of a battery of the electronic device; when the first application is in a first running state, A difference between the second current and the first current is determined as a peak power current of the first application.

5. The method according to claim 2 or 3, characterized in that: The additional load current is a preset load current, or the additional load current is a load current determined based on a battery current and a remaining battery capacity of the electronic device.

6. The method according to claim 1, characterized in that The method further comprises: When the electronic device is in a stationary state, obtaining a first voltage of a battery of the electronic device; Applying a pulse current to the battery and obtaining at least two voltages of the battery within a first time period; When a standard deviation of the at least two voltages is less than or equal to a standard deviation threshold, subtracting the first voltage from a second voltage of the at least two voltages to obtain a voltage transient change value; The quotient of the voltage transient change value and the amplitude of the pulse current is determined as the battery internal resistance.

7. An electronic equipment control device, characterized in that: The device comprises: a determination module and an execution module; The determination module is used to determine the second voltage threshold according to the battery internal resistance of the electronic device and the third voltage threshold when the battery voltage of the electronic device is less than or equal to the first voltage threshold; the third voltage threshold is used to trigger undervoltage lockout shutdown, and the second voltage threshold is greater than the third voltage threshold; The execution module is configured to execute a shutdown operation when the battery voltage and the second voltage threshold satisfy a first condition.

8. The device according to claim 7, characterized in that The determination module is specifically configured to determine the sum of the first voltage value and the third voltage threshold as the second voltage threshold when the battery voltage is less than or equal to the first voltage threshold and no application startup event is detected; Among them, the first voltage value is: the product of the first internal resistance value and the additional load current; the first internal resistance value is the sum of the battery internal resistance and the internal resistance compensation value, and the additional load current is the load current to be increased when the battery voltage reaches the third voltage threshold.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the electronic device control method as described in any one of claims 1 to 6 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the electronic device control method according to any one of claims 1 to 6 are implemented.