Optimized determination method for battery charging percentage, medium and equipment

By introducing a method of calculating the actual voltage increment in the battery charge management system, the problem of inaccurate power during charging current changes and constant voltage charging is solved, and a more accurate battery charge status display and power monitoring are achieved.

CN119556153APending Publication Date: 2025-03-04FUJIAN NEWLAND PAYMENT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411830405.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When calculating the battery charge amount, the prior art cannot accurately deal with the charging current changes and inaccurate power during the constant voltage charging stage, resulting in an error of more than 20% of the charging capacity display.

Method used

By calculating the actual voltage increment using the discharge curve and comparing it with the theoretical voltage increment, the power display is dynamically adjusted to ensure that the battery charging status is accurately displayed under changing charging current and constant voltage charging.

Benefits of technology

It realizes that no matter how large or small the current is charged, the charging capacity can be accurately displayed, and it can also be accurately displayed during the constant voltage charging stage. The charging percentage error is optimized from above 20% to below 5%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556153A_ABST
    Figure CN119556153A_ABST
Patent Text Reader

Abstract

The invention discloses a battery charging percentage optimization determination method, medium and equipment, and the method comprises the steps: regularly and synchronously obtaining a theoretical voltage increment and an actual voltage increment according to a preset frequency, the theoretical voltage increment being obtained through the calculation of a charging current and a charging time, and the actual voltage increment being obtained through the calculation of a discharging curve; and comparing the theoretical voltage increment with the actual voltage increment, if the actual voltage increment is greater than the theoretical voltage increment, increasing the display electric quantity of the terminal equipment by 1%, otherwise, keeping the electric quantity display unchanged. According to the method, the charging state of the battery can be accurately reflected, and errors possibly existing in a traditional method are avoided. By comparing the theoretical voltage increment with the actual voltage increment, electric quantity display is dynamically adjusted, and it is ensured that a user always obtains reliable battery electric quantity information. The method is suitable for lithium batteries of different models, can support constant-current and constant-voltage charging modes, and has good compatibility and applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of battery charging feedback, and in particular to a method, medium and device for optimizing the determination of battery charging percentage. Background Art

[0002] At present, mobile phones use a special coulomb counter chip to integrate the current and time in real time and accurately calculate the battery capacity. Take a five-inch screen smart POS charging as an example. In order to reduce costs, the POS solution does not use a coulomb counter chip, and even the charging chip does not support reading the charging current. The only thing that can be used for power calculation is the battery voltage.

[0003] When the traditional solution calculates the charging capacity based on voltage, the battery must first be discharged, and then a battery tester is used to simulate a full charge test according to the maximum constant current and constant voltage supported by the charging chip to obtain a comparison table of capacity percentages corresponding to different charging voltages. The corresponding charging capacity is then displayed according to the charging voltage during actual use.

[0004] Many customers on the market will directly use hubs, computers, etc. to charge POS, and the charging current that can be provided ranges from 500mA to 2000mA. Different charging currents will have different charging voltages for batteries with the same power. Take the battery with no-load 3.8V and battery internal resistance 0.1 ohm as an example. Using a charging current of 500mA (ie 0.5A), the charging voltage read is 3.8+0.1*0.5=3.85V; and using a charging current of 2000mA (ie 2A), the charging voltage read is 3.8+0.1*2=4.0V. The capacity percentages corresponding to the charging curves of the two voltages of 3.85V and 4V are different, which directly forms a power error. The software cannot know the specific charging current, which directly leads to an error of more than 20% in the charging power.

[0005] In addition, after the battery power exceeds 80%, it starts to switch from constant current charging to constant voltage charging. At this time, the charging voltage is fixed. At this time, the same voltage cannot correspond to the accurate power through the charging curve table. Summary of the invention

[0006] In view of this, the purpose of the present invention is to propose a measurement method that uses a discharge curve plus a voltage increment to replace a charging curve, uses the charging time to infer the charging current, and further infers the required voltage increment, which completely solves the problem of inaccurate power caused by the use of a fixed charging curve method during variable charging current and constant voltage charging, and achieves accurate display of the charging power regardless of the charging current, and also accurately displays the charging power during the constant voltage charging stage.

