Charging method and device, terminal, readable storage medium and program product
By dynamically adjusting the voltage and current, the charging efficiency reduction caused by incompatibility between the terminal and the adapter fast charging protocol is solved, and a stable fast charging effect is achieved.
Patent Information
- Application Number
- CN202310728735.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
The incompatibility of the fast charging protocol between the terminal and the adapter leads to a decrease in charging efficiency. Traditional technology enters the normal charging mode after identifying the intermittent problem, and cannot achieve true fast charging.
When the charging standards of the adapter and the terminal are inconsistent, the first application voltage is determined based on the terminal's battery voltage, the initial application voltage and the preset voltage difference threshold, and the first application voltage, the initial application current and the preset current threshold are determined based on the first application voltage, the initial application current and the preset current threshold. The target application current and the target application voltage are dynamically controlled by the voltage difference and current, and the voltage and current are gradually adjusted to ensure that the voltage difference is within a reasonable range and avoid intermittent problems.
Ensure that the terminal can use the determined target application voltage and target application current for fast charging, improve charging efficiency, and avoid the problem of interruption during the charging process.
Smart Images

Figure CN119171554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fast charging technology, and in particular to a charging method, device, terminal, readable storage medium and program product. Background Art
[0002] With the development of fast charging technology, fast charging has been widely recognized by users and has become a standard feature of smart terminals such as mobile phones. However, when the fast charging protocols between the terminal and the adapter are incompatible, only lower power charging can be achieved. For this reason, a terminal integrated fast charging standard is proposed to solve the problem of incompatibility between fast charging protocols.
[0003] At present, adapters produced by third parties are not necessarily strictly produced in accordance with the terminal's integrated fast charging standards, which causes intermittent problems in the process of voltage and current regulation when the terminal is charging. The avoidance mechanism in traditional technology is that the terminal enters the normal charging mode after identifying the adapter with intermittent problems, resulting in reduced charging efficiency. Summary of the invention
[0004] The embodiments of the present application provide a charging method, device, terminal, readable storage medium and program product, which can solve the problem that an adapter that is not compatible with the terminal's integrated fast charging standard intermittently enters a normal charging mode, resulting in a decrease in terminal charging efficiency.
[0005] In a first aspect, an embodiment of the present application provides a charging method, the charging method comprising:
[0006] When it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal, determining the first application voltage according to the battery voltage of the terminal, the initial application voltage and a preset voltage difference threshold;
[0007] A target application current and a target application voltage are determined according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
[0008] In a second aspect, an embodiment of the present application provides a charging device, the charging device comprising:
[0009] A first determination module, configured to determine a first application voltage according to a battery voltage of the terminal, an initial application voltage and a preset voltage difference threshold when detecting that a charging standard of the adapter is inconsistent with a charging standard of the terminal;
[0010] The second determination module is used to determine a target application current and a target application voltage according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
[0011] In a third aspect, an embodiment of the present application provides a terminal, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method described in the first aspect.
[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0013] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0014] The above-mentioned charging method, device, terminal, readable storage medium and program product can determine the first application voltage according to the battery voltage of the terminal, the initial application voltage and the preset voltage difference threshold when detecting that the charging standard of the adapter is inconsistent with the charging standard of the terminal, so that the target application current and the target application voltage for charging the terminal can be determined according to the first application voltage, the initial application current and the preset current threshold. In this process, the first application voltage applied to the adapter is first determined according to the battery voltage of the terminal, the initial application voltage and the preset voltage difference threshold, and then the target application voltage and the target application current applied to the adapter are determined according to the first application voltage, the initial application current and the preset current threshold. By gradually adjusting the application voltage applied by the terminal to the adapter, the initial application voltage is adjusted to the target application voltage, and the voltage difference and current are dynamically controlled to ensure that the voltage applied to the adapter and the voltage difference of the terminal battery are within a reasonable range, so as to avoid the problem of unstable output caused by the voltage difference between the voltage applied to the adapter and the battery of the terminal being too large, thereby avoiding the problem of intermittent in the process of voltage and current regulation when the terminal is charging, ensuring that the terminal can use the determined target application voltage and target application current for fast charging, thereby ensuring the charging efficiency of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A diagram showing an application environment of a charging method in an embodiment;
[0017] Figure 2is a flow chart of a charging method in one embodiment;
[0018] Figure 3 A flowchart of a charging method in another embodiment;
[0019] Figure 4 A flowchart of a charging method in another embodiment;
[0020] Figure 5 A flowchart of a charging method in another embodiment;
[0021] Figure 6 A flowchart of a charging method in another embodiment;
[0022] Figure 7 A flowchart of a charging method in another embodiment;
[0023] Figure 8 is a structural block diagram of a charging device in one embodiment;
[0024] Fig. 9 is a structural block diagram of a charging device in another embodiment;
[0025] Fig.10 FIG. 4 is a diagram showing the internal structure of a terminal in an embodiment. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0027] With the development of fast charging technology, smart terminals such as mobile phones have made fast charging technology a standard feature. However, due to the inability to effectively identify terminals and adapters of different brands, there is an incompatibility problem between the fast charging protocols of terminals and adapters, which greatly restricts and limits the user's fast charging experience. Therefore, a terminal converged fast charging standard is proposed to solve the problem of incompatibility between fast charging.
[0028] However, the adapters produced by third parties are not necessarily produced strictly in accordance with the terminal's integrated fast charging standard specifications. Therefore, when charging, the terminal will send a voltage and current application request to the adapter. The adapter can output the corresponding voltage and current according to the received application request, and the terminal adjusts the voltage and current applied to the adapter. However, during the terminal voltage and current adjustment process, if the voltage value applied by the terminal to the adapter is too large, the voltage difference between the applied voltage and the battery voltage of the terminal will be too large and cannot be well stabilized, which will cause the current to be unstable, resulting in intermittent charging problems during the voltage and current adjustment process when the terminal is charging. In response to this problem, in the traditional technology, the terminal enters the normal charging mode after identifying the intermittent problem during the voltage and current adjustment process when charging. Even if the fast charging logo is still displayed in the terminal, it will not enter the real fast charging mode, resulting in the charging speed of the terminal not being improved, which reduces the charging efficiency of the terminal. Based on this, the present application proposes a charging method that can ensure the charging efficiency of the integrated fast charging of the terminal.
[0029] Figure 1 FIG. 1 is a schematic diagram of an application environment of a charging method in an embodiment. Figure 1 As shown, the application environment includes a terminal 102 and an adapter 104, the terminal 102 communicates with the adapter 104 through a network, and the adapter 104 can charge the terminal 102. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the adapter 104 can be chargers of various models, or mobile power supplies, or various terminals such as laptop computers and tablet computers. It can be understood that if the adapter 104 is a terminal, for example, the adapter 104 is a laptop computer and the terminal 102 is a smart phone, the smart phone can be charged by the laptop computer, and for another example, when the adapter 104 is a laptop computer and the terminal 102 is a smart watch, the smart watch can be charged by the laptop computer.
[0030] In one embodiment, Figure 2 As shown, a charging method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0031] S201, when it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal, determining a first application voltage according to the battery voltage of the terminal, the initial application voltage and a preset voltage difference threshold.
[0032] First of all, it should be noted that the embodiments of the present application are applied to scenarios where the terminal adopts the Universal Fast Charging Specification (UFCS) for fast charging. Usually, after the terminal establishes a connection with the adapter, the terminal will send a handshake pulse to the adapter. After the adapter detects the handshake pulse, it will disconnect the pins D+ and D- for sending and receiving data. At this time, the terminal can establish a UFCS communication connection with the adapter for fast charging.
[0033] Optionally, in this embodiment, the terminal may send a device information acquisition package get deviceinfo to the adapter to obtain the device information of the adapter, wherein the device information of the adapter may include the identity document (ID) of the adapter manufacturer, the adapter protocol chip manufacturer ID, and the adapter hardware version number. After receiving the device information returned by the adapter, the terminal may determine the manufacturer of the adapter according to the adapter manufacturer ID, determine the device protocol corresponding to the adapter according to the adapter protocol chip manufacturer ID, and determine the hardware model of the adapter according to the adapter hardware version number, thereby being able to determine the unique identifier of the adapter, and may determine whether the adapter belongs to an adapter in a preset adapter library that does not match the UFCS charging standard of the terminal based on the unique identifier of the adapter, and further determine whether the charging standard of the adapter is consistent with the charging standard of the terminal, that is, if the above-mentioned adapter belongs to the above-mentioned adapter library, it means that the charging standard of the adapter is inconsistent with the charging standard of the terminal. As an optional example, if the charging standard of the adapter is to receive the dynamic application voltage sent by the terminal, release the current control, and output the charging voltage and charging current to the terminal through the voltage difference, and the charging standard of the terminal is to send a larger application voltage to the adapter from the initial moment, in this case it can be determined that the charging standard of the adapter is inconsistent with the charging standard of the terminal.
[0034] In this embodiment, the terminal may send a command packet of get output ability to the adapter to obtain the output ability of the adapter. The terminal may determine an initial application voltage with a smaller voltage value according to the output ability of the adapter. For example, the voltage value of the initial application voltage may be a voltage value less than 500mV. Further, the terminal obtains the difference between the initial application voltage and the battery voltage of the terminal, determines the voltage adjustment value according to the difference, and repeatedly iterates and adjusts the initial application voltage by the voltage adjustment value until the initial application voltage reaches the first application voltage. Optionally, if the difference between the initial application voltage and the battery voltage of the terminal is larger, a larger voltage adjustment value may be determined, and if the difference between the initial application voltage and the battery voltage of the terminal is smaller, a smaller voltage adjustment value may be determined. It should be noted that, generally, the condition for the terminal to perform fast charging is that the voltage output by the adapter is higher than the battery voltage of the terminal by 200mV-300mV. Therefore, in this embodiment, the preset voltage difference threshold may be any value within the range of 200mV-300mV, and this embodiment is not limited here. In addition, it can be understood that if the initial application voltage of the terminal and the voltage difference of the battery are between 200mV-300mV, the initial application voltage can be determined as the first application voltage; if the initial application voltage of the terminal and the voltage difference of the battery are not between 200mV-300mV, the initial application voltage can be adjusted to the above-mentioned first application voltage according to the battery voltage of the terminal and the preset voltage difference threshold.
[0035] S202, determining a target application current and a target application voltage according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
[0036] Among them, the target application current is sent by the terminal to the adapter, and is used for the adapter to output a current that can provide fast charging to the terminal according to the target application current. The target application voltage is sent by the terminal to the adapter, and is used for the adapter to output a voltage that can provide fast charging to the terminal according to the target application voltage.
[0037] In this embodiment, as an optional implementation, the terminal may determine an initial application current with a smaller current value according to the output capability of the adapter. For example, the current value of the initial application current may be a current value less than 1A.
[0038] Optionally, in this embodiment, if the initial application current is equal to the preset current threshold, the terminal can determine the first application voltage as the target application voltage, and the initial application current as the target application current. If the initial application current is not equal to the preset current threshold, the difference between the initial application current and the preset current threshold can be obtained, and the current adjustment value for adjusting the initial application current is determined according to the above difference, and then the initial application current is adjusted according to the current adjustment value and the first application voltage is adjusted to determine the target application current and the target application voltage. As an optional implementation, the current adjustment value in this embodiment can be 500mA, or it can be other adjustment values, and this embodiment is not limited here.
[0039] Optionally, the current threshold in this embodiment can be determined by the terminal in advance based on the charging curve of the terminal battery power and battery temperature, the charging current supported by the output capacity of the adapter, and the minimum current of the charging current reduced by the temperature control scenario.
[0040] In the above charging method, when it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal, the first application voltage can be determined according to the battery voltage of the terminal, the initial application voltage and the preset voltage difference threshold, so that the target application current and the target application voltage for charging the terminal can be determined according to the first application voltage, the initial application current and the preset current threshold. In this process, the first application voltage applied to the adapter is first determined according to the battery voltage of the terminal, the initial application voltage and the preset voltage difference threshold, and then the target application voltage and the target application current applied to the adapter are determined according to the first application voltage, the initial application current and the preset current threshold. By gradually adjusting the application voltage applied by the terminal to the adapter, the initial application voltage is adjusted to the target application voltage, and the voltage difference and current are dynamically controlled to ensure that the voltage applied to the adapter and the voltage difference of the terminal battery are within a reasonable range, thereby avoiding the problem of unstable output caused by the voltage difference between the voltage applied to the adapter and the battery of the terminal being too large, thereby avoiding the problem of intermittent in the process of voltage and current regulation when the terminal is charging, ensuring that the terminal can use the determined target application voltage and target application current for fast charging, thereby ensuring the charging efficiency of the terminal. 。
[0041] In the above scenario where the first application voltage is determined based on the battery voltage of the terminal, the initial application voltage and the preset voltage difference threshold, the terminal can iteratively adjust the initial application voltage based on the preset voltage difference threshold until the difference between the voltage satisfied by the adapter output and the battery voltage of the terminal is greater than or equal to the voltage difference threshold, thereby determining the first application voltage. Figure 3 As shown, the above S201 includes:
[0042] S301, executing a voltage adjustment step, the voltage adjustment step comprising: adjusting an initial application voltage to a second application voltage according to a voltage difference threshold, and obtaining a first output voltage from an adapter based on the second application voltage.
[0043] It is understandable that if the voltage value of the initial application voltage is small, then the voltage output by the adapter based on the initial application voltage is also small, and may not meet the terminal's fast charging requirements. Therefore, it is necessary to increase the voltage value of the initial application voltage.
[0044] In this embodiment, when the initial application voltage is less than the battery voltage of the terminal, the initial application voltage can be adjusted to a second application voltage. Optionally, the terminal can add a voltage adjustment value to the initial application voltage to obtain the second application voltage, or the terminal can determine the product value of the initial application voltage and the adjustment coefficient as the second application voltage based on a preset adjustment coefficient.
[0045] Further, as an optional implementation, after the terminal adjusts the initial application voltage to the second application voltage, it can send a first control packet for obtaining resource information to the adapter based on the second application voltage. After receiving the above-mentioned first control packet, the adapter can output a first output voltage according to the second application voltage, and send a resource information data packet including the first output voltage to the terminal.
[0046] S302, taking the first output voltage as a new initial application voltage, and returning to execute the voltage adjustment step until the difference between the first output voltage and the battery voltage is greater than or equal to the voltage difference threshold, and determining the first output voltage as the first application voltage.
[0047] In this embodiment, the difference between the first output voltage received by the terminal and the battery voltage of the terminal may still be smaller than the above-mentioned voltage difference threshold. Therefore, the terminal can use the received first output voltage as the new initial application voltage and return to execute the above-mentioned voltage adjustment step until the difference between the first output voltage output by the adapter is greater than or equal to the above-mentioned voltage difference threshold. At this time, the terminal can determine the first output voltage whose difference between the first output voltage and the battery voltage is greater than or equal to the voltage difference threshold as the above-mentioned first application voltage.
[0048] As an example, the terminal can use the first output voltage as the new initial application voltage, adjust the new initial application voltage to a new second application voltage according to the voltage difference threshold, and obtain a new first output voltage from the adapter based on the new second application voltage. If the difference between the new first output voltage and the battery voltage is greater than or equal to the above-mentioned voltage difference threshold, the terminal determines the new first output voltage as the first application voltage; if the difference between the new first output voltage and the battery voltage is less than the above-mentioned voltage difference threshold, the terminal uses the new first output voltage as the above-mentioned new initial application voltage, and returns to execute the above-mentioned voltage adjustment step until the difference between the first output voltage output by the adapter and the battery voltage is greater than or equal to the above-mentioned voltage difference threshold, so as to obtain the above-mentioned first application voltage.
[0049] In this embodiment, the voltage adjustment step is iteratively performed until the difference between the first output voltage output by the adapter and the battery voltage is greater than or equal to the voltage difference threshold, and the first output voltage at this time is determined as the first application voltage, that is, the difference between the determined first application voltage and the battery voltage is greater than or equal to the voltage difference threshold. The voltage is dynamically applied to ensure that the voltage difference between the output voltage of the adapter and the battery voltage is within a reasonable range, so that the adapter can provide the terminal with a first output voltage for fast charging, thereby ensuring the charging efficiency of the terminal. In addition, in the embodiment of the present application, since the initial application voltage is iteratively adjusted multiple times with a voltage adjustment value, the voltage value of the initial application voltage can be gradually increased, which can avoid the problem of intermittent output of the adapter caused by using a larger application voltage at the beginning.
[0050] The following describes the detailed process of adjusting the initial application voltage to the second application voltage according to the voltage difference threshold. Figure 4 As shown, the above S301 includes:
[0051] S401, obtaining a difference between an initial application voltage and a battery voltage.
[0052] In this embodiment, the terminal may obtain the battery voltage through a battery power meter, and then obtain the difference between the initial application voltage and the battery voltage after determining the initial application voltage.
[0053] S402: When the difference is less than the voltage difference threshold, the initial application voltage is adjusted according to a preset voltage adjustment value to obtain a second application voltage.
[0054] In this embodiment, if the difference between the initial application voltage and the battery voltage is less than the voltage difference threshold, it means that the voltage applied by the terminal to the adapter has not yet reached the condition for starting direct charging, so the initial application voltage of the terminal needs to be adjusted.
[0055] Optionally, in this embodiment, the preset voltage adjustment value may be a value determined based on historical experience, and illustratively, the preset voltage adjustment value may be 300mV, or may be other values, which are not limited in this embodiment. Exemplarily, assuming that the initial application voltage is 2V and the preset voltage adjustment value is 200mV, the terminal may use the sum of the initial application voltage and the preset voltage adjustment value as the second application voltage, that is, the second application voltage may be 2.3V.
[0056] In this embodiment, by obtaining the difference between the initial application voltage and the battery voltage, the initial application voltage can be adjusted according to a preset voltage adjustment value to obtain a second application voltage when the difference between the initial application voltage and the battery voltage is less than a voltage difference threshold. Since the terminal adjusts the initial voltage when the difference between the initial application voltage and the battery voltage is less than the voltage difference threshold, the accuracy of the adjustment of the initial application voltage is ensured, and the adjustment process of adjusting the initial application voltage according to the preset voltage adjustment value is relatively simple, and the second application voltage can be obtained quickly, thereby improving the efficiency of obtaining the second application voltage.
[0057] The detailed process of determining the target application current and the target application voltage will be described in the embodiment. Figure 5 As shown, the above S202 includes:
[0058] S501, obtaining a comparison result between an initially applied current and a current threshold.
[0059] Optionally, in this embodiment, the difference between the initial application current and the current threshold can be obtained, and the comparison result between the initial application current and the current threshold can be determined based on the difference. Optionally, if the difference is 0, it means that the comparison result is that the initial application current is equal to the current threshold; if the difference is greater than 0, it means that the comparison result is that the initial application current is greater than the current threshold; if the difference is less than 0, it means that the comparison result is that the initial application current is less than the current threshold. Alternatively, the ratio between the initial application current and the current threshold can be obtained, and the comparison result between the initial application current and the current threshold can be determined based on the ratio. Optionally, if the ratio is 1, it means that the comparison result is that the initial application current is equal to the current threshold; if the ratio is greater than 1, it means that the comparison result is that the initial application current is greater than the current threshold; if the ratio is less than 1, it means that the comparison result is that the initial application current is less than the current threshold.
[0060] S502, determining a target application current and a target application voltage according to the first application voltage, the initial application current and the comparison result.
[0061] In this embodiment, if the comparison result is that the initial application current is less than the current threshold, it means that the current currently applied by the terminal to the adapter is too small, and the initial application current needs to be increased to obtain the target application current; if the comparison result is that the initial application current is greater than the current threshold, it means that the current currently applied by the terminal to the adapter is too large, and the initial application current needs to be reduced to obtain the target application current; if the comparison result is that the initial application current is equal to the current threshold, then as an optional implementation method, the above-mentioned initial application current can be determined as the target application current, and the above-mentioned first application voltage can be determined as the target application voltage.
[0062] In addition, it should be noted that when the initial application current is adjusted, the battery voltage of the terminal may change. Therefore, in the process of adjusting the initial application current, it is also necessary to adaptively adjust the size of the first application voltage of the terminal to determine the target voltage that matches the final target current.
[0063] In this embodiment, since the process of obtaining the comparison result between the initial application current and the current threshold is relatively simple, the target application current and the target application voltage can be quickly determined based on the first application voltage, the initial application current and the obtained comparison result, thereby improving the efficiency of the terminal in determining the target application current and the target application voltage, thereby improving the charging efficiency of the terminal.
[0064] The following describes the detailed process of determining the target application current and the target application voltage based on the first application voltage, the initial application current and the comparison result when the initial application current is less than the current threshold. Figure 6 As shown, the above S502 includes:
[0065] S601, if the comparison result is that the initial application current is less than the current threshold, a first current adjustment step is executed, and the first current adjustment step includes: adjusting the initial application current to a first application current, adjusting the first application voltage to a third application voltage, obtaining a second output voltage from the adapter based on the first application current and the third application voltage, adjusting the second output voltage to a fourth application voltage, and obtaining a first output current from the adapter based on the fourth application voltage and the first application current.
[0066] It is understandable that, when the initial application current is less than the current threshold, the current value of the initial application current can be increased. As an optional implementation, the first application current can be determined based on the sum of the preset first current adjustment value and the initial application current. For example, the sum of the first current adjustment value and the initial application current can be used as the first application current. Exemplarily, taking the first current adjustment value as 500mA as an example, if the initial application current is 1A, the first application current can be 1A+500mA=1.5A.
[0067] It should be noted that when the initial application current is adjusted according to the preset first current adjustment value, the battery voltage may change. Therefore, the first application voltage applied by the terminal to the adapter needs to be adjusted. Since the preset first current adjustment value does not know in advance the magnitude of the battery voltage change, in this embodiment, a maximum possible voltage adjustment value can be added to the first application voltage applied to the adapter, and the first application voltage can be adjusted to the third application voltage, that is, the sum of the first application voltage and the first voltage adjustment value is used as the third application voltage, and the second output voltage is obtained from the adapter based on the first application current and the third application voltage. As an example, when the preset first current adjustment value is 500mA, the corresponding first voltage adjustment value can be 300mV. It should be noted here that the corresponding relationship between the first current adjustment value and the first voltage adjustment value is determined in advance through a large number of experiments. It is determined through experiments that after the initial application current is adjusted by the first current adjustment value, the first voltage adjustment value will not cause the battery voltage to change. Exemplarily, taking the first voltage adjustment value as 300mV as an example, if the first application voltage is 4V, the third application voltage can be 4V+400mV=4.3V.
[0068] After the terminal adjusts the initial application current to the first application current and the first application voltage to the third application voltage, the terminal can send a second control packet to the adapter based on the first application current and the third application voltage, and receive the second output voltage output by the adapter based on the second control packet. Further, the terminal can adjust the second output voltage output by the adapter to a fourth application voltage based on the second voltage adjustment value. As an optional implementation, the terminal can determine the sum of the second output voltage and the second voltage adjustment value as the fourth application voltage. Exemplarily, in this embodiment, the second voltage adjustment value can be 10mv, or it can be other adjustment values, which are not limited in this embodiment. Exemplarily, if the first application current is 1.5A and the third application voltage is 4.3V, the second output voltage can be 4.3V, and if the second voltage adjustment value is 10mV, the fourth application voltage can be 4.3V+10mV=4.31V.
[0069] Further, after the terminal adjusts the second output voltage to the fourth application voltage, the terminal can send a third control packet to the adapter based on the fourth application voltage and the first application current, and receive the first output current output by the adapter based on the third control packet. Exemplarily, if the first application current is 1.5A, the first output current output by the adapter can be 1.5A.
[0070] S602, taking the first output current as a new initial application current, and returning to execute the first current adjustment step until the first output current is equal to the current threshold, determining the first output current as the target application current, and determining the fourth application voltage as the target application voltage.
[0071] It can be understood that in the embodiment of the present application, in order to avoid the problem of intermittent output caused by the adapter directly receiving a relatively large application current, the current regulation scheme adopted is based on a smaller initial application current, and the initial application current is gradually increased using a preset current adjustment value. Therefore, after receiving the first output current sent by the adapter, the terminal can use the first output current as the new initial application current, adjust the new initial application current using the preset current adjustment value, and repeat the above-mentioned first current adjustment step until the first output current output by the adapter is equal to the current threshold, and the first output current when the first output current output by the adapter is equal to the current threshold is determined as the target application current, and the fourth application voltage corresponding to the first output current is determined as the target application voltage.
[0072] In this embodiment, when the comparison result is that the initial application current is less than the current threshold, the first current adjustment step can be executed. Through the first current adjustment step, the initial application current can be adjusted to the first application current, and the first application voltage can be adjusted to the third application voltage. The second output voltage can be obtained from the adapter based on the first application current and the third application voltage, and the second output voltage can be adjusted to the fourth application voltage. The first output current is obtained from the adapter based on the fourth application voltage and the first application current, so that the first output current is used as the new initial application current, and the first current adjustment step is returned to be executed until the first output current is equal to the current threshold, so that the terminal can gradually increase the current value applied to the adapter, avoiding the problem of intermittent output caused by the adapter directly receiving a larger current, and then the first output current output by the adapter that meets the fast charging requirements can be determined as the target application current, and the fourth application voltage can be determined as the target application voltage, so that the adapter can quickly charge the terminal and improve the charging efficiency.
[0073] The following describes the detailed process of determining the target application current and the target application voltage according to the first application voltage, the initial application current and the comparison result when the initial application current is greater than the current threshold. Figure 7 As shown, the above S502 further includes:
[0074] S701, if the comparison result is that the initial application current is greater than the current threshold, a second current adjustment step is executed, and the second current adjustment step includes: adjusting the initial application current to a second application current, obtaining a third output voltage from the adapter based on the second application current and the first application voltage, adjusting the third output voltage to a fifth application voltage, and obtaining a second output current from the adapter based on the fifth application voltage and the second application current.
[0075] It is understandable that, when the initial application current is greater than the current threshold, the current value of the initial application current can be reduced. As an optional implementation, the second application current can be determined based on the difference between the preset second current adjustment value and the initial application current. For example, the difference between the second current adjustment value and the initial application current can be used as the second application current. Optionally, the second current adjustment value can be the same as the first current adjustment value, or the second current adjustment value can also be different from the first current adjustment value. For example, taking the second current adjustment value as 500mA as an example, if the initial application current is 2.5A, the second application current can be 2.5A-500mA=2A.
[0076] After the terminal adjusts the initial application current to the second application current, the terminal can send a fourth control packet to the adapter based on the second application current and the first application voltage, and receive the third output voltage output by the adapter based on the fourth control packet. Further, the terminal can adjust the third output voltage output by the adapter to a fifth application voltage based on the third voltage adjustment value. As an optional implementation, the terminal can determine the sum of the third output voltage and the third voltage adjustment value as the fifth application voltage. Optionally, the third voltage adjustment value in this embodiment can be the same as the second voltage adjustment value, or the third voltage adjustment value can also be a voltage adjustment value different from the second voltage adjustment value. Optionally, in this embodiment, the third voltage adjustment value can be 10mV, or it can also be other adjustment values, which is not limited in this embodiment. For example, if the third voltage adjustment value is 10mV and the third output voltage is 4V, the fifth application voltage can be 10mV+4V=4.01V.
[0077] Further, after the terminal adjusts the third output voltage to the fifth application voltage, the terminal can send a fifth control packet to the adapter based on the fifth application voltage and the second application current, and receive the second output current output by the adapter based on the fifth control packet. Exemplarily, if the second application current is 2A, the second output current output by the adapter can be 2A.
[0078] S702, taking the second output current as a new initial application current, and returning to execute the second current adjustment step until the second output current is equal to the current threshold, determining the second output current as the target application current, and determining the fifth application voltage as the target application voltage.
[0079] It can be understood that in the embodiment of the present application, in order to solve the problem that the application current sent to the adapter is too small and the voltage difference is too large, resulting in the failure of the charging control loop in the adapter, the current regulation scheme adopted in the present embodiment is to reduce the initial application current one by one. Therefore, after receiving the second output current, the terminal can use the second output current as the new initial application current, adjust the new initial application current using the preset current adjustment value, and repeat the above-mentioned second current adjustment step until the second output current output by the adapter is equal to the current threshold, and the second output current output by the adapter is equal to the current threshold. The second output current is determined as the target application current, and the fifth application voltage corresponding to the second output current is determined as the target application voltage.
[0080] In this embodiment, when the comparison result is that the initial application current is greater than the current threshold, the second current adjustment step can be executed. The initial application current can be adjusted to the second application current through the second current adjustment step, and the third output voltage is obtained from the adapter based on the second application current and the first application voltage, and the third output voltage is adjusted to the fifth application voltage. The second output current is obtained from the adapter based on the fifth application voltage and the second application current, so that the second output current is used as the new initial application current, and the second current adjustment step is returned until the second output current is equal to the current threshold, so that the terminal can gradually reduce the current value applied to the adapter, avoiding the problem that the application current sent to the adapter is too small and the voltage difference is too large, resulting in the failure of the charging control loop in the adapter, and then the second output current output by the adapter that meets the fast charging requirements can be determined as the target application current, and the fifth application voltage is determined as the target application voltage, so that the adapter can quickly charge the terminal and improve the charging efficiency.
[0081] To facilitate understanding by those skilled in the art, the charging method provided by the present application is described in detail below. The method may include:
[0082] S1. When it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal, a voltage adjustment step is performed. The voltage adjustment step includes: obtaining the difference between the initial application voltage and the battery voltage, and when the difference is less than the voltage difference threshold, adjusting the initial application voltage according to a preset voltage adjustment value to obtain a second application voltage.
[0083] S2: Obtain a first output voltage from an adapter based on the second application voltage.
[0084] S3, taking the first output voltage as a new initial application voltage, and returning to execute the voltage adjustment step until the difference between the first output voltage and the battery voltage is greater than or equal to the voltage difference threshold, and determining the first output voltage as the first application voltage.
[0085] S4, obtain the comparison result between the initial application current and the current threshold. If the comparison result between the initial application current and the current threshold is that the initial application current is less than the current threshold, execute step S5. If the comparison result between the initial application current and the current threshold is that the initial application current is greater than the current threshold, execute step S6. If the initial application current is equal to the target current, execute step S7.
[0086] S5, execute the first current adjustment step, the first current adjustment step includes: determining the first application current according to the sum of the preset first current adjustment value and the initial application current, adjusting the first application voltage to the third application voltage, obtaining the second output voltage from the adapter based on the first application current and the third application voltage, adjusting the second output voltage to the fourth application voltage, obtaining the first output current from the adapter based on the fourth application voltage and the first application current, taking the first output current as the new initial application current, and returning to execute the first current adjustment step until the first output current is equal to the current threshold, determining the first output current as the target application current, and determining the fourth application voltage as the target application voltage.
[0087] S6, execute the second current adjustment step, the second current adjustment step comprising: determining the second application current according to the difference between the preset second current adjustment value and the initial application current, obtaining a third output voltage from the adapter based on the second application current and the first application voltage, adjusting the third output voltage to a fifth application voltage, obtaining a second output current from the adapter based on the fifth application voltage and the second application current, using the second output current as a new initial application current, and returning to execute the second current adjustment step until the second output current is equal to the current threshold, determining the second output current as the target application current, and determining the fifth application voltage as the target application voltage.
[0088] S7, determining the initial application current as the target application current, and determining the first application voltage as the target application voltage.
[0089] S8, charging the terminal using the target application current and the target application voltage.
[0090] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to 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 flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0091] Based on the same inventive concept, the embodiment of the present application also provides a charging device for implementing the above-mentioned charging method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more charging device embodiments provided below can refer to the limitations on the charging method above, and will not be repeated here.
[0092] In one embodiment, Figure 8 As shown, a charging device is provided, comprising: a first determination module 10 and a second determination module 11, wherein:
[0093] The first determination module 10 is used to determine the first application voltage according to the battery voltage of the terminal, the initial application voltage and a preset voltage difference threshold when it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal.
[0094] The second determination module 11 is used to determine a target application current and a target application voltage according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
[0095] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0096] In one embodiment, Fig. 9 As shown, the first determination module 10 comprises: a first execution unit 101 and a first determination unit 102, wherein:
[0097] The first execution unit 101 is used to execute a voltage adjustment step, which includes: adjusting an initial application voltage to a second application voltage according to a voltage difference threshold, and obtaining a first output voltage from an adapter based on the second application voltage.
[0098] The first determination unit 102 is used to use the first output voltage as a new initial application voltage and return to execute the voltage adjustment step until the difference between the first output voltage and the battery voltage is greater than or equal to a voltage difference threshold, and determine the first output voltage as the first application voltage.
[0099] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0100] In one embodiment, please continue to refer to Fig. 9 The first execution unit 101 is specifically used to: obtain the difference between the initial application voltage and the battery voltage; when the difference is less than the voltage difference threshold, adjust the initial application voltage according to a preset voltage adjustment value to obtain a second application voltage.
[0101] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0102] In one embodiment, please continue to refer to Fig. 9 The second determination module 11 includes: an acquisition unit 111 and a second determination unit 112, wherein:
[0103] The acquisition unit 111 is used to acquire a comparison result between the initial application current and the current threshold.
[0104] The second determining unit 112 is used to determine a target applied current and a target applied voltage according to the first applied voltage, the initial applied current and the comparison result.
[0105] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0106] In one embodiment, please continue to refer to Fig. 9 The second determination unit 112 is specifically used for: if the comparison result is that the initial application current is less than the current threshold, executing the first current adjustment step, the first current adjustment step including: adjusting the initial application current to the first application current, adjusting the first application voltage to the third application voltage, obtaining the second output voltage from the adapter based on the first application current and the third application voltage, adjusting the second output voltage to the fourth application voltage, obtaining the first output current from the adapter based on the fourth application voltage and the first application current; using the first output current as the new initial application current, and returning to execute the first current adjustment step until the first output current is equal to the current threshold, determining the first output current as the target application current, and determining the fourth application voltage as the target application voltage.
[0107] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0108] In one embodiment, please continue to refer to Fig. 9 The second determining unit 112 is specifically used to determine the first application current according to the sum of the preset first current adjustment value and the initial application current.
[0109] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0110] In one embodiment, please continue to refer to Fig. 9 The second determination unit 112 is specifically used to: if the comparison result is that the initial application current is greater than the current threshold, then execute the second current adjustment step, the second current adjustment step including: adjusting the initial application current to the second application current, obtaining a third output voltage from the adapter based on the second application current and the first application voltage, adjusting the third output voltage to the fifth application voltage, and obtaining a second output current from the adapter based on the fifth application voltage and the second application current; using the second output current as the new initial application current, and returning to execute the second current adjustment step until the second output current is equal to the current threshold, determining the second output current as the target application current, and determining the fifth application voltage as the target application voltage.
[0111] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0112] In one embodiment, please continue to refer to Fig. 9 The second determining unit 112 is specifically used to determine the second application current according to the difference between the preset second current adjustment value and the initial application current.
[0113] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0114] In one embodiment, please continue to refer to Fig. 9 The second determining unit 112 is specifically used to: if the initial application current is equal to the current threshold, determine the initial application current as the target application current, and determine the first application voltage as the target application voltage.
[0115] The charging device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0116] Each module in the above charging device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0117] In one embodiment, a terminal is provided, whose internal structure diagram can be as follows: Fig.10 As shown. The terminal includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the terminal is used to exchange information between the processor and an external device. The communication interface of the terminal is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a charging method is implemented. The display unit of the terminal is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the terminal housing, or an external keyboard, touchpad or mouse.
[0118] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0119] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the charging method.
[0120] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute a charging method.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0122] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A charging method, characterized in that: include: When it is detected that the charging standard of the adapter is inconsistent with the charging standard of the terminal, determining the first application voltage according to the battery voltage of the terminal, the initial application voltage and a preset voltage difference threshold; A target application current and a target application voltage are determined according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
2. The method according to claim 1, characterized in that The step of determining the first application voltage according to the battery voltage of the terminal, the initial application voltage and a preset voltage difference threshold comprises: Executing a voltage adjustment step, the voltage adjustment step comprising: adjusting the initial application voltage to a second application voltage according to the voltage difference threshold, and obtaining a first output voltage from the adapter based on the second application voltage; The first output voltage is used as a new initial application voltage, and the voltage adjustment step is performed again until the difference between the first output voltage and the battery voltage is greater than or equal to the voltage difference threshold, and the first output voltage is determined as the first application voltage.
3. The method according to claim 2, characterized in that The adjusting the initial application voltage to a second application voltage according to the voltage difference threshold comprises: Obtaining a difference between the initial application voltage and the battery voltage; When the difference is smaller than the voltage difference threshold, the initial applied voltage is adjusted according to a preset voltage adjustment value to obtain the second applied voltage.
4. The method according to any one of claims 1 to 3, characterized in that: The step of determining a target application current and a target application voltage according to the first application voltage, the initial application current and a preset current threshold value includes: Obtaining a comparison result between the initial application current and the current threshold; A target application current and a target application voltage are determined according to the first application voltage, the initial application current and the comparison result.
5. The method according to claim 4, characterized in that The step of determining a target application current and a target application voltage according to the first application voltage, the initial application current and the comparison result includes: If the comparison result is that the initial application current is less than the current threshold, a first current adjustment step is performed, and the first current adjustment step includes: adjusting the initial application current to a first application current, adjusting the first application voltage to a third application voltage, obtaining a second output voltage from the adapter based on the first application current and the third application voltage, adjusting the second output voltage to a fourth application voltage, and obtaining a first output current from the adapter based on the fourth application voltage and the first application current; The first output current is used as a new initial application current, and the first current adjustment step is returned to be executed until the first output current is equal to the current threshold, the first output current is determined as the target application current, and the fourth application voltage is determined as the target application voltage.
6. The method according to claim 5, characterized in that The adjusting the initial application current to the first application current includes: The first application current is determined according to the sum of a preset first current adjustment value and the initial application current.
7. The method according to claim 4, characterized in that The step of determining a target application current and a target application voltage according to the first application voltage, the initial application current and the comparison result further includes: If the comparison result is that the initial application current is greater than the current threshold, a second current adjustment step is performed, and the second current adjustment step includes: adjusting the initial application current to a second application current, obtaining a third output voltage from the adapter based on the second application current and the first application voltage, adjusting the third output voltage to a fifth application voltage, and obtaining a second output current from the adapter based on the fifth application voltage and the second application current; The second output current is used as a new initial application current, and the second current adjustment step is performed again until the second output current is equal to the current threshold, the second output current is determined as the target application current, and the fifth application voltage is determined as the target application voltage.
8. The method according to claim 7, characterized in that The adjusting the initial application current to a second application current includes: The second application current is determined according to a difference between a preset second current adjustment value and the initial application current.
9. The method according to claim 4, characterized in that The step of determining a target application current and a target application voltage according to the first application voltage, the initial application current and the comparison result further includes: If the comparison result is that the initial application current is equal to the current threshold, the initial application current is determined as the target application current, and the first application voltage is determined as the target application voltage.
10. A charging device, characterized in that: include: A first determination module, configured to determine a first application voltage according to a battery voltage of the terminal, an initial application voltage and a preset voltage difference threshold when detecting that a charging standard of the adapter is inconsistent with a charging standard of the terminal; The second determination module is used to determine a target application current and a target application voltage according to the first application voltage, the initial application current and a preset current threshold; the target application current and the target application voltage are used to charge the terminal.
11. A terminal comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method for determining the charging current according to any one of claims 1 to 9.
12. 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 according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
