Voltage threshold acquisition method and device, electronic device, and storage medium

By calculating the current impedance value of the battery in real time and dynamically adjusting the precharge voltage threshold, the problem of repeated restart and low charging efficiency after the battery is aging is solved, and a more efficient charging process is achieved.

CN119787524APending Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311294494.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the existing battery charging technology, the fixed precharge voltage threshold used in the precharge stage cannot be dynamically adjusted, resulting in repeated restarts after the battery aging, affecting the charging time and charging efficiency.

Method used

By calculating the current impedance value of the battery in real time during the pre-charge phase and dynamically adjusting the pre-charge voltage threshold based on this value, it ensures the timing of the electronic device from the pre-charge mode to the normal charging mode.

Benefits of technology

It effectively avoids the problem of repeated restarts after the battery ages, shortens pre-charge time, and improves charging efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119787524A_ABST
    Figure CN119787524A_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for obtaining a voltage threshold, an electronic device, and a storage medium; the method comprises: obtaining a target voltage and current sequence when charging a battery in a pre-charging mode; determining a current impedance value corresponding to the battery according to the target voltage and current sequence; and determining a pre-charging voltage threshold corresponding to the battery according to the current impedance value. The method can calculate the current impedance value in real time during the pre-charging stage, and determine an accurate pre-charging voltage threshold according to the current impedance value, thereby effectively controlling the charging time and charging efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of battery fast charging technology, and are related to but not limited to a method and device for obtaining a voltage threshold, an electronic device, and a storage medium. Background Art

[0002] Battery charging methods include over-discharge pre-charge and normal fast charge. The mechanism for determining the charging method is: after the electronic device is turned on, it is first determined whether the battery is higher than the power-on voltage (for example, 3.35V). If it is higher, it enters the kernel stage after powering on, that is, the normal fast charge method is adopted. If it is not higher, it enters the unified extensible firmware interface UEFI stage, that is, the over-discharge pre-charge method is adopted to charge with a small current until the battery voltage is higher than a certain pre-charge voltage threshold VTHD (for example, VTHD>3.4V), then shut down and restart, and compare the battery voltage and the power-on voltage 3.35V again, and repeat the previous steps.

[0003] At present, the pre-charge voltage threshold in the pre-charge stage adopts a preset fixed value. As the battery continues to age during use, battery floating pressure will be generated during the charging process. If a fixed pre-charge voltage threshold is used, after the battery voltage reaches the pre-charge voltage threshold and restarts, the battery voltage is still lower than the power-on voltage and can only be pre-charged again and restarted, causing the electronic device to restart repeatedly, affecting the charging time and charging efficiency. Summary of the invention

[0004] In view of this, the voltage threshold acquisition method and device, electronic device, and storage medium provided in the embodiments of the present application can calculate the current impedance value in real time during the pre-charging stage, and determine the accurate pre-charging voltage threshold based on the current impedance value, thereby effectively controlling the charging time and charging efficiency.

[0005] In a first aspect, a method for obtaining a voltage threshold provided in an embodiment of the present application is applied to an electronic device, comprising:

[0006] When the battery is charged in a pre-charging mode, a target voltage-current sequence is obtained, wherein the target voltage-current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery obtained when the battery is charged by two charging currents, and a current difference between the two charging currents is not less than a preset difference;

[0007] Determining a current impedance value corresponding to the battery according to the target voltage and current sequence;

[0008] A pre-charge voltage threshold corresponding to the battery is determined according to the current impedance value, wherein the pre-charge voltage threshold is a voltage threshold indicating that the electronic device switches from the pre-charge mode to the normal charge mode.

[0009] In a second aspect, a voltage threshold acquisition device provided in an embodiment of the present application is applied to an electronic device, including:

[0010] A voltage and current acquisition module, used for acquiring a target voltage and current sequence when charging the battery in a pre-charging mode, wherein the target voltage and current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery acquired when charging the battery by two charging currents, and a current difference between the two charging currents is not less than a preset difference;

[0011] An impedance value calculation module, used to determine a current impedance value corresponding to the battery according to the target voltage and current sequence;

[0012] The voltage threshold calculation module is used to determine the pre-charge voltage threshold corresponding to the battery according to the current impedance value, and the pre-charge voltage threshold is a voltage threshold that indicates that the electronic device switches from the pre-charge mode to the normal charge mode.

[0013] In a third aspect, an electronic device provided in an embodiment of the present application includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps of the method for obtaining the voltage threshold provided in the first aspect of the embodiment of the present application are implemented.

