Control method and device

By adjusting the value of the current limiter, the discharge speed of the battery in the foldable smart device is controlled so that the power consumption is close to it, which solves the battery life problem caused by uneven battery discharge and extends the use time of the device.

CN117713265BActive Publication Date: 2024-09-13HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310751594.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2024-09-13
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

In foldable smart devices, due to uneven battery discharge, the battery with lower voltage is exhausted first while the battery with higher voltage is not completely discharged, affecting the battery life of the device.

Method used

By adjusting the value of the current limiter, the discharge speed of the first battery and the second battery is controlled so that their power consumption is close, thereby extending the battery life of the terminal device.

Benefits of technology

This effectively makes the two batteries run out of power close to each other, extending the battery life of the device and solving the battery life problem caused by uneven battery discharge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117713265B
    Figure CN117713265B
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of computer technology, and in particular to a control method and device. The method is applied to a terminal device, which is provided with a first battery, a second battery, a current limiter and a system load. The first battery is electrically connected to the system load through the current limiter, and the second battery is electrically connected to the system load. The method includes: obtaining battery parameters, the battery parameters include the first voltage and the first current of the first battery and the second voltage and the second current of the second battery; judging whether the battery parameters are within the corresponding expected intervals; if it is determined that the battery parameters exceed the expected interval, determining the first limit value corresponding to the current battery parameters in the parameter adjustment table; and adjusting the value of the current limiter to the first limit value. By adjusting the first current, the discharge speed of the first battery and the second battery can be controlled, so that the time when the two batteries reach the shutdown voltage is close, thereby extending the battery life of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a control method and device. Background Art

[0002] Nowadays, foldable smart devices usually contain multiple batteries. Take foldable mobile phones as an example. Foldable mobile phones are equipped with two batteries. Due to limited space, one battery is set on the main board and the other battery is set on the small board. Ideally, when discharging, the voltage drop rate of the two batteries should be close, and eventually they can reach the shutdown threshold at the same time. However, due to the influence of factors such as the internal resistance characteristics of the battery, system power consumption, and wiring impedance, when the two batteries power the main board, the discharge speed of the two batteries may be uneven, which in turn causes the voltage difference between the two batteries to gradually increase. When the battery with a smaller voltage is less than the shutdown voltage, the mobile phone needs to shut down, while the battery with a higher voltage has not reached the shutdown voltage, and the power is not completely discharged, resulting in a shorter battery life of the mobile phone, affecting the normal use of the user. Summary of the invention

[0003] The present application provides a control method and device. By adjusting the first current, the discharge speed of the first battery and the second battery can be controlled so that the power consumption of the two batteries is close to each other, and then the time when the two batteries reach the shutdown voltage is close to each other, thereby extending the battery life of the terminal device.

[0004] In a first aspect, an embodiment of the present application provides a control method, which is applied to a terminal device, wherein the terminal device is provided with a first battery, a second battery, a current limiter, and a system load, wherein the first battery is electrically connected to the system load through the current limiter, and the second battery is electrically connected to the system load, and the method includes:

[0005] Acquire battery parameters, where the battery parameters include a first voltage and a first current of the first battery and a second voltage and a second current of the second battery;

[0006] Determining whether the battery parameters are within their respective expected ranges;

[0007] If it is determined that the battery parameter exceeds the expected range, determining a first limit value corresponding to the current battery parameter in the parameter adjustment table;

[0008] The value of the current limiter is adjusted to the first limiting value, wherein the current limiter is used to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value.

[0009] In one embodiment, the method further comprises:

[0010] If it is determined that the first limit value corresponding to the current battery parameter does not exist in the parameter adjustment table, storing the current battery parameter as the first parameter in the parameter adjustment table;

[0011] The value of the current limiter is adjusted until the battery parameter reaches the expected range or reaches a stable state, and the current value of the current limiter is stored in the parameter adjustment table as a limit value associated with the first parameter.

[0012] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0013] Obtaining the adjustment range of the current limiter, including: a maximum limit value and a minimum limit value;

[0014] Processing the maximum limit value and the minimum limit value multiple times based on a dichotomy method, and obtaining an optional limit value each time;