[0007] In order to achieve the above technical objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a method for optimizing the battery charging percentage, which is applicable to a terminal device having a rechargeable battery, and the method comprises:

[0008] The theoretical voltage increment and the actual voltage increment are obtained synchronously and regularly according to the preset frequency. The theoretical voltage increment is obtained by calculating the charging current and the charging time, and the actual voltage increment is obtained by calculating the discharge curve.

[0009] Determine the size of the theoretical voltage increment and the actual voltage increment;

[0010] If the actual voltage increment is greater than the theoretical voltage increment, the displayed power of the terminal device will be increased by 1%;

[0011] If the actual voltage increment is less than the theoretical voltage increment, the displayed power level remains unchanged.

[0012] In some embodiments, the theoretical voltage increment is calculated by the charging current and the charging time and is expressed by formula (1), which is as follows:

[0013]

[0014] In formula (1), V m is the theoretical voltage increment, R is the internal resistance of the battery currently being charged, I is the current charging current of the battery, C is the capacity of the battery, T is the charging time, and the unit of T is minutes.

[0015] In some embodiments, the discharge curve is a discharge voltage and charge curve, and the discharge curve is configured to consist of a discharge voltage and a discharge charge;

[0016] The actual voltage increment is obtained by calculating the discharge curve including:

[0017] Get the displayed power of the current terminal device;

[0018] Matching the discharge voltage in the discharge curve according to the displayed power to obtain a first voltage value;

[0019] Obtaining the actual charging voltage of the current battery, recorded as the second voltage value;

[0020] The difference between the second voltage value and the first voltage value is calculated and recorded as the actual voltage increment.

[0021] In some embodiments, the actual voltage increment is expressed by formula (2), which is as follows:

[0022] V a =V c -V d ;

[0023] In formula (2), V a is the actual voltage increment, V c is the second voltage value, V d is the first voltage value.

[0024] In some embodiments, the preset frequency is once per minute.

[0025] In some embodiments, the battery includes lithium batteries with different rated capacities and different rated voltages.

[0026] In some embodiments, the terminal device is a POS machine.

[0027] In some embodiments, the method is applicable to a terminal device that is charged by a constant current; and / or, the method is applicable to a terminal device that is charged by a constant voltage.

[0028] In a second aspect, the present invention provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method of the first aspect.

[0029] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of the first aspect.

[0030] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0031] By introducing the comparison between the theoretical voltage increment and the actual voltage increment, the accuracy of the charging status display is improved, avoiding the problem of inaccurate charging percentage caused by battery aging or reduced charging efficiency. When the charging current cannot be read, the feedback algorithm uses the charging time to calculate the charging current, further calculates the required voltage increment, and replaces the charging curve with the discharge curve plus the voltage increment. The problem of inaccurate power caused by the variable charging current and the fixed charging curve method during constant voltage charging is completely solved from the theoretical root. Compared with the original charging curve algorithm, the charging feedback algorithm greatly improves the accuracy of the charging percentage. The battery charging percentage and the actual battery error are optimized from more than 20% to less than 5%.

[0032] This method can monitor the charging status of the battery in real time, ensuring that the user obtains more reliable power information when using the terminal device, thereby optimizing the user experience and reducing unexpected shutdowns due to insufficient power. In addition, the mechanism of dynamically adjusting the power display enables the terminal device to respond more sensitively to changes in the battery charging process, enhancing the intelligence level of the battery management system. Finally, since this method does not rely on complex hardware support and only needs to be optimized at the software level, it reduces the implementation cost and improves the cost performance of the device. In general, the battery charge percentage optimization determination method of the present invention has significant application prospects in improving the accuracy of charging display, enhancing user experience, and promoting equipment intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 is a method step diagram of a method for optimizing the determination of battery charging percentage according to a specific implementation method;

[0035] Figure 2 is a step diagram of a method for obtaining the actual voltage increment by calculating the discharge curve according to a specific implementation method;

[0036] Figure 3 This is a comparison diagram of charging before and after the 5V650mA modification described in the specific implementation method;

[0037] Figure 4 It is a 5V2A charging comparison chart described in the specific implementation method. DETAILED DESCRIPTION