[0014] In a fourth aspect, a computer-readable storage medium is provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for obtaining the voltage threshold provided in the first aspect of the embodiment of the present application are implemented.

[0015] The voltage threshold acquisition method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application can calculate the current impedance value in real time during the pre-charging stage, and determine the accurate pre-charging voltage threshold according to the current impedance value, thereby effectively controlling the charging time and charging efficiency, thereby solving the technical problems raised in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0017] Figure 1 A schematic diagram of an implementation flow of a method for obtaining a voltage threshold provided in an embodiment of the present application;

[0018] Figure 2 A schematic flow chart of a method for obtaining a target voltage and current sequence provided in an embodiment of the present application;

[0019] Figure 3A schematic diagram of a charging method provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of another charging method provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of a flow chart of another charging method provided in an embodiment of the present application;

[0022] Figure 6 A schematic flow chart of a method for determining a pre-charge voltage threshold provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of the overall process of a method for optimizing battery over-discharge pre-charging provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of the structure of a voltage threshold acquisition device provided in an embodiment of the present application;

[0025] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0028] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0030] Battery charging methods include over-discharge pre-charge and normal fast charge. The mechanism for determining the charging method is: after the electronic device is turned on, it is first determined whether the battery is higher than the power-on voltage (for example, 3.35V). If it is higher, it enters the kernel stage after powering on, that is, the normal fast charge method is adopted. If it is not higher, it enters the unified extensible firmware interface UEFI stage, that is, the over-discharge pre-charge method is adopted to charge with a small current until the battery voltage is higher than a certain pre-charge voltage threshold VTHD (for example, VTHD>3.4V), then shut down and restart, and compare the battery voltage and the power-on voltage 3.35V again, and repeat the previous steps.

[0031] At present, the pre-charge voltage threshold in the pre-charge stage adopts a preset fixed value. As the battery continues to age during use, battery floating pressure will be generated during the charging process. If a fixed pre-charge voltage threshold is used, after the battery voltage reaches the pre-charge voltage threshold and restarts, the battery voltage is still lower than the power-on voltage and can only be pre-charged again and restarted, causing the electronic device to restart repeatedly, affecting the charging time and charging efficiency.

[0032] In view of this, an embodiment of the present application provides a method for obtaining a voltage threshold, in the case of charging the battery in a pre-charging mode, obtaining a target voltage and current sequence, wherein the target voltage and current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery obtained when the battery is charged by two charging currents, and the current difference between the two charging currents is not less than a preset difference; according to the target voltage and current sequence, determining the current impedance value corresponding to the battery; according to the current impedance value, determining the pre-charging voltage threshold corresponding to the battery, the pre-charging voltage threshold is a voltage threshold indicating that the electronic device switches from the pre-charging mode to the normal charging mode. The method can calculate the current impedance value of the battery in real time during the UEFI charging stage, and determine the current pre-charging voltage threshold according to the current impedance value, thereby effectively controlling the charging time and improving the charging efficiency.

[0033] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0034] Figure 1 A schematic diagram of the implementation flow of a method for obtaining a voltage threshold provided in an embodiment of the present application. The method for obtaining a voltage threshold can be applied to electronic devices, which can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop computer, a PDA or a server, etc.; the electronic device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 1 As shown, the method may include the following steps 101 to 103:

[0035] Step 101: When charging the battery in a pre-charging mode, a target voltage and current sequence is obtained. The target voltage and current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery obtained when the battery is charged by two charging currents, and a current difference between the two charging currents is not less than a preset difference.

[0036] It should be noted that in order to calculate the current impedance value of the electronic device, multiple voltage values ​​and multiple current values ​​of the battery can be collected and calculated when the charging current has a step change. For example, the current impedance value of the battery can be calculated using an electrochemical impedance spectroscopy (EIS) analysis method. Therefore, the electronic device system needs to generate a step change in the current current, which causes a step change in the battery voltage voltage, that is, the voltage and current components required for the EIS analysis can be obtained.

[0037] In the embodiment of the present application, the battery is charged respectively by using two charging currents with current difference, and then multiple voltage values ​​and multiple current values ​​of the battery are obtained, that is, multiple voltage values ​​and multiple current values ​​with step changes can be obtained for calculating the current impedance value. The number of multiple voltage values ​​and multiple current values ​​can be set according to demand, and the present application does not limit the number of multiple voltage values ​​and multiple current values.