[0015] Based on the order in which the optional limit values ​​are obtained, the value of the current limiter is adjusted to the optional limit values ​​in sequence until the battery parameter reaches the expected range or reaches a stable state.

[0016] In one embodiment, the first current has a corresponding first safety threshold;

[0017] The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises:

[0018] If it is detected that the first current exceeds the first safety threshold, the value of the current limiter is reduced until the first current is less than or equal to the first safety threshold.

[0019] In one embodiment, the second current has a corresponding second safety threshold;

[0020] The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises:

[0021] If it is detected that the second current exceeds the second safety threshold, the value of the current limiter is increased to increase the first current and decrease the second current until the second current is less than or equal to the second safety threshold.

[0022] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0023] determining a voltage difference between the first voltage and the second voltage;

[0024] When it is detected that the absolute value of the voltage difference exceeds a third safety threshold, the value of the current limiter is adjusted until the voltage difference falls within the expected range or reaches a stable state.

[0025] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0026] If the first voltage is greater than the second voltage and the absolute value of the voltage difference exceeds the third safety threshold, the value of the current limiter is increased until the absolute value of the voltage difference is less than or equal to the third safety threshold.

[0027] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0028] If the first current has reached the first safety threshold before the absolute value of the voltage difference is smaller than the third safety threshold, then increasing the value of the current limiter is stopped and it is determined that the stable state has been reached.

[0029] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0030] If the first voltage is less than the second voltage and the absolute value of the voltage difference exceeds the third safety threshold, the value of the current limiter is reduced until the absolute value of the voltage difference is less than or equal to the third safety threshold.

[0031] In one embodiment, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes:

[0032] If the second current has reached the second safety threshold before the absolute value of the voltage difference is smaller than the third safety threshold, then the reduction of the value of the current limiter is stopped and it is determined that the stable state has been reached.

[0033] In one embodiment, the current limiter is a pulse width modulation (PWM) device.

[0034] In a second aspect, an embodiment of the present application provides a control device, which is deployed in a terminal device, wherein the terminal device is provided with a first battery, a second battery, a current limiter and a system load, wherein the first battery is electrically connected to the system load through the current limiter, and the second battery is electrically connected to the system load, and the device includes:

[0035] an acquisition module, configured to acquire battery parameters, wherein the battery parameters include a first voltage and a first current of the first battery and a second voltage and a second current of the second battery;

[0036] A determination module, used to determine whether the battery parameters are within the corresponding expected ranges;

[0037] a determination module, configured to determine a first limit value corresponding to the current battery parameter in a parameter adjustment table if it is determined that the battery parameter exceeds the expected range;

[0038] A processing module is used to adjust the value of the current limiter to the first limiting value, wherein the current limiter is used to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value.

[0039] In a third aspect, an embodiment of the present application provides a terminal device, including:

[0040] at least one processor; and

[0041] at least one memory in communication with the processor, wherein:

[0042] The memory stores program instructions, and the processor calls the program instructions to execute the method provided by the first aspect.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein the program implements the method provided in the first aspect when executed by a processor.

[0044] In an embodiment of the present application, the terminal device is provided with a first battery, a second battery, a current limiter and a system load, the first battery is connected to the system load through the current limiter, and the second battery is connected to the system load, and the method includes: obtaining battery parameters, the battery parameters include the first voltage and the first current of the first battery and the second voltage and the second current of the second battery; judging whether the battery parameters are within the corresponding expected intervals; if it is determined that the battery parameters exceed the expected interval, determining the first limit value corresponding to the current battery parameters in the parameter adjustment table; adjusting the value of the current limiter to the first limit value. By adjusting the first current, the discharge speed of the first battery and the second battery can be controlled, so that the time when the two batteries reach the shutdown voltage is close, thereby extending the battery life of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of the structure of a control device provided in an embodiment of the present application;

[0046] Figure 2A flow chart of a control method provided in an embodiment of the present application;

[0047] Figure 3 A flowchart of another control method provided in an embodiment of the present application;