[0038] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0039] The purpose of the present invention is to propose a measurement method that uses a discharge curve plus a voltage increment to replace a charging curve, uses the charging time to infer the charging current, and further infers the required voltage increment, which completely solves the problem of inaccurate power caused by the use of a fixed charging curve method during variable charging current and constant voltage charging, and achieves accurate display of the charging power regardless of the charging current, and also accurately displays the charging power in the constant voltage charging stage.

[0040] See also Figure 1 In a first aspect, the present invention provides a method for optimizing the battery charging percentage, which is applicable to a terminal device having a rechargeable battery, and the method comprises:

[0041] S101, synchronously and regularly acquiring a theoretical voltage increment and an actual voltage increment according to a preset frequency, wherein the theoretical voltage increment is obtained by calculating the charging current and the charging time, and the actual voltage increment is obtained by calculating the discharge curve;

[0042] S102, determining the magnitude of the theoretical voltage increment and the actual voltage increment;

[0043] S103, if the actual voltage increment is greater than the theoretical voltage increment, the displayed power of the terminal device is increased by 1%;

[0044] S104: If the actual voltage increment is less than the theoretical voltage increment, the displayed power level remains unchanged.

[0045] In this embodiment, a method for optimizing the determination of the battery charging percentage is proposed for monitoring the battery charging status of terminal equipment. The core of this method is to more accurately reflect the battery charging status by periodically and synchronously acquiring the theoretical voltage increment and the actual voltage increment of the battery. Specifically, data is first acquired according to a preset time frequency. The calculation of the theoretical voltage increment is based on the product of the charging current and the charging time, which represents the charging voltage increment that the battery should reach within a certain period of time; the actual voltage increment is calculated through the discharge curve of the battery, which reflects the voltage change of the battery under different discharge states.

[0046] Next, the system will compare the values ​​of the theoretical voltage increment with the actual voltage increment. If the actual voltage increment is found to be greater than the theoretical voltage increment, it means that the battery charging effect is good, and the device will increase the displayed power by 1% accordingly; conversely, if the actual voltage increment is less than the theoretical voltage increment, the displayed power will remain unchanged. This dynamic adjustment mechanism can better reflect the actual charging state of the battery and avoid the erroneous display or lag that may occur in the traditional charging percentage calculation method. In addition, the implementation of this method can be embedded in the battery management system of the terminal device through software upgrades. It has good applicability and scalability and can adapt to rechargeable batteries of different brands and types.

[0047] In some embodiments, the theoretical voltage increment is calculated by the charging current and the charging time and is expressed by formula (1), which is as follows:

[0048]

[0049] In formula (1), V m is the theoretical voltage increment, R is the internal resistance of the battery currently being charged, I is the current charging current of the battery, C is the capacity of the battery, T is the charging time, and the unit of T is minutes.

[0050] In this embodiment, the charging time T required to increase the capacity C by 1% is inversely proportional to the charging current I.

[0051] That is: the current corresponding to a 1% increase

[0052]

[0053] The unit of C is milliampere-hour (mAh). For example, for a 2600mAh battery, C = 2600 / 100 = 26mAh. The unit of T is minute. The multiplication by 60 in the formula here is to convert hours into minutes. The unit of I is milliampere (mA).

[0054] Theoretical voltage increment of the battery during charging V m It is equal to the internal resistance R of the battery being charged multiplied by the charging current I, and the relationship between the theoretical voltage increment and the charging time is calculated by applying the current battery charging current formula:

[0055]

[0056] Among them, the theoretical voltage increment V m The unit is millivolt (mV), the unit of battery internal resistance R is ohm (Ω), which may have different values ​​depending on the battery. Here we take 0.1 as an example. The unit of charging current is milliampere (mA).

[0057] See also Figure 2 In some embodiments, the discharge curve is a discharge voltage and charge curve, and the discharge curve is configured to consist of a discharge voltage and a discharge charge;

[0058] The actual voltage increment is obtained by calculating the discharge curve including:

[0059] S201, obtaining the displayed power of the current terminal device;

[0060] S202, matching the discharge voltage in the discharge curve according to the displayed power to obtain a first voltage value;

