Terminal device charging methods, devices and storage media
By storing multiple fast charging protocols in the terminal device and selecting the appropriate charging power, the problem of fast charging protocol incompatibility is solved, achieving compatibility between the terminal device and the charging connection device, improving charging efficiency, and enhancing the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2019-09-03
- Publication Date
- 2026-05-26
Smart Images

Figure CN112448435B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, specifically to a terminal device charging method, apparatus, and storage medium. Background Technology
[0002] With the development of communication technology, the use of mobile phones and other terminal devices is becoming increasingly widespread. To address the battery life issue and improve user experience, most terminal devices are equipped with fast charging technology. However, differences exist between various fast charging technologies, and hardware limitations of terminal devices make it difficult for different fast charging protocols to be compatible. This forces terminal devices to use dedicated charging equipment, causing significant inconvenience to users.
[0003] Currently, the USB Power Delivery (USB-PD) protocol can be provided by the Universal Serial Bus Implementers Forum (USB-IF) to unify various fast charging protocols.
[0004] However, the above solutions only address the lack of standardization in fast charging technology, but fail to ensure compatibility with existing fast charging protocols. Users carrying multiple devices need to carry multiple corresponding charging adapters, resulting in a poor user experience. Summary of the Invention
[0005] This application provides a terminal device charging method, apparatus, and storage medium to solve the technical problem of poor user experience in current charging methods.
[0006] This application provides a method for charging a terminal device, including:
[0007] When a connection with a charging connection device is determined, the charging power corresponding to each fast charging protocol that matches the charging connection device is obtained from multiple fast charging protocols stored in the terminal device;
[0008] The fast charging protocol corresponding to the charging power that meets the preset conditions is determined as the target fast charging protocol;
[0009] Charging is performed using the target fast charging protocol.
[0010] This application provides a terminal device charging device, including:
[0011] The acquisition module is configured to, when it is determined that a connection with the charging connection device is established, acquire the charging power corresponding to each fast charging protocol that matches the charging connection device from among multiple fast charging protocols stored in the charging device of the terminal device.
[0012] The first determining module is configured to determine the fast charging protocol corresponding to the charging power that meets preset conditions as the target fast charging protocol;
[0013] The charging module is configured to charge using the target fast charging protocol.
[0014] This application provides a terminal device, including:
[0015] One or more processors;
[0016] Memory, used to store one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the terminal device charging methods in the embodiments of this application.
[0018] Further details regarding the above embodiments and other aspects of this application, as well as their implementations, are provided in the accompanying drawings, detailed description, and claims. Attached Figure Description
[0019] Figure 1A This is a schematic diagram illustrating an application scenario of a terminal device charging method provided in one embodiment;
[0020] Figure 1B This is a schematic diagram illustrating another application scenario of a terminal device charging method provided in one embodiment;
[0021] Figure 2 This is a schematic flowchart of a terminal device charging method provided in one embodiment;
[0022] Figure 3 for Figure 2 The illustrated embodiment shows a connection diagram of the charging adapter, charging controller, and battery.
[0023] Figure 4 for Figure 2 The schematic diagram of the charging controller in the embodiment shown is as follows;
[0024] Figure 5 for Figure 2 A schematic diagram of an exemplary structure of a programmable circuit in the illustrated embodiment;
[0025] Figure 6 This is a schematic diagram of the structure of a terminal device charging device provided in one embodiment;
[0026] Figure 7 This is a schematic diagram of the structure of a terminal device provided in one embodiment. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be arbitrarily combined with each other.
[0028] Figure 1A This is a schematic diagram illustrating an application scenario of a terminal device charging method provided in one embodiment. Figure 1B This is a schematic diagram illustrating another application scenario of a terminal device charging method provided in one embodiment. For example... Figure 1A As shown, the terminal device charging method provided in this application allows the terminal device 11 to charge its own battery via the charging adapter 12. Figure 1B As shown, the terminal device charging method provided in this application can also involve the terminal device 11 charging the battery of the device 13 to be charged when it is in the power output module. For example, the device 13 to be charged can be a wearable device such as a smart bracelet. That is, the charging connection devices involved in this application include: a charging adapter or other devices to be charged that require charging from the terminal device. The fast charging protocol involved in this application refers to a charging method in which the average current entering the battery is greater than or equal to a preset current value, or the total charging amount is greater than or equal to a preset percentage of the battery's rated capacity, starting from the initial charging state and continuing for a preset time period. For example, the preset current value is 3A, and the preset percentage is 60%. Current fast charging protocols are incompatible, causing users to need to carry multiple corresponding charging adapters when carrying multiple terminal devices, or, when a user needs to charge another device to be charged, if the fast charging protocol configured for that device is incompatible with the fast charging protocol of the terminal device, the terminal device cannot charge that device, resulting in a poor user experience.
[0029] This application provides a method for charging a terminal device. By storing multiple fast charging protocols in the terminal device, the compatibility between the terminal device's fast charging protocols and those of the connected charging devices is improved. Then, based on the charging power corresponding to each fast charging protocol that matches the connected charging device, a fast charging protocol with a charging power that meets preset conditions is selected as the target fast charging protocol. Finally, this target fast charging protocol is used for charging. Therefore, on the one hand, compatibility between the terminal device's fast charging protocol and the connected charging device's fast charging protocol is achieved, eliminating the need for users to carry multiple charging adapters, or allowing the terminal device to fast charge other devices. On the other hand, selecting a suitable fast charging protocol with appropriate charging power further improves charging efficiency. Therefore, the terminal device charging method provided by this application improves the user experience.
[0030] Figure 2 This is a flowchart illustrating a terminal device charging method according to one embodiment. This embodiment is applicable to scenarios where a terminal device's battery is charged via a charging adapter, or where the terminal device, while in power output mode, charges the battery of a device to be charged. This embodiment can be executed by a charging device of the terminal device, which can be implemented in software and / or hardware, and can be integrated into the terminal device. Figure 2 As shown, the charging method for the terminal device provided in this embodiment includes the following steps:
[0031] Step 201: When it is determined that a connection with the charging connection device is established, obtain the charging power corresponding to each fast charging protocol that matches the charging connection device from among the multiple fast charging protocols stored in the terminal device.
[0032] Specifically, the terminal device in this embodiment can be a handheld device, a mobile terminal, a wearable device, a computing device, and various forms of user equipment (UE). For example, the terminal device in this embodiment can be a mobile phone.
[0033] When a terminal device is connected to a charging connection device, the terminal device will detect voltage on a preset pin, thereby confirming that the terminal device is connected to the charging connection device.
[0034] The terminal device in this embodiment stores multiple fast charging protocols. These multiple fast charging protocols can also be referred to as firmware. Among these multiple fast charging protocols, there may be multiple fast charging protocols that are compatible with the charging connection device.
[0035] In one application scenario, the charging connection device is a charging adapter. A charging adapter, also known as a charging head, is used to convert household AC power into low-voltage DC power.
[0036] The aforementioned fast charging protocols may have the following possibilities: In the first possible implementation, all of these fast charging protocols stipulate that the handshake protocol is initiated by the charging adapter; in the second possible implementation, all of these fast charging protocols stipulate that the handshake protocol is initiated by the terminal device; in the third possible implementation, some of these fast charging protocols stipulate that the handshake protocol is initiated by the charging adapter, while others stipulate that the handshake protocol is initiated by the terminal device.
[0037] For the first possible implementation, the specific implementation process of step 201 can be as follows: when a charging protocol handshake packet sent by the charging adapter is received, determine the fast charging protocol that matches the charging protocol handshake packet among multiple fast charging protocols; respond according to the fast charging protocol that matches the charging protocol handshake packet; and determine the charging power corresponding to the fast charging protocol that matches the charging protocol handshake packet.
[0038] Optionally, in this implementation, the charging protocol handshake packet sent by the charging adapter may include a protocol identifier. When the terminal device receives the charging protocol handshake packet from the charging adapter, it determines, based on the protocol identifier in the handshake packet, which matches one of the multiple fast charging protocols stored locally. Then, it responds according to these fast charging protocols. This response means, according to the specific provisions of the fast charging cable protocol, applying a preset voltage to the charging pins in the terminal device, or applying a preset voltage to the charging management in the terminal device, and then sending a message back to the charging adapter. After responding, it is equivalent to the terminal device and the charging adapter negotiating the charging voltage and charging current. Therefore, the charging power corresponding to the fast charging protocol matching the handshake packet can be determined.
[0039] For the second possible implementation, the specific implementation process of step 201 can be as follows: use the first fast charging protocol to detect the charging protocol of the charging adapter. If the charging adapter responds to the first fast charging protocol, use the first fast charging protocol to handshake with the charging adapter to determine the charging power corresponding to the first fast charging protocol, and use the second fast charging protocol as the new first fast charging protocol. If the charging adapter does not respond to the first fast charging protocol, directly execute the step of using the second fast charging protocol as the new first fast charging protocol, and return to execute this step until the charging power corresponding to each fast charging protocol that matches the charging adapter is obtained.
[0040] In this implementation, a polling method is used to determine the charging power corresponding to each fast charging protocol that matches the charging adapter. The first fast charging protocol is any one of multiple fast charging protocols stored in the terminal device. The second fast charging protocol is any one of multiple fast charging protocols stored in the terminal device other than the first fast charging protocol. In this implementation, the first fast charging protocol is used to probe the charging adapter, for example, by sending a probe packet to the charging adapter. If the charging adapter receives the probe for the first fast charging protocol and determines that it can match the first fast charging protocol, it sends a response to the terminal device for the first fast charging protocol. Then, the terminal device uses the first fast charging protocol to handshake with the charging adapter, thereby determining the charging power corresponding to the first fast charging protocol and adopting the second fast charging protocol as the new first fast charging protocol. If the charging adapter receives the probe for the first fast charging protocol and determines that it cannot match the first fast charging protocol, it does not send a response to the terminal device for the first fast charging protocol, and the terminal device directly executes the step of adopting the second fast charging protocol as the new first fast charging protocol. Next, return to this step and continue until all the fast charging protocols stored in the terminal device have detected the charging protocol from the charging adapter. After completion, the charging power corresponding to each fast charging protocol matched with the charging adapter is obtained.
[0041] For the third possible implementation, the specific implementation process of step 201 can be combined with the processes in the first and second possible implementations above. Further details will not be provided here.
[0042] Figure 3 for Figure 2 The illustrated embodiment shows a connection diagram of the charging adapter, charging controller, and battery. Figure 3 As shown, in this application scenario, the charging controller 31 is the charging controller in the terminal device, and the battery 32 is the battery in the terminal device. The charging controller 31 is used to coordinate the charging voltage and charging current between the charging adapter 33 and the battery 32. Most fast charging protocol handshakes occur between the charging controller 31 and the charging adapter 33. Taking the USB 2.0 protocol as an example, the charging controller 31 and the charging adapter 33 transmit handshake packets through four lines: Vcc, GND, D+, and D-, dynamically controlling the output voltage and current of the power adapter. The connection between the charging controller 31 and the battery 32 is relatively simple. The charging controller 31 connects the output terminal of the charging adapter 33 to the input terminal of the battery 32 to charge the battery 32. Simultaneously, the charging controller 31 analyzes the charging status of the battery 32 and feeds it back to the charging adapter 33, thereby enabling the charging adapter 33 to dynamically adjust the charging status.
[0043] In another application scenario, the terminal device is in power output mode, where it acts as the charging host. The charging connection device is the device to be charged that needs to be charged by the terminal device.
[0044] It should be noted that the user can trigger the terminal device to enter the power output mode, or the terminal device can automatically enter the power output mode after detecting that the charging connection device is not a charging adapter.
[0045] In this scenario, the specific implementation process of step 201 is as follows: perform a control protocol handshake with the device to be charged; after the handshake is successful, negotiate and determine each fast charging protocol that matches the device to be charged through the transmission method defined in the control protocol, and determine the charging power corresponding to each fast charging protocol that matches the device to be charged.
[0046] In this embodiment, the control protocol refers to the transmission protocol supported by the circuit control chip of the terminal device and the circuit control chip of the device to be charged.
[0047] In this implementation, if the control protocols of the terminal device and the device to be charged are compatible, each fast charging protocol and its corresponding charging protocol that match the device to be charged can be negotiated and determined all at once through the transmission method defined in the control protocol. This eliminates the need to determine the corresponding charging power for each fast charging protocol that matches the device to be charged through polling or sequential determination. Consequently, charging efficiency is improved.
[0048] In this implementation, if the terminal device and the device to be charged cannot achieve a control protocol handshake, that is, the control protocols of the terminal device and the device to be charged are not compatible, the charging power corresponding to each fast charging protocol that matches the device to be charged can be determined by referring to the first, second, or third possible implementation methods in the previous application scenario.
[0049] Step 202: Determine the fast charging protocol corresponding to the charging power that meets the preset conditions as the target fast charging protocol.
[0050] In one implementation, the preset condition here can be the maximum charging power. Then step 202 specifically involves: determining the fast charging protocol corresponding to the maximum charging power as the target fast charging protocol.
[0051] In this implementation, a determined target fast charging protocol is used for charging. Since the charging power is maximized, the charging efficiency can be improved.
[0052] In another implementation, the preset condition is that the charging power is greater than any of the preset power thresholds. Step 202 specifically involves: determining the fast charging protocol corresponding to any charging power greater than the preset power threshold as the target fast charging protocol.
[0053] Step 203: Charge using the target fast charging protocol.
[0054] In one implementation, in an application scenario where the charging connection device is a charging adapter, if the target fast charging protocol is the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol is directly used for charging; if the target fast charging protocol is not the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol is used to handshake with the charging adapter again before charging.
[0055] In application scenarios where the charging connection device is the device to be charged, if the terminal device and the device to be charged successfully complete the control protocol handshake, then during charging, the target fast charging protocol is used to complete the handshake with the device to be charged before charging. If the control protocol handshake between the terminal device and the device to be charged fails, and the target fast charging protocol is the last fast charging protocol used in the handshake with the device to be charged, then the target fast charging protocol is used directly for charging. If the control protocol handshake between the terminal device and the device to be charged fails, and the target fast charging protocol is not the last fast charging protocol used in the handshake with the device to be charged, then the target fast charging protocol is used to re-establish the handshake with the device to be charged before charging.
[0056] In another implementation, after the target fast charging protocol is determined, the target fast charging protocol is used to re-handshake with the charging connection device before charging.
[0057] Figure 4 for Figure 2 A schematic diagram of the charging controller in the illustrated embodiment. Figure 4 As shown, the charging controller provided in this embodiment includes a circuit control chip 41, a firmware storage chip 42, and a programmable circuit 43. The firmware storage chip 42 stores multiple fast charging protocols involved in this embodiment. In this embodiment, to enable the terminal device to be compatible with multiple fast charging protocols, the circuit corresponding to a fixed fast charging protocol in the prior art terminal device is replaced with a programmable circuit. The programmable circuit 43 is a circuit whose circuit structure can be rewritten through programming. The circuit control chip 41 can change the circuit structure of the programmable circuit under the control of the terminal device's controller.
[0058] Figure 5 for Figure 2A schematic diagram of an exemplary structure of a programmable circuit in the illustrated embodiment. Figure 5 As shown, the programmable circuit in this embodiment includes a capacitor C and a switch S. If the value of one of the individual capacitors is set to 1μF, then based on... Figure 5 By combining switches, capacitors of four sizes—0.5μF, 0.67μF, 1μF, and 2μF—can be obtained. If... Figure 5 By increasing the scale of the capacitor, a larger variable range of capacitance can be obtained.
[0059] In this embodiment, by setting registers, multiple capacitors, multiple resistors, and various switching circuits, the circuit in the charging controller can be controlled, thereby meeting the charging circuit requirements of a specific fast charging protocol.
[0060] based on Figure 4 and Figure 5 The implementation method, specifically the charging process in step 203, can be as follows: determine the target charging parameters corresponding to the target fast charging protocol; based on the target charging parameters, the control circuit control chip adjusts the input / output characteristics of the programmable circuit to the target input / output characteristics corresponding to the target charging parameters; and charging is performed based on the target input / output characteristics. Both the circuit control chip and the programmable circuit are located in the terminal device.
[0061] Each fast charging protocol has different charging parameters, which refer to charging current, charging voltage, or charging power. After determining the target charging parameters, the control circuit chip adjusts the input / output characteristics of the programmable circuit to match the target charging parameters. Specifically, the input / output characteristics of the programmable circuit can be adjusted by changing its impedance characteristics. Once the input / output characteristics of the programmable circuit are adjusted to match the target charging parameters, charging is performed based on these target input / output characteristics.
[0062] In scenarios where the charging connection device is a charging adapter, using the target fast charging protocol for charging means that the terminal device uses the target fast charging protocol and obtains electrical energy through the charging adapter.
[0063] In a scenario where the terminal device is in power output mode and the charging connection device is a device waiting to be charged that needs to be charged, using the target fast charging protocol for charging means that the terminal device obtains power from its own battery, uses the target fast charging protocol, and then inputs the power into the battery of the device waiting to be charged.
[0064] Optionally, in this embodiment, after determining the charging power corresponding to each fast charging protocol matched with the charging connection device, these charging powers can be saved so that charging powers that meet preset conditions can be selected subsequently, preventing the omission of charging powers corresponding to each fast charging protocol matched with the charging connection device. Specifically, in step 201, in the second and third possible implementations of the scenario where the charging connection device is a charging adapter, the charging power corresponding to the first fast charging protocol is saved.
[0065] Based on the above implementation method, after charging with the target fast charging protocol, this embodiment further includes: deleting the saved charging power corresponding to each fast charging protocol matched with the charging adapter, so as to save storage space of the terminal device.
[0066] Optionally, in this embodiment, when determining to connect to the charging connection device, if it is determined that there is no fast charging protocol matching the charging connection device in the terminal device, it is determined whether there is a fast charging protocol matching the charging connection device in the server; if it is determined that there is a fast charging protocol matching the charging connection device in the server, the fast charging protocol matching the charging connection device is downloaded, and the connection with the charging connection device is disconnected; after the download is completed, the connection with the charging connection device is re-established.
[0067] In the above implementation, the terminal device can send a protocol identifier of a fast charging protocol matching the charging connection device to the server. If the server can find one or more fast charging protocols corresponding to the protocol identifier, it will send the one or more fast charging protocols to the terminal device. While downloading the fast charging protocol matching the charging connection device, the terminal device disconnects from the charging connection device. After the download is complete, it reconnects to the charging connection device. Then, it continues with steps 201-203 to charge using the target fast charging protocol.
[0068] In the above implementation, if the server also lacks a fast charging protocol compatible with the charging connection device, the terminal device uses a basic charging protocol for charging. This basic charging protocol is a non-fast charging protocol supported by both the terminal device and the charging connection device.
[0069] Furthermore, in the above implementation, when the terminal device determines that one or more fast charging protocols matching the charging connection device exist on the server, it can prompt the user whether to download the fast charging protocol. If the user confirms to download these fast charging protocols, the steps of downloading the fast charging protocol matching the charging connection device and disconnecting from the charging connection device are executed; if the user confirms not to download, the basic charging protocol is used for charging.
[0070] The above implementation method enables the acquisition of a fast charging protocol that matches the charging connection device from the server when no fast charging protocol matching the charging connection device exists locally on the terminal device. This further improves the compatibility between the fast charging protocol in the terminal device and the fast charging protocol in the charging connection device, thereby enhancing the user experience.
[0071] Optionally, the terminal device charging method provided in this embodiment can also obtain the updated fast charging protocol from the server when an update instruction for the fast charging protocol is received. This update instruction for the fast charging protocol can be triggered by the user or by the server.
[0072] The above implementation method can ensure that the fast charging protocol in the terminal device is the latest version of the fast charging protocol, thereby increasing the possibility of compatibility between the fast charging protocol in the terminal device and the fast charging protocol in the charging connection device.
[0073] The following example illustrates the process described above. It takes the case where the charging adapter only supports the Quick Charge (QC) 2.0 charging protocol, while the terminal device does not support this fast charging protocol.
[0074] Below is a brief introduction to the handshake principle of the QC2.0 charging protocol: The terminal device outputs a voltage signal to the charging adapter via the USB data communication port D+ / D-. The charging adapter has a built-in USB input decoding chip that determines the required output voltage. QC2.0 has two industry standards: Grade A and Grade B. Grade A standard: output voltages of 5V, 9V, and 12V; Grade B standard: output voltages of 5V, 9V, 12V, and 20V.
[0075] The normal charging process is as follows:
[0076] 1. When the charging adapter is connected to the terminal device via a data cable, the charging adapter will short-circuit D+ and D- by default. This will cause the terminal device to detect that the charging adapter is a Dedicated Charging Port (DCP) mode, and the default output voltage will be 5V, allowing the terminal device to charge normally.
[0077] 2. If the terminal device supports the QC2.0 fast charging protocol, the high voltage dedicated charger port (hvdcp) process in the Android user space will start, begin to load a voltage of 0.325V on D+, and maintain it for more than 1.25 seconds.
[0078] 3. When the charging adapter detects a voltage of 0.325V on D+ and maintains it for more than 1.25 seconds, the charging adapter disconnects the short circuit between D+ and D-. Since D+ and D- are disconnected, the voltage on D- no longer follows the 0.325V fluctuation of the voltage on D+. At this point, the voltage will begin to decrease.
[0079] 4. When the terminal device detects that the voltage on D- drops from 0.325V and remains there for more than 1 second, hvdcp reads the value of / sys / class / power supply / usb / voltage max: if it is 9V, it sets the voltage on D+ to 3.3V and the voltage on D- to 0.6V; if it is 5V, it sets D+ to 0.6V and D- to 0V.
[0080] 5. After the charging adapter detects the voltage on D+ and D-, it adjusts the output voltage of the charging adapter to 9V or 5V.
[0081] In this example, the terminal device does not support this fast charging protocol. The execution process of the terminal device is as follows.
[0082] 1. After the terminal device is connected to the charging adapter, the charging adapter shorts D+ and D- according to the QC2.0 protocol. Since the terminal device does not support the QC2.0 protocol, it will not apply 0.325V voltage to D+, but will try the handshake method of other fast charging protocols stored on it, that is, execute steps 201-203.
[0083] 2. After failing to connect to other fast charging protocols, check the network connection status. If the device is connected to the network, search for firmware updates.
[0084] 3. After the update is found, prompt the user to update to the latest charging firmware.
[0085] 4. If the user refuses to update, the charging will proceed according to the basic charging method.
[0086] 5. If the user agrees to the update, the update will be downloaded and the firmware will be flashed onto the charging controller. During the update process, the charging controller will be disconnected from the charging adapter.
[0087] 6. After the update is complete, reconnect to the charging adapter and re-perform the handshake operation, i.e., execute steps 201-203. At this time, since the updated firmware supports the QC2.0 protocol, after detecting the D+ and D- short circuit, it attempts to handshake with multiple charging protocols by changing the charging control circuit, and successfully completes the handshake with QC2.0.
[0088] 7. After a successful handshake, the charging controller dynamically adjusts the programmable circuit to adapt to the voltage and current output of the charging adapter.
[0089] The terminal device charging method provided in this embodiment includes: when it is determined that a connection with a charging connection device is established, obtaining the charging power corresponding to each fast charging protocol that matches the charging connection device from a plurality of fast charging protocols stored in the terminal device; determining the fast charging protocol corresponding to the charging power that meets preset conditions as the target fast charging protocol; and charging using the target fast charging protocol. By storing multiple fast charging protocols in the terminal device, the compatibility between the fast charging protocols of the terminal device and the fast charging protocols of the charging connection device is improved. Then, based on the charging power corresponding to each fast charging protocol that matches the charging connection device from these plurality of fast charging protocols, the fast charging protocol corresponding to the charging power that meets preset conditions is selected as the target fast charging protocol, and finally, the target fast charging protocol is used for charging. Thus, on the one hand, the fast charging protocols of the terminal device and the fast charging protocols of the charging connection device are compatible, eliminating the need for users to carry multiple charging adapters, or allowing the terminal device to fast charge other devices to be charged. On the other hand, selecting a fast charging protocol corresponding to a suitable charging power further improves charging efficiency. Therefore, the terminal device charging method provided in this application improves the user experience.
[0090] Figure 6 This is a schematic diagram of the structure of a terminal device charging device provided in one embodiment. For example... Figure 6 As shown, the terminal device charging device provided in this embodiment includes: an acquisition module 61, a first determination module 62, and a charging module 63.
[0091] The acquisition module 61 is configured to, when it is determined that it is connected to the charging connection device, acquire the charging power corresponding to each fast charging protocol that matches the charging connection device among multiple fast charging protocols stored in the charging device of the terminal device.
[0092] In one application scenario, the charging connection device is a charging adapter. The acquisition module 61 is specifically configured to: upon receiving a charging protocol handshake packet sent by the charging adapter, determine the fast charging protocol that matches the handshake packet from among multiple fast charging protocols; respond according to the fast charging protocol matching the handshake packet; and determine the charging power corresponding to the fast charging protocol matching the handshake packet.
[0093] Based on the above implementation, the acquisition module 61 is further configured to: use the first fast charging protocol to detect the charging protocol of the charging adapter; if the charging adapter responds to the first fast charging protocol, use the first fast charging protocol to handshake with the charging adapter, determine the charging power corresponding to the first fast charging protocol, and use the second fast charging protocol as the new first fast charging protocol; if the charging adapter does not respond to the first fast charging protocol, directly execute the step of using the second fast charging protocol as the new first fast charging protocol, return to execute this step, until the charging power corresponding to each fast charging protocol matched with the charging adapter is obtained.
[0094] In another application scenario, the terminal device's charging unit is in power output mode, and the charging connection device is a device to be charged that needs to be charged by the terminal device's charging unit. The acquisition module 61 is specifically configured to: perform a control protocol handshake with the device to be charged; after a successful handshake, negotiate and determine each fast charging protocol that matches the device to be charged using the transmission method defined in the control protocol, and determine the charging power corresponding to each fast charging protocol that matches the device to be charged.
[0095] The first determining module 62 is configured to determine the fast charging protocol corresponding to the charging power that meets preset conditions as the target fast charging protocol.
[0096] Optionally, the first determining module 62 is specifically configured to: determine the fast charging protocol corresponding to the maximum charging power as the target fast charging protocol.
[0097] The charging module 63 is configured to charge using the target fast charging protocol.
[0098] Optionally, the charging module 63 is specifically configured to: determine the target charging parameters corresponding to the target fast charging protocol; adjust the input / output characteristics of the programmable circuit to the target input / output characteristics corresponding to the target charging parameters according to the target charging parameters; wherein the circuit control chip and the programmable circuit are both located in the terminal device charging device; and perform charging based on the target input / output characteristics.
[0099] Optionally, the charging module 63 is specifically configured to: if the target fast charging protocol is the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol is used directly for charging; if the target fast charging protocol is not the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol is used to handshake with the charging adapter again before charging.
[0100] Optionally, the device further includes a storage module configured to store the charging power corresponding to the first fast charging protocol. Correspondingly, the device also includes a deletion module configured to delete the stored charging power corresponding to each fast charging protocol matched with the charging adapter.
[0101] Optionally, in one implementation, the device further includes: a second determining module, a disconnecting module, and a reconnecting module.
[0102] The second determining module is configured to determine whether a fast charging protocol matching the charging connection device exists in the server when it is determined that there is no fast charging protocol matching the charging connection device in the terminal device charging device.
[0103] The disconnect module is configured to download the fast charging protocol that matches the charging connection device and disconnect from the charging connection device when it is determined that a fast charging protocol matching the charging connection device exists on the server.
[0104] The reconnect module is configured to reconnect to the charging device after the download is complete.
[0105] Optionally, the device further includes an update acquisition module configured to acquire an updated fast charging protocol from a server upon receiving an update instruction for the fast charging protocol.
[0106] The terminal device charging device provided in this embodiment is used to achieve... Figure 2 The terminal device charging method shown in the embodiment is similar in principle and technical effect to the terminal device charging device provided in this embodiment, and will not be described again here.
[0107] Figure 7 This is a schematic diagram of the structure of a terminal device provided in one embodiment. For example... Figure 7 As shown, the terminal device includes a processor 70 and a memory 71. The terminal device may have one or more processors 70. Figure 7 Taking a processor 70 as an example; the processor 70 and memory 71 of this terminal device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0108] The memory 71, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions and modules corresponding to the terminal device charging method in this embodiment (e.g., the acquisition module 61, the first determination module 62, and the charging module 63 in the terminal device charging device). The processor 70 executes various functional applications and data processing of the terminal device by running the software programs, instructions, and modules stored in the memory 71, thereby implementing the aforementioned terminal device charging method.
[0109] The memory 71 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 71 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 71 may further include memory remotely located relative to the processor 70, and these remote memories can be connected to the terminal device via a network. Embodiments of the aforementioned network include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0110] This application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a terminal device charging method, the method comprising:
[0111] When a connection with a charging connection device is determined, the charging power corresponding to each fast charging protocol that matches the charging connection device is obtained from multiple fast charging protocols stored in the terminal device;
[0112] The fast charging protocol corresponding to the charging power that meets the preset conditions is determined as the target fast charging protocol;
[0113] Charging is performed using the target fast charging protocol.
[0114] Of course, the computer-executable instructions provided in this application are not limited to the method operations described above, but can also execute related operations in the terminal device charging method provided in any embodiment of this application.
[0115] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.
[0116] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0117] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0118] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored in memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Multifunction Discs, DVDs, or CDs), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable logic devices (FGPAs), and processors based on multi-core processor architectures.
[0119] A detailed description of exemplary embodiments of this application has been provided above through exemplary and non-limiting examples. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, without departing from the scope of this application. Therefore, the proper scope of this application will be determined by the claims.
Claims
1. A terminal device charging method, characterized by, include: When a connection with a charging connection device is determined, the charging power corresponding to each fast charging protocol that matches the charging connection device is obtained from multiple fast charging protocols stored in the terminal device; The fast charging protocol corresponding to the charging power that meets the preset conditions is determined as the target fast charging protocol; Charging using the target fast charging protocol includes: determining target charging parameters corresponding to the target fast charging protocol; adjusting the input / output characteristics of the programmable circuit to the target input / output characteristics corresponding to the target charging parameters using a control circuit control chip; and charging based on the target input / output characteristics. The circuit control chip and the programmable circuit are both located in the terminal device. The programmable circuit is a circuit whose circuit structure can be rewritten through programming. The circuit control chip is used to change the circuit structure of the programmable circuit under the control of the terminal device's controller. The charging connection device is a charging adapter; the step of obtaining the charging power corresponding to each fast charging protocol that matches the charging connection device among multiple fast charging protocols stored in the terminal device includes: when a charging protocol handshake packet sent by the charging adapter is received, determining the fast charging protocol that matches the handshake packet among the multiple fast charging protocols, responding according to the fast charging protocol that matches the handshake packet, and determining the charging power corresponding to the fast charging protocol that matches the handshake packet; using a first fast charging protocol to probe the charging adapter; if a response from the charging adapter to the first fast charging protocol is detected, using the first fast charging protocol to handshake with the charging adapter, determining the charging power corresponding to the first fast charging protocol, and using a second fast charging protocol as the new first fast charging protocol; if no response from the charging adapter to the first fast charging protocol is detected, directly executing the step of using the second fast charging protocol as the new first fast charging protocol, returning to this step, until the charging power corresponding to each fast charging protocol that matches the charging adapter is obtained.
2. The method according to claim 1, characterized in that, The charging process using the target fast charging protocol includes: If the target fast charging protocol is the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol will be used directly for charging. If the target fast charging protocol is not the last fast charging protocol that shook hands with the charging adapter, then the target fast charging protocol is used to re-shake hands with the charging adapter before charging begins.
3. The method according to claim 1, characterized in that, After determining the charging power corresponding to the first fast charging protocol, the method further includes: Save the charging power corresponding to the first fast charging protocol; Accordingly, after charging using the target fast charging protocol, the method further includes: Delete the saved charging power corresponding to each fast charging protocol that matches the charging adapter.
4. The method according to claim 1, characterized in that, The step of determining the fast charging protocol corresponding to the charging power that meets preset conditions as the target fast charging protocol includes: The fast charging protocol corresponding to the maximum charging power is determined as the target fast charging protocol.
5. The method according to claim 1, characterized in that, Before obtaining the charging power corresponding to each fast charging protocol matched with the charging connection device among multiple fast charging protocols stored in the terminal device, the method further includes: When it is determined that there is no fast charging protocol in the terminal device that matches the charging connection device, it is determined whether there is a fast charging protocol in the server that matches the charging connection device. When it is determined that a fast charging protocol matching the charging connection device exists in the server, the fast charging protocol matching the charging connection device is downloaded, and the connection with the charging connection device is disconnected. After the download is complete, reconnect to the charging device.
6. The method according to claim 1, characterized in that, The method further includes: Upon receiving an update instruction for the fast charging protocol, retrieve the updated fast charging protocol from the server.
7. The method according to claim 1, characterized in that, The terminal device is in power output mode, and the charging connection device is a device to be charged that needs to be charged by the terminal device; The step of obtaining the charging power corresponding to each fast charging protocol that matches the charging connection device among multiple fast charging protocols stored in the terminal device includes: Perform a control protocol handshake with the device to be charged; After a successful handshake, each fast charging protocol matching the device to be charged is negotiated and determined using the transmission method defined in the control protocol, and the charging power corresponding to each fast charging protocol matching the device to be charged is determined.
8. A terminal device charging device, characterized in that, include: The acquisition module is configured to, when it is determined that a connection with the charging connection device is established, acquire the charging power corresponding to each fast charging protocol that matches the charging connection device from among multiple fast charging protocols stored in the charging device of the terminal device. The first determining module is configured to determine the fast charging protocol corresponding to the charging power that meets preset conditions as the target fast charging protocol; The charging module is configured to charge using the target fast charging protocol; The charging module is specifically configured to: determine the target charging parameters corresponding to the target fast charging protocol; adjust the input / output characteristics of the programmable circuit to the target input / output characteristics corresponding to the target charging parameters according to the target charging parameters; and perform charging based on the target input / output characteristics; wherein, the circuit control chip and the programmable circuit are both disposed in the terminal device charging device, the programmable circuit is a circuit whose circuit structure can be rewritten by programming, and the circuit control chip is used to change the circuit structure of the programmable circuit under the control of the controller of the terminal device charging device; The charging connection device is a charging adapter; the acquisition module is specifically configured to: when receiving a charging protocol handshake packet sent by the charging adapter, determine the fast charging protocol that matches the handshake packet among the plurality of fast charging protocols, respond according to the fast charging protocol that matches the handshake packet, and determine the charging power corresponding to the fast charging protocol that matches the handshake packet; the acquisition module is further configured to: use a first fast charging protocol to perform charging protocol detection on the charging adapter; if a response from the charging adapter to the first fast charging protocol is detected, perform a handshake with the charging adapter using the first fast charging protocol, determine the charging power corresponding to the first fast charging protocol, and use a second fast charging protocol as the new first fast charging protocol; if no response from the charging adapter to the first fast charging protocol is detected, directly execute the step of using the second fast charging protocol as the new first fast charging protocol, return to execute this step, until the charging power corresponding to each fast charging protocol that matches the charging adapter is obtained.
9. The apparatus according to claim 8, characterized in that, The charging module is specifically configured as follows: If the target fast charging protocol is the last fast charging protocol that was used to handshake with the charging adapter, then the target fast charging protocol will be used directly for charging. If the target fast charging protocol is not the last fast charging protocol that shook hands with the charging adapter, then the target fast charging protocol is used to re-shake hands with the charging adapter before charging begins.
10. The apparatus according to claim 8, characterized in that, The device further includes: The storage module is configured to save the charging power corresponding to the first fast charging protocol; Accordingly, the device further includes: The deletion module is configured to delete the saved charging power corresponding to each fast charging protocol that matches the charging adapter.
11. The apparatus according to claim 8, characterized in that, The first determining module is specifically configured as follows: The fast charging protocol corresponding to the maximum charging power is determined as the target fast charging protocol.
12. The apparatus according to claim 8, characterized in that, The device further includes: The second determining module is configured to determine whether a fast charging protocol matching the charging connection device exists in the server when it is determined that there is no fast charging protocol matching the charging connection device in the terminal device charging device. The disconnect module is configured to download the fast charging protocol that matches the charging connection device when it is determined that a fast charging protocol matching the charging connection device exists in the server, and then disconnect from the charging connection device. The reconnection module is configured to re-establish the connection with the charging device after the download is complete.
13. The apparatus according to claim 8, characterized in that, The device further includes: The update acquisition module is configured to retrieve the updated fast charging protocol from the server upon receiving an update instruction for the fast charging protocol.
14. The apparatus according to claim 8, characterized in that, The terminal device charging device is in power output mode, and the charging connection device is a device to be charged that needs to be charged by the terminal device charging device. The acquisition module is specifically configured as follows: Perform a control protocol handshake with the device to be charged; After a successful handshake, each fast charging protocol matching the device to be charged is negotiated and determined using the transmission method defined in the control protocol, and the charging power corresponding to each fast charging protocol matching the device to be charged is determined.
15. A terminal device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the terminal device charging method as described in any one of claims 1-7.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the terminal device charging method as described in any one of claims 1-7.