[0048] Figure 4 A flowchart of another control method provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the structure of another control device provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to better understand the technical solution of this specification, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0052] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0053] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0054] Nowadays, terminal devices such as foldable mobile phones can support multiple batteries at the same time. After the terminal device is turned on, the power consumption of the two batteries is not necessarily the same. If one battery is exhausted prematurely, the terminal device needs to be shut down, and the other battery cannot be used even if it has power. In this way, the battery life of the terminal device will be affected. To address this problem, an embodiment of the present application provides a control method, which controls the discharge speed of the battery so that the time when the two batteries are exhausted is close, thereby effectively extending the battery life of the terminal device.

[0055] The control method provided in the embodiment of the present application can be applied to terminal devices including more than two batteries, such as foldable mobile phones. For the convenience of description, the terminal device in the embodiment of the present application is configured with two batteries by default, namely, a first battery and a second battery, the first battery and the second battery are connected to the system load respectively, wherein a current limiter is also configured between the first battery and the system load. Figure 1As shown, the terminal device 110 is internally provided with a first battery 101, a second battery 102, a current limiter 103 and a system load 104. If the terminal device 110 is a foldable mobile phone, the first battery 101 and the second battery 102 can be respectively provided on different foldable plates, the system load 104 is used to characterize the sum of electrical appliances in the terminal device 110, the current limiter 103 is used to limit the current of the first battery 101, when the value of the battery limiter 103 is set to the maximum value, the circuit at the current limiter 103 is equivalent to being fully turned on, when the value of the battery limiter 103 is set to the minimum value, the current at the current limiter 103 is equivalent to being disconnected, and the first battery 101 will no longer discharge. In an actual working scenario, the current received by the system load 104 is a fixed value, that is, the sum of the first current provided by the first battery 101 and the second current provided by the second battery 102 is a fixed value, if the first current decreases, the second current will increase, if the first current increases, the second current will decrease. Therefore, the current limiter 103 can indirectly affect the size of the second current by limiting the size of the first current, and the size of the current will affect the discharge speed of the battery. The faster the discharge speed of the battery, the faster the voltage drops. Therefore, the current limiter 103 can also affect the voltage size of the first battery 101 and the second battery 102.

[0056] Figure 2 A flow chart of a control method provided in an embodiment of the present application, which can be applied to the above-mentioned terminal device, such as Figure 2 As shown, the method may include:

[0057] Step 201 : acquiring battery parameters, where the battery parameters include a first voltage and a first current of a first battery and a second voltage and a second current of a second battery.

[0058] After the terminal device is turned on, the first battery and the second battery jointly power the system load, and the terminal device can obtain battery parameters in real time, including the first voltage and the first current of the first battery and the second voltage and the second current of the second battery.

[0059] Step 202: determine whether the battery parameters are within their respective expected ranges.

[0060] Each time the battery parameters are acquired, the terminal device must determine whether the current battery parameters are within the corresponding expected range. In the actual working scenario, the first current and the second current have their own corresponding upper limit values. If the current is too large, safety problems may occur. Therefore, the terminal device sets a first safety threshold for the first current and a second safety threshold for the second current. If the first current exceeds the first safety threshold, the terminal device can determine that the first current exceeds the expected range. If the second current exceeds the second safety threshold, the terminal device can determine that the second current exceeds the expected range. Secondly, in order to make the discharge speeds of the first battery and the second battery close, the terminal device also sets a third safety threshold for the voltage difference between the first voltage and the second voltage. If the absolute value of the voltage difference exceeds the third safety threshold, the terminal device can determine that the voltage difference exceeds the expected range (or consider that the first voltage and the second voltage exceed the expected range).

[0061] Step 203: If it is determined that the battery parameter exceeds the expected range, a first limit value corresponding to the current battery parameter is determined in the parameter adjustment table.

[0062] Step 204: adjust the value of the current limiter to a first limiting value, wherein the current limiter is used to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value.