[0061] S203, obtaining the actual charging voltage of the current battery, and recording it as a second voltage value;

[0062] S204: Calculate the difference between the second voltage value and the first voltage value, and record it as the actual voltage increment.

[0063] In this embodiment, the discharge curve is a curve graph composed of two parameters: discharge voltage and discharge capacity. This curve can reflect the voltage change of the battery under different discharge conditions. By using this discharge curve, the actual voltage increment can be calculated. The specific steps are as follows:

[0064] First, the system obtains the displayed power of the current terminal device. This power percentage represents the current discharge state of the battery. According to this displayed power, the corresponding discharge voltage value is found in the discharge curve and recorded as the first voltage value.

[0065] Then, the system obtains the actual charging voltage of the battery at present, which is recorded as a second voltage value. This voltage value represents the actual voltage level of the battery in the current charging state.

[0066] Finally, the system calculates the difference between the second voltage value and the first voltage value, which is the actual voltage increment. This difference reflects the actual voltage increase of the battery during the current charging process.

[0067] It should be noted that the establishment of the discharge curve requires fitting and calibration with a large amount of measured data in advance. The accuracy of the curve directly affects the calculation accuracy of the actual voltage increment. At the same time, in order to adapt to the characteristic differences of different types of batteries, multiple sets of discharge curves can be pre-established for different batteries and dynamically switched according to the type of battery actually used.

[0068] Through the above steps, the system can calculate the corresponding actual voltage increment according to the actual charging state of the current battery. This value can be compared with the theoretical voltage increment mentioned above to provide a basis for subsequent charging percentage adjustments.

[0069] This method of calculating the actual voltage increment based on the discharge curve can more accurately reflect the current charging state of the battery and avoid the lag and error problems that may exist in the traditional charging percentage calculation. Since the discharge curve is fitted based on a large amount of measured data, it can more accurately capture the voltage change law of the battery under different discharge states. Therefore, using this curve to infer the actual voltage increment can be closer to the actual charging condition of the battery. In addition, by establishing exclusive discharge curves for different types of batteries, the system can switch flexibly to meet the needs of various terminal devices. At the same time, as the battery life increases, the discharge curve can also be dynamically updated to ensure the continuous accuracy of charging state monitoring. On the other hand, the implementation of this method is relatively simple, and only optimization and integration at the software level are required, without additional hardware support. This not only reduces the implementation cost, but also enhances the promotion and application prospects of this technology on various terminal devices. In short, the calculation of the actual voltage increment based on the discharge curve provides an effective solution for the accurate monitoring of the battery charging state, and has broad application prospects in improving user experience and promoting equipment intelligence.

[0070] In some embodiments, the actual voltage increment is expressed by formula (2), which is as follows:

[0071] V a =V c -V d ;

[0072] In formula (2), V a is the actual voltage increment, V c is the second voltage value, V d is the first voltage value.

[0073] In this embodiment, the actual voltage increment V a Equal to the current charging voltage V c (i.e., the second voltage value) minus the discharge voltage V calculated based on the discharge curve for the current charge d , where the second voltage value V c The unit is millivolt.

[0074] In the actual constant current charging process, as time T increases, V a Will follow V c As the voltage increases, the theoretical voltage increment V can be seen from formula (1) and the relationship between the theoretical voltage increment and the charging time. m As time T increases, it will become smaller and smaller. When the actual voltage increment V a Greater than the theoretical voltage increment V m It means that the actual charging capacity of the battery has increased by 1%, and the displayed capacity will increase by 1%.

[0075] In the actual constant voltage charging process, although the second voltage value V c Fixed to a constant voltage value, as the battery displays the power and battery discharge voltage V d Synchronously rise, the actual voltage increment V a =V c -V d The charging time required for a 1% increase becomes longer to meet the actual voltage increment V a Greater than the theoretical voltage increment V m At this time, the charging feedback algorithm formula still fully complies with this scenario and can continue to be used. It perfectly matches the fact that the actual constant voltage charging of the battery increases by 1% later.

[0076] In some embodiments, the preset frequency is once per minute.

