Charging control method and device, electronic equipment, storage medium and program product
Patent Information
- Application Number
- CN202510526881.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-10-30
AI Technical Summary
而充电接口为C型接口的充电器,虽能在无设备连接时进入功耗较低的待机模式,却仅支持关联有充电协议的设备,限制了设备的使用范围,无法为无充电协议的设备充电
[0056]本公开实施例中,电子设备获取充电器处于待机模式下的充电接口处的电参数,并基于电参数,确定充电器是否连接有充电设备,并基于判断结果,维持或切换充电器的模式,一方面,相比于相关技术中的A型接口充电器在没有连接充电设备的待机模式下也会产生较大功耗(20mW),本公开实施例,能够实现在充电器不连接充电设备进行充电时,处于功耗小于预设功耗阈值的待机模式,能够减少不必要的功耗,且由于充电器的电路处于低功耗状态,也能够减少充电器内各元器件的发热和损耗从而降低元器件的老化速度,延长充电器的使用寿命;另一方面,相比于相关技术中的C型接口充电器基于充电协议检测充电设备的连接状态,无法检测无充电协议设备的连接状态,本公开实施例,能够基于充电器充电接口处的电参数判断充电器是否连接充电设备,并确定是否切换当前模式,本公开实施例的方案能够识别任意充电设备,方案简单有效,智能性较高。
Smart Images