[0063] As long as one of the above four battery parameters exceeds the corresponding threshold, it can be determined that the battery parameter exceeds the expected range. When the terminal device detects that the battery parameter exceeds the expected range, it is necessary to adjust the value of the current limiter so that the battery parameter returns to the expected range. For different battery parameters, the terminal device needs to adjust the current limiter to different values. In order to find a suitable limit value more quickly, the terminal device can configure a parameter adjustment table based on historical data, and the parameter adjustment table stores the association between the battery parameters and the limit value. Among them, the battery parameters in the parameter adjustment table are the battery parameters when the terminal device detects that the battery parameters exceed the expected range, and the limit value is the value when the terminal device adjusts the current limiter until the battery parameters return to the expected range. In the parameter adjustment table, the four battery parameters are stored corresponding to one limit value. When actually querying, the terminal device needs to match based on the current actual four battery parameters. If the four battery parameters corresponding to a certain limit value are the same as the current actual battery parameters or the error is less than a certain threshold, it can be considered that the match is successful, and the terminal device obtains the limit value to adjust the current limiter.

[0064] In one embodiment, the data in the parameter adjustment table can be supplemented one by one after the terminal device is turned on. Each time the terminal device detects that the battery parameter exceeds the expected range and adjusts the current limiter until the battery parameter returns to the expected range, the associated data of the battery parameter and the limit value can be obtained. Specifically, when the terminal device needs to adjust the current limiter, it first searches in the parameter adjustment table. If a suitable limit value (i.e., the first limit value mentioned above) is not found, the current battery parameter is stored as the first parameter in the parameter adjustment table; then the value of the current limiter is adjusted until the battery parameter returns to the expected range or reaches a stable state, and the current value of the current limiter is stored in the parameter adjustment table as the limit value associated with the first parameter. For example, the terminal device detects that the first current is 3A at time 0, which exceeds the first safety threshold (1.5A). At this time, the current limiter is in a fully open state and the value is 10; afterwards, the terminal device reduces the value of the current limiter, and detects that the first current is 1.5A at time 3, and determines that the first current has returned to the expected range. At this time, the value of the current limiter is 5, and the terminal device can store the first current 3A and the limit value 5 as corresponding data in the parameter adjustment table. The next time the terminal device detects that the first current is 3A, there is no need to gradually adjust the current limiter. Just query the parameter adjustment table to obtain the limit value 5, and adjust the value of the current limiter directly to 5. It can be understood that the longer the terminal device is turned on, the more data in the parameter adjustment table, the greater the probability of matching the battery parameters to the appropriate limit value, and the faster the current limiter is adjusted. After the terminal device is turned off, the data in the parameter adjustment table can be saved and continued to be used after the next startup, or it can be directly deleted and reconfigured after the next startup.

[0065] In one embodiment, when adjusting the value of the current limiter, the terminal device may gradually increase or decrease it, or may quickly search for a suitable value based on a binary search. The terminal device may obtain the adjustment range of the current limiter, including a maximum limit value and a minimum limit value, and then process the maximum limit value and the minimum limit value multiple times based on a binary search, and obtain an optional limit value each time. Based on the order in which the optional limit values ​​are obtained, the terminal device adjusts the value of the current limiter to the optional limit value in sequence until the battery parameters return to the expected range or reach a stable state.

[0066] In one embodiment, the terminal device may actually adjust the current limiter in a manner as shown in Table 1.

[0067] Table 1

[0068]

[0069] First, the terminal device needs to ensure that the first current and the second current do not exceed the safety threshold. When it is detected that the first current exceeds the first safety threshold, the terminal device needs to reduce the value of the current limiter, and the first current will become smaller; when it is detected that the second current exceeds the second safety threshold, the terminal device needs to increase the value of the current limiter, the first current will increase, and the sum of the first current and the second current remains unchanged, and the second current will decrease. Secondly, the terminal device needs to control the voltage difference between the first voltage and the second voltage not to be too large, so as to prevent one of the batteries from discharging too fast and affecting the battery life. When it is detected that the first voltage is greater than the second voltage and the voltage difference exceeds the third safety threshold, the terminal device needs to increase the value of the current limiter, so that the first current becomes larger, the discharge speed of the first battery becomes faster, and the voltage difference will be reduced; when it is detected that the first voltage is less than the second voltage and the voltage difference exceeds the third safety threshold, the terminal device needs to reduce the value of the current limiter, so that the second current becomes larger, the discharge speed of the second battery becomes faster, and the voltage difference will be reduced.