[0038] For example, the battery can be charged with 300mA and 2000mA currents respectively, and the current difference between 300mA and 2000mA is greater than 500mA (preset difference). When charging with 300mA current, the voltage and current values ​​of the battery are collected once every one second. After collecting 20 voltage and current sequences, charging with 2000mA current is started, and the voltage and current values ​​of the battery are collected every one second. The charging is terminated after collecting 20 voltage and current sequences. The 40 collected voltage and current sequences are the target voltage and current sequences.

[0039] Step 102: Determine the current impedance value corresponding to the battery according to the target voltage-current sequence.

[0040] It should be noted that after obtaining the target voltage and current sequence, a variety of methods can be used to calculate the current impedance value. For example, the impedance information of the battery can be obtained based on electrochemical impedance spectroscopy EIS analysis, or the impedance information of the battery can be obtained through a model calculation method. The embodiment of the present application does not limit the method for determining the current impedance value corresponding to the battery according to the target voltage and current sequence.

[0041] Step 103: Determine a pre-charge voltage threshold corresponding to the battery according to the current impedance value, wherein the pre-charge voltage threshold is a voltage threshold indicating that the electronic device switches from the pre-charge mode to the normal charge mode.

[0042] It should be noted that after obtaining the current impedance value of the battery, there are many methods for determining the pre-charge voltage threshold according to the current impedance value. For example, the pre-charge voltage threshold VTHD can be obtained by a priori inference based on the battery impedance, or the pre-charge voltage threshold can be calculated according to the current impedance value. The embodiment of the present application does not limit the method for determining the pre-charge voltage threshold corresponding to the battery according to the current impedance value.

[0043] The embodiment of the present application calculates the current impedance value of the battery in real time based on the target voltage and current sequence during the pre-charging stage, and estimates the stop voltage VTHD of the pre-charging stage according to the current impedance value. The VTHD can be dynamically adjusted according to the aging status of the battery. Accurate VTHD can avoid repeated restarting of the battery after aging and shorten the pre-charging time. While effectively controlling the pre-charging time, it ensures the pre-charging efficiency and improves the user's pre-charging speed experience.

[0044] In some embodiments, the current voltage of the battery needs to be considered when charging with the two charging currents to avoid damaging the battery by charging with an inappropriate charging current.

[0045] Figure 2 A schematic flow chart of a method for obtaining a target voltage and current sequence provided in an embodiment of the present application. Figure 2 As shown, the two charging currents include a first charging current and a second charging current, the first charging current is less than the second charging current, and the step 101 of acquiring a target voltage and current sequence may include:

[0046] Step 1011: Obtain the current voltage of the battery.

[0047] Exemplarily, the current voltage of the battery can be obtained by reading the fuel gauge chip on the battery pack through the I2C bus to obtain the current battery voltage.

[0048] Step 1012: Determine the charging priority corresponding to the first charging current and the second charging current according to the relationship between the preset reference voltage and the current voltage, wherein the charging priority is used to indicate the charging order, and the higher the charging priority, the earlier the charging order.

[0049] It should be noted that the battery is provided with a preset reference voltage, which is used to determine the current used to charge the battery. For example, if the current voltage is less than the preset reference voltage, only the first charging current (small current) can be used for charging at the beginning; if the current voltage is not less than the preset reference voltage, the first charging current or the second charging current (larger current) can be used for charging at the beginning.

[0050] In some embodiments, the first charging current is a preset charging current, and the second charging current is determined according to a type of an adapter corresponding to the battery.

[0051] It should be noted that, in order to protect the battery, the charging current is usually preset to a smaller current, such as 300 mA. The second charging current can be set to a larger current, such as 500 mA, 2000 mA, etc., according to the adapter.

[0052] Exemplarily, the preset reference voltage is 3.1V. If the current voltage is less than 3.1V, the preset charging current of 300mA can be used for charging. When the current voltage is not less than 3.1V, the charging current can be determined according to the adapter type. For example, if a non-USB adapter is inserted (dedicated charging port DCP or continuous data protection CDP type), the charging current will be set to 2000ma. If it is a USB type, the charging current of the power management chip PMIC is set to 500ma.

[0053] Step 1013: Charge the battery according to the charging priority, the first charging current, and the second charging current.

[0054] It should be noted that after the charging priority is determined, the battery is charged according to the charging priority, the first charging current and the second charging current. The embodiment of the present application does not limit the charging method.

[0055] The magnitude relationship between the preset reference voltage and the current voltage includes two relationships, one is that the current voltage is less than the preset reference voltage, and the other is that the current voltage is greater than or equal to the preset reference voltage. The following two cases are described.