[0077] According to the previous formula, the software only needs to calculate the actual voltage increment V every 1 minute. a When V a Greater than the theoretical voltage increment V m When the displayed power increases by 1%, the time T is reset to 0 and the next round of calculation begins. The next minute, the new displayed power is calculated according to the discharge curve to calculate the next discharge voltage V d It is worth noting that the discharge voltage V d Greater than the discharge voltage V in the previous calculation d , so the next actual voltage increment V a It starts to increase with the current charging voltage V a Waiting for the next actual voltage increment V a Greater than the next theoretical voltage increment V m The power is increased by 1, and the cycle continues.

[0078] In this embodiment, the preset frequency of once per minute is determined based on the dynamic characteristics of the battery charging process. Generally speaking, the battery voltage will rise rapidly at the beginning of charging, and the voltage growth will gradually slow down over time. Therefore, the sampling frequency of once per minute can better capture this change process, ensuring that the system can obtain the latest data of the charging status in a timely manner, and provide a reliable basis for the subsequent charging percentage adjustment.

[0079] This high-frequency real-time monitoring not only improves the accuracy of the charging status display, but also lays the foundation for further optimizing the charging management strategy. For example, the system can predict when the battery will reach full charge based on the changing trend of the voltage increment, so as to stop charging in advance or switch to the maintenance charging mode to maximize the battery life. In short, this high-frequency sampling implementation method fully utilizes the value of battery charging status monitoring technology and provides users with a more intelligent and reliable charging experience.

[0080] In some embodiments, the battery includes lithium batteries with different rated capacities and different rated voltages.

[0081] Lithium batteries are the most widely used type of rechargeable batteries in current terminal devices, and their charge and discharge characteristics are affected by parameters such as capacity and voltage. The optimization determination method of the present invention is applicable to lithium batteries of different models.

[0082] Specifically, when calculating the theoretical voltage increment, the system will input and adjust the corresponding parameters according to the actual battery capacity C and rated voltage. At the same time, when establishing the discharge curve, exclusive fitting and calibration will be performed for different battery models. This flexibility ensures that the method can adapt to various specifications of lithium batteries on the market, providing strong support for its wide application in different terminal devices. Whether it is a laptop battery with a larger capacity or a mobile phone battery with a relatively small capacity, this optimized measurement method can accurately reflect the battery charging status and provide users with reliable power information.

[0083] In some embodiments, the terminal device is a POS machine.

[0084] POS machines are usually equipped with lithium batteries to ensure that they can still work normally during power outages or network failures. In order to prevent transaction interruptions or data loss due to insufficient power, it is crucial to accurately monitor the battery charging status. Therefore, the battery charging percentage optimization determination method of the present invention can be adjusted according to the actual use of the POS machine, and the theoretical voltage increment and actual voltage increment of the battery can be obtained in real time to ensure that users can obtain accurate power information when conducting transactions. This method ensures the stability and reliability of the POS machine during peak business hours. It should be noted that although the present invention is based on the lithium battery data of a 5-inch POS, its algorithm theory is applicable to lithium batteries of various rated capacities and rated voltages.

[0085] In some embodiments, the method is applicable to a terminal device that is charged by a constant current; and / or, the method is applicable to a terminal device that is charged by a constant voltage.

[0086] In this embodiment, the battery charge percentage optimization determination method is applicable to two charging modes: constant current charging and constant voltage charging. For terminal devices with constant current charging, the system maintains a constant current input during the charging process to ensure the charging stability of the battery, which is suitable for scenarios that require fast charging, such as smartphones and mobile devices. In the constant voltage charging mode, the system maintains a fixed voltage output to avoid battery damage caused by overcharging, which is suitable for applications with long-term charging, such as power tools and household appliances. By adapting to different charging modes, this method can more flexibly monitor and adjust the charging status to ensure optimal power display and battery protection under different charging conditions. Users can choose the appropriate charging mode according to the charging requirements of the device to ensure that the battery can obtain accurate charging status feedback in various application scenarios, thereby extending battery life and optimizing device performance.

[0087] In a second aspect, the present invention provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method of the first aspect.