[0070] In one embodiment, when the battery parameters exceed the expected range, the terminal device adjusts the value of the current limiter, and the battery parameters can return to the expected range or reach a stable state. For example, when the first voltage is greater than the second voltage and the voltage difference exceeds the third safety threshold, the terminal device needs to increase the value of the current limiter. During the increase, the first current will increase. If the voltage difference is not less than the third safety threshold, the first current reaches the first safety threshold, and the current limiter cannot continue to increase. The current state is a stable state. Alternatively, when the first voltage is less than the second voltage and the voltage difference exceeds the third safety threshold, the second current reaches the second safety threshold during the current limiter reduction process, and the terminal device will stop adjusting the current limiter.

[0071] In one embodiment, the current limiter may be implemented by a pulse width modulation (PWM) device.

[0072] In an embodiment of the present application, the terminal device can quickly obtain a suitable limiting value by setting a parameter adjustment table, thereby speeding up the adjustment speed of the current limiter. If a suitable limiting value does not exist in the parameter adjustment table, a suitable limiting value is quickly found through binary search, thereby improving the adjustment efficiency and making the discharge speeds of the two batteries of the terminal device close, thereby extending the battery life.

[0073] The method of the present application is further described below by taking a foldable mobile phone as an example. The foldable mobile phone is provided with two batteries, one of which is connected to the system load through a PWM device, such as Figure 3 As shown, the method may include:

[0074] Step 301, setting PWM to a maximum value.

[0075] When the foldable mobile phone is turned on, the PWM device (such as a MOS tube) is set to the maximum value by default. For example, the adjustable range of a certain PWM device is 0 to 511, the minimum value is 0, and the maximum value is 511.

[0076] Step 302, determine whether V1≤3.6V or V2≤3.6V is satisfied?

[0077] The method of the embodiment of the present application is intended to solve the problem that one of the batteries in a foldable mobile phone discharges faster and has a lower voltage. Therefore, when the voltage of any battery is less than or equal to 3.6V, the foldable mobile phone can start subsequent judgments, otherwise there is no need to adjust the PWM device.

[0078] Step 303, determine whether I1+I2>0.2C and both batteries are discharged?

[0079] In the current specific embodiment, if the battery current is small or one of the batteries is exhausted, there is no need to adjust the PWM device subsequently.

[0080] Step 304, determine whether the battery parameter exceeds the expected range?

[0081] When the battery parameters are applicable to the method of the present application, the foldable mobile phone starts the determination process and first detects whether the value of the battery parameter exceeds the expected range.

[0082] In the embodiment of the present application, the first safety threshold is set to 1.9A, the second safety threshold is set to 2.4A, and the third safety threshold is set to 40mv. Each safety threshold can be adjusted based on actual conditions.

[0083] Under normal circumstances, the first current and the second current will not exceed the safety threshold at the same time. If they exceed the safety threshold at the same time, it can be determined as an abnormal scenario. Only when I1>1.9V can PWM be reduced, and only when I2>2.4V can PWM be increased. Under the condition that I1 and I2 are normal, if V1-V2≥40mv, PWM can be increased, and if V2-V1≥40mv, PWM can be reduced.

[0084] In one embodiment, when it is determined that PWM needs to be adjusted, the foldable mobile phone can quickly adjust based on the dichotomy method, such as Figure 4 As shown, the adjustment steps based on the dichotomy method may include:

[0085] Step 401, query the parameter adjustment table.

[0086] Step 402: determine whether there is a matching first PWM value.

[0087] If so, proceed to step 403 , otherwise proceed to step 404 .

[0088] Step 403: Set the value of the PWM device to a first PWM value.

[0089] The appropriate PWM value can be directly obtained by looking up the table, thereby improving the regulation efficiency.

[0090] Step 404, determine whether PWM should be increased.

[0091] The scenarios where PWM should be increased may include: the second current exceeds the second safety threshold, or the first voltage is greater than the second voltage and the voltage difference exceeds the third safety threshold. In the above scenarios, the foldable phone may determine that PWM should be increased and proceed to step 405, otherwise proceed to step 406.

[0092] Step 405, PWM=(min+max) / 2, min=PWM.

[0093] Step 406, PWM=(min+max) / 2, max=PWM.

[0094] A selectable PWM value is obtained each cycle by binary division.

[0095] Step 407, determining whether the battery parameters are within the expected range or have reached a stable state.

