Charging method and device, electronic equipment, storage medium and computer program product
By determining the fast charging function of the device in the charger and adjusting the charging power allocation strategy, the problem of poor compatibility of the charger's multi-port charging solution is solved, and the charger's compatibility with fast charging devices and user experience are improved.
Patent Information
- Application Number
- CN202410316559.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-09-19
AI Technical Summary
The multi-port charging solution of existing chargers frequently adjusts power distribution, resulting in poor compatibility and prone to charging interruptions.
After receiving the charging request, it is determined whether the second device supports the fast charging function, and charging power is allocated to the first device and the second device based on the strategy corresponding to the fast charging function, especially allocating greater power to the second device, reducing the frequency of power allocation and improving compatibility.
It achieves universal charging in different charging protocol scenarios and improves the user experience, especially the charging speed of devices that support fast charging function.
Smart Images

Figure CN120675217A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of charging technology, and in particular to a charging method and device, electronic equipment, storage medium, and computer program product. Background Art
[0002] With the development of electronic devices and fast-charging technology, more and more users require chargers to charge one or more electronic devices. Existing chargers have multiple charging ports with fixed output power. This power output method can easily lead to a mismatch between the rated power of the electronic device plugged into the charging port and the output power of the charging port, resulting in charging failure or slow charging. To address this issue, chargers can use dynamic power allocation solutions to allocate charging power to electronic devices.
[0003] Currently, dynamic power allocation schemes for multi-port chargers allocate power based on the slope of the charging current or the actual power consumed by the electronic device during charging. However, these schemes frequently allocate power, resulting in poor charger compatibility and prone to charging interruptions. Summary of the Invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a charging method and device, an electronic device, a storage medium and a computer program product, which can reduce the frequency of charging power distribution, and thus can be compatible with charging in different charging protocol scenarios, so that the charging of the first device and the second device is universal.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a charging method, comprising at least:
[0006] During a process in which the charger is charging at least one first device, receiving a charging request sent by a second device;
[0007] If it is determined based on the charging request that the second device supports the fast charging function, allocating charging power to the first device and the second device based on a charging policy corresponding to the fast charging function;
[0008] The charging power allocated to the second device is greater than the charging power allocated to the first device.
[0009] In some embodiments, allocating charging power to the first device and the second device based on the first preset power corresponding to the fast charging function includes:
[0010] Determining the first preset power as the charging power of the second device; wherein the first preset power is related to the rated power of the charger;
[0011] The charging power of each of the first devices is determined based on the rated power of the charger and the first preset power.
[0012] In some embodiments, the method further comprises:
[0013] When it is determined based on the charging request that the second device does not support the fast charging function, allocating charging power to the first device and the second device based on the total number of the first devices and the second devices, the type of the first device, and the type of the second device;
[0014] When the duration for which the second device is charged at the first preset power is greater than or equal to the preset duration, charging power is allocated to the first device and the second device based on the total number of the first devices and the second devices, the type of the first device, and the type of the second device.
[0015] In some embodiments, allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device includes:
[0016] When the total number is greater than a preset value and less than or equal to the number of charging ports of the charger, charging power is allocated to the first device and the second device based on a ratio between the rated power of the charger and the total number.
[0017] In some embodiments, allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device includes:
[0018] When the total number is less than or equal to the preset value, if there is a device of the first type among the first device and the second device, and there are devices of different types among the first device and the second device, charging power is allocated to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device;
[0019] If there is a second type of device or a third type of device among the first device and the second device; or if both the first device and the second device are devices of the first type, allocating charging power to the first device and the second device based on a ratio between the rated power of the charger and the total number of devices;
[0020] Among them, the rated power of the first type of device is less than the rated power of the third type of device; the second type of device is a device that supports fast charging function.
[0021] In some embodiments, the method further comprises:
[0022] When the total number is less than or equal to the preset value, and the first device and the second device are charged according to the ratio between the rated power of the charger and the total number, if there is a device with a charging power less than a second preset power, the charging power is allocated to the device with a charging power less than the second preset power based on the second preset power;
[0023] Based on the rated power of the charger and the second preset power, charging power is allocated to the device whose charging power is greater than or equal to the second preset power.
[0024] In some embodiments, allocating charging power to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device includes:
[0025] Allocating charging power to devices of the first type based on a third preset power corresponding to the first type;
[0026] Based on the rated power of the charger and the third preset power, charging power is allocated to the second type of device or the third type of device.
[0027] In some embodiments, determining the charging power of each of the first devices based on the rated power of the charger and the first preset power includes:
[0028] When there is only one first device, allocating charging power to the first device based on a difference between the rated power of the charger and the first preset power;
[0029] When there is a plurality of first devices, charging power is allocated to the first devices based on a ratio between the difference and the number of the first devices.
[0030] In some embodiments, the method further comprises:
[0031] upon successfully receiving the charging request, allocating charging power to the first device and the second device, respectively, based on a ratio between a rated power of the charger and the total number of the first devices and the second devices;
[0032] During the process of charging the first device and the second device according to the allocated charging power, it is determined whether the second device supports a fast charging function based on the charging request.
[0033] In some embodiments, receiving a charging request sent by a second device includes:
[0034] Detecting an electrical signal of a connection line between a charging port of the charger and a processing module of the charger;
[0035] In response to detecting a change in the electrical signal, receiving the charging request sent by the second device.
[0036] According to a second aspect of an embodiment of the present disclosure, there is provided a charging device, comprising at least:
[0037] a receiving module, configured to receive a charging request sent by a second device while the charger is charging at least one first device;
[0038] an allocation module configured to allocate charging power to the first device and the second device based on a charging policy corresponding to the fast charging function when it is determined based on the charging request that the second device supports the fast charging function;
[0039] The charging power allocated to the second device is greater than the charging power allocated to the first device.
[0040] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising at least:
[0041] processor;
[0042] memory for storing computer programs or instructions;
[0043] The processor executes the computer program or instructions to implement the steps of the charging method described in the first aspect.
[0044] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, wherein the storage medium stores a computer program or instructions. When the computer program or instructions in the storage medium are executed by a processor, the steps of the charging method described in the first aspect are implemented.
[0045] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program or instructions, which, when executed by a processor, implement the steps of the charging method described in the first aspect.
[0046] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0047] In the embodiment of the present disclosure, since the present disclosure distributes charging power based on the charging strategy corresponding to the fast charging function when the charging request determines that the second device supports the fast charging function, it is different from the related art in which power is distributed according to the real-time slope change of the charging current or the actual power of the electronic device during the charging process. The present disclosure can reduce the frequency of charging power distribution, and thus can be compatible with charging in different charging protocol scenarios, so that the charging of the first device and the second device has universal applicability.
[0048] Moreover, in the present disclosure, when the second device supports the fast charging function, the charging power allocated to the second device based on the charging strategy corresponding to the fast charging function is greater than the charging power allocated to the first device. This can take into account the fast charging requirements of the second device, allowing the user to perceive the fast charging of the second device by the charger, thereby improving the user experience.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0051] Figure 1 This is a schematic diagram of a charging method according to an exemplary embodiment. Figure 1 .
[0052] Figure 2 The figure is a circuit diagram of a traditional multi-port charger according to an exemplary embodiment.
[0053] Figure 3 This is a schematic diagram of a charging method according to an exemplary embodiment. Figure 2 .
[0054] Figure 4 This is a schematic diagram of a charging method according to an exemplary embodiment. Figure 3 .
[0055] Figure 5 The figure is a structural block diagram of a charging device according to an exemplary embodiment.
[0056] Figure 6 The figure is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0057] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0058] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0059] In related technologies, there are four possible dynamic power allocation schemes for multi-port chargers. The first scheme involves allocating a power greater than a preset threshold to the charging port where the electronic device is first connected. For example, if the charger's rated power is 67W, the power allocated to the charging port where the electronic device is first connected is 45W.
[0060] The second solution is to first distribute power evenly when multiple electronic devices are connected to the charger, and then distribute power based on the voltage of each electronic device. For example, if the charger is rated for 67W and the voltages of two electronic devices are different, 45W will be allocated to the device with a voltage above 12V and 20W to the device with a voltage below 12V. If the voltages of the two electronic devices are the same, 30W will be allocated to each device.
[0061] The third solution is that the charger will distribute power once when multiple electronic devices are connected, and then redistribute power again after a period of time based on the actual power of the electronic devices. For example, if the rated power of the charger is 67W and two electronic devices are charged at 45W and 20W respectively, if the charging time reaches 15 minutes and the actual power of one electronic device drops to 20W, the charger will redistribute power again. In this case, power can be distributed evenly, that is, 30W can be allocated to both electronic devices.
[0062] The fourth solution is for the charger to adjust the power output of multiple charging ports based on the slope of the charging current. For example, if the rated power of the charger is 67W and two electronic devices are connected to the charger and charging at 40W and 25W respectively, if the slope of the charging current of the charging port corresponding to one electronic device increases, the charger can allocate 50W to that electronic device and 15W to the other electronic device.
[0063] As can be seen, current dynamic power allocation schemes for multi-port chargers allocate power based on the slope of the charging current or the actual power consumed by the electronic device during charging. However, these schemes frequently allocate power, resulting in poor charger compatibility and prone to charging interruptions.
[0064] Based on this, embodiments of the present disclosure provide a charging method that can reduce the frequency of charging power distribution. Here, the charging method can be applied to electronic devices. In one example, the electronic device may include a control device that executes the charging method to control a charger to perform power distribution; the control device includes a mobile communication terminal or a server. In another example, the electronic device may include a charger that executes the charging method to perform power distribution. The following embodiments illustrate the charging method using a charger as an example.
[0065] Figure 1 This is a schematic diagram of a charging method according to an exemplary embodiment. Figure 1 .like Figure 1 As shown, the charging method provided by the embodiment of the present disclosure includes at least the following steps:
[0066] Step 110: While the charger is charging at least one first device, receiving a charging request sent by a second device;
[0067] Step 120: If it is determined based on the charging request that the second device supports the fast charging function, charging power is allocated to the first device and the second device based on a charging policy corresponding to the fast charging function;
[0068] The charging power allocated to the second device is greater than the charging power allocated to the first device.
[0069] In the embodiments of the present disclosure, the charger may have multiple charging ports. For example, the charger may include a dual-port charger, a triple-port charger, or a quad-port charger, etc., which is not limited in the embodiments of the present disclosure.
[0070] It should be noted that the multiple charging ports of the charger in the disclosed embodiment are all connected to different protocol chips, and any charging port can charge electronic devices that support different protocol chips. Therefore, after any charging port receives a charging request sent by a second device, it can respond to the charging request sent by the second device.
[0071] For example, Figure 2As shown, in the related art, each of the charging port 1, charging port 2 and charging port 3 of the multi-port charger is connected to a corresponding protocol chip, that is, charging port 1, charging port 2 and charging port 3 are all charged according to the corresponding protocol chip. For example, charging port 1 can charge an electronic device that supports protocol chip 1, charging port 2 can charge an electronic device that supports protocol chip 2, and charging port 3 can charge an electronic device that supports protocol chip 3. Therefore, although the related art can support charging of electronic devices with different protocol chips, the charging method is limited. In contrast, the charger of the embodiment of the present disclosure can use one charging port to charge electronic devices that support different protocol chips, and can make the charging method more flexible on the basis of the charger supporting charging of electronic devices with different protocol chips, thereby improving the user experience.
[0072] In step 110, the charger can charge a first device and a second device. The first device can be an electronic device that has been connected to the charger and is being charged; the second device can be an electronic device that has just been connected to the charger and is ready to be charged.
[0073] It should be noted that both the first device and the second device may include, but are not limited to, mobile communication terminals, portable entertainment devices, wearable devices, household appliances, and special-purpose devices. Mobile communication terminals include, but are not limited to, mobile phones, tablet computers, and laptop computers; portable entertainment devices include, but are not limited to, audio players and digital cameras; wearable devices include, but are not limited to, headphones, smart watches, smart bracelets, and smart glasses; household appliances include, but are not limited to, electric toothbrushes, televisions, stereos, and video recorders; and special-purpose devices include, but are not limited to, drones and electronic game consoles.
[0074] In the embodiment of the present disclosure, the charging request may be a message sent by the second device to request the charger to allocate charging power.
[0075] Here, the charging request sent by the second device to the charger may carry information related to the second device; for example, the charging request may carry the fast charging identifier of the second device or the power information requested by the second device to the charger.
[0076] In the embodiments of the present disclosure, "the charger is charging at least one first device" can be understood as "at the current moment, at least one first device is connected to the charger and the charger is charging each first device." "Receiving a charging request from a second device" can be understood as "an electrical connection has been established between the second device and the charger, i.e., information can be transmitted between the second device and the charger, but the charger is not currently charging the second device."
[0077] It is understandable that, while the charger is charging a first device connected to the charger, the charger can receive a charging request sent by a second device newly connected to the charger, and determine how to allocate charging power to the second device according to the charging request.
[0078] In one embodiment of the present disclosure, receiving a charging request sent by the second device in step 110 may include:
[0079] Detecting an electrical signal of a connection line between a charging port of the charger and a processing module of the charger;
[0080] In response to detecting a change in the electrical signal, a charging request sent by a second device is received.
[0081] In the embodiment of the present disclosure, the charging port of the charger may be a port for charging the first device or the second device. The processing module of the charger may be a microcontroller unit (MCU) in the charger.
[0082] Here, the change in the electrical signal in the connection line between the charging port and the processing module can be understood as a change in the resistance at the charging port caused by the insertion of a second device into the charging port, which in turn causes a change in the electrical signal in the connection line. Therefore, by detecting this change in the electrical signal, the charger can determine that an electrical connection has been established between the charging port and the second device. Based on this electrical connection, the charger can receive a charging request from the second device. Subsequently, the charger can allocate charging power to the first and second devices based on this charging request, thereby improving the user experience.
[0083] In step 120, if it is determined that the second device supports the fast charging function, charging power is allocated to the first device and the second device based on the charging policy corresponding to the fast charging function, and the charging power allocated to the second device is greater than the charging power allocated to the first device. In other words, the charger will reallocate the charging power between the first device and the second device based on the charging policy corresponding to the fast charging function, allowing the second device to charge at a higher power, thereby allowing the user to perceive the charger fast charging the second device.
[0084] It should be noted that the charging strategy corresponding to the fast charging function may include: when the rated power of the second device is less than the rated power of the charger, determining the rated power of the second device as the charging power of the second device, and determining the charging power of each first device based on the difference between the rated power of the charger and the rated power of the second device; or;
[0085] In a case where the rated power of the second device is greater than the rated power of the charger, the rated power of the charger is determined as the charging power of the second device; or
[0086] Charging power is allocated to the second device based on a first preset power related to the rated power of the charger, and charging power is allocated to each first device based on the rated power of the charger and the first preset power.
[0087] It should be noted that, in the embodiment of the present disclosure, determining that the second device supports the fast charging function based on the charging request may include: determining that the second device supports the fast charging function based on the fast charging identifier carried in the charging request. The fast charging identifier can be used to characterize the second device as a device that supports the fast charging function. Here, if the second device is a device that supports the fast charging function, the charging request sent by the second device may carry the fast charging identifier; if the second device is not a device that supports the fast charging function, the charging request sent by the second device does not carry the fast charging identifier, and the charging request sent by the second device may carry a requested power. The requested power may be the charging power that the second device expects the charger to allocate, and the embodiment of the present disclosure does not limit this.
[0088] It should be noted that the device supporting the fast charging function may be a device supporting the Programmable Power Supply (PPS) protocol, which is not limited in the embodiments of the present disclosure.
[0089] The PPS protocol is a protocol for regulating voltage and current output. A charger that supports the PPS protocol can provide higher charging power to a second device via a Universal Serial Bus-C (USB-C) interface, resulting in faster charging speeds. A charger that supports the PPS protocol can also adjust the output voltage and current based on the needs of the second device to improve charging efficiency and device safety.
[0090] In one embodiment of the present disclosure, the charging method may further include:
[0091] In case the charging request is successfully received, allocating charging power to the first device and the second device respectively based on a ratio between a rated power of the charger and a total number of the first device and the second device;
[0092] During the process of charging the first device and the second device according to the allocated charging power, it is determined based on the charging request whether the second device supports the fast charging function.
[0093] In the embodiment of the present disclosure, the rated power of the charger may be the maximum power that the charger can output, that is, the power actually output by the charger may be less than or equal to the rated power of the charger.
[0094] The total number of the above-mentioned first devices and second devices can be greater than or equal to 2, and less than or equal to the number of charging ports of the charger; for example, if the charger has 4 charging ports, the total number of the first devices and second devices can be 2, 3 or 4.
[0095] Here, based on the ratio between the rated power of the charger and the total number of the first device and the second device, the charging power is allocated to the first device and the second device respectively. It can be understood that the rated power of the charger is divided equally according to the total number of the first device and the second device and allocated to the first device and the second device respectively.
[0096] For example, the rated power of the charger is 100W, and the total number of the first device and the second device is 2; in this case, the charging power allocated to the first device and the charging power allocated to the second device can both be 50W.
[0097] In an embodiment of the present disclosure, when a second device is connected to the charging port of the charger, the charger can divide the rated power of the charger equally according to the total number of the second device and the first device within a preset time period, such as 1 second to 10 seconds, and allocate the equally divided rated power to the second device to inform the second device that the charger can charge, and then determine whether the charging request sent by the second device carries a fast charging identifier, and then determine whether the second device supports the fast charging function based on the result of carrying the fast charging identifier.
[0098] It is understandable that before determining whether a charging request carries a fast charge indicator, the charger needs to first divide the charging power equally between the first device and the second device connected to the charger, so as to inform the second device that the charger can charge. In the embodiment of the present disclosure, when the charger successfully receives a charging request sent by the second device, it can first divide the rated power of the charger equally between the first device and the second device, so as to inform the second device that the charger can charge, thereby improving charging efficiency.
[0099] It is understandable that, taking into account the user's demand for fast charging of the second device, the charger can, when it determines that the charging request carries fast charging, allocate a charging power to the second device that is greater than the charging power allocated to the first device, so that the user can perceive the fast charging of the second device by the charger, thereby improving the user experience.
[0100] For example, if the charger's rated power is 100W, there's one first device, and the second device sends a charging request with a fast charge indicator, the charger can allocate 67W of charging power to the second device based on the fast charge indicator, while the charging power allocated to the first device can be 33W, thus increasing the charging speed of the second device.
[0101] In the embodiment of the present disclosure, when the charger determines that the charging request does not carry a fast charging identifier, it can also allocate charging power to the first device and the second device respectively according to the type of the first device and the type of the second device.
[0102] For example, when the second device is not a device that supports the fast charging function and the first device and the second device are of the same type, the charger can allocate charging power to the first device and the second device respectively based on the ratio between the rated power of the charger and the total number of the first device and the second device; in this case, the charging power allocated to the first device is equal to the charging power allocated to the second device.
[0103] It should be noted that if there is only one first device connected to the charger and no second device is plugged into the charger, the charger can directly assign the rated power of the charger to the first device. In this case, the first device can choose to charge at a power less than or equal to the rated power of the charger based on its own needs.
[0104] A charging method provided by an embodiment of the present disclosure distributes charging power based on a charging strategy corresponding to a fast charging function when it is determined based on a charging request that the second device supports the fast charging function. Therefore, unlike the related art in which power is distributed according to a real-time slope change of a charging current or the actual power of an electronic device during a charging process, the present disclosure can reduce the frequency of charging power distribution, and thus can be compatible with charging in different charging protocol scenarios, making the charging of the first device and the second device universal.
[0105] Moreover, in the present disclosure, when the second device supports the fast charging function, the charging power allocated to the second device based on the charging strategy corresponding to the fast charging function is greater than the charging power allocated to the first device. This can take into account the user's fast charging demand for the second device, allowing the user to perceive the fast charging of the second device by the charger, thereby improving the user experience.
[0106] In some embodiments, step 120 may include:
[0107] Determining a first preset power as a charging power for the second device; wherein the first preset power is related to a rated power of the charger;
[0108] The charging power of each first device is determined based on the rated power of the charger and the first preset power.
[0109] In the embodiment of the present disclosure, the first preset power may be a power preset by the charger according to the rated power of the charger. That is, the first preset power may be different for different chargers.
[0110] It should be noted that, when the rated power of the charger is greater than 120W, the first preset power may be 120W; when the rated power of the charger is greater than 67W and less than or equal to 120W, the first preset power may be 67W; when the rated power of the charger is greater than 33W and less than or equal to 67W, the first preset power may be 33W; when the rated power of the charger is less than or equal to 33W, the first preset power may be the rated power of the charger; this is not limited in the embodiments of the present disclosure.
[0111] Here, the charger allocates a first preset power to the second device, and the duration for charging the second device based on the first preset power may be a preset duration, for example, 10 minutes.
[0112] It is understandable that after the charger determines that the second device is a device that supports the fast charging function, it can allocate a first preset power to the second device, and then allocate charging power to the first device based on the rated power of the charger, the first preset power and the number of first devices.
[0113] In one embodiment of the present disclosure, determining the charging power of each first device based on the rated power of the charger and the first preset power includes:
[0114] When there is only one first device, allocating charging power to the first device based on a difference between a rated power of the charger and a first preset power;
[0115] When there are multiple first devices, charging power is allocated to the first devices based on a ratio between the difference and the number of the first devices.
[0116] In the embodiment of the present disclosure, the ratio between the difference and the number of first devices is used as the charging power allocated to the first device. It can be understood that the difference is divided equally according to the number of first devices, and the divided power is used as the charging power allocated to the first device.
[0117] For example, the rated power of the charger is 100W, the first preset power is 67W, and the number of first devices is 3; at this time, the difference can be 33W, and the ratio between the difference and the number of first devices can be 11W, that is, the charging power allocated to each first device can be 11W.
[0118] In the embodiment of the present disclosure, the charger can allocate a first preset power to the second device after determining that the second device supports the fast charging function, and allocate charging power to the first device based on the rated power of the charger, the first preset power and the number of first devices. In this way, the fast charging requirements of the second device can be taken into account while maximizing the allocation of the rated power of the charger, thereby improving the user experience.
[0119] In some embodiments, the charging method may further include:
[0120] If it is determined based on the charging request that the second device does not support the fast charging function, allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device;
[0121] When the duration of charging of the second device at the first preset power is greater than or equal to the preset duration, the charging power is allocated to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device.
[0122] In the embodiment of the present disclosure, the charging request does not carry a fast charging identifier, which can be understood as the second device sending the charging request is not a device that supports the fast charging function.
[0123] The duration may be the duration during which the second device is charged at the first preset power; for example, the duration may be 8 minutes or 12 minutes. The preset duration may be a duration preset by the charger; for example, the preset duration may be in the range of 10 minutes to 15 minutes.
[0124] It is understandable that when the charger determines that the second device is not a device that supports the fast charging function, or that the duration of charging the second device at the first preset power exceeds the preset time, it can re-allocate the charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device and the type of the second device.
[0125] Here, the type of the first device and the type of the second device may include but are not limited to the first type, the second type, and the third type. The first type of device may be a device with a rated power less than a power threshold, the second type of device may be a device supporting a fast charging function, and the third type of device may be a device with a rated power greater than or equal to the power threshold.
[0126] It should be noted that the power threshold can be set according to actual application conditions. For example, the power threshold can be set within the range of 30W to 150W, which is not limited in the embodiments of the present disclosure.
[0127] In an embodiment of the present disclosure, the charger may determine based on a charging request that the second device does not support the fast charging function, or that the duration of charging of the second device at the first preset power is greater than or equal to the preset duration, and then re-allocate the charging power to the first device and the second device according to the type of the first device and the type of the second device, respectively. This can improve the charging efficiency of the first device and the second device while taking into account the fast charging requirement of the second device.
[0128] In some embodiments, allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device includes:
[0129] When the total number is greater than a preset value and less than or equal to the number of charging ports of the charger, allocating charging power to the first device and the second device based on a ratio between the rated power of the charger and the total number;
[0130] When the total number is less than or equal to a preset value, if a device of the first type exists among the first device and the second device, and a device of a different type exists among the first device and the second device, charging power is allocated to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device;
[0131] If there is a device of the second type or a device of the third type among the first device and the second device; or if the first device and the second device are both devices of the first type, allocating charging power to the first device and the second device based on a ratio between the rated power of the charger and the total number of devices;
[0132] Among them, the rated power of the first type of device is less than the rated power of the third type of device; the second type of device is a device that supports fast charging function.
[0133] In the embodiment of the present disclosure, the charger can first determine the total number of the first device and the second device, and then determine the type of the first device and the type of the second device, so as to allocate different charging powers to the first device and the second device according to the total number of the first device and the second device, different types of the first device, and different types of the second device.
[0134] It should be noted that the preset value may be pre-set by the charger according to the rated power of the charger and the number of charging ports of the charger.
[0135] For example, the rated power of the charger is 120W, and the number of charging ports of the charger is 4; if the charger divides the rated power of the charger equally and allocates a charging power of only 30W to each charging port, if a different charging power is allocated to each charging port, the charging efficiency of the device connected to a certain charging port may be low. Therefore, the preset value can be 3 at this time.
[0136] In the embodiments of the present disclosure, the first type of device may be a device that supports the Power Delivery (PD) protocol and has a rated power of less than 30W, a device that supports the Quick Charge (QC) protocol, or a device that supports the Universal Fast Charging Specification (UFCS) protocol; for example, the first type of device may be a watch, earphones, toothbrush, etc. The second type of device may be a device that supports the PPS protocol; for example, the second type of device may be a mobile phone that supports the fast charging function. The third type of device may be a device that supports the PD protocol and has a rated power greater than or equal to 30W; for example, the third type of device may be a laptop computer.
[0137] Among them, the PD protocol is a protocol for transmitting data and charging. Devices that support the PD protocol can provide higher power output to electronic devices through the USB-C interface, thereby supporting faster charging speeds and higher power transmission. Devices that support the PD protocol will not request power packets at regular intervals like devices that support the PPS protocol. Devices that support the PD protocol will only request power packets from the charger when voltage regulation is required. For example, laptops usually use the PD protocol for charging; smartphones basically do not use the PD protocol for fast charging, and the rated power of mobile phones charged using the PD protocol does not exceed 30W.
[0138] Here, the first device and the second device include different types of devices, which can be understood as at least two of the first device and the second device belong to different types of devices.
[0139] For example, the total number of first devices and second devices is 3, and the preset value is 4. The total number of first devices and second devices, the type of the first devices, and the type of the second devices satisfying the first preset condition may include: the first device and the second device include 1 device of the first type and 2 devices of the second type; or the first device and the second device include 2 devices of the first type and 1 device of the second type; or the first device and the second device include 1 device of the first type and 2 devices of the third type; or the first device and the second device include 2 devices of the first type and 1 device of the third type; or the first device and the second device include 1 device of the first type, 1 device of the second type, and 1 device of the third type.
[0140] Similarly, the total number of first and second devices is 3, the preset value is 4, and the number of charging ports of the charger is 5. The total number of first and second devices, the type of the first device, and the type of the second device satisfying the second preset condition may include: the first and second devices include 3 devices of the first type; or the first and second devices include 3 devices of the second type; or the first and second devices include 3 devices of the third type; or the first and second devices include 2 devices of the second type and 1 device of the third type; or the first and second devices include 1 device of the second type and 2 devices of the third type; or the total number of the first and second devices is 4.
[0141] In the embodiment of the present disclosure, the charger can allocate charging power to the first device and the second device based on different methods when the total number of the first device and the second device, the type of the first device, and the type of the second device meet different preset conditions, thereby improving the flexibility of the charger in charging the first device and the second device, and further improving the charging efficiency of the first device and the second device.
[0142] In some embodiments, allocating charging power to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device, respectively, includes:
[0143] Allocating charging power to the first type of device based on a third preset power corresponding to the first type;
[0144] Charging power is allocated to the second type of device or the third type of device based on the rated power of the charger and the third preset power.
[0145] In the embodiment of the present disclosure, the third preset power may be a power preset by the charger corresponding to the first type. For example, the third preset power may be 30W or 40W.
[0146] It is understandable that the charger can allocate the third preset power to the first type of device, and allocate charging power to the second type of device or the third type of device according to the rated power of the charger, the third preset power and the number of the first type of devices.
[0147] In the embodiment of the present disclosure, the charger allocates the third preset power to the first type of device, and allocates charging power to the second type of device or the third type of device based on the rated power of the charger and the third preset power, thereby being able to more reasonably allocate charging power to different types of devices and improving the charging efficiency of the first device and the second device.
[0148] In one embodiment of the present disclosure, allocating charging power to the second type of device or the third type of device based on the rated power of the charger and the third preset power includes:
[0149] When the number of the first type of device is one, allocating charging power to the second type of device or the third type of device based on a difference between the rated power of the charger and a third preset power;
[0150] When there are multiple devices of the first type, the product between the number of devices of the first type and the third preset power is determined, and charging power is allocated to the second type of device or the third type of device based on the difference between the rated power of the charger and the product.
[0151] In the embodiment of the present disclosure, the number of the first type of devices may be greater than or equal to 1 and less than a preset value. For example, if the preset value is 3, the number of the first type of devices may be 1 or 2.
[0152] Here, when there are multiple devices of the first type, the charger allocates the third preset power to each device of the first type, that is, the total power allocated to multiple devices of the first type is the product of the number of devices of the first type and the third preset power, and the difference between the rated power of the charger and the product is used to allocate charging power to the second type or the third type of device.
[0153] For example, the charger's rated power is 100W, the third preset power is 30W, there are two devices of the first type, the total number of first and second devices is three, and one device is of the second type. In this case, the product of the number of devices of the first type and the third preset power is 60W, and the difference between the charger's rated power and the product is 40W. Therefore, the charging power allocated to the second type device is 40W.
[0154] In the embodiment of the present disclosure, when allocating the third preset power to the first type of device, the charger can allocate charging power to the second type of device or the third type of device based on the rated power of the charger, the third preset power, and the number of the first type of devices, thereby being able to more reasonably allocate charging power to different types of devices and improving the charging efficiency of the first device and the second device.
[0155] In some embodiments, the charging method may further include:
[0156] When the total number is less than a preset value and the first device and the second device are charged according to the ratio between the rated power of the charger and the total number, if there is a device with a charging power less than a second preset power, the charging power is allocated to the device with a charging power less than the second preset power based on the second preset power;
[0157] Based on the rated power of the charger and the second preset power, charging power is allocated to devices whose charging power is greater than or equal to the second preset power.
[0158] In the embodiment of the present disclosure, the second preset power may be a power preset by the charger, for example, the second preset power may be 20W, 30W, or 40W.
[0159] Here, if there is a device whose charging power is less than the second preset power, the charging power is allocated to the device whose charging power is less than the second preset power based on the second preset power. It can be understood that if the charging power of a certain device is less than the second preset power, the second preset power is re-allocated to the device.
[0160] For example, the total number of first and second devices is 3, the preset value is 4, the number of charging ports on the charger is 5, the rated power of the charger is 150W, and the second preset power is 30W. The first and second devices include two second-type devices and one third-type device. In this case, the charger allocates 50W of charging power to each of the two second-type devices and the one third-type device. If, 10 minutes after allocating 50W to all three devices, the third-type device completes charging (i.e., the charging power for the third-type device is less than 30W), the charger may adjust the charging power allocated to the third-type device from 50W to 30W and allocate 60W of charging power to each of the two second-type devices.
[0161] In the embodiment of the present disclosure, the charger can take into account whether the charging of the first device or the second device connected to a certain charging port is completed, and then allocate charging power to the first device and the second device once, thereby improving the flexibility of the charger in charging the first device and the second device, and further improving the charging efficiency of the first device and the second device.
[0162] Figure 3 This is a schematic diagram of a charging method according to an exemplary embodiment. Figure 2 .like Figure 3 As shown, the charging method provided in the embodiment of the present disclosure is only an example and not a limitation, and is intended to facilitate those skilled in the art to better understand the technical solution of the present disclosure. Figure 3 The charging method provided in the embodiment of the present disclosure is applied to a charger and may include at least the following steps:
[0163] Step 301: While the charger is charging at least one first device, a charging request sent by a second device is received.
[0164] Step 302: When the charging request is successfully received, charging power is allocated to the first device and the second device based on a ratio between the rated power of the charger and the total number of the first device and the second device.
[0165] Step 303 : Determine whether the second device supports the fast charging function based on the charging request; if so, go to step 304 ; if not, go to step 307 .
[0166] Step 304: Determine the first preset power as the charging power of the second device.
[0167] Step 305: Determine the charging power of each first device based on the rated power of the charger and the first preset power.
[0168] Step 306 , determine whether the duration of charging of the second device according to the first preset power is greater than or equal to the preset duration; if so, go to step 307 ; if not, go to step 304 .
[0169] Step 307: Allocate charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device.
[0170] In the embodiment of the present disclosure, when executing step 307, the charger can first determine the total number of the first devices and the second devices, and then determine the type of the first device and the type of the second device, thereby allocating different charging powers to different numbers and types of first devices and second devices.
[0171] like Figure 4 As shown, the charging method provided in the embodiment of the present disclosure is applied to a charger. The charger allocates charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device, and may include at least the following steps:
[0172] Step 401 , determine whether the total number of the first device and the second device is less than or equal to a preset value; if so, go to step 403 ; if not, go to step 402 .
[0173] Step 402: When the total number is greater than a preset value and less than or equal to the number of charging ports of the charger, allocate charging power to the first device and the second device based on the ratio between the rated power of the charger and the total number.
[0174] Step 403 : Determine whether there is a device of the first type in the first device and the second device, and whether there are devices of different types in the first device and the second device; if so, go to step 404 ; if not, go to step 405 .
[0175] Step 404: Charge the first type of device based on the third preset power corresponding to the first type; and charge the second type of device or the third type of device based on the rated power of the charger and the third preset power.
[0176] Step 405: When the total number is less than or equal to the preset value, if there is a second type of device or a third type of device among the first device and the second device; or, if the first device and the second device are both first type of devices, charging power is allocated to the first device and the second device respectively based on the ratio between the rated power of the charger and the total number.
[0177] Step 406 , determine whether there is a device with a charging power less than the second preset power; if so, go to step 407 ; if not, go to step 405 .
[0178] Step 407: Based on the second preset power, allocate charging power to devices whose charging power is less than the second preset power; and based on the rated power of the charger and the second preset power, allocate charging power to devices whose charging power is greater than or equal to the second preset power.
[0179] For example, in one embodiment of the present disclosure, if the charger has a single port, that is, the device connected to the charger includes only one first device, the charger can directly allocate the rated power of the charger, such as 100W, to the first device.
[0180] In another embodiment of the present disclosure, the charger has dual-port access, that is, the devices connected to the charger include a first device and a second device, and the rated power of the charger is 100W.
[0181] First, when the charger is charging a first device and successfully receives a charging request sent by a second device, the charger can allocate 50W of charging power to both the first device and the second device within 10 seconds; then, the charger can also determine whether the charging request carries a fast charging logo within these 10 seconds. If the charging request carries a fast charging logo, the charger can allocate a first preset power, such as 67W, to the second device, and allocate 33W of charging power to the first device. If the charging request does not carry a fast charging logo, or if the second device is charged at 67W for more than 10 minutes, the charger can allocate charging power to the first device and the second device respectively based on the total number of the first device and the second device, the type of the first device, and the type of the second device.
[0182] Here, if the first device and the second device include: a first type device and a second type device, or a first type device and a third type device; the charger can allocate a third preset power, such as 30W, to the first type device, and allocate 70W charging power to the second type device or the third type device. If the first device and the second device are both first type devices, second type devices, or third type devices, or if the first device and the second device include: a second type device and a third type device, the charger can allocate 50W charging power to both the first device and the second device.
[0183] After both the first and second devices are charged at 50W, the charger can determine every 10 minutes whether any of the first and second devices has a charging power less than a second preset power, such as 30W. If the charging power of the first or second device is determined to be less than 30W, the charger can adjust the charging power allocated to the first or second device from 50W to 30W, and can adjust the charging power allocated to the second or first device from 50W to 70W. If the charging power of the first or second device is determined to be greater than or equal to 30W, the charger continues to allocate 50W of charging power to both the first and second devices.
[0184] In another embodiment of the present disclosure, the charger has three ports, that is, the devices connected to the charger include two first devices and one second device, and the rated power of the charger is 150W.
[0185] First, when the charger charges two first devices and successfully receives a charging request sent by the second device, the charger can allocate 50W of charging power to both the first device and the second device within 10s; then, the charger can also determine whether the charging request carries a fast charging identifier within these 10s. If the charging request carries a fast charging identifier, the charger can allocate a first preset power, such as 120W, to the second device, and allocate 15W of charging power to both first devices. If the charging request does not carry a fast charging identifier, or if the second device is charged at 120W for more than 10 minutes, the charger can allocate charging power to the first device and the second device respectively based on the total number of the first device and the second device, the type of the first device, and the type of the second device.
[0186] Here, if the first and second devices include: 1 device of the first type and 2 devices of the second type; 2 devices of the first type and 1 device of the second type; 1 device of the first type and 2 devices of the third type; 2 devices of the first type and 1 device of the third type; or 1 device of the first type, 1 device of the second type, and 1 device of the third type; then the charger may allocate a third preset power, such as 30W, to the device of the first type, and a charging power of 60W to the device of the second type or the device of the third type. If the first and second devices are both devices of the first type, the second type, or the third type, or if the first and second devices include a device of the second type and a device of the third type; then the charger may allocate a charging power of 50W to both the two first devices and the one second device.
[0187] After the two first devices and one second device are all charged at 50W, the charger may determine every 10 minutes whether there is a device among the first device and the second device whose charging power is less than a second preset power, such as 30W. If it is determined that the charging power of the second device is less than 30W, the charger may adjust the charging power allocated to the second device from 50W to 30W, and may adjust the charging power allocated to the two first devices from 50W to 60W. If it is determined that the charging power of the two first devices is less than 30W, the charger may adjust the charging power allocated to the two first devices from 50W to 30W, and may adjust the charging power allocated to the second device from 50W to 90W. If it is determined that the charging power of the first device and the second device is both greater than or equal to 30W, the charger continues to allocate 50W of charging power to both the first device and the second device.
[0188] It should be noted that during the process of allocating charging power to multiple connected first devices and second devices, if a connected first device is unplugged, the charger will re-determine the number of first devices and second devices connected to the charger, and then re-allocate charging power to the first and second devices based on the current total number of first and second devices, the type of the first device, and the type of the second device. If a connected second device is unplugged, the charger will re-determine the number of first devices connected to the charger, and then re-allocate charging power to the first device based on the current number and type of the first device.
[0189] The charging method provided in the embodiments of the present disclosure allocates charging power based on the charging policy corresponding to the fast charging function when the charging request determines that the second device supports the fast charging function. Therefore, unlike the related art that allocates power based on the real-time slope change of the charging current or the actual power of the electronic device during the charging process, the present disclosure can reduce the frequency of charging power allocation, thereby being compatible with charging in different charging protocol scenarios, making the charging of the first device and the second device universal. Moreover, in the present disclosure, when the second device supports the fast charging function, the charging power allocated to the second device based on the charging policy corresponding to the fast charging function is greater than the charging power allocated to the first device. This can take into account the fast charging needs of the second device, allowing the user to perceive the fast charging of the second device by the charger, thereby improving the user experience. At the same time, the embodiments of the present disclosure can allocate charging power to the first device and the second device respectively based on the total number of the first device and the second device, the type of the first device, the type of the second device, and the rated power of the charger, thereby more reasonably allocating charging power to different types of devices, thereby improving the charging efficiency of the first device and the second device.
[0190] Figure 5 FIG1 is a structural block diagram of a charging device according to an exemplary embodiment. Figure 5 The charging device 500 provided by the embodiment of the present disclosure may include: a receiving module 510 and a distribution module 520.
[0191] The receiving module 510 is configured to receive a charging request sent by a second device during the process of the charger charging at least one first device;
[0192] an allocating module 520 configured to allocate charging power to the first device and the second device based on a charging policy corresponding to the fast charging function when it is determined based on the charging request that the second device supports the fast charging function;
[0193] The charging power allocated to the second device is greater than the charging power allocated to the first device.
[0194] The charging device provided in the embodiment of the present disclosure allocates charging power based on the charging strategy corresponding to the fast charging function when the charging request determines that the second device supports the fast charging function. Therefore, unlike the related art that allocates power based on the real-time slope change of the charging current or the actual power of the electronic device during the charging process, the present disclosure can reduce the frequency of charging power allocation, and thus can be compatible with charging in different charging protocol scenarios, making the charging of the first device and the second device universal. Moreover, in the present disclosure, when the second device supports the fast charging function, the charging power allocated to the second device based on the charging strategy corresponding to the fast charging function is greater than the charging power allocated to the first device, which can take into account the fast charging needs of the second device, allowing the user to perceive the fast charging of the second device by the charger, thereby improving the user experience.
[0195] for Figure 5 In the technical solution shown, in one possible implementation, the allocation module 520 can be specifically configured to: determine the first preset power as the charging power of the second device; wherein the first preset power is related to the rated power of the charger; and determine the charging power of each of the first devices based on the rated power of the charger and the first preset power.
[0196] for Figure 5 In the technical solution shown, in one possible implementation, the allocation module 520 can also be configured as follows: when there is only one first device, the charging power is allocated to the first device based on the difference between the rated power of the charger and the first preset power; when there are multiple first devices, the charging power is allocated to the first device based on the ratio between the difference and the number of the first devices.
[0197] for Figure 5 In the technical solution shown, in a possible implementation, the allocation module 520 can also be configured as follows: when it is determined based on the charging request that the second device does not support the fast charging function, the charging power is allocated to the first device and the second device respectively based on the total number of the first device and the second device, the type of the first device, and the type of the second device; when the duration for which the second device is charged at the first preset power is greater than or equal to the preset duration, the charging power is allocated to the first device and the second device respectively based on the total number of the first device and the second device, the type of the first device, and the type of the second device.
[0198] for Figure 5In the technical solution shown, in one possible implementation, the allocation module 520 can also be configured to allocate charging power to the first device and the second device based on the ratio between the rated power of the charger and the total number when the total number is greater than a preset value and less than or equal to the number of charging ports of the charger.
[0199] for Figure 5 In the technical solution shown, in a possible implementation, the allocation module 520 can also be configured as follows: when the total number is less than or equal to the preset value, if there is a first type of device in the first device and the second device, and there are different types of devices in the first device and the second device, then based on the rated power of the charger, the type of the first device and the type of the second device, the charging power is allocated to the first device and the second device; if there is a second type of device or a third type of device in the first device and the second device; or, the first device and the second device are both devices of the first type, then based on the ratio between the rated power of the charger and the total number, the charging power is allocated to the first device and the second device; wherein the rated power of the first type of device is less than the rated power of the third type of device; the second type of device is a device that supports fast charging function.
[0200] for Figure 5 In the technical solution shown, in one possible implementation, the allocation module 520 can also be configured to: charge the first type of device based on the third preset power corresponding to the first type; and allocate charging power to the second type of device or the third type of device based on the rated power of the charger and the third preset power.
[0201] for Figure 5 In the technical solution shown, in a possible implementation, the allocation module 520 can also be configured as follows: when the total number is less than or equal to the preset value, and the first device and the second device are charged according to the ratio between the rated power of the charger and the total number, if there is a device with a charging power less than the second preset power, then based on the second preset power, the charging power is allocated to the device with a charging power less than the second preset power; based on the rated power of the charger and the second preset power, the charging power is allocated to the device with a charging power greater than or equal to the second preset power.
[0202] for Figure 5In the technical solution shown, in one possible implementation, the allocation module 520 may also be configured to: upon successfully receiving the charging request, allocate charging power to the first device and the second device respectively based on the ratio between the rated power of the charger and the total number of the first device and the second device; the charging device 500 may also include: a determination module, configured to determine whether the second device supports the fast charging function based on the charging request during the process of charging the first device and the second device according to the allocated charging power.
[0203] for Figure 5 In the technical solution shown, in one possible implementation, the receiving module 510 can be specifically configured to: detect the electrical signal of the connection line between the charging port of the charger and the processing module of the charger; in response to detecting a change in the electrical signal, receive the charging request sent by the second device.
[0204] It should be noted that Figure 5 The specific manner in which each module performs operations in the charging device in the illustrated embodiment has been described in detail in the embodiment of the method and will not be elaborated on here.
[0205] Figure 6 6 is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0206] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0207] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with at least one of display, phone calls, data communications, camera operation, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 602 may include one or more modules to facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
[0208] The memory 604 is configured to store various types of data to support operations on the electronic device 600. Examples of such data include at least one of the following: instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, and videos. The memory 604 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 memory, flash memory, magnetic disk, or optical disk.
[0209] The power supply component 606 provides power to various components of the electronic device 600. The power supply component 606 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 the electronic device 600.
[0210] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0211] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0212] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as a keyboard, click wheel, and buttons. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.
[0213] The sensor assembly 614 includes one or more sensors for providing various aspects of the status assessment of the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of components, such as the display and keypad of the electronic device 600. The sensor assembly 614 can also detect changes in the position of the electronic device 600 or a component thereof, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and changes in the temperature of the electronic device 600. The sensor assembly 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 can 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, the sensor assembly 614 can also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, and a temperature sensor.
[0214] The communication component 616 is configured to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies.
[0215] In an exemplary embodiment, the electronic device 600 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.
[0216] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including executable instructions or a computer program, which can be executed by a processor of the charger to perform the charging method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0217] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the charging methods described in the above embodiments. For example, the method includes: receiving a charging request sent by a second device while the charger is charging at least one first device; if it is determined based on the charging request that the second device supports a fast charging function, allocating charging power to the first device and the second device based on a charging policy corresponding to the fast charging function; wherein the charging power allocated to the second device is greater than the charging power allocated to the first device.
[0218] The present 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 methods described in the above embodiments.
[0219] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0220] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0221] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A charging method, characterized in that: The method comprises: During a process in which the charger is charging at least one first device, receiving a charging request sent by a second device; If it is determined based on the charging request that the second device supports the fast charging function, allocating charging power to the first device and the second device based on a charging policy corresponding to the fast charging function; The charging power allocated to the second device is greater than the charging power allocated to the first device.
2. The method according to claim 1, characterized in that The allocating charging power to the first device and the second device based on the charging strategy corresponding to the fast charging function includes: Determining a first preset power as the charging power of the second device; wherein the first preset power is related to the rated power of the charger; The charging power of each of the first devices is determined based on the rated power of the charger and the first preset power.
3. The method according to claim 2, characterized in that The method further comprises: When it is determined based on the charging request that the second device does not support the fast charging function, allocating charging power to the first device and the second device based on the total number of the first devices and the second devices, the type of the first device, and the type of the second device; When the duration for which the second device is charged at the first preset power is greater than or equal to the preset duration, charging power is allocated to the first device and the second device based on the total number of the first devices and the second devices, the type of the first device, and the type of the second device.
4. The method according to claim 3, characterized in that The allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device includes: When the total number is greater than a preset value and less than or equal to the number of charging ports of the charger, charging power is allocated to the first device and the second device based on a ratio between the rated power of the charger and the total number.
5. The method according to claim 3, characterized in that The allocating charging power to the first device and the second device based on the total number of the first device and the second device, the type of the first device, and the type of the second device includes: When the total number is less than or equal to the preset value, if there is a device of the first type among the first device and the second device, and there are devices of different types among the first device and the second device, charging power is allocated to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device; If there is a second type of device or a third type of device among the first device and the second device; or if both the first device and the second device are devices of the first type, allocating charging power to the first device and the second device based on a ratio between the rated power of the charger and the total number of devices; Among them, the rated power of the first type of device is less than the rated power of the third type of device; the second type of device is a device that supports fast charging function.
6. The method according to claim 5, characterized in that The method further comprises: When the total number is less than or equal to the preset value, and the first device and the second device are charged according to the ratio between the rated power of the charger and the total number, if there is a device with a charging power less than a second preset power, the charging power is allocated to the device with a charging power less than the second preset power based on the second preset power; Based on the rated power of the charger and the second preset power, charging power is allocated to the device whose charging power is greater than or equal to the second preset power.
7. The method according to claim 5, characterized in that The allocating charging power to the first device and the second device based on the rated power of the charger, the type of the first device, and the type of the second device includes: Allocating charging power to devices of the first type based on a third preset power corresponding to the first type; Based on the rated power of the charger and the third preset power, charging power is allocated to the second type of device or the third type of device.
8. The method according to any one of claims 2 to 7, characterized in that The determining the charging power of each of the first devices based on the rated power of the charger and the first preset power includes: When there is only one first device, allocating charging power to the first device based on a difference between the rated power of the charger and the first preset power; When there is a plurality of first devices, charging power is allocated to the first devices based on a ratio between the difference and the number of the first devices.
9. The method according to any one of claims 1 to 7, characterized in that The method further comprises: upon successfully receiving the charging request, allocating charging power to the first device and the second device, respectively, based on a ratio between a rated power of the charger and the total number of the first devices and the second devices; During the process of charging the first device and the second device according to the allocated charging power, it is determined whether the second device supports a fast charging function based on the charging request.
10. The method according to any one of claims 1 to 7, characterized in that The receiving a charging request sent by the second device includes: Detecting an electrical signal of a connection line between a charging port of the charger and a processing module of the charger; In response to detecting a change in the electrical signal, receiving the charging request sent by the second device.
11. A charging device, characterized in that: include: a receiving module, configured to receive a charging request sent by a second device while the charger is charging at least one first device; an allocating module configured to, when it is determined based on the charging request that the second device supports the fast charging function, allocate charging power to the first device and the second device based on a charging policy corresponding to the fast charging function; The charging power allocated to the second device is greater than the charging power allocated to the first device.
12. An electronic device, characterized in that: include: processor; memory for storing computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the charging method according to any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium storing a computer program or instruction, characterized in that: When the computer program or instructions in the storage medium are executed by a processor, the steps of the charging method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the charging method according to any one of claims 1 to 10 are implemented.