[0088] In this embodiment, the storage medium can be in various forms, such as a hard disk, a solid-state hard disk, a USB flash drive, a CD-ROM, or a cloud storage, and can be used in various computing environments. The stored program instructions include multiple modules, each of which is responsible for a specific function, such as obtaining the charging current and charging time of the battery, calculating the theoretical voltage increment, obtaining and matching the discharge voltage, calculating the actual voltage increment, etc. When these instructions are executed by the processor, the system can periodically and synchronously obtain the charging status information of the battery, and update the battery charging percentage display in real time based on the comparison result of the theoretical voltage increment and the actual voltage increment. In this way, the user can intuitively see the charging status of the battery on the terminal device, avoiding accidental shutdown or device failure due to insufficient power. In addition, the portability and flexibility of the storage medium enable the program to be quickly deployed on different devices, making it convenient for users to use the optimization determination method in a variety of application scenarios.

[0089] By converting the optimized determination method into an executable computer program, the automation level of battery charging status monitoring can be improved and human operation errors can be reduced. The portability of the program allows the method to be widely used in various terminal devices, especially in mobile devices and electronic products that need to monitor the battery status in real time, ensuring that users always obtain accurate power information, thereby improving the safety and efficiency of the device. In short, the computer-readable storage medium provides a convenient and intelligent solution for battery charging management.

[0090] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of the first aspect.

[0091] In this embodiment, the memory of the electronic device can be various forms of storage media, such as ROM, RAM, flash memory, etc. These storage media store program codes for implementing the method of the present invention. When the user starts the device or triggers the relevant function, the processor reads and executes these program instructions. First, the system will synchronously obtain the theoretical voltage increment and actual voltage increment of the battery at a preset frequency. The theoretical voltage increment is calculated based on the charging current and charging time, while the actual voltage increment is obtained by matching the discharge curve of the battery. Next, the system will compare the sizes of the two voltage increments. If the actual voltage increment is greater than the theoretical voltage increment, the power display of the terminal device will be increased by 1%; otherwise, the power display will remain unchanged. This dynamic adjustment mechanism ensures the accuracy and real-time display of the battery charging status.

[0092] At the same time, in order to adapt to the characteristics of different types of batteries, the memory of the electronic device can also preset multiple sets of discharge curves and dynamically switch according to the actual battery model used. This flexibility enables the optimization measurement method to be widely used in various terminal devices, such as mobile phones, tablets, notebooks, etc., to provide users with reliable power information.

[0093] By integrating the optimization measurement method into the hardware and software of the device, the automation level of the system is greatly improved, and the user's operating burden is reduced. Secondly, by making full use of the device's own computing resources, the battery charging state can be monitored and adjusted in real time, ensuring that users obtain accurate power feedback during use, thereby optimizing the overall user experience. In addition, the embedded design of this method makes it have good compatibility and scalability, which helps to promote the application of battery management technology in a wider range of electronic equipment fields. In short, this electronic device implementation provides effective hardware support for the optimization determination of the battery charging state.

[0094] Furthermore, the following examples can be developed in combination with the above solutions:

[0095] Compared with the inaccurate charging curve method caused by the uncertainty of charging current, the discharge voltage and capacity curve of the battery is accurate. Therefore, the discharge curve plus voltage increment is introduced to replace the charging curve.

[0096] As the battery is charged, the charging voltage of the battery becomes higher and higher. Then the actual voltage increment becomes higher and higher. On the contrary, the theoretical voltage increment decreases as the charging time increases. It is precisely this increase and decrease that, over time, the actual voltage increment will eventually be greater than the theoretical voltage increment, reaching the feedback balance point.

[0097] 5V650mA charging comparison before and after modification Figure 3 The solid line is the charging curve after optimization using the optimization determination method of the battery charging percentage provided by the present invention, and the dotted line is the charging curve using the prior art, where the old firmware intentionally restarts the discharge when it is charged to 15%, and directly jumps to 43% after restarting, and then quickly drops to 37%, that is, the battery is actually around 37%, and the feedback algorithm charging is just around 37% at this time. The old firmware 37% did not rise by 1% for nearly 2 hours, only because the charging current is small and the voltage increment is small, which cannot reach the voltage corresponding to 38% of the charging curve. The feedback algorithm takes up to 7 minutes to rise by 1%, which will not cause the error of not rising for a long time.