[0096] After adjusting the value of the PWM device by table lookup or binary search, it is determined whether the battery parameter returns to the expected range or reaches a stable state. If so, the adjustment is stopped and the corresponding data is added to the parameter adjustment table. Otherwise, it returns to step 401.

[0097] Step 408: Add the corresponding data to the parameter adjustment table.

[0098] Each battery parameter in the parameter adjustment table can be stored as a specific numerical value or as an interval centered on the specific numerical value. When stored as a specific numerical value, the match is considered successful if the actual battery parameter is the same as the battery parameter in the parameter adjustment table or the error is small. When stored as an interval, the match is considered successful when the four battery parameters are all within the corresponding interval of the same data.

[0099] Through the above steps, the foldable phone can quickly obtain the appropriate PWM value, thereby extending the battery life.

[0100] Figure 5 This is a schematic diagram of the structure of a control device provided in an embodiment of the present application. The device can implement the dual battery voltage control method provided in an embodiment of the present application, such as Figure 5 As shown, the device may include: an acquisition module 510 , a judgment module 520 , a determination module 530 and a processing module 540 .

[0101] The acquisition module 510 is used to acquire battery parameters, where the battery parameters include a first voltage and a first current of the first battery and a second voltage and a second current of the second battery.

[0102] The determination module 520 is used to determine whether the battery parameters are within the corresponding expected ranges.

[0103] The determination module 530 is configured to determine a first limit value corresponding to the current battery parameter in the parameter adjustment table if it is determined that the battery parameter exceeds the expected range.

[0104] The processing module 540 is used to adjust the value of the current limiter to a first limiting value, wherein the current limiter is used to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value.

[0105] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.

[0106] In the embodiment of the present application, the terminal device 600 may specifically include a foldable mobile phone or other device containing multiple batteries, etc. The terminal device 600 may include a processor 610 and an internal memory 620, etc.

[0107] The processor 610 may include one or more processing units. Different processing units may be independent devices or may be integrated into one or more processors.

[0108] The processor 610 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. The memory may store instructions or data that the processor 610 has just used or cyclically used. If the processor 610 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 610, and thus improves the efficiency of the system.

[0109] The internal memory 620 may be used to store computer executable program codes, including instructions. The internal memory 620 may include a program storage area and a data storage area. In addition, the internal memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0110] The embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the control method provided by the embodiment of the present application.

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

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

[0113] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0114] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0115] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0116] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

Claims

1. A control method, characterized in that: The method is applied to a terminal device, the terminal device is provided with a first battery, a second battery, a current limiter and a system load, the first battery is electrically connected to the system load through the current limiter, and the second battery is electrically connected to the system load, the method comprises: Acquire battery parameters, where the battery parameters include a first voltage and a first current of the first battery and a second voltage and a second current of the second battery; Determining whether the battery parameters are within their respective expected ranges; If it is determined that the battery parameter exceeds the expected range, determining a first limit value corresponding to the current battery parameter in the parameter adjustment table; Adjusting the value of the current limiter to the first limiting value, wherein the current limiter is used to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value; The first current has a corresponding first safety threshold, the second current has a corresponding second safety threshold, and the absolute value of the voltage difference between the first voltage and the second voltage has a corresponding third safety threshold; The method further comprises: If it is determined that the parameter adjustment table does not contain a first limit value corresponding to the current battery parameter, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state; Wherein, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes: If the first current is less than the first safety threshold, the second current is less than the second safety threshold, the first voltage is greater than the second voltage, and the absolute value of the voltage difference exceeds the third safety threshold, then the value of the current limiter is increased; if the first current has reached the first safety threshold before the absolute value of the voltage difference is less than the third safety threshold, then the value of the current limiter is stopped from being increased and it is determined that the stable state has been reached; If the first current is less than the first safety threshold, the second current is less than the second safety threshold, the first voltage is less than the second voltage, and the absolute value of the voltage difference exceeds the third safety threshold, then reduce the value of the current limiter; if the second current has reached the second safety threshold before the absolute value of the voltage difference is less than the third safety threshold, stop reducing the value of the current limiter and determine that the stable state has been reached.