[0056] Case 1: The following describes a method for obtaining a target voltage and current sequence when the current voltage is less than a preset reference voltage.

[0057] Figure 3 A schematic diagram of a charging method provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, in Figure 2 Based on the illustrated embodiment, the step 1012 determines the charging priority corresponding to the first charging current and the second charging current according to the magnitude relationship between the preset reference voltage and the current voltage, and may include:

[0058] Step 201: When the current voltage of the battery is less than a preset reference voltage, determining that the charging priority corresponding to the first charging current is higher than the charging priority corresponding to the second charging current;

[0059] The step 1013 of charging the battery according to the charging priority, the first charging current and the second charging current may include:

[0060] Step 202: charging the battery by using the first charging current to obtain a plurality of voltage values ​​and a plurality of current values ​​of the battery;

[0061] Step 203: charging the battery with the second charging current to obtain a plurality of voltage values ​​and a plurality of current values ​​of the battery.

[0062] It should be noted that if the current voltage of the battery is less than the preset reference voltage, it is determined that the charging priority corresponding to the first charging current is higher than the charging priority corresponding to the second charging current. When charging, the battery is first charged with the first charging current to obtain multiple voltage values ​​and multiple current values ​​of the battery; and then the battery is charged with the second charging current to obtain multiple voltage values ​​and multiple current values ​​of the battery.

[0063] Furthermore, in order to protect the battery, before charging the battery with the second charging current, it is necessary to determine the current voltage of the battery again.

[0064] Figure 4 A schematic diagram of another charging method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, in Figure 3 Based on the illustrated embodiment, before charging the battery by the second charging current in step 203 to obtain multiple voltage values ​​and multiple current values ​​of the battery, the method further includes:

[0065] Step 301: Obtaining the current voltage of the battery;

[0066] Step 302: Determine whether the current voltage of the battery is greater than or equal to the preset reference voltage.

[0067] It should be noted that since the second charging current is greater than the first charging current, in order to avoid damaging the battery, before switching to the second charging current, it is necessary to obtain the current voltage of the battery again to determine whether the current voltage is greater than or equal to the preset reference voltage before switching. If the current voltage is less than the preset reference voltage, continue to charge with the first charging current until the current voltage is greater than or equal to the preset reference voltage, and sufficient voltage and current values ​​are collected before switching.

[0068] Case 2: The following describes a method for obtaining a target voltage and current sequence when the current voltage is greater than or equal to a preset reference voltage.

[0069] Figure 5 A flow chart of another charging method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, in Figure 3 Based on the illustrated embodiment, the step 1012 determines the charging priority corresponding to the first charging current and the second charging current according to the magnitude relationship between the preset reference voltage and the current voltage, and may include:

[0070] Step 401: When the current voltage of the battery is greater than or equal to a preset reference voltage, determining that the charging priority corresponding to the first charging current is equal to the charging priority corresponding to the second charging current;

[0071] The step 1013 of charging the battery according to the charging priority, the first charging current and the second charging current may include:

[0072] Step 402: Charge the battery with the first charging current and the second charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery; or, charge the battery with the second charging current and the first charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery.

[0073] It should be noted that, since the current voltage is greater than or equal to the preset reference voltage, it is acceptable to preferentially use the first charging current or the second charging current for charging, as long as sufficient voltage and current values ​​are collected for both the first charging current and the second charging current.

[0074] The technical solutions provided in the above two situations create conditions for the subsequent calculation of the battery impedance value by collecting multiple voltage values ​​and multiple current values ​​that meet the calculated impedance value, such as the step condition of DFT, during the charging process using the first charging current and the second charging current.

[0075] In some embodiments, a battery electrochemical impedance spectroscopy (EIS) analysis method may be used to calculate the current impedance value of the battery.

[0076] Figure 5 A schematic diagram of a flow chart for determining a current impedance value provided in an embodiment of the present application is as follows: Figure 5 As shown, the step 102 determines the current impedance value corresponding to the battery according to the target voltage and current sequence, which may include:

[0077] Step 1021: Perform Fourier calculation on all voltage values ​​in the target voltage and current sequence to obtain a first value.

[0078] Step 1022: Perform Fourier calculation on all current values ​​in the target voltage and current sequence to obtain a second value.

[0079] Step 1023: Obtain the current impedance value according to the first value and the second value.

[0080] It should be noted that the EIS analysis can be performed using the formula: Z = DFT (battery_voltage) / DFT (battery_current), where Z is the complex impedance at different calculation frequencies, and DFT is discrete Fourier transform. The function of DFT is to transform the signal from the time domain to the frequency domain, and both the time domain and the frequency domain are discrete. It can be found out which sinusoidal waves a signal is composed of, and the result is the amplitude and phase of the sinusoidal wave.