[0098] 5V2A charging comparison Figure 4 The solid line is the charging curve after optimization using the optimization determination method of the battery charging percentage provided by the present invention, and the dotted line is the charging curve using the prior art. The old firmware took more than ten seconds to increase 1% from 1% to 6%, resulting in a falsely high power level. The old firmware took 261 seconds to increase 1%, while the new firmware took 108 seconds to increase the first 90%, and the overall increase was more balanced. After charging 90%, the time for the charging feedback algorithm to increase 1% in the later stage gradually lengthened, just like the actual battery.

[0099] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0100] By introducing the comparison between the theoretical voltage increment and the actual voltage increment, the accuracy of the charging status display is improved, avoiding the problem of inaccurate charging percentage caused by battery aging or reduced charging efficiency. When the charging current cannot be read, the feedback algorithm uses the charging time to calculate the charging current, further calculates the required voltage increment, and replaces the charging curve with the discharge curve plus the voltage increment. The problem of inaccurate power caused by the variable charging current and the fixed charging curve method during constant voltage charging is completely solved from the theoretical root. Compared with the original charging curve algorithm, the charging feedback algorithm greatly improves the accuracy of the charging percentage. The battery charging percentage and the actual battery error are optimized from more than 20% to less than 5%.

[0101] This method can monitor the charging status of the battery in real time, ensuring that the user obtains more reliable power information when using the terminal device, thereby optimizing the user experience and reducing unexpected shutdowns due to insufficient power. In addition, the mechanism of dynamically adjusting the power display enables the terminal device to respond more sensitively to changes in the battery charging process, enhancing the intelligence level of the battery management system. Finally, since this method does not rely on complex hardware support and only needs to be optimized at the software level, it reduces the implementation cost and improves the cost performance of the device. In general, the battery charge percentage optimization determination method of the present invention has significant application prospects in improving the accuracy of charging display, enhancing user experience, and promoting equipment intelligence.

[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit 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 software functional units.

[0103] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0104] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for optimizing the determination of battery charging percentage, characterized in that: Applicable to a terminal device having a rechargeable battery, the method comprising: Acquire a theoretical voltage increment and an actual voltage increment synchronously and regularly according to a preset frequency, wherein the theoretical voltage increment is obtained by calculating the charging current and the charging time, and the actual voltage increment is obtained by calculating the discharge curve; Determining the magnitude of the theoretical voltage increment and the actual voltage increment; If the actual voltage increment is greater than the theoretical voltage increment, the displayed power of the terminal device is increased by 1%; If the actual voltage increment is less than the theoretical voltage increment, the displayed power level is kept unchanged.

2. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The theoretical voltage increment is calculated by charging current and charging time and is expressed by formula (1), which is as follows: In formula (1), V m is the theoretical voltage increment, R is the internal resistance of the battery currently being charged, I is the current charging current of the battery, C is the capacity of the battery, T is the charging time, and the unit of T is minutes.

3. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The discharge curve is a discharge voltage and quantity curve, and the discharge curve is configured to consist of a discharge voltage and a discharge quantity; The actual voltage increment is obtained by calculating the discharge curve, including: Get the displayed power of the current terminal device; Matching a discharge voltage in the discharge curve according to the displayed power to obtain a first voltage value; Obtaining the actual charging voltage of the current battery, recorded as the second voltage value; A difference between the second voltage value and the first voltage value is calculated and recorded as the actual voltage increment.

4. The method for optimizing the battery charging percentage according to claim 3, characterized in that: The actual voltage increment is expressed by formula (2), which is as follows: V a =V c -V d ; In formula (2), V a is the actual voltage increment, V c is the second voltage value, V d is the first voltage value.

5. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The preset frequency is once per minute.

6. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The batteries include lithium batteries with different rated capacities and different rated voltages.

7. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The terminal device is a POS machine.

8. The method for optimizing the battery charging percentage according to claim 1, characterized in that: The method is applicable to a terminal device for constant current charging; and / or, the method is applicable to a terminal device for constant voltage charging.

9. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method of any one of claims 1 to 8 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 8.