Figure CN123019142A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of charging technology, and in particular to a charging control method, device, electronic device, storage medium, and program product. Background Technology
[0002] With the widespread adoption and diversification of electronic devices, chargers, as indispensable accessories, have seen increasing attention focused on their performance and power consumption. Current chargers typically use either Type-A or Type-C interfaces. While Type-A chargers are compatible with devices lacking a specific charging protocol, they cannot detect the connection status of such devices and therefore require the interface to remain constantly open, resulting in higher standby power consumption, which contradicts modern energy-saving principles. Type-C chargers, on the other hand, can enter a lower-power standby mode when no device is connected, but they only support devices with a specific charging protocol, limiting their usability and preventing them from charging devices without that protocol. This contradiction makes it difficult for users to balance efficient charging with energy conservation and emission reduction, especially in today's diverse device landscape and varying usage environments. Therefore, achieving both low-power standby and broad compatibility with all types of devices has become a pressing technical challenge. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, this disclosure provides a charging control method, device, electronic device, storage medium, and program product.
[0004] According to a first aspect of the present disclosure, a charging control method is provided, the method comprising:
[0005] When the charger is in standby mode, the electrical parameters at the charging port of the charger are obtained; wherein, the power consumption of the charger in standby mode is less than a preset power consumption threshold.
[0006] Based on the electrical parameters, determine whether the charger is connected to a charging device;
[0007] When the charging device is connected, switch from the standby mode to the charging mode to charge the charging device.
[0008] When the charging device is not connected, the charger remains in the standby mode.
[0009] In some embodiments, the electrical parameter is voltage, and determining whether the charger is connected to a charging device based on the electrical parameter includes:
[0010] In response to the voltage being greater than a first voltage threshold and less than or equal to a second voltage threshold, it is determined that the charger is not connected to the charging device;
[0011] In response to the voltage being less than or equal to the first voltage threshold, it is determined that the charger is connected to the charging device.
[0012] In some embodiments, the method further includes:
[0013] After switching the charger from the standby mode to the charging mode, it is determined whether there is a communication signal between the charger and the connected charging device; wherein, the communication signal is a signal associated with a preset charging protocol;
[0014] In response to the existence of a communication signal between the charger and the connected charging device, based on the changes in the communication signal, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode;
[0015] In response to the absence of a communication signal between the charger and the connected charging device, based on the charging parameters of the charger charging the charging device, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0016] In some embodiments, determining, based on changes in the communication signal, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode includes:
[0017] In response to the communication signal being uninterrupted, or the duration of the interruption being less than a first preset duration threshold, it is determined to maintain the charger in the charging mode;
[0018] In response to the interruption of the communication signal, and the duration of the interruption is greater than the first preset duration threshold, the charger is switched from the charging mode to the standby mode.
[0019] In some embodiments, the step of determining, based on charging parameters of the charger charging the charging device, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode in response to the absence of a communication signal between the charger and the connected charging device includes:
[0020] In response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters meet preset conditions, based on the electrical parameters at the charger's charging interface, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0021] In response to the absence of a communication signal between the charger and the connected charging device, and if the charging parameters do not meet the preset conditions, it is determined to maintain the charger in the charging mode.
[0022] In some embodiments, the charging parameter is the charging current, and the electrical parameter at the charging interface of the charger is the voltage; the step of determining, based on the electrical parameter at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode when the charging parameter meets preset conditions includes:
[0023] If the charger charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, based on the voltage at the charging interface of the charger, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0024] Wherein, the first current is a current less than a first current threshold, the second current is a current less than a second current threshold, the first current threshold is greater than the second current threshold, and the first preset duration is greater than the second preset duration.
[0025] In some embodiments, determining, based on the voltage at the charging port of the charger, to maintain the charger in the charging mode or to switch the charger from the charging mode to the standby mode includes:
[0026] In response to the voltage at the charging port of the charger being less than or equal to a first voltage threshold, it is determined to maintain the charger in the charging mode;
[0027] In response to the voltage at the charging port of the charger being greater than the first voltage threshold and less than or equal to the second voltage threshold, the charger is switched from the charging mode to the standby mode.
[0028] In some embodiments, the method further includes:
[0029] After the charger is switched from the charging mode to the standby mode, the number of times the charger switches between the standby mode and the charging mode within a third preset time period is determined.
[0030] In response to the charger switching to the charging mode and the number of switching times being greater than a preset threshold, the charger is kept in the charging mode until the charger is switched to a preset target charging device, and then it is determined whether to continue to maintain or switch the charging mode; wherein, the preset target charging device is a device associated with the preset charging protocol.
[0031] According to a second aspect of the present disclosure, a charging control device is provided, the device comprising:
[0032] The acquisition module is configured to acquire electrical parameters at the charging port of the charger when the charger is in standby mode; wherein the power consumption of the charger in standby mode is less than a preset power consumption threshold.
[0033] The first determining module is configured to determine whether the charger is connected to a charging device based on the electrical parameters.
[0034] The switching module is configured to switch from the standby mode to the charging mode to charge the charging device when the charging device is connected.
[0035] The maintenance module is configured to keep the charger in the standby mode when the charging device is not connected.
[0036] In some embodiments, the electrical parameter is voltage, and the first determining module is further configured to determine that the charger is not connected to the charging device in response to the voltage being greater than a first voltage threshold and less than or equal to a second voltage threshold;
[0037] In response to the voltage being less than or equal to the first voltage threshold, it is determined that the charger is connected to the charging device.
[0038] In some embodiments, the apparatus further includes:
[0039] The second determining module is configured to determine whether there is a communication signal between the charger and the connected charging device after the charger is switched from the standby mode to the charging mode; wherein the communication signal is a signal associated with a preset charging protocol;
[0040] The third determining module is configured to, in response to the existence of a communication signal between the charger and the connected charging device, determine, based on changes in the communication signal, whether to maintain the charger in the charging mode or to switch the charger from the charging mode to the standby mode.
[0041] The fourth determining module is configured to, in response to the absence of a communication signal between the charger and the connected charging device, determine, based on the charging parameters of the charger charging the charging device, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0042] In some embodiments, the third determining module is further configured to determine to maintain the charger in the charging mode in response to the communication signal being uninterrupted or the duration of the interruption being less than a first preset duration threshold; and to switch the charger from the charging mode to the standby mode in response to the communication signal being interrupted and the duration of the interruption being greater than the first preset duration threshold.
[0043] In some embodiments, the fourth determining module is further configured to, in response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters meet preset conditions, determine, based on the electrical parameters at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode; and in response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters do not meet the preset conditions, determine to maintain the charger in the charging mode.
[0044] In some embodiments, the charging parameter is the charging current, and the electrical parameter at the charging interface of the charger is the voltage; the fourth determining module is further configured to, when the charger charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, determine, based on the voltage at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode; wherein, the first current is a current less than a first current threshold, the second current is a current less than a second current threshold, the first current threshold is greater than the second current threshold, and the first preset duration is greater than the second preset duration.
[0045] In some embodiments, the fourth determining module is further configured to determine to maintain the charger in the charging mode in response to the voltage at the charging interface of the charger being less than or equal to a first voltage threshold; and to switch the charger from the charging mode to the standby mode in response to the voltage at the charging interface of the charger being greater than the first voltage threshold and less than or equal to a second voltage threshold.
[0046] In some embodiments, the apparatus further includes:
[0047] The fifth determining module is configured to determine the number of times the charger switches between the standby mode and the charging mode within a third preset time period after switching the charger from the charging mode to the standby mode.
[0048] The sixth determining module is configured to maintain the charger in the charging mode after the charger switches and the number of switching times is greater than a preset number threshold, until the charger is replaced with a preset target charging device, and then determine whether to continue to maintain or switch the charging mode; wherein the preset target charging device is a device associated with the preset charging protocol.
[0049] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0050] processor;
[0051] Memory used to store computer programs or instructions;
[0052] The processor executes the computer program or instructions to implement the steps of the charging control method described in the first aspect above.
[0053] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions which, when executed by a processor, implement the steps of the charging control method described in the first aspect.
[0054] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the charging control method described in the first aspect above.
[0055] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0056] In this embodiment, the electronic device acquires the electrical parameters at the charging interface of the charger in standby mode, and determines whether the charger is connected to a charging device based on the electrical parameters. Based on the determination result, the mode of the charger is maintained or switched. On the one hand, compared with the Type A interface charger in the related technology, which also generates a large power consumption (20mW) in standby mode without a charging device connected, this embodiment can achieve a standby mode with power consumption less than a preset power consumption threshold when the charger is not connected to a charging device, which can reduce unnecessary power consumption. Moreover, since the charger circuit is in a low power consumption state, it can also reduce the heat generation and wear of the components in the charger, thereby reducing the aging speed of the components and extending the service life of the charger. On the other hand, compared with the Type C interface charger in the related technology, which detects the connection status of the charging device based on the charging protocol and cannot detect the connection status of devices without the charging protocol, this embodiment can determine whether the charger is connected to a charging device based on the electrical parameters at the charger charging interface and determine whether to switch the current mode. The solution of this embodiment can identify any charging device, and the solution is simple, effective, and highly intelligent.
[0057] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0058] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0059] Figure 1 This is the internal circuit diagram of the charger.
[0060] Figure 2 This is a flowchart illustrating a charging control method according to an exemplary embodiment.
[0061] Figure 3 This is a schematic diagram illustrating the power consumption of a charger in standby mode according to an exemplary embodiment.
[0062] Figure 4 This is a block diagram illustrating a charging control device according to an exemplary embodiment.
[0063] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0065] In related technologies, there is a type of charger with a Type A charging interface. Because this type of charger needs to accommodate many devices without charging protocols, such as wired mice, keyboards, printers, and electric fans, these devices usually do not require complex charging protocols and only need a simple 5V voltage to be charged. Therefore, in order to meet the charging needs of these devices, the output terminal of the Type A charger's charging interface is always at a high level. This can be understood as meaning that even if no device is connected to the charger, the charger's output terminal will still have a 5V voltage. Figure 1 This is the internal circuit diagram of the charger, in which... Figure 1 The dashed lines between circuit elements are a schematic representation of this part of the circuit, intended to show that these dashed sections also contain connections between circuit elements. L11 is a negative temperature coefficient thermistor, L12 is the circuit associated with the X-type safety capacitor, L13 is the power supply circuit associated with the power supply voltage, L14 is the circuit associated with the high-voltage capacitor, L15 is the circuit using pulse width modulation to control the switch, L16 is the protocol communication circuit and leakage circuit, and L17 is the rectifier switch circuit. Even when no charging device is connected, the above circuits will still generate power consumption while the output of the Type A interface charger remains at a high level. The total power consumption is approximately 20 milliwatts (mW). According to the standard protocol, the ideal power consumption of a charger in standby mode is less than 5 mW, which can be considered zero power consumption. 20 mW is far greater than 5 mW. Therefore, Type A interface chargers in related technologies will generate significant power consumption even in standby mode without a connected charging device.
[0066] Another type of charger in the related technology uses a Type-C charging interface. This type of charger only supports devices with a compatible charging protocol. When no compatible device is connected, it is in standby mode, keeping the output of the charging interface at a low level to reduce power consumption. Upon receiving a charging signal from a device with a compatible charging protocol, it enters charging mode, setting the output of the charging interface to a high level to charge the device. During charging, it communicates with the device based on the charging protocol and determines whether the device has disconnected from the charger. If it is determined that the device has disconnected, it enters standby mode and switches the output of the charging interface from high to low. Although this type of charger can set the output of the charging interface to a low level to reduce power consumption when no device is connected, it cannot detect the connection status of devices without a charging protocol, and therefore cannot charge devices without a charging protocol, such as wired mice, keyboards, printers, and electric fans.
[0067] In response, this disclosure provides a charging control method. Figure 2 This is a flowchart illustrating a charging control method according to an exemplary embodiment. Figure 2 As shown, the method mainly includes the following steps:
[0068] S21. When the charger is in standby mode, obtain the electrical parameters at the charging interface of the charger; wherein, the power consumption of the charger in standby mode is less than a preset power consumption threshold.
[0069] S22. Based on the electrical parameters, determine whether the charger is connected to a charging device;
[0070] S23. When the charging device is connected, switch from the standby mode to the charging mode to charge the charging device.
[0071] S24. When the charging device is not connected, maintain the charger in the standby mode.
[0072] In this embodiment of the disclosure, the charging control method can be applied to the charger itself, such as to the control unit inside the charger, and can also be applied to other electronic devices that can communicate with the charger, such as user equipment (UE), mobile devices, user terminals, mobile phones, tablets, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. For example, the electronic device can communicate with the charger based on Bluetooth or wireless network. This embodiment of the disclosure uses an electronic device as an example for illustration.
[0073] In step S21, the electronic device acquires the electrical parameters at the charging interface of the charger when the charger is in standby mode; wherein, the power consumption of the charger in standby mode is less than a preset power consumption threshold. In some embodiments, the charger is in standby mode when it is connected to a power source but not to a charging device; in other embodiments, the charger is in standby mode when it is connected to both a power source and a charging device, but is not supplying power to the charging device.
[0074] In this embodiment of the disclosure, the charging interface of the charger can be a Type A interface, a Type C interface, or a non-standard interface such as a circular interface. This embodiment of the disclosure does not impose any restrictions on this.
[0075] In this embodiment of the disclosure, the preset power consumption threshold is a set value, such as the ideal power consumption (5 milliwatts) of the charger in standby mode as specified in the standard protocol. Figure 3 This is a schematic diagram illustrating the power consumption of a charger in standby mode according to an exemplary embodiment, wherein L31 is the charger in this embodiment of the present disclosure, consisting of... Figure 3 It can be seen that the charger consumes 5 milliwatts when in standby mode.
[0076] It should be noted that in this embodiment, the charger is in a standby mode where the power consumption is less than a preset power consumption threshold. When the charger is in standby mode, the power consumption is less than that of a Type A interface charger in the related art when it is not connected to a charging device, and can be equivalent to the power consumption of a Type C interface charger in the related art when it is not connected to a charging device.
[0077] In this embodiment of the disclosure, the electronic device obtains the electrical parameters at the charging interface of the charger. It is understood that the charging interface of the charger typically includes multiple input / output pins, and the electronic device can obtain the electrical parameters of any input / output pin of the charging interface of the charger as the electrical parameters at the charging interface.
[0078] It should be noted that the internal circuit structure of the charger in this embodiment can be the same as the internal circuit of a charger in related technologies. The internal circuit of the charger can generate the electrical parameters at the charging interface of the charger. In this embodiment, a separate current source can also be set in the internal circuit of the charger to generate the electrical parameters of the charger in standby mode. In this embodiment, a separate current source can also be omitted, and the connection relationship of each component in the circuit can be changed to generate the electrical parameters of the charger in standby mode. This embodiment does not limit the scope of this embodiment.
[0079] In this embodiment of the disclosure, the electrical parameters at the charging interface can be the voltage at the charging interface, or other electrical parameters related to voltage, such as electric field strength. This embodiment of the disclosure does not limit the specific parameters.
[0080] In step S22, the electronic device determines whether the charger is connected to a charging device based on electrical parameters. In this embodiment, the charging device includes the aforementioned device without a charging protocol and / or a device with a charging protocol. As previously stated, the charger being in standby mode means either the charger is connected to a power source but not connected to a charging device, or the charger is connected to a power source and connected to a charging device, but is not supplying power to the charging device.
[0081] In some embodiments, the electronic device determines whether the charger is connected to a charging device based on electrical parameters. The electronic device also determines, based on electrical parameters, whether the charger, in a standby mode connected to power but not connected to a charging device, changes from being unconnected to being connected to a charging device. In other embodiments, the electronic device determines whether the charger is connected to a charging device based on electrical parameters. Furthermore, the electronic device, based on electrical parameters, determines whether the charger, in a standby mode connected to power and connected to a charging device but not supplying power to the charging device, changes the connected charging device. This disclosure uses the example of the charger being in a standby mode connected to power but not connected to a charging device, and determining, based on electrical parameters, whether the charger changes from being unconnected to being connected to a charging device.
[0082] In some embodiments, the electronic device can determine whether the charger is connected to a charging device based on changes in electrical parameters. For example, if the value of the electrical parameter obtained by the electronic device changes significantly, such as when the electrical parameter is voltage, if the voltage drops from 3.3V to less than 1V, it can be determined that the charger is connected to a charging device.
[0083] In other embodiments, the determination of whether the charger is connected to a charging device can also be based on the relationship between electrical parameters and preset electrical parameter thresholds. If the electrical parameter is voltage, determining whether the charger is connected to a charging device based on the electrical parameter includes:
[0084] In response to the voltage being greater than a first voltage threshold and less than or equal to a second voltage threshold, it is determined that the charger is not connected to the charging device;
[0085] In response to the voltage being less than or equal to the first voltage threshold, it is determined that the charger is connected to the charging device.
[0086] In this embodiment of the disclosure, the first voltage threshold can be a set value, such as one that can be measured experimentally. For example, the first voltage threshold can be 1V. The second voltage threshold can be the maximum voltage value that the charger can output at the charging interface in standby mode. For example, the second voltage threshold can be 3.3V.
[0087] It should be noted that the first voltage threshold is greater than 0V. Due to the performance issues of some charger cables, when a charging device is connected, the voltage may not drop from a higher voltage, such as 3.3V, to 0V, but may drop to a certain value greater than 0V, such as 0.8V. Therefore, setting the first voltage threshold to 1V can improve the accuracy of determining whether a charging device is connected to the charger.
[0088] In this embodiment of the disclosure, the electronic device determines that the charger is not connected to the charging device in response to a voltage greater than a first voltage threshold and less than or equal to a second voltage threshold. For example, when the first voltage threshold is 1V and the second voltage threshold is 3.3V, the electronic device determines that the charger is not connected to the charging device in response to a voltage at the charger charging interface that is greater than 1V and less than 3.3V.
[0089] In this embodiment of the disclosure, when the charger changes from being unconnected to being connected to a device, the voltage at the charger's charging interface will exhibit a certain capacitive impedance due to the connection of the charging device. The capacitive components (such as capacitors) inside the charging device will form a circuit with the components inside the charger. The capacitive impedance of the capacitive components in this circuit will impede the current and voltage in the circuit, thereby reducing the voltage at the charger's charging interface.
[0090] Therefore, in this embodiment of the present disclosure, the electronic device determines that the charger is connected to a charging device in response to a voltage less than or equal to a first voltage threshold. For example, when the first voltage threshold is 1V, the electronic device determines that the charger is connected to a charging device in response to a voltage less than or equal to 1V at the charger charging interface.
[0091] In this embodiment, on the one hand, since voltage changes are usually rapid, especially when the charger is connected to or disconnected from the device, the voltage will change immediately. Therefore, voltage judgment can improve the speed of determining whether the charger is connected to the charging device. On the other hand, compared with electrical parameters such as current and power, voltage is relatively stable and not easily affected by external interference. Voltage judgment can improve the accuracy of the judgment and reduce the possibility of misjudgment. Moreover, the relationship between voltage and threshold can be used to determine whether the charger is connected to the charging device. The solution is simple and effective.
[0092] In step S23, when a charging device is connected, the electronic device switches from standby mode to charging mode to charge the charging device. In this embodiment of the present disclosure, when the electronic device determines that a charging device is connected to the charger based on the electrical parameters at the charger's charging interface, it switches from standby mode to charging mode to charge the charging device. In charging mode, the charger adjusts its output voltage and current to charge the device, such as switching the output voltage to 5V.
[0093] In step S24, the electronic device maintains the charger in standby mode when no charging device is connected. In this embodiment of the present disclosure, the electronic device maintains the charger in standby mode when it is determined, based on the electrical parameters at the charger's charging interface, that the charger is not connected to a charging device.
[0094] In this embodiment, the electronic device acquires the electrical parameters at the charging interface of the charger in standby mode, and determines whether the charger is connected to a charging device based on the electrical parameters. Based on the determination result, the mode of the charger is maintained or switched. On the one hand, compared with the Type A interface charger in the related technology, which also generates a large power consumption (20mW) in standby mode without a charging device connected, this embodiment can achieve a standby mode with power consumption less than a preset power consumption threshold when the charger is not connected to a charging device, which can reduce unnecessary power consumption. Moreover, since the charger circuit is in a low power consumption state, it can also reduce the heat generation and wear of the components in the charger, thereby reducing the aging speed of the components and extending the service life of the charger. On the other hand, compared with the Type C interface charger in the related technology, which detects the connection status of the charging device based on the charging protocol and cannot detect the connection status of devices without the charging protocol, this embodiment can determine whether the charger is connected to a charging device based on the electrical parameters at the charger charging interface and determine whether to switch the current mode. The solution of this embodiment can identify any charging device, and the solution is simple, effective, and highly intelligent.
[0095] In some embodiments, the method further includes:
[0096] After switching the charger from the standby mode to the charging mode, it is determined whether there is a communication signal between the charger and the connected charging device; wherein, the communication signal is a signal associated with a preset charging protocol;
[0097] In response to the existence of a communication signal between the charger and the connected charging device, based on the changes in the communication signal, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode;
[0098] In response to the absence of a communication signal between the charger and the connected charging device, based on the charging parameters of the charger charging the charging device, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0099] In this embodiment of the disclosure, after the electronic device determines that the charger is connected to a charging device based on electrical parameters and switches the charger from standby mode to charging mode, it determines whether there is a communication signal between the charger and the connected charging device. The communication signal is a signal associated with a preset charging protocol, which may include Power Delivery (PD) protocol, Quick Charge (QC) protocol, Universal FastCharging Specification (UFCS) protocol, etc.
[0100] In this embodiment of the disclosure, a communication signal exists between the charger and the connected charging device to indicate that the charging device is the aforementioned protocol-compliant device. The charger and the charging device communicate based on a preset charging protocol, such as the communication rules, data format, and interaction process defined in the preset communication protocol between the charger and the charging device.
[0101] In this embodiment of the disclosure, the electronic device responds to the existence of a communication signal between the charger and the connected charging device, and determines, based on the changes in the communication signal, whether to maintain the charger in charging mode or to switch the charger from charging mode to standby mode.
[0102] In some embodiments, in response to the charging device connected to the charger being a protocol-connected device, the electronic device determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on whether the type of communication signal changes. For example, the electronic device determines to maintain the charger in charging mode in response to the communication signal between the charger and the charging device being a communication signal associated with charging parameters, indicating that the charging process is in progress; and switches the charger from charging mode to standby mode in response to the communication signal between the charger and the charging device changing from a communication signal associated with charging parameters to a signal indicating that the charging device has completed charging.
[0103] In other embodiments, determining, based on changes in the communication signal, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode includes:
[0104] In response to the communication signal being uninterrupted, or the duration of the interruption being less than a first preset duration threshold, it is determined to maintain the charger in the charging mode;
[0105] In response to the interruption of the communication signal, and the duration of the interruption is greater than the first preset duration threshold, the charger is switched from the charging mode to the standby mode.
[0106] In this embodiment of the disclosure, the electronic device, in response to the charging device connected to the charger being a device with a protocol, determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on whether the communication signal is interrupted and the duration of the interruption.
[0107] In this embodiment of the disclosure, if the electronic device responds to the uninterrupted communication signal or the duration of the interruption is less than a first preset duration threshold, it indicates that the charging device is in the charging process, and it is determined to maintain the charger in the charging mode. The first preset duration is a set value, such as 1s, 3s, etc., and this embodiment of the disclosure does not limit it.
[0108] In this embodiment of the present disclosure, if the electronic device responds to the interruption of the communication signal and the duration of the interruption is greater than a first preset duration threshold, it indicates that the device has completed charging and the charger is switched from charging mode to standby mode.
[0109] In this embodiment of the disclosure, the electronic device determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on whether the communication signal is interrupted and the duration of the interruption. On the one hand, maintaining the charger in charging mode when the communication signal is uninterrupted or the interruption duration is less than a first preset duration threshold means that the charger will not be mistakenly judged as having completed charging and switch modes due to a brief communication interruption, thus improving the accuracy of mode switching. On the other hand, switching to standby mode when the communication signal interruption duration is greater than the first preset duration threshold means that if the connection between the charging device and the charger is unstable for a long time or has been disconnected (for example, the user has unplugged the charging cable), the charger will switch to a standby mode with lower power consumption to reduce unnecessary energy waste.
[0110] In this embodiment of the disclosure, in response to the absence of a communication signal between the charger and the connected charging device, the electronic device determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the charging parameters of the charger charging the charging device. The charging parameters may be charging current, charging voltage, charging power, etc. It should be noted that the type of charging parameters is different from the type of electrical parameters at the aforementioned charging interface. For example, when the charging parameter is charging current, the electrical parameters at the aforementioned charging interface may be voltage.
[0111] In this embodiment of the disclosure, the electronic device can determine whether to maintain the charger in a charging mode or switch the charger from a charging mode to a standby mode based on the stable state of the charging parameters of the charger charging the charging device. The electronic device can also determine whether to maintain the charger in a charging mode or switch the charger from a charging mode to a standby mode based on the relationship between the charging parameters of the charger charging the charging device and a preset charging parameter threshold. The electronic device can also determine whether to maintain the charger in a charging mode or switch the charger from a charging mode to a standby mode based on the matching degree between the various charging parameters of the charger charging the charging device. For example, the charging parameters include charging temperature and charging power. The electronic device determines whether to maintain the charger in a charging mode or switch the charger from a charging mode to a standby mode based on the matching degree between the charging temperature and the charging power.
[0112] In this embodiment, when a communication signal exists between the charger and the charging device, changes in the communication signal can accurately determine whether the charging device is charging, thus enabling charger mode switching. However, when no communication signal exists, it is impossible to accurately determine whether the charging device is charging based on the communication signal. Therefore, charging parameters are needed to determine whether the charging device is charging, thus enabling charger mode switching. This embodiment offers high flexibility and is applicable to any charging device.
[0113] In some embodiments, the step of determining, based on charging parameters of the charger charging the charging device, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode in response to the absence of a communication signal between the charger and the connected charging device includes:
[0114] In response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters meet preset conditions, based on the electrical parameters at the charger's charging interface, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0115] In response to the absence of a communication signal between the charger and the connected charging device, and if the charging parameters do not meet the preset conditions, it is determined to maintain the charger in the charging mode.
[0116] In this embodiment of the disclosure, the electronic device, in response to the absence of a communication signal between the charger and the connected charging device, and provided that the charging parameters meet preset conditions, determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the electrical parameters at the charger's charging interface. In some embodiments, meeting the preset conditions for charging parameters can mean that the charging parameters are within a preset range. For example, if the charging parameter is the charging current, and the preset charging current range is 0.5A-5A, then when the charging current is within 0.5A-5A, such as 1A or 2A, it is considered that the charging parameters meet the preset conditions.
[0117] In other embodiments, the charging parameter meeting the preset condition can also be that the fluctuation of the charging parameter is within a preset fluctuation range. For example, if the charging parameter is the charging current and the preset fluctuation range is 0.5A, then the fluctuation of the charging current within 0.5A is considered as the charging parameter meeting the preset condition. The fluctuation of the charging parameter can be the fluctuation of the charging parameter relative to the preset charging parameter. For example, when the charging parameter is the charging current, the fluctuation of the charging current can be the fluctuation of the charging current relative to the rated current.
[0118] In this embodiment of the disclosure, when the charging parameters meet the preset conditions, the electronic device determines whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the electrical parameters at the charging interface of the charger. The electrical parameters at the charging interface can be the electrical parameters described above, such as voltage, electric field strength, etc. It should be noted that the types of charging parameters and electrical parameters at the charging interface are different. For example, when the charging parameter is the charging current, the electrical parameter at the charging interface can be the voltage.
[0119] In some embodiments, the electronic device may determine whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on changes in electrical parameters. For example, if the value of the electrical parameter obtained by the electronic device changes significantly, such as when the electrical parameter is voltage, if the voltage changes from 1V to 3.3V, the charger may be switched from charging mode to standby mode.
[0120] In other embodiments, the electronic device may also determine whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the relationship between the electrical parameters and the preset electrical parameter threshold. For example, when the electrical parameters are greater than the preset electrical parameter threshold, it is determined to switch the charger from charging mode to standby mode, and when the electrical parameters are less than the preset electrical parameter threshold, it is determined to maintain the charger in charging mode.
[0121] In this embodiment of the disclosure, the electronic device determines to maintain the charger in charging mode in response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters do not meet the preset conditions.
[0122] In this embodiment, the electronic device determines whether to switch the charger mode based on whether the charging parameters meet preset conditions, demonstrating high intelligence. On one hand, it can determine whether to switch modes based on the electrical parameters at the charging interface when the charging parameters meet the preset conditions. This dual-judgment method can more accurately determine the current charging state and thus switch modes, reducing the inaccuracy of judging a single parameter. On the other hand, by adjusting the charger mode in a timely manner based on changes in both charging and electrical parameters, the charger can reduce the prolonged exposure to high voltage and high current, thereby reducing the charger's power consumption.
[0123] In some embodiments, the charging parameter is the charging current, and the electrical parameter at the charging interface of the charger is the voltage; the step of determining, based on the electrical parameter at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode when the charging parameter meets preset conditions includes:
[0124] If the charger charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, based on the voltage at the charging interface of the charger, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0125] Wherein, the first current is a current less than a first current threshold, the second current is a current less than a second current threshold, the first current threshold is greater than the second current threshold, and the first preset duration is greater than the second preset duration.
[0126] In this embodiment of the disclosure, when the electronic device charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, it determines, based on the voltage at the charging interface of the charger, whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode. The first current threshold, the second current threshold, the first preset duration, and the second preset duration are all set values that can be experimentally measured. The first preset duration can be 10 seconds, 8 seconds, etc., and the second preset duration can be 10 milliseconds, 8 milliseconds, etc. It should be noted that the first current threshold and / or the second current threshold may be different for different charger models. For example, the first current threshold may be 10mA, 9mA, etc., and the second current threshold may be 3mA, 100uA, etc.
[0127] In this embodiment of the present disclosure, taking a first current threshold of 10mA, a second current threshold of 100uA, a first preset duration of 8 seconds, and a second preset duration of 10 milliseconds as an example, if an electronic device charges a charging device with a current of less than 10mA for 8 seconds and then charges the charging device with a second current of less than 100uA for 10 milliseconds, the system determines, based on the voltage at the charging interface of the charger, whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode.
[0128] In this embodiment of the disclosure, determining whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the voltage at the charger's charging port can be as described above. For example, in some embodiments, determining whether to maintain the charger in charging mode or switch the charger from charging mode to standby mode based on the voltage at the charger's charging port includes:
[0129] In response to the voltage at the charging port of the charger being less than or equal to a first voltage threshold, it is determined to maintain the charger in the charging mode;
[0130] In response to the voltage at the charging port of the charger being greater than the first voltage threshold and less than or equal to the second voltage threshold, the charger is switched from the charging mode to the standby mode.
[0131] In this embodiment of the disclosure, as mentioned above, the first voltage threshold can be a set value, such as one that can be measured experimentally, for example, the first voltage threshold can be 1V; the second voltage threshold can be the maximum voltage value that the charger can output at the charging interface in standby mode, for example, the second voltage threshold can be 3.3V.
[0132] In this embodiment of the disclosure, the electronic device determines to maintain the charger in charging mode in response to the voltage at the charging interface of the charger being less than or equal to a first voltage threshold. For example, when the first voltage threshold is 1V, the electronic device determines to maintain the charger in charging mode in response to the voltage at the charging interface of the charger being less than or equal to 1V.
[0133] In this embodiment of the disclosure, the electronic device switches the charger from charging mode to standby mode in response to the voltage at the charging interface of the charger being greater than a first voltage threshold and less than or equal to a second voltage threshold. For example, when the first voltage threshold is 1V and the second voltage threshold is 3.3V, the electronic device switches the charger from charging mode to standby mode in response to the voltage at the charging interface of the charger being greater than 1V and less than or equal to 3.3V.
[0134] In this embodiment, the charging current is first determined. If the duration of the charging current being the first current is greater than a first preset duration, and the duration of the charging current being the second current is greater than a second preset duration, the charger mode is determined based on the voltage at the charger's charging interface. This embodiment of the present invention, by determining the current twice, can improve the accuracy of determining whether to switch modes and has a high degree of intelligence.
[0135] It should be noted that this embodiment of the present disclosure uses a two-time current judgment method as an example, but it does not mean that this embodiment of the present disclosure only supports a two-time current judgment method. This embodiment of the present disclosure also supports a three-time, four-time or more-time current judgment method. This embodiment of the present disclosure does not limit this. For example, a third current threshold less than the second current threshold and a third preset duration less than the second preset duration can also be set. When the charger charges the charging device with the first current for a first preset duration, then charges the charging device with the second current for a second preset duration, and then charges the charging device with the third current less than the third current threshold for a third preset duration, the electronic device can determine, based on the voltage at the charging interface of the charger, whether to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0136] In some embodiments, the method further includes:
[0137] After the charger is switched from the charging mode to the standby mode, the number of times the charger switches between the standby mode and the charging mode within a third preset time period is determined.
[0138] In response to the charger switching to the charging mode and the number of switching times being greater than a preset threshold, the charger is kept in the charging mode until the charger is switched to a preset target charging device, and then it is determined whether to continue to maintain or switch the charging mode; wherein, the preset target charging device is a device associated with the preset charging protocol.
[0139] In this embodiment of the present disclosure, after the electronic device switches the charger from charging mode to standby mode, it determines the number of times the charger switches between standby mode and charging mode within a third preset time period. The third preset time period is a set value, such as 5 seconds, 10 seconds, etc. For example, when the third preset time period is 10 seconds, after the charger switches from charging mode to standby mode, it determines the number of times the charger switches between standby mode and charging mode within 10 seconds. For example, if the charger switches from standby mode to charging mode, then from charging mode to standby mode, and then from standby mode to charging mode again within 10 seconds, the number of switches is 3.
[0140] In this embodiment of the disclosure, the electronic device responds to the charger switching to charging mode and the number of switching times exceeds a preset threshold. The charger remains in charging mode until it is switched to a preset target charging device, at which point it determines whether to continue maintaining or switching the charging mode. The preset threshold is a set value, such as 2 times. If the charger switches to charging mode once or multiple times within a third preset time period, and the number of switching times exceeds the preset threshold, it indicates that the current charging device may be malfunctioning, and the charger needs to remain in charging mode to charge the current device. For example, if the preset threshold is 2 times and the third preset time period is 10 seconds, and the charger switches 3 times within 10 seconds, and the charger remains in charging mode after 3 switches, then the charger remains in charging mode. It should be noted that maintaining the charger in charging mode at this time means that regardless of whether the charger is connected to a charging device, it continuously outputs charging voltage and current, such as continuously outputting 5V.
[0141] In this embodiment of the disclosure, the electronic device maintains the charger in charging mode until the charger is switched to a preset target charging device, at which point it determines whether to continue maintaining or switching the charging mode. The preset target charging device is a device associated with a preset charging protocol. After determining that the charger has been switched to the preset target charging device, the electronic device can determine whether to continue maintaining or switching the charging mode based on changes in the communication signal between the charger and the preset target charging device. The method for determining whether to continue maintaining or switching the charging mode based on changes in the communication signal between the charger and the preset target charging device can be as described above.
[0142] In this embodiment of the disclosure, after the charger is switched from charging mode to standby mode, if the number of times the charger switches between standby mode and charging mode within a third preset time period exceeds a preset threshold, it indicates that the charger has performed multiple mode switches in a short period of time. This suggests that the charging device connected to the charger may be experiencing abnormal conditions such as overheating. Maintaining the charger in charging mode can reduce charging interruptions caused by charging device malfunctions, thereby reducing potential problems such as device shutdown or data loss due to insufficient power in the charging device. Furthermore, after the charger is switched to a preset target charging device, determining whether to continue maintaining or switching the charging mode can prevent the charger from continuously operating in a high-power charging mode, thus reducing the overall power consumption of the charger.
[0143] Figure 4 This is a block diagram of a charging control device 400 according to an exemplary embodiment. Figure 4 As shown, the device mainly includes:
[0144] The acquisition module 401 is configured to acquire electrical parameters at the charging interface of the charger when the charger is in standby mode; wherein the power consumption of the charger in standby mode is less than a preset power consumption threshold.
[0145] The first determining module 402 is configured to determine whether the charger is connected to a charging device based on the electrical parameters.
[0146] The switching module 403 is configured to switch from the standby mode to the charging mode to charge the charging device when the charging device is connected.
[0147] The maintenance module 404 is configured to maintain the charger in the standby mode when the charging device is not connected.
[0148] In some embodiments, the electrical parameter is voltage, and the first determining module 402 is further configured to determine that the charger is not connected to the charging device in response to the voltage being greater than a first voltage threshold and less than or equal to a second voltage threshold; and to determine that the charger is connected to the charging device in response to the voltage being less than or equal to the first voltage threshold.
[0149] In some embodiments, the apparatus further includes:
[0150] The second determining module is configured to determine whether there is a communication signal between the charger and the connected charging device after the charger is switched from the standby mode to the charging mode; wherein the communication signal is a signal associated with a preset charging protocol;
[0151] The third determining module is configured to, in response to the existence of a communication signal between the charger and the connected charging device, determine, based on changes in the communication signal, whether to maintain the charger in the charging mode or to switch the charger from the charging mode to the standby mode.
[0152] The fourth determining module is configured to, in response to the absence of a communication signal between the charger and the connected charging device, determine, based on the charging parameters of the charger charging the charging device, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
[0153] In some embodiments, the third determining module is further configured to determine to maintain the charger in the charging mode in response to the communication signal being uninterrupted or the duration of the interruption being less than a first preset duration threshold; and to switch the charger from the charging mode to the standby mode in response to the communication signal being interrupted and the duration of the interruption being greater than the first preset duration threshold.
[0154] In some embodiments, the fourth determining module is further configured to, in response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters meet preset conditions, determine, based on the electrical parameters at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode; and in response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters do not meet the preset conditions, determine to maintain the charger in the charging mode.
[0155] In some embodiments, the charging parameter is the charging current, and the electrical parameter at the charging interface of the charger is the voltage; the fourth determining module is further configured to, when the charger charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, determine, based on the voltage at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode; wherein, the first current is a current less than a first current threshold, the second current is a current less than a second current threshold, the first current threshold is greater than the second current threshold, and the first preset duration is greater than the second preset duration.
[0156] In some embodiments, the fourth determining module is further configured to determine to maintain the charger in the charging mode in response to the voltage at the charging interface of the charger being less than or equal to a first voltage threshold; and to switch the charger from the charging mode to the standby mode in response to the voltage at the charging interface of the charger being greater than the first voltage threshold and less than or equal to a second voltage threshold.
[0157] In some embodiments, the apparatus further includes:
[0158] The fifth determining module is configured to determine the number of times the charger switches between the standby mode and the charging mode within a third preset time period after switching the charger from the charging mode to the standby mode.
[0159] The sixth determining module is configured to maintain the charger in the charging mode after the charger switches and the number of switching times is greater than a preset number threshold, until the charger is replaced with a preset target charging device, and then determine whether to continue to maintain or switch the charging mode; wherein the preset target charging device is a device associated with the preset charging protocol.
[0160] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0161] Figure 5 This is a structural block diagram illustrating an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 can be a charger, or other electronic devices that have a communication connection with the charger, such as mobile phones, computers, messaging devices, tablet devices, personal digital assistants, etc.
[0162] Reference Figure 5 The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0163] Processing component 502 typically controls the overall operation of electronic device 500, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0164] Memory 504 is configured to store various types of data to support operation on electronic device 500. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 500, contact data, phonebook data, messages, pictures, and videos. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0165] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0166] Multimedia component 508 includes a screen that provides an output interface between electronic device 500 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When electronic device 500 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0167] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0168] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0169] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or one of its components, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0170] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0171] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including executable instructions or a computer program, which can be executed by a processor 520 of an electronic device 500 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0173] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of a mobile terminal, enables the mobile terminal to perform any of the charging control methods described in the embodiments of this disclosure. For example, the method includes:
[0174] When the charger is in standby mode, the electrical parameters at the charging port of the charger are obtained; wherein, the power consumption of the charger in standby mode is less than a preset power consumption threshold.
[0175] Based on the electrical parameters, determine whether the charger is connected to a charging device;
[0176] When the charging device is connected, switch from the standby mode to the charging mode to charge the charging device.
[0177] When the charging device is not connected, the charger remains in the standby mode.
[0178] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the charging control methods described above in this disclosure.
[0179] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0180] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A charging control method, characterized in that, The method includes: When the charger is in standby mode, the electrical parameters at the charging port of the charger are obtained; wherein, the power consumption of the charger in standby mode is less than a preset power consumption threshold. Based on the electrical parameters, determine whether the charger is connected to a charging device; When the charging device is connected, switch from the standby mode to the charging mode to charge the charging device. When the charging device is not connected, the charger remains in the standby mode.
2. The method according to claim 1, characterized in that, The electrical parameter is voltage. Determining whether the charger is connected to a charging device based on the electrical parameter includes: In response to the voltage being greater than a first voltage threshold and less than or equal to a second voltage threshold, it is determined that the charger is not connected to the charging device; In response to the voltage being less than or equal to the first voltage threshold, it is determined that the charger is connected to the charging device.
3. The method according to claim 1 or 2, characterized in that, The method further includes: After switching the charger from the standby mode to the charging mode, it is determined whether there is a communication signal between the charger and the connected charging device; wherein, the communication signal is a signal associated with a preset charging protocol; In response to the existence of a communication signal between the charger and the connected charging device, based on the changes in the communication signal, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode; In response to the absence of a communication signal between the charger and the connected charging device, based on the charging parameters of the charger charging the charging device, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode.
4. The method according to claim 3, characterized in that, The step of determining, based on changes in the communication signal, whether to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode includes: In response to the communication signal being uninterrupted, or the duration of the interruption being less than a first preset duration threshold, it is determined to maintain the charger in the charging mode; In response to the interruption of the communication signal, and the duration of the interruption is greater than the first preset duration threshold, the charger is switched from the charging mode to the standby mode.
5. The method according to claim 3, characterized in that, The step of responding to the absence of a communication signal between the charger and the connected charging device, and determining, based on the charging parameters of the charger charging the charging device, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode, includes: In response to the absence of a communication signal between the charger and the connected charging device, and when the charging parameters meet preset conditions, based on the electrical parameters at the charger's charging interface, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode. In response to the absence of a communication signal between the charger and the connected charging device, and if the charging parameters do not meet the preset conditions, it is determined to maintain the charger in the charging mode.
6. The method according to claim 5, characterized in that, The charging parameter is the charging current, and the electrical parameter at the charging interface of the charger is the voltage; the step of determining, based on the electrical parameter at the charging interface of the charger, to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode when the charging parameter meets preset conditions includes: If the charger charges the charging device with a first current for a first preset duration and then charges the charging device with a second current for a second preset duration, based on the voltage at the charging interface of the charger, it is determined to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode. Wherein, the first current is a current less than a first current threshold, the second current is a current less than a second current threshold, the first current threshold is greater than the second current threshold, and the first preset duration is greater than the second preset duration.
7. The method according to claim 6, characterized in that, Determining whether to maintain the charger in the charging mode or switch the charger from the charging mode to the standby mode based on the voltage at the charger's charging port includes: In response to the voltage at the charging port of the charger being less than or equal to a first voltage threshold, it is determined to maintain the charger in the charging mode; In response to the voltage at the charging port of the charger being greater than the first voltage threshold and less than or equal to the second voltage threshold, the charger is switched from the charging mode to the standby mode.
8. The method according to claim 7, characterized in that, The method further includes: After the charger is switched from the charging mode to the standby mode, the number of times the charger switches between the standby mode and the charging mode within a third preset time period is determined. In response to the charger switching to the charging mode and the number of switching times being greater than a preset threshold, the charger is kept in the charging mode until the charger is switched to a preset target charging device, and then it is determined whether to continue to maintain or switch the charging mode; wherein, the preset target charging device is a device associated with the preset charging protocol.
9. A charging control device, characterized in that, The device includes: The acquisition module is configured to acquire electrical parameters at the charging port of the charger when the charger is in standby mode; wherein the power consumption of the charger in standby mode is less than a preset power consumption threshold. The first determining module is configured to determine whether the charger is connected to a charging device based on the electrical parameters. The switching module is configured to switch from the standby mode to the charging mode to charge the charging device when the charging device is connected. The maintenance module is configured to keep the charger in the standby mode when the charging device is not connected.
10. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the charging control method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the charging control method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the charging control method according to any one of claims 1 to 8.