[0081] In the embodiment of the present application, the specific calculation formula of DFT can be as follows: Among them, the sine wave superposition X(k) represents the data of DFT transformation, while x(n) represents the sampled data, and N is the number of sampling points in the calculation cycle. When this algorithm theory is applied to electronic devices, the battery impedance information can be obtained in real time. Therefore, the battery voltage threshold acquisition scheme can be designed based on EIS.

[0082] In some embodiments, the pre-charge voltage threshold may be determined based on the current impedance value and the current charging current of the battery.

[0083] Figure 6 A flow chart of a method for determining a pre-charge voltage threshold provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the step 103 determines the pre-charge voltage threshold corresponding to the battery according to the current impedance value, which may include:

[0084] Step 1031: Acquire a first voltage value, where the first voltage value is a preset switching voltage, and the preset switching voltage is a voltage threshold that instructs the electronic device to enter a pre-charging mode or a normal charging mode to charge the battery.

[0085] Step 1032: multiply the current impedance value by the current charging current to obtain a second voltage value.

[0086] Step 1033: sum the first voltage value and the second voltage value to obtain the pre-charge voltage threshold.

[0087] It should be noted that the pre-charge voltage threshold can be calculated according to the current impedance value of the battery, the preset switching voltage and the current charging current. The calculation of the pre-charge voltage threshold can be carried out using the formula: vthd = v + batt_r * ibus, where v represents the preset switching voltage, batt_r represents the current impedance value, and ibus represents the current charging current. The output ibus of the current adapter is collected using the PMIC chip ADC to obtain the current charging current.

[0088] The embodiment of the present application provides a software design scheme for optimizing battery over-discharge pre-charging based on EIS. The scheme calculates the battery impedance in real time based on the target voltage and current sequence during the pre-charging stage and estimates the stop voltage VTHD of the pre-charging stage. It can dynamically adjust the VTHD according to the aging state of the battery, and can improve the user's pre-charging speed experience while ensuring the pre-charging function. The method of obtaining the voltage threshold in real time can effectively avoid the problem of long pre-charging time after the battery is placed for a long time and the inapplicability of the EIS impedance value stored in the partition.

[0089] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.

[0090] Figure 7 The overall flow chart of a method for optimizing battery over-discharge pre-charging provided in the embodiment of the present application is as follows. Figure 7 As shown, taking a mobile phone running an Android system as an example, the method includes the following steps 501 to 521:

[0091] Step 501: The mobile phone starts.

[0092] Step 502: The mobile phone first enters the Unified Extensible Firmware Interface UEFI stage.

[0093] Step 503: read the fuel gauge chip on the battery pack pack through the I2C bus to obtain the current battery voltage batt_volt.

[0094] Step 504: determine whether batt_volt is greater than 3.35V at this time. If it is greater than 3.35V, it indicates that the Android operating system can be loaded and run, so the loading of the Android operating system will be exited from UEFI.

[0095] Step 505: If it is not greater than 3.35V, it indicates that the battery is over-discharged and needs to stay in the UFEI stage for over-discharge charging.

[0096] Step 506: First, initialize the relevant flags. need_dft indicates that DFT needs to be performed to calculate the battery impedance. low_step_count and high_step_count are the counts of the low step and high step of the voltage and current respectively (the battery voltage and current of the low step and high step need to be sampled for 20 seconds, and sampling once every 1 second means that they need to be counted 20 times respectively). If batt_volt is less than 3.1V at this time, it means that it is necessary to enter the first stage, because once entering the first stage, because it is necessary to calculate the Fourier transform DFT, 20 voltage and current data need to be sampled, so the conditions for exiting the first stage are that low_step_count is not equal to 0 and low_step_count is greater than 20.

[0097] Step 507: After entering the first stage, the variable need_dft is set to true; and the charging current of the power management integrated chip PMIC in the first stage is set to a low current of 300mA, and the count is low_step_count+1.

[0098] Step 508: The ADC samples the battery voltage and current and fills the end of the low_volt_curr voltage and current sequence. If the low_volt_curr sequence is filled with more than 20 elements, the first element is removed, all elements are moved forward by one, and the newly sampled element is added to the end of the sequence.

[0099] Step 509: During the charging process, the battery voltage will slowly increase and be sampled every 1 second. When batt_volt>3.1V and low_step_count>20, it will jump from the first stage of pre-charging to the second stage.

