Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the embodiments of the present application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application discloses a charging management method and device, a terminal device and a storage medium, which can shorten the preparation time before the terminal device starts to be charged, so that the charging efficiency of the terminal device is improved.
The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 1A, fig. 1A is a schematic view of an application scenario of a charging management method disclosed in an embodiment of the present application, and includes aterminal device 10 and acharging apparatus 20. Theterminal device 10 may include a Digital Signal Processing (DSP)module 101 and aprocessor 102, where theDSP module 101 and theprocessor 102 may establish a communication connection. Specifically, theDSP module 101 may include various types of digital signal processing modules that can be built in theterminal device 10, so as to be a subsystem in theterminal device 10 that directly controls the charging process, and may communicate with theprocessor 102 and thecharging apparatus 20 to which theterminal device 10 is connected, respectively; theProcessor 102 may be an Application Processor (AP) of theterminal device 10, and theProcessor 102 may be installed with an operating system, such as an Android operating system, an iOS operating system, and the like, through which a user may visually obtain relevant information when theterminal device 10 accesses thecharging apparatus 20 for charging, and may conveniently control the whole charging process.
The DSP module may include a DSP module only used for Digital signal processing, or may include a mixed signal processing module integrated with an Analog-to-Digital Converter (ADC) or an Analog-to-Digital conversion circuit and used for Analog signal and Digital signal processing, such as various types of ADSPs (Analog Digital signal processors).
For example, theterminal device 10 may include various devices or systems with wireless communication functions, such as a mobile phone, a smart wearable device, an in-vehicle terminal, a tablet Computer, a PC (Personal Computer), a PDA (Personal Digital Assistant), and the like, and is not particularly limited in the embodiment of the present application.
For example, thecharging device 20 may include a power adapter, a mobile power supply with a power adapter function, a wireless charger, other electronic devices (such as a notebook computer, a desktop computer, etc.) connected to theterminal device 10 through a data line, and the like. After theterminal device 10 is connected to thecharging device 20, theterminal device 10 may be powered by thecharging device 20. It should be noted that thecharging device 20 shown in fig. 1A is a power adapter, and the power adapter may also be actually connected to a power supply, so as to obtain a charging current provided by the power supply and supply power to theterminal device 10 after being adapted by the power adapter.
In addition, thecharging device 20 shown in fig. 1A is also merely an example. Referring to fig. 1B, fig. 1B is a schematic view illustrating another application scenario of the charging management method disclosed in the embodiment of the present application. As shown in fig. 1B, in some embodiments, thecharging device 20 may also be a mobile power supply, and the mobile power supply may have a part or all of the functions of the power adapter, so that a battery cell in the mobile power supply may be used to provide a charging current, and further, the charging current may be used to supply power to theterminal device 10 connected to thecharging device 20.
With reference to fig. 2, fig. 2 is a schematic block diagram of a terminal device according to an embodiment of the present disclosure. As shown in fig. 2, theterminal device 10 may further include aswitch 103 and aserial port 104 in addition to theDSP module 101 and theprocessor 102. Communication connection can be established between theDSP module 101 and theprocessor 102, for example, communication connection is established through a G-link (general link) bus, so that theDSP module 101 can report data to theprocessor 102 through the communication connection, and theprocessor 102 can also issue an instruction to theDSP module 101 through the communication connection. Further, theprocessor 102 may be further connected to theswitch 103 through theserial port 104, and theswitch 103 may be directly connected to the chargingapparatus 20 when theterminal device 10 is connected to the chargingapparatus 20, so that when theswitch 103 is switched to theserial port 104, theprocessor 102 may directly perform serial port communication with the chargingapparatus 20 through theserial port 104.
Illustratively, theDSP module 101 may be integrated with a communication module (e.g., VOOCPHY, etc.), and the communication module may be configured to transmit and receive a communication signal to establish a communication connection with the chargingdevice 20, so as to control a corresponding charging process. Optionally, a connection module (e.g., usb phy responsible for bottom layer signal conversion) may be integrated in theDSP module 101, and the connection module and the communication module may be connected to theswitch 103 respectively, and theswitch 103 is used to switch between the communication module and the connection module. In some embodiments, theDSP module 101 may also only establish a general connection with theswitch 103, i.e. the selection may be made by a logic circuit inside theDSP module 101 without distinguishing the connection module or the communication module.
Optionally, theterminal device 10 may further include a Power Management IC (PMIC, not shown), and the Power Management IC may be connected to theprocessor 102 and independent from theDSP module 101, and is used to implement functions such as charging identification and charging control in some cases.
In the related art, theterminal device 10 generally performs Control of a charging process based on an MCU (Micro Control Unit) to implement charging management. However, the MCU-based charging management scheme often needs to determine a target charging current corresponding to the accessed chargingdevice 20, and then the MCU can establish a communication connection with the chargingdevice 20 and control the chargingdevice 20 to supply power to theterminal device 10 at the target charging current based on the communication connection. The above process requires a lot of time to be consumed before theterminal device 10 starts to be charged formally after theterminal device 10 is connected to the chargingapparatus 20, which results in an excessively long preparation time before theterminal device 10 starts to be charged, and reduces the efficiency of charging theterminal device 10.
In the embodiment of the present application, when theterminal device 10 accesses the chargingdevice 20, theDSP module 101 may determine a charging type corresponding to the chargingdevice 20, and send the charging type to theprocessor 102. Theprocessor 102 may determine a target charging current matching the chargingdevice 20 when the charging type is the first charging type, and theDSP module 101 may simultaneously establish a communication connection with the chargingdevice 20 and perform data transmission with the chargingdevice 20 through the communication connection in the process of determining the target charging current matching the chargingdevice 20 by theprocessor 10. The Charging type of theCharging device 20 is the first Charging type, which may indicate that the Charging interface of theCharging device 20 conforms to a certain Charging protocol (e.g., BC1.2, Battery Charging v1.2 Charging protocol, etc.), so that the target Charging current matched with the Chargingdevice 20 may be further determined based on the Charging protocol. On this basis, that is, in the case of data transmission with the chargingdevice 20, theDSP module 101 may further control the chargingdevice 20 to supply power with the target charging current, so as to charge theterminal device 20.
To better describe an application scenario of the embodiment of the present application, fig. 3 discloses a timing chart of a charging management method of the embodiment of the present application. As shown in fig. 3, theterminal device 10 may include aDSP module 101 and aprocessor 102, and is applied in a charging scenario of accessing the chargingapparatus 20. Specifically, the method may include:
302. in the case where theterminal device 10 accesses the chargingapparatus 20, theDSP module 101 determines a charging type corresponding to the chargingapparatus 20, and transmits the charging type to theprocessor 102.
304. In the case where the above-described charging type is the first charging type, theprocessor 102 determines a target charging current that matches the chargingdevice 20.
306. In the process of determining the target charging current matched with the chargingdevice 20 by theprocessor 102, theDSP module 101 establishes a communication connection with the chargingdevice 20 and performs data transmission with the chargingdevice 20 through the communication connection.
308. TheDSP module 101 controls the chargingdevice 20 to supply power at the target charging current.
It can be seen that, by implementing the charging management method described in the foregoing embodiment, theterminal device 10 may perform the preparation processing operation required before theterminal device 20 starts to be charged formally through theprocessor 102 and theDSP module 101, that is, while theprocessor 102 determines the target charging current required for charging, theDSP module 101 may also establish a communication connection with the chargingapparatus 20, so as to controllably enable the chargingapparatus 20 to supply power with the target charging current based on the communication connection, thereby avoiding excessive consumption of the preparation time during the preparation processing operation, and thus shortening the preparation time before theterminal device 10 starts to be charged, and further effectively improving the efficiency of charging theterminal device 20.
Referring to fig. 4, fig. 4 is a schematic flowchart of a charging management method disclosed in an embodiment of the present application, where the charging management method can be applied to the terminal device, and the terminal device can include a DSP module and a processor. As shown in fig. 4, the charge management method may include the steps of:
402. under the condition that the terminal equipment is connected with the charging device, the DSP module determines the charging type corresponding to the charging device and sends the charging type to the processor.
In the embodiment of the application, when the terminal device is connected to the charging device, the DSP module of the terminal device may determine the charging type corresponding to the charging device. The charging type may be determined by a charging interface of the charging device, and different charging interfaces may correspond to different charging protocols supported by the charging device.
Illustratively, the charging protocols supported by the charging device may include basic general charging protocols, such as BC1.2 charging protocol, USB-PD charging protocol, etc. by USB-IF (USB Implementers Forum); the charging system may also include a proprietary charging protocol that is provided by each hardware manufacturer, for example, a VOOC charging protocol, a SuperVOOC charging protocol, a QC charging protocol, an SCP charging protocol, and the like, which is not specifically limited in this embodiment of the present application.
For example, taking the charging device as a power adapter, a power adapter supporting the BC1.2 charging protocol may be provided with the following types of interfaces (or "ports"): SDP (Standard Downstream Port), CDP (Charging Downstream Port), DCP (Dedicated Charging Port). In order to support a higher-level private charging protocol on the basis of the BC1.2 charging protocol to realize a faster and efficient charging process, a power adapter with a DCP-type charging interface may be selected to charge the terminal device. On this basis, when the terminal device detects that the charging device is accessed (i.e., the charging interface of the power adapter is inserted into the terminal device), the DSP module of the terminal device can obtain and determine the charging type (e.g., the DCP type) corresponding to the charging device, and then can perform corresponding charging control according to the charging type in subsequent steps.
Further, after determining the charging type, the DSP module may report the charging type to the processor. Specifically, the DSP module may be connected via a G-Link bus between the DSP module and the processor, such that the charging type described above may be transmitted to the processor via the G-Link bus. In some embodiments, the DSP module of the terminal device may package the charging type into a specified data format, and then send a data packet of the data format to the processor, so that the processor obtains the data packet through data packet reception interruption, and unpacks the data packet to obtain the charging type corresponding to the charging device. In other embodiments, since the DSP module of the terminal device is directly connected to the processor, the DSP module may also directly send a specified level signal (e.g., a specified pulse signal, a square wave signal, etc.) to the processor, so as to characterize the charging type corresponding to the charging device through the level signal, and thus, the charging type may be transmitted to the processor.
404. The processor determines a target charging current matched with the charging device under the condition that the charging type is the first charging type, and in the process that the processor determines the target charging current matched with the charging device, the DSP module establishes communication connection with the charging device and performs data transmission with the charging device through the communication connection.
After the terminal device is connected to the charging device and the DSP module of the terminal device determines the charging type corresponding to the charging device, in order to control the charging device to supply power to the terminal device corresponding to the charging type, not only a target charging current used when the charging device supplies power to the terminal device needs to be determined, but also a communication connection needs to be established between the DSP module and the charging device, so that the charging device can controllably supply power to the terminal device.
In an embodiment of the present application, the step of determining the target charging current may be performed by a processor. For example, the processor may determine a target charging current that matches the connected charging device if the charging type is a first designated charging type (e.g., a DCP type that supports a faster, more efficient charging process).
In some embodiments, the processor may query, by using a table lookup, a target charging current that is pre-stored and matches the charging type according to the charging type corresponding to the charging device.
In other embodiments, the processor may also sequentially test a plurality of charging currents to be selected with different current values according to a certain sorting rule, starting from the initial charging current to be selected, so as to determine a target charging current meeting requirements from the plurality of charging currents to be selected. For example, the sorting rule may include a rule that increases the current value by a certain step (for example, the current value of the next candidate charging current is increased by 100mA, 200mA, etc. compared with the current value of the currently tested candidate charging current), a rule that selects several current values according to a contracted experience or protocol and sorts the current values from small to large (for example, candidate charging currents with current values of 500mA, 900mA, 1350mA, 1500mA, 1750mA, 2000mA, etc. are respectively selected and tested in sequence), and the like. On the basis, the processor can determine a target charging current matched with the charging device, so that in the subsequent step, the charging device can supply power to the terminal equipment by using the target charging current.
Meanwhile, the step of establishing a communication connection with the charging device may be performed by the DSP module. Illustratively, in the case that the above-mentioned charging type is a first designated charging type (e.g., DCP type), the DSP module of the terminal device may further establish a communication connection with the charging device in the process of sending the charging type to the processor to trigger the processor to determine a target charging current matching with the charging device, so that data transmission may be performed with the charging device through the communication connection.
Specifically, when the switch of the terminal device is switched to the DSP module, the DSP module may be directly connected to the charging device. On the basis, the DSP module can send a communication signal to the charging device through the built-in communication module and receive the communication signal sent to the DSP module by the charging device, so that the communication connection with the charging device is realized. Based on this communication connection, the DSP module can carry out relatively stable data transmission with charging device to can monitor the state when charging device supplies power for terminal equipment in real time, help carrying out timely effectual control to charging device's charging process, promote the security and the reliability of charging to terminal equipment greatly.
406. The DSP module controls the charging device to supply power at a target charging current.
It should be noted that, after the DSP module establishes a communication connection with the charging device, the DSP module can controllably enable the charging device to supply power to the terminal device with a certain charging current. In order to ensure that the state of the charging device supplying power to the terminal equipment can be monitored in real time and avoid the occurrence of accidents, the DSP module can control the charging device to supply power with the target charging current under the condition of data transmission with the charging device, so that the power supply state (such as whether power is supplied or not, the charging current during power supply and the like) of the charging device can be flexibly adjusted based on the data (such as temperature data, voltage data, current data and the like) transmitted from the charging device to the DSP module. By implementing the method, the terminal equipment can save part of preparation time before formal charging on the premise of ensuring the safety and reliability of charging, thereby effectively improving the efficiency of charging the terminal equipment.
It can be seen that, with the charging management method described in the foregoing embodiment, the terminal device may perform preparation processing required before formal charging is started through the processor and the DSP module, that is, when the target charging current required for charging is determined through the processor, a communication connection may be established between the DSP module and the charging device, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby avoiding a large amount of preparation time consumed by the MCU sequentially performing the preparation processing, and thus shortening preparation time before the terminal device starts charging, and further effectively improving efficiency of charging the terminal device.
Referring to fig. 5, fig. 5 is a flowchart illustrating another charging management method disclosed in the embodiment of the present application, where the charging management method can be applied to the terminal device, and the terminal device can include a DSP module and a processor. As shown in fig. 5, the charge management method may include the steps of:
502. and under the condition that the terminal equipment is connected with the charging device, the DSP module acquires the charging interface type corresponding to the charging device.
The charging interface type of the charging device may correspond to different charging protocols supported by the charging device. For example, taking the charging device as a power adapter, the power adapter supporting the BC1.2 charging protocol may be provided with different types of charging interfaces such as SDP, CDP, and DCP. On this basis, when the terminal device detects that the charging device is accessed, the DSP module of the terminal device can obtain the charging interface type corresponding to the charging device, and then can determine whether the charging interface type is the first charging type (e.g., DCP type supporting a faster and more efficient charging process) in the subsequent steps.
In this embodiment, when acquiring the charging interface type of the accessed charging device, the DSP module of the terminal device may be acquired based on the DSP module through direct connection between the switch and the charging interface of the charging device, or may be acquired indirectly through another module built in the terminal device. For example, when the terminal device detects that the charging device is accessed, the charging interface type of the charging device can be identified through the power management module, and then the DSP module can acquire the identified charging interface type from the power management module, thereby indirectly identifying and confirming the charging interface type of the charging device.
Specifically, for example, when the terminal device is connected to the charging device, the DSP module may generate a power identification interrupt, where the power identification interrupt may be used to trigger the power management module to identify the charging interface type of the charging device. Further, the power management module can transmit the charging interface type identified by the power management module to the DSP module, so that the DSP module can obtain and determine the charging interface type of the charging device. Optionally, the power management module may also identify the charging interface type of the charging device when the terminal device is connected to the charging device, and the DSP module may generate a corresponding power identification interrupt, and obtain the identified charging interface type from the power management module in response to the power identification interrupt.
504. And the processor determines a target charging current matched with the charging device under the condition that the type of the charging interface is a first charging type conforming to a target charging protocol.
Step 504 is similar to step 404 described above. It should be noted that the first Charging type conforming to the target Charging protocol may indicate that the Charging interface type of the Charging device conforms to a specified target Charging protocol (e.g., BC1.2, namely, Battery Charging v1.2 Charging protocol, etc.).
In this embodiment of the application, in order to determine a target charging current matched with a charging device connected to a terminal device, a processor of the terminal device may sequentially test a plurality of charging currents to be selected with different current values according to a certain sorting rule, starting from an initial charging current to be selected, so as to determine a target charging current meeting requirements from the plurality of charging currents to be selected. For example, the sorting rule may include a rule that increases the current value by a certain step (for example, the current value of the next candidate charging current is increased by 100mA, 200mA, etc. compared with the current value of the currently tested candidate charging current), a rule that selects several current values according to a contracted experience or protocol and sorts the current values from small to large (for example, candidate charging currents with current values of 500mA, 900mA, 1350mA, 1500mA, 1750mA, 2000mA, etc. are respectively selected and tested in sequence), and the like.
For example, after the DSP module of the terminal device obtains the charging interface type, the charging interface type may be sent to the processor, and then the processor may sequentially test the loading capacity of the charging device for the multiple charging currents to be selected according to the sequence of the current values of the multiple charging currents to be selected from small to large when the charging interface type is the first charging type. The load capacity, i.e., the load capacity, indicates the capacity of the charging apparatus to maintain the input current at a constant current value regardless of the impedance after the charging apparatus is connected to the terminal device, and can be measured according to the constant current value. By sequentially using a plurality of charging currents to be selected with different current values for testing according to the sequence from small to large of the current values, the target charging current matched with the charging device can be accurately determined from the plurality of charging currents to be selected, so that the charging device can supply power to the terminal equipment by using the target charging current in the subsequent steps.
506. If the type of the charging interface is the first charging type, the DSP module sends an activation signal to the charging device in the process that the processor determines the target charging current matched with the charging device, and the activation signal is used for activating the charging device.
508. The DSP module enables the communication module and performs data transmission with the activated charging device through the communication module.
The activation signal may include a specific pulse signal, a square wave signal, and the like. For example, taking the activation signal as a pulse signal, while the processor of the terminal device determines the target charging current matching with the charging device, the DSP module of the terminal device may also actively and continuously send a pulse train signal formed by a plurality of pulse signals, so that the charging device may be activated by the pulse train signal. It should be noted that the charging device may be activated passively by drawing an input current exceeding a certain current threshold (e.g., 1A, 1.2A, etc.) from the terminal device, or may be activated actively by sending an activation signal as described above. Alternatively, the current value of the activation signal may be greater than the current value (e.g., 300mA, 500mA, etc.) required to activate the charging device. The charging device is activated in a mode of actively sending the pulse string signals through the DSP module, so that the problem of possible cyclic reset of the charging device in a passive activation mode can be avoided, the charging device can be ensured to be activated in time, and the reliability of charging the terminal equipment is further improved.
Further, the charging device may send a communication signal to the DSP module after being activated. Before that, the DSP module may first enable (i.e., activate) its own communication module, so that the communication signal sent by the activated charging device may be received by the communication module. On this basis, the DSP module can establish communication connection with the charging device after the activation to carry out data transmission based on this communication connection, so that the state when making the DSP module can monitor charging device in real time and supply power for terminal equipment helps carrying out timely effectual control to charging device's charging process, makes this charging device can supply power for terminal equipment by controlled ground, has promoted the security and the reliability that charge to terminal equipment greatly.
For example, the communication signal may include a charging communication frame, that is, the DSP module may perform data transmission with the activated charging device through its communication module in the form of the charging communication frame. In some embodiments, the charging communication frame may include device information and the like corresponding to the charging device, so that in subsequent steps, the DSP module may report the device information to a processor connected thereto, and control output of corresponding charging interaction information through the processor to remind a user that charging has formally started, thereby improving user experience of using the charging device by the user.
510. The DSP module controls the charging device to supply power at a target charging current.
Step 510 is similar to step 406, and is not described herein again.
It can be seen that, with the charging management method described in the foregoing embodiment, when the terminal device determines the target charging current required for charging through the processor, the terminal device may also establish a communication connection with the charging device through the DSP module, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby shortening the preparation time before the terminal device starts charging, and further effectively improving the efficiency of charging the terminal device; in addition, the subsequent charging preparation steps are executed when the charging interface type of the charging device is judged to be the first charging type (such as a DCP type), so that the charging device is favorable for realizing a faster and more efficient charging process on the premise of ensuring the charging safety and reliability; in addition, through the active activation of the charging device by the DSP module, the problem of possible cyclic reset of the charging device in a passive activation mode can be avoided, the charging device can be ensured to be activated in time, and the reliability of charging the terminal equipment is further improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating another charging management method disclosed in the embodiment of the present application, where the charging management method can be applied to the terminal device, and the terminal device can include a DSP module and a processor. As shown in fig. 6, the charge management method may include the steps of:
602. and under the condition that the terminal equipment is connected with the charging device, the DSP module generates power supply identification interruption.
604. The DSP module responds to the power supply identification interruption and identifies the charging interface type corresponding to the charging device.
Step 602 and step 604 are similar to the detailed description ofstep 502, and are not described here again.
Before the terminal device is connected to the charging device, it may be further configured to continuously detect whether the terminal device is connected to the charging device. For example, the DSP module of the terminal device may continuously detect a voltage of a first charging interface of the terminal device, where the first charging interface, that is, a charging interface corresponding to the switch, may be used to directly access the charging device.
Specifically, for example, the DSP module may detect a voltage change state of the first charging interface of the terminal device, and generate power access interruption when determining that the charging device is accessed according to the voltage change state. For example, when the DSP module detects that the voltage Vbus of the first charging interface rises from 0V to a standard charging voltage (e.g., 5V, 6V, etc.), a plug interrupt (i.e., the aforementioned power access interrupt) may be triggered by the voltage change. On this basis, the DSP module may report access information corresponding to the charging device to the processor in response to the power access interruption, where the access information may be used to enable the processor to learn an event of the charging device access. Further, the processor may determine an initial charging current in response to the access information, and trigger the DSP module to control the charging device to supply power with the initial charging current.
It is noted that the current value of the initial charging current may be larger than a current value required to activate the charging device. For example, if the current value required to activate the charging device is 300mA, the above initial charging current may be set to 500 mA; for another example, if the current value required to activate the charging device is 500mA, the above-described initial charging current may be set to 750mA, 900mA, or the like. By setting the initial charging current, when the DSP module needs to activate the charging device, an activation signal can be further output to the charging device under the excitation of the initial charging current so as to realize the active activation of the charging device, thereby avoiding the possible cyclic reset problem of the charging device in a passive activation mode, ensuring that the charging device can be activated in time, and further improving the reliability of charging the terminal equipment.
606. And under the condition that the type of the charging interface is a first charging type conforming to a target charging protocol, sequentially testing the loading capacity of the charging device aiming at the plurality of charging currents to be selected according to the sequence of the current values of the plurality of charging currents to be selected from small to large so as to determine the target charging current matched with the charging device from the plurality of charging currents to be selected.
Step 606 is similar to the detailed description ofstep 504, and is not described here again.
608. If the type of the charging interface is the first charging type, the DSP module sends an activation signal to the charging device in the process that the processor determines the target charging current matched with the charging device, and the activation signal is used for activating the charging device.
610. The DSP module enables the communication module and receives first communication information sent by the charging device through the communication module, where the first communication information may include device information corresponding to the charging device.
Step 608 and step 610 are similar to step 506 and step 508, and are not described herein again.
612. The DSP module sends the device information to the processor.
In this embodiment, different charging devices may correspond to different device information, and the device information may be set by a hardware manufacturer according to a product model, or may be automatically generated according to configuration information (such as a rated voltage, a rated current, a rated power, and the like) of the charging device itself, so as to accurately identify a certain type or a certain class (such as a certain type, a certain model, and the like) of the charging device. On the basis, the DSP module can transmit the device information to the processor through the G-Link bus connection between the DSP module and the processor, so that the processor can realize richer charging management functions based on the device information in subsequent steps.
614. And the processor outputs charging interaction information corresponding to the device information according to the device information.
Illustratively, the charging interaction information may include one or more of image information, sound information, and vibration information. According to the difference of the device information of the charging device, the processor can determine different charging interaction information, such as different charging icons, different frequency or semantic voice prompts, different frequency or amplitude vibrations and the like. Referring to fig. 7, fig. 7 is a schematic diagram of a terminal device outputting charging interaction information according to an embodiment of the present disclosure. As shown in fig. 7, theterminal device 10 may use the image information output on itsscreen 110 as the charging interaction information. This image information may be displayed in the upper right corner of thescreen 110 of the terminal device 10 (i.e., resident display), as indicated by anicon 111; or may be displayed in the center of the screen 110 (i.e., the screen-off display) as shown byicon 112. It is understood that the charging interaction information shown in fig. 7 is only some examples, the charging interaction information shown by theicon 111 and the charging interaction information shown by theicon 112 may be displayed separately or simultaneously, and theterminal device 10 may output other types of charging interaction information. When the charging devices with different device information are connected, the charging interaction information can be different, so that the user can be prompted about the difference of charging duration, speed, efficiency and the like corresponding to the different charging devices, and more diversified use experience can be brought.
As an optional implementation manner, before the DSP module controls the charging device to supply power with the target charging current, a power management module, which is independent of the DSP module and is disposed in the terminal device, may be suspended to turn off the charging function under the non-target charging current, and meanwhile, an error in voltage data obtained by the DSP module from the charging device due to an influence of the floating voltage may also be avoided. Illustratively, the DSP module may send a charging suspend signal to the processor in case of data transmission with the charging device, so that the processor may control a power management module connected to the processor to suspend in response to the charging suspend signal, the power management module being independent from the DSP module and operable to control the charging device to supply power at the basic charging current in case of no suspension. The current value of the basic charging current may be smaller than the current value of the target charging current.
As another optional implementation manner, after controlling the charging device to supply power with the target charging current, the DSP module may further monitor first temperature information corresponding to the charging device during the charging process. For example, if the first temperature information exceeds the temperature threshold, the DSP module may control the charging device to stop supplying power, so as to avoid the danger that the charging device is likely to be over-temperature due to continuous power supply. On this basis, the DSP module may report the first temperature information to the processor, and the processor may control the charging device to supply power with the basic charging current after a first waiting time (e.g., 20 seconds, 30 seconds, etc.) according to the first temperature information. The basic supply current may be smaller than the target charging current. Therefore, by implementing the method, the terminal equipment can stop the charging process in time under the condition that the charging device is possibly in an over-temperature danger, and controls the charging device to recover power supply according to relatively low current after waiting for a certain time to cool the charging device, so as to ensure the safety of the charging process as much as possible.
Further, the DSP module may further continue to monitor second temperature information corresponding to the charging device, and if the second temperature information does not exceed the temperature threshold, the DSP module may activate the charging device after a second waiting time period (e.g., 25 seconds, 35 seconds, etc.), and in a case of data transmission with the charging device, control the charging device to supply power at the target charging current again. It should be noted that the second waiting time period may be longer than the first waiting time period, so that sufficient time may be reserved for reactivating the charging device to safely and reliably restart the faster and more efficient charging process.
It can be seen that, with the charging management method described in the foregoing embodiment, when the terminal device determines the target charging current required for charging through the processor, the terminal device may also establish a communication connection with the charging device through the DSP module, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby shortening the preparation time before the terminal device starts charging, and further effectively improving the efficiency of charging the terminal device; in addition, after the DSP module is in communication connection with the charging device, the DSP module can acquire device information corresponding to the charging device and report the device information to the processor, so that the processor can output charging interaction information timely to remind a user of formal start of charging, the situation that the user mistakenly regards as unsuccessful charging due to overlong charging preparation time is effectively avoided, the reliability of charging the terminal device can be further improved, and the user experience of the user in using the charging device is also improved.
Referring to fig. 8, fig. 8 is a schematic block diagram of a charging management apparatus according to an embodiment of the present disclosure, where the charging management apparatus can be applied to the terminal device, and the terminal device can include a DSP module and a processor. As shown in fig. 8, the charging management apparatus may include afirst determination unit 801, asecond determination unit 802, acommunication connection unit 803, and a chargingcontrol unit 804, in which:
a first determiningunit 801, configured to, when the terminal device is connected to the charging apparatus, determine a charging type corresponding to the charging apparatus by using the DSP module, and send the charging type to the processor;
a second determiningunit 802, configured to determine, by the processor, a target charging current matching the charging device if the charging type is the first charging type;
acommunication connection unit 803, configured to, in the process that the processor determines a target charging current matching the charging device, establish a communication connection with the charging device through the DSP module, and perform data transmission with the charging device through the communication connection;
and the chargingcontrol unit 804 is used for controlling the charging device to supply power at the target charging current by the DSP module.
It can be seen that, with the charging management apparatus described in the foregoing embodiment, the terminal device may perform preparation processing required before formal charging is started through the processor and the DSP module, that is, when the processor determines a target charging current required for charging, the DSP module may also establish a communication connection with the charging device, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby avoiding a large amount of preparation time consumed by the MCU for performing the preparation processing in sequence, and thus shortening the preparation time before the terminal device starts charging, and further effectively improving the efficiency of charging the terminal device.
In an embodiment, the charging type includes a charging interface type, and the first determiningunit 801 is specifically configured to, when the terminal device is connected to the charging device, obtain, by the DSP module, the charging interface type corresponding to the charging device;
the second determiningunit 802 may be specifically configured to determine, by the processor, a target charging current matched with the charging device when the charging interface type is the first charging type conforming to the target charging protocol.
Further, the first determiningunit 801 may include a first interruption subunit and a power identification subunit, which are not shown in the drawing, wherein:
the first interrupt subunit is used for generating power supply identification interrupt by the DSP module under the condition that the terminal equipment is connected to the charging device;
and the power supply identification subunit is used for responding to power supply identification interruption by the DSP module and identifying the type of the charging interface corresponding to the charging device.
In an embodiment, the second determiningunit 802 may be specifically configured to, when the charging type is the first charging type, sequentially test the loading capacities of the charging device for the plurality of charging currents to be selected by the processor according to the order from small to large of the current values of the plurality of charging currents to be selected, so as to determine the target charging current matching with the charging device from the plurality of charging currents to be selected.
In an embodiment, thecommunication connection unit 803 may include a transmitting subunit and a data transmission subunit, not shown in the figure, where:
the transmitting subunit is used for transmitting an activation signal to the charging device by the DSP module in the process of determining the target charging current matched with the charging device by the processor if the charging type is the first charging type, wherein the activation signal is used for activating the charging device;
and the data transmission subunit is used for enabling the communication module by the DSP module and carrying out data transmission with the activated charging device through the communication module.
Illustratively, the activation signal may include a burst signal.
It can be seen that, with the charging management device described in the above embodiment, while the terminal device determines the target charging current required for charging through the processor, the terminal device may also establish a communication connection with the charging device through the DSP module, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby shortening the preparation time before the terminal device starts charging, and further effectively improving the efficiency of charging the terminal device; in addition, the subsequent charging preparation steps are executed when the charging interface type of the charging device is judged to be the first charging type (such as a DCP type), so that the charging device is favorable for realizing a faster and more efficient charging process on the premise of ensuring the charging safety and reliability; in addition, through the active activation of the charging device by the DSP module, the problem of possible cyclic reset of the charging device in a passive activation mode can be avoided, the charging device can be ensured to be activated in time, and the reliability of charging the terminal equipment is further improved.
In an embodiment, the charging management device may further include an interaction control unit, not shown in the drawing, wherein the data transmission subunit may be further configured to receive, by the DSP module, a first communication signal sent by the charging device through the communication module, where the first communication signal may include device information corresponding to the communication device;
the data transmission subunit can also be used for the DSP module to send the device information to the processor;
the interaction control unit may be configured to output, by the processor, charging interaction information corresponding to the device information according to the device information.
The charging interaction information may include one or more of image information, sound information, and vibration information.
In an embodiment, the charging management apparatus may further include an initialization unit, not shown in the drawing, where the initialization unit may be configured to detect a voltage change state of the first charging interface of the terminal device by using the DSP module, and generate a power access interrupt when determining that the charging apparatus is accessed according to the voltage change state; and the number of the first and second groups,
the DSP module is used for responding to the power supply access interruption and reporting access information corresponding to the charging device to the processor; and the number of the first and second groups,
the processor responds to the access information, determines the initial charging current and triggers the DSP module to control the charging device to supply power with the initial charging current.
The current value of the initial charging current may be greater than a current value required to activate the charging device.
In an embodiment, the initialization unit may be further configured to send a charge suspension signal to the processor when the DSP module performs data transmission with the charging device; and the number of the first and second groups,
the processor responds to the charging suspension signal and controls the power management module connected with the processor to suspend, and the power management module and the DSP module are mutually independent and are used for controlling the charging device to supply power by basic charging current under the condition of not suspending.
In an embodiment, the charging management device may further include a temperature management unit, not shown in the figure, where the temperature management unit may be configured to monitor first temperature information corresponding to the charging device by the DSP module; if the first temperature information exceeds the temperature threshold, the DSP module controls the charging device to stop supplying power and reports the first temperature information to the processor; and the processor controls the charging device to supply power with basic charging current after the first waiting time according to the first temperature information, wherein the basic power supply current is smaller than the target charging current.
Furthermore, after the temperature management unit controls the charging device to supply power by the basic charging current, the temperature management unit can also be used for the DSP module to monitor second temperature information corresponding to the charging device; and if the second temperature information does not exceed the temperature threshold, the DSP module activates the charging device after a second waiting time period, and re-executes the step of controlling the charging device to supply power at the target charging current.
It can be seen that, with the charging management device described in the above embodiment, while the terminal device determines the target charging current required for charging through the processor, the terminal device may also establish a communication connection with the charging device through the DSP module, so as to controllably enable the charging device to supply power with the target charging current based on the communication connection, thereby shortening the preparation time before the terminal device starts charging, and further effectively improving the efficiency of charging the terminal device; in addition, after the DSP module is in communication connection with the charging device, the DSP module can acquire device information corresponding to the charging device and report the device information to the processor, so that the processor can output charging interaction information timely to remind a user of formal start of charging, the situation that the user mistakenly regards as unsuccessful charging due to overlong charging preparation time is effectively avoided, the reliability of charging the terminal device can be further improved, and the user experience of the user in using the charging device is also improved.
Referring to fig. 9, fig. 9 is a schematic block diagram of a terminal device according to an embodiment of the present disclosure. As shown in fig. 9, the terminal device may include amemory 901 and aprocessor 902, where thememory 901 stores a computer program, and when the computer program is executed by theprocessor 902, theprocessor 902 may implement all or part of the steps in any one of the charging management methods described in the above embodiments.
Furthermore, the present application further discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program, when executed by a processor, enables the processor to implement all or part of the steps of any one of the charging management methods described in the above embodiments.
In addition, the embodiments of the present application further disclose a computer program product, when the computer program product runs on a computer, the computer may implement all or part of the steps in any one of the charging management methods described in the above embodiments.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The charging management method and apparatus, the terminal device, and the storage medium disclosed in the embodiments of the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.