2. The method according to claim 1, characterized in that The method further comprises: If it is determined that the first limit value corresponding to the current battery parameter does not exist in the parameter adjustment table, storing the current battery parameter as the first parameter in the parameter adjustment table; The value of the current limiter is adjusted until the battery parameter reaches the expected range or reaches a stable state, and the current value of the current limiter is stored in the parameter adjustment table as a limit value associated with the first parameter.

3. The method according to claim 2, characterized in that The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: Obtaining the adjustment range of the current limiter, including: a maximum limit value and a minimum limit value; Processing the maximum limit value and the minimum limit value multiple times based on a dichotomy method, and obtaining an optional limit value each time; Based on the order in which the optional limit values ​​are obtained, the value of the current limiter is adjusted to the optional limit values ​​in sequence until the battery parameter reaches the expected range or reaches a stable state.

4. The method according to claim 2, characterized in that: The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: If it is detected that the first current exceeds the first safety threshold, the value of the current limiter is reduced until the first current is less than or equal to the first safety threshold.

5. The method according to claim 2, characterized in that: The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: If it is detected that the second current exceeds the second safety threshold, the value of the current limiter is increased to increase the first current and decrease the second current until the second current is less than or equal to the second safety threshold.

6. The method according to claim 2, characterized in that The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: determining a voltage difference between the first voltage and the second voltage; When it is detected that the absolute value of the voltage difference exceeds a third safety threshold, the value of the current limiter is adjusted until the voltage difference falls within the expected range or reaches a stable state.

7. The method according to claim 6, characterized in that The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: If the first voltage is greater than the second voltage and the absolute value of the voltage difference exceeds the third safety threshold, the value of the current limiter is increased until the absolute value of the voltage difference is less than or equal to the third safety threshold.

8. The method according to claim 6, characterized in that The step of adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state comprises: If the first voltage is less than the second voltage and the absolute value of the voltage difference exceeds the third safety threshold, the value of the current limiter is reduced until the absolute value of the voltage difference is less than or equal to the third safety threshold.

9. The method according to claim 1, characterized in that: The current limiter is a pulse width modulation (PWM) device.

10. A control device, characterized in that: The device is deployed in a terminal device, the terminal device is provided with a first battery, a second battery, a current limiter and a system load, the first battery is electrically connected to the system load through the current limiter, the second battery is electrically connected to the system load, and the device includes: an acquisition module, configured to acquire battery parameters, wherein the battery parameters include a first voltage and a first current of the first battery and a second voltage and a second current of the second battery; A determination module, used to determine whether the battery parameters are within the corresponding expected ranges; a determination module, configured to determine a first limit value corresponding to the current battery parameter in a parameter adjustment table if it is determined that the battery parameter exceeds the expected range; a processing module, configured to adjust the value of the current limiter to the first limiting value, wherein the current limiter is configured to limit the magnitude of the first current, and the sum of the first current and the second current is a constant value; The first current has a corresponding first safety threshold, the second current has a corresponding second safety threshold, and the absolute value of the voltage difference between the first voltage and the second voltage has a corresponding third safety threshold; The device is also used for: If it is determined that the parameter adjustment table does not contain a first limit value corresponding to the current battery parameter, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state; Wherein, adjusting the value of the current limiter until the battery parameter reaches the expected range or reaches a stable state includes: If the first current is less than the first safety threshold, the second current is less than the second safety threshold, the first voltage is greater than the second voltage, and the absolute value of the voltage difference exceeds the third safety threshold, then the value of the current limiter is increased; if the first current has reached the first safety threshold before the absolute value of the voltage difference is less than the third safety threshold, then the value of the current limiter is stopped from being increased and it is determined that the stable state has been reached; If the first current is less than the first safety threshold, the second current is less than the second safety threshold, the first voltage is less than the second voltage, and the absolute value of the voltage difference exceeds the third safety threshold, then reduce the value of the current limiter; if the second current has reached the second safety threshold before the absolute value of the voltage difference is less than the third safety threshold, stop reducing the value of the current limiter and determine that the stable state has been reached.

11. A terminal device, characterized in that: include: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions, and the processor calls the program instructions to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program implements the method according to any one of claims 1 to 9 when executed by a processor.