[0100] Step 510: The second stage of pre-charging will determine the charging current according to the type of charger currently plugged into the mobile phone. If a non-USB charger is inserted, such as (DCP or CDP type), the charging current will be set to 2000mA. If it is a USB type, the charging current of the PMIC will be set to 500mA. Since the first stage switches to the second stage, the battery current has a step-by-step change, and the system power consumption in the pre-charging stage is relatively stable (bare metal program runs, and large program applications cannot be loaded, so the power consumption is stable), so the conditions for doing DFT are met.

[0101] Step 511: Determine whether DFT is needed again, because it is possible that the battery voltage batt_volt is greater than 3.1V when the phone is just started and directly enters the second stage of pre-charging, that is, need_dft is equal to false. Return to step 507, set need_dft to true, set the charging current of the first stage to start charging and collect voltage and current values, and count through low_volt_curr.

[0102] Step 512: If need_dft is equal to true, determine the count of high_step_count.

[0103] Step 513: It is necessary to count 20 times to calculate the DFT, ie, High_step_count+1 each time.

[0104] Step 514: ADC samples the battery voltage and current and fills the end of the high_volt_curr voltage and current sequence. If the high_volt_curr sequence is filled with more than 20 elements, the first element is removed, all elements are moved forward by one, and the newly sampled element is added to the end of the sequence.

[0105] Step 515: Then delay for 1 second and continue counting until high_step_count=20.

[0106] Step 516: At this time, the low_volt_curr voltage-current sequence and the high_volt_curr voltage-current sequence are connected to form a volt_curr voltage-current sequence of 40 values.

[0107] Step 517: Perform DFT on volt in Volt_curr and perform DFT on curr in volt_curr.

[0108] Step 518: Finally, the impedance value batt_r at the frequency is calculated using the DFT of volt and the DFT of curr.

[0109] Step 519: By knowing the battery impedance in real time, the battery floating pressure under a certain charging current can be inferred, so the PMIC chip ADC is used to collect the output ibus (charger current) of the current adapter.

[0110] Step 520: Calculate the pre-charge voltage threshold vthd=3350mv+curr_batt_r*ibus.

[0111] Step 521: Determine whether batt_volt is greater than vthd. If so, shut down and restart the device; if not, continue charging in the second stage of pre-charging.

[0112] The above embodiment provides a software design solution for optimizing battery over-discharge pre-charging based on EIS. The solution calculates the battery impedance in real time based on the EIS algorithm during the pre-charging stage and estimates the stop voltage VTHD during the pre-charging stage. The VTHD can be dynamically adjusted according to the aging state of the battery. The solution ensures the pre-charging function while improving the user's pre-charging speed experience, and can effectively avoid the problem of long pre-charging time after the battery is placed for a long time and the inapplicability of the EIS impedance value stored in the partition.

[0113] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0114] Based on the foregoing embodiments, an embodiment of the present application provides a device for acquiring a voltage threshold. The modules included in the device and the units included in each module can be implemented by a processor; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0115] Figure 8 A schematic diagram of a voltage threshold acquisition device provided in an embodiment of the present application. Figure 8 As shown, the device 600 includes a data voltage and current acquisition module 601, an impedance value calculation module 602 and a voltage threshold calculation module 603, wherein:

[0116] The voltage and current acquisition module 601 is used to obtain a target voltage and current sequence when the battery is charged in a pre-charging mode, wherein the target voltage and current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery obtained when the battery is charged by two charging currents, and the current difference between the two charging currents is not less than a preset difference;

[0117] An impedance value calculation module 602 is used to determine a current impedance value corresponding to the battery according to the target voltage and current sequence;

[0118] The voltage threshold calculation module 603 is used to determine the pre-charge voltage threshold corresponding to the battery according to the current impedance value, and the pre-charge voltage threshold is a voltage threshold that indicates that the electronic device switches from the pre-charge mode to the normal charge mode.

[0119] In some embodiments, the two charging currents include a first charging current and a second charging current, the first charging current is less than the second charging current, and the voltage and current acquisition module 601 includes a voltage acquisition unit, a priority determination unit and a charging control unit, wherein:

[0120] A voltage acquisition unit, used to acquire the current voltage of the battery;

[0121] a priority determination unit, configured to determine the charging priorities corresponding to the first charging current and the second charging current according to a relationship between a preset reference voltage and the current voltage, wherein the charging priorities are used to indicate a charging sequence, and the higher the charging priority, the earlier the charging sequence;

[0122] A charging control unit is used to charge the battery according to the charging priority, the first charging current and the second charging current.

[0123] In some embodiments, the priority determination unit is specifically used to: when the current voltage of the battery is less than a preset reference voltage, determine that the charging priority corresponding to the first charging current is higher than the charging priority corresponding to the second charging current; the charging control unit is specifically used to: charge the battery with the first charging current to obtain multiple voltage values ​​and multiple current values ​​of the battery; charge the battery with the second charging current to obtain multiple voltage values ​​and multiple current values ​​of the battery.

[0124] In some embodiments, the charging control unit is further specifically used to: obtain the current voltage of the battery before obtaining multiple voltage values ​​and multiple current values ​​of the battery; and determine whether the current voltage of the battery is greater than or equal to the preset reference voltage.

[0125] In some embodiments, the priority determination unit is specifically used to: when the current voltage of the battery is greater than or equal to a preset reference voltage, determine that the charging priority corresponding to the first charging current is equal to the charging priority corresponding to the second charging current; the charging control unit is specifically used to: charge the battery with the first charging current and the second charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery; or, charge the battery with the second charging current and the first charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery.

[0126] In some embodiments, the impedance value calculation module 602 includes a first calculation unit, a second calculation unit and an impedance value calculation unit, wherein the first calculation unit is used to perform Fourier calculation on all voltage values ​​in the target voltage and current sequence to obtain a first value; the second calculation unit is used to perform Fourier calculation on all current values ​​in the target voltage and current sequence to obtain a second value; the impedance value calculation unit is used to obtain the current impedance value based on the first value and the second value.

[0127] In some embodiments, the voltage threshold calculation module 603 includes a first value acquisition unit, a second value acquisition unit and a threshold calculation unit, wherein the first value acquisition unit is used to acquire a first voltage value, the first voltage value is a preset switching voltage, and the preset switching voltage is a voltage threshold indicating that the electronic device enters a pre-charging mode or a normal charging mode to charge the battery; the second value acquisition unit is used to multiply the current impedance value by the current charging current to obtain a second voltage value; the threshold calculation unit is used to sum the first voltage value and the second voltage value to obtain the pre-charging voltage threshold.

[0128] In the embodiment of the present application, VTHD can be dynamically adjusted according to the aging status of the battery. Accurate VTHD can avoid repeated restarts after battery aging and shorten the pre-charging time. While effectively controlling the pre-charging time, it ensures the pre-charging efficiency and improves the user's pre-charging speed experience.

[0129] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0130] It should be noted that in the embodiments of this application Figure 8 The division of the modules in the voltage threshold acquisition device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.

[0131] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0132] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 100 includes a battery pack 130, a memory 120, a processor 110, and a computer program 121 stored in the memory 120 and executable on the processor 110. The battery pack 130 may include a plurality of batteries. The processor 110 is connected to the memory 120 and the battery pack 130 respectively; when the processor 110 executes the computer program, the steps of the method for obtaining the voltage threshold provided in the above embodiment are implemented.

[0133] The processor 110 may include one or more processing units. For example, the processor 110 is a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs). Different processing units may be independent devices or integrated into one or more processors.

[0134] The memory 120 can be used to store computer executable program codes, which include instructions. The internal memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, video data, etc.), etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 120, and / or instructions stored in a memory provided in the processor.

[0135] In application, the battery pack 130 may include at least two batteries connected in parallel or in series, specifically a first battery and a second battery, wherein the capacities of the first battery and the second battery may be the same or different, and the embodiment of the present application does not impose any restrictions on the number of batteries and the battery capacity included in the battery pack 130. It should be noted that the battery pack 130 provided in the embodiment of the present application is a unit in a power module of an electronic device, and the battery pack 130 including the first battery and the second battery is only exemplary.

[0136] In one embodiment, the battery pack 130 further includes a through-shaft. In application, the electronic device 100 may be a folding screen mobile phone, the first battery and the second battery may be installed in the mainboards of the two folding screens respectively, and the first battery and the second battery may be connected by a physical structure. The embodiment of the present application does not impose any restrictions on the specific connection method of the battery pack 130.

[0137] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned system can refer to the corresponding process in the above-mentioned charging equalization method embodiment, which will not be repeated here.

[0138] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0139] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method for obtaining a voltage threshold provided in the above embodiment are implemented.

[0140] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0141] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0142] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0143] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the method for obtaining a voltage threshold value provided in the above method embodiment.

[0145] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center to another website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0146] It should be noted here that the description of the above storage medium, program product and device embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiment of this application for understanding.

[0147] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0148] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0150] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.

[0151] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0152] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0153] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0154] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0155] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain a new method embodiment. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain a new product embodiment. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain a new method embodiment or device embodiment.

[0156] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for obtaining a voltage threshold, characterized in that: Used in electronic equipment, including: When the battery is charged in a pre-charging mode, a target voltage-current sequence is obtained, wherein the target voltage-current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery obtained when the battery is charged by two charging currents, and a current difference between the two charging currents is not less than a preset difference; Determining a current impedance value corresponding to the battery according to the target voltage and current sequence; A pre-charge voltage threshold corresponding to the battery is determined according to the current impedance value, wherein the pre-charge voltage threshold is a voltage threshold indicating that the electronic device switches from the pre-charge mode to the normal charge mode.

2. The method according to claim 1, characterized in that: The two charging currents include a first charging current and a second charging current, the first charging current is smaller than the second charging current, and the acquiring the target voltage and current sequence includes: Obtaining the current voltage of the battery; Determine, according to a relationship between a preset reference voltage and the current voltage, a charging priority corresponding to the first charging current and the second charging current, wherein the charging priority is used to indicate a charging order, and a higher charging priority indicates an earlier charging order; The battery is charged according to the charging priority, the first charging current, and the second charging current.

3. The method according to claim 2, characterized in that The determining the charging priority corresponding to the first charging current and the second charging current according to the magnitude relationship between the preset reference voltage and the current voltage includes: When the current voltage of the battery is less than a preset reference voltage, determining that the charging priority corresponding to the first charging current is higher than the charging priority corresponding to the second charging current; The charging the battery according to the charging priority, the first charging current and the second charging current comprises: The battery is charged by the first charging current to obtain a plurality of voltage values ​​and a plurality of current values ​​of the battery; and the battery is charged by the second charging current to obtain a plurality of voltage values ​​and a plurality of current values ​​of the battery.

4. The method according to claim 3, characterized in that Before charging the battery by the second charging current and acquiring a plurality of voltage values ​​and a plurality of current values ​​of the battery, the method further includes: Obtaining the current voltage of the battery; It is determined that the current voltage of the battery is greater than or equal to the preset reference voltage.

5. The method according to claim 2, characterized in that: The determining the charging priority corresponding to the first charging current and the second charging current according to the magnitude relationship between the preset reference voltage and the current voltage includes: When the current voltage of the battery is greater than or equal to a preset reference voltage, determining that the charging priority corresponding to the first charging current is equal to the charging priority corresponding to the second charging current; The charging the battery according to the charging priority, the first charging current and the second charging current comprises: The battery is charged by the first charging current and the second charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery; or, the battery is charged by the second charging current and the first charging current in sequence to obtain multiple voltage values ​​and multiple current values ​​of the battery.

6. The method according to claim 1, characterized in that The step of determining a current impedance value corresponding to the battery according to the target voltage and current sequence includes: Performing Fourier calculation on all voltage values ​​in the target voltage and current sequence to obtain a first value; Performing Fourier calculation on all current values ​​in the target voltage and current sequence to obtain a second value; The current impedance value is obtained according to the first value and the second value.

7. The method according to claim 1, characterized in that The step of determining a pre-charge voltage threshold corresponding to the battery according to the current impedance value includes: Acquire a first voltage value, where the first voltage value is a preset switching voltage, and the preset switching voltage is a voltage threshold indicating that the electronic device enters a pre-charging mode or a normal charging mode to charge the battery; Multiplying the current impedance value by the current charging current to obtain a second voltage value; The first voltage value and the second voltage value are summed to obtain the pre-charge voltage threshold.

8. A device for obtaining a voltage threshold, characterized in that: Used in electronic equipment, including: A voltage and current acquisition module, used for acquiring a target voltage and current sequence when charging the battery in a pre-charging mode, wherein the target voltage and current sequence is a plurality of voltage values ​​and a plurality of current values ​​of the battery acquired when charging the battery by two charging currents, and a current difference between the two charging currents is not less than a preset difference; An impedance value calculation module, used to determine a current impedance value corresponding to the battery according to the target voltage and current sequence; The voltage threshold calculation module is used to determine the pre-charge voltage threshold corresponding to the battery according to the current impedance value, and the pre-charge voltage threshold is a voltage threshold that indicates that the electronic device switches from the pre-charge mode to the normal charge mode.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the method for obtaining the voltage threshold value according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for obtaining a voltage threshold value according to any one of claims 1 to 7 are implemented.