Charging method, data cable, and readable storage medium
By detecting the charging power of the first device being charged and dynamically adjusting the charging power of the next device, intelligent power allocation is achieved when multiple devices are charging using a multi-port data cable. This solves the problem of low charging rate for multi-port data cables and improves charging efficiency and speed.
Patent Information
- Application Number
- PCT/CN2024/112701
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2026-02-19
AI Technical Summary
Multi-port data cables have a low charging rate when charging multiple devices simultaneously, which cannot meet the needs of fast charging.
By detecting the charging power of the first charging device, the initial charging power is determined, and the subsequent charging power is dynamically adjusted based on the difference between the power supported by the data cable and the initial charging power. The subsequent charging device is charged through different ports of the data cable, thus achieving intelligent power allocation.
It improves the overall charging efficiency of the data cable when charging multiple devices, reduces power loss, and adapts to the charging needs of different device connection sequences, ensuring charging speed.
Smart Images

Figure CN2024112701_19022026_PF_FP_ABST
Abstract
Description
Charging method, data line and readable storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of data line, in particular to a charging method, a data line and a readable storage medium. BACKGROUND
[0002] With the continuous development of data lines, data lines with multiple ports have appeared, that is, multi-port data lines. There are relatively many types of multi-port data lines, which seem very practical, but the charging rate is low, especially when multiple different devices to be charged are plugged in, it takes several hours to charge a small amount of electricity.
[0003] In this case, how to improve the charging speed of the data line is a problem worth considering.
[0004] SUMMARY
[0005] The present application provides a charging method, which is executed by a data line, comprising:
[0006] detecting the charging power of the first charging device to obtain a first charging power;
[0007] determining a second charging power according to the power difference between the power supported by the data line and the first charging power;
[0008] charging a second charging device through the data line according to the second charging power; the first charging device is charged before the second charging device, and the first charging device and the second charging device are charged through different ports of the data line.
[0009] The present application also provides a charging device, comprising:
[0010] a first charging power determination module configured to detect the charging power of a first charging device to obtain a first charging power when the first charging device is charged through a data line;
[0011] a second charging power determination module configured to determine a second charging power according to the power difference between the power supported by the data line and the first charging power;
[0012] a second charging device charging module configured to charge a second charging device through the data line according to the second charging power; the first charging device is charged before the second charging device, and the first charging device and the second charging device are charged through different ports of the data line.
[0013] The present application also provides a data line comprising a controller and a charging line, when a charging method is executed by the controller, the controller is used to:
[0014] detect the charging power of the first charging device to obtain a first charging power;
[0015] determining the post-charging power according to a power difference between a power supported by the data line and the pre-charging power;
[0016] charging the post-charging device according to the post-charging power through the data line; the pre-charging device is charged prior to the post-charging device, and the pre-charging device and the post-charging device are charged through different ports of the data line.
[0017] The application further provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to use the processor to:
[0018] detecting a charging power of the pre-charging device to obtain the pre-charging power;
[0019] determining the post-charging power according to a power difference between a power supported by the data line and the pre-charging power;
[0020] charging the post-charging device according to the post-charging power through the data line; the pre-charging device is charged prior to the post-charging device, and the pre-charging device and the post-charging device are charged through different ports of the data line.
[0021] The application further provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to use the processor to:
[0022] detecting a charging power of the pre-charging device to obtain the pre-charging power;
[0023] determining the post-charging power according to a power difference between a power supported by the data line and the pre-charging power;
[0024] charging the post-charging device according to the post-charging power through the data line; the pre-charging device is charged prior to the post-charging device, and the pre-charging device and the post-charging device are charged through different ports of the data line. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on the disclosed drawings.
[0026] FIG. 1 is a structural schematic diagram of a data line in an embodiment;
[0027] FIG. 2 is a flow schematic diagram of a charging method in an embodiment;
[0028] Figure 3 is a flowchart of determining the post-charging power in one embodiment;
[0029] Figure 4 is a flowchart of the charging method in one embodiment where different post-charging devices exist;
[0030] Figure 5 is a flowchart of the charging method in different situations in one embodiment;
[0031] Figure 6 is a structural diagram of a one-to-two data line in one embodiment;
[0032] Figure 7 is a flowchart of the charging method performed by two devices in one embodiment;
[0033] Figure 8 is a structural block diagram of a charging device in one embodiment;
[0034] Figure 9 is an internal structural diagram of a computer device in one embodiment;
[0035] Figure 10 is an internal structural diagram of a computer readable storage medium in one embodiment;
[0036] Figure 11 is a structural block diagram of a computer program product in one embodiment.
[0037] 101-input electrical port; 102-output charging terminal; 910-processor; 920-memory; 930-input / output interface; 940-communication interface; 950-display unit; 960-input device; 970-system bus; 921-nonvolatile storage medium; 922-internal memory; 9211-operating system; 9212-computer program; 1000-computer readable storage medium; 1001-processor; 1002-memory; 1100-computer program product. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0039] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0040] With the popularity of multi-outlet data line, the multi-port intelligent fast charging distribution strategy needs to be optimized. Compared with the prior art, the application provides a new multi-port intelligent fast charging distribution strategy, so that the multi-outlet data line can realize intelligent power distribution when charging. When the user uses the multi-outlet data line to charge multiple devices to be charged, the devices to be charged can be charged according to the access order of the devices to be charged.
[0041] The charging method provided by the application can be applied to the application environment as shown in FIG. 1. Among them, the data line is a multi-port data line; optionally, the data line can be a 1-to-N data line, that is, 1 input electrical port 101 and N output charging ports 102; the micro control unit (MCU) is at the 1 input port 101, and controls the N output charging ports 102 at the back end.
[0042] In an exemplary embodiment, as shown in FIG. 2, a charging method is provided, which is applied to the data line in FIG. 1 as an example for illustration, including the following steps 201 to 203. Among them:
[0043] Step 201, detecting the charging power of the first charging device to obtain the first charging power.
[0044] Among them, the first charging device is a device connected to the port of the data line and charged before the second charging device; correspondingly, the second charging device is a device charged through the port of the data line and charged after the first charging device. Exemplarily, the data line is connected to the first device, the second device and the third device in time sequence; relative to the first device, the second device and the third device are both second charging devices; relative to the second device, the first device is a first charging device and the third device is a second charging device; relative to the third device, the first device and the second device are both first charging devices, and so on.
[0045] According to whether the second charging device is connected to the data line, at least two types of second charging devices can be determined, one of which is a second charging device that has not been connected to the data line, and the other of which is a second charging device connected to the data line. Exemplarily, in the case that the data line is connected to the first device and charges the first device, the device connected to the data line and not recognized by the data line is a second charging device relative to the first device; and in the same case, the device connected to the data line and recognized by the data line is another second charging device relative to the first device.
[0046] The data line has different ports, and the sum of the number of the pre-charging device and the number of the post-charging device is less than or equal to the number of the ports of the data line. Since there is pre-charging power in the case that the pre-charging device is charged through the data line, the pre-charging device has a charging protocol adapted to the data line. Since the post-charging device can be not connected to the data line, the post-charging device does not necessarily have a charging protocol adapted to the data line.
[0047] The charging power detection refers to performing charging power detection on the pre-charging device according to the charging protocol supported by the device to obtain the pre-charging power. The pre-charging power is the charging power of the data line to the pre-charging device. Since the pre-charging device is charged according to the pre-charging power, the data line preferentially charges the pre-charging device. When the pre-charging power is less than or equal to the power supported by the data line, the data line can charge according to the maximum power supported by the pre-charging device regardless of whether the post-charging device is connected to the data line. When the pre-charging power is greater than the power supported by the data line, the data line charges according to the maximum power supported by the data line regardless of whether the post-charging device is connected to the data line.
[0048] In an optional embodiment, the charging power detection on the pre-charging device to obtain the pre-charging power includes: performing numerical detection on the charging parameter of the pre-charging device according to a preset frequency to obtain a charging parameter value; the charging parameter of the pre-charging device is adapted to the charging protocol of the pre-charging device; and determining the pre-charging power according to the charging parameter value. Optionally, the preset frequency can be 60 seconds / time or other frequencies; the charging parameter value includes but is not limited to the voltage and current values set according to each charging protocol, and the pre-charging power is determined in a fixed range of the charging parameter value.
[0049] In an optional embodiment, determining the pre-charging power according to the charging parameter value includes: obtaining real-time voltage and current for charging the pre-charging device; performing mean value processing on the real-time voltage and current obtained in a preset detection number, respectively, to obtain voltage mean value and current mean value; and determining the pre-charging power according to the voltage mean value and the current mean value.
[0050] In another optional embodiment, the charging power detection on the pre-charging device to obtain the pre-charging power includes: in the case that the pre-charging device is identified, determining the protocol adapted to the data line and the pre-charging device; and determining the pre-charging power according to the protocol to perform power allocation on the post-charging device connected to the data line.
[0051] Step 202: determining the post-charging power according to the power difference between the power supported by the data line and the pre-charging power.
[0052] The power supported by the data line is the power that the data line can carry. The power supported by the data line is at least related to the material and specifications of the data line itself, and on this basis, the power supported by the data line is also related to the protocol that the data line can support. Exemplarily, the material and specifications of the data line itself make the power supported by the data line 120 watts, and the maximum power supported by the data line in the fast charging protocol is 100 watts, then the power supported by the data line is 100 watts, and the maximum power that the data line can charge the same device is 100 watts.
[0053] The power difference is at least part of the remaining power of the data line that can charge the later charging device in the case of preferentially charging the first charging device. The power difference is the power difference between different powers.
[0054] Optionally, for the power difference between the power supported by the data line and the first charging power, the power difference can be the difference or ratio between the power supported by the data line and the first charging power, or the difference or ratio between the power supported by the data line and the first charging power when the change value of the first charging power exceeds the range threshold value. Wherein, the range threshold value can be determined based on the filtered parameters or other related values.
[0055] The later charging power is the charging power determined based on the power difference. In the case of only one later charging device, the later charging power is used to charge this later charging device; in the case of only multiple later charging devices, the later charging power is the power allocated to the multiple later charging devices when charging the multiple later charging devices. Since the first charging power and the later charging power are the powers output by the data line at different ports, the sum of the first charging power and the later charging power is less than or equal to the power supported by the data line.
[0056] In one optional embodiment, determining the later charging power according to the power difference between the power supported by the data line and the first charging power comprises: determining the power difference between the power supported by the data line and the first charging power; taking the power difference as the later charging power.
[0057] In another optional embodiment, determining the later charging power according to the power difference between the power supported by the data line and the first charging power comprises: determining the power difference between the power supported by the data line and the first charging power; mapping according to the interval where the power difference is located to obtain the later charging power.
[0058] In yet another optional embodiment, determining the later charging power according to the power difference between the power supported by the data line and the first charging power comprises: the data line determines the later charging power according to the power difference between the power supported by the data line and the first charging power.
[0059] Based on this, if the charging power of the first charging device decreases, the first charging power decreases, the power difference between the power supported by the data line and the first charging power increases, and the second charging power increases. Thus, the charging power of the second charging device that does not reach the maximum charging power can be increased. That is, the second charging power can be dynamically regulated according to the dynamic change of the first charging power.
[0060] In step 203, the second charging device is charged by the data line according to the second charging power. The first charging device is charged before the second charging device, and the first charging device and the second charging device are charged through different ports of the data line.
[0061] In an optional embodiment, charging the second charging device by the data line according to the second charging power includes: if the second charging power exists and it is identified that the second charging device is connected to the data line, charging the second charging device by the data line according to the second charging power.
[0062] In another optional embodiment, charging the second charging device by the data line according to the second charging power includes: distributing the second charging power to different ports of the data line, and charging the second charging devices through the power distributed to different ports. In the case that the second charging device is connected to one port of the data line, the second charging power is used to charge the second charging device. In the case that the second charging devices are connected to multiple ports of the data line respectively, the second charging power is distributed according to the order in which the second charging devices are connected to the ports, and each second charging device is charged based on the power distributed to the port.
[0063] In the above charging method, the charging power related to the data line is at least divided into two dimensions of the first charging power and the second charging power. Thus, the charging power of the first charging device is detected to obtain the first charging power, so that the power of the first charging device and the overall charging power of the data line form two independent parts. Then, whether the second charging device is connected to the data line or not, the second charging power is determined according to the power difference between the power supported by the data line and the first charging power, so that the charging power of the data line has the dimension of the second charging power, and the second charging power can be dynamically regulated according to the dynamic change of the first charging power to increase the second charging power when the first charging power decreases. In this case, the second charging device is charged by the data line according to the second charging power, so that the electric energy transmitted by the data line is preferentially output to the first charging device, which improves the charging efficiency of the first charging device, reduces the electric energy loss through a larger power, and improves the overall charging efficiency. In addition, the relative relationship between the first charging device and the second charging device can be adaptively adjusted according to the order in which different devices are connected to the data line, so that the charging power of the devices can be adaptively adjusted.
[0064] In an exemplary embodiment, as shown in FIG. 3, the second charging power is determined according to the power difference between the power supported by the data line and the first charging power, including:
[0065] In step 301, the first-charge residual power is determined according to the power difference between the power supported by the data line and the first-charge power.
[0066] The first-charge residual power is the residual power that can be used to charge the second-charge device in the case of preferentially charging the first-charge device. Alternatively, the power difference between the power supported by the data line and the first-charge power can be taken as the first-charge residual power; the first-charge residual power can be determined based on filtering of the power difference between the power supported by the data line and the first-charge power.
[0067] In an optional embodiment, the first-charge residual power is determined according to the power difference between the power supported by the data line and the first-charge power, including: accumulating the first-charge power of each first-charge device to obtain the total first-charge power of the first-charge devices; and determining the first-charge residual power according to the difference between the power supported by the data line and the total first-charge power of the first-charge devices.
[0068] In step 302, the charging power of the second-charge device is detected to obtain the second-charge demand power.
[0069] The second-charge demand power is the power set according to the charging demand of the second-charge device. In the case of charging according to the second-charge demand power, the charging efficiency of the second-charge device is relatively high, which is helpful for fast charging. Alternatively, the second-charge demand power is the maximum charging power of the second-charge device.
[0070] Since the power supported by the data line is limited and the number of the first-charge devices is indefinite, it is necessary to compare the size relationship between the first-charge residual power and the second-charge demand power.
[0071] In an optional embodiment, the charging power of the second-charge device is detected to obtain the second-charge demand power, including: detecting the charging protocol of the second-charge device, and performing numerical calculation on the charging parameters of the second-charge device according to the charging protocol of the second-charge device to obtain the second-charge demand power.
[0072] In another optional embodiment, the charging power of the second-charge device is detected to obtain the second-charge demand power, including: performing numerical detection on the charging parameters of the second-charge device according to a preset frequency to obtain a charging parameter value; the charging parameters of the second-charge device are adapted to the charging protocol of the second-charge device; and the second-charge demand power is determined according to the charging parameter value. The preset frequency can be 60 seconds / time or other frequencies; the charging parameter value includes but is not limited to the voltage and current values set according to the charging protocols, and the first-charge power is determined in a fixed range of the charging parameter value. In the case that the charging parameter value is the real-time voltage and current of the second-charge device, the real-time voltage and current of the preset detection times are respectively subjected to mean value processing to obtain a voltage mean value and a current mean value; and the second-charge power is determined according to the voltage mean value and the current mean value.
[0073] In step 303, when the first charging residual power is greater than the second charging demand power, the second charging power is determined according to the second charging demand power.
[0074] Optionally, when the first charging residual power is greater than the second charging demand power, the data line is in the case that the first charging residual power is greater than the second charging demand power; or, when the difference between the first charging residual power and the second charging demand power is greater than a certain threshold, the data line is in the case that the first charging residual power is greater than the second charging demand power.
[0075] In an optional embodiment, the second charging power is determined according to the second charging demand power, including: taking the second charging demand power as the second charging power.
[0076] In another optional embodiment, the second charging power is determined according to the second charging demand power, including: distributing the second charging demand power of the data line to different second charging devices to obtain the second charging power of each second charging device.
[0077] In the embodiment, the first charging residual power is determined according to the power difference between the power supported by the data line and the first charging power, so as to determine the maximum power that can be used by the second charging device; then the charging power of the second charging device is detected to obtain the second charging demand power, so as to determine the fastest charging power of the second charging device, so that the first charging residual power and the second charging demand power can be compared. Then, in the case that the first charging residual power is greater than the second charging demand power, the second charging power is determined according to the second charging demand power, so as to improve the charging efficiency of the second charging device.
[0078] In an optional embodiment, the method further includes: in the case that the first charging residual power is less than the second charging demand power, determining the second charging power according to the first charging residual power until the case that the first charging residual power is greater than the second charging demand power occurs, and determining the second charging power according to the second charging demand power.
[0079] In an optional embodiment, in the case that the first charging residual power is less than the second charging demand power, the second charging power is determined according to the first charging residual power, including: in the case that the first charging residual power is less than the second charging demand power, taking the first charging residual power as the second charging power.
[0080] In another optional embodiment, in the case that the first charging residual power is less than the second charging demand power, the second charging power is determined according to the first charging residual power, including: in the case that the first charging residual power is less than the second charging demand power, charging the first second charging device according to the first charging residual power, and not charging the second second charging device.
[0081] In an optional embodiment, the second charging power is determined according to the second charging demand power, including: taking the second charging demand power as the second charging power.
[0082] In another optional embodiment, the post-charging power is determined according to the post-charging demand power, comprising: distributing the post-charging demand power to the post-charging device to obtain the post-charging power of the post-charging device.
[0083] In the embodiment, when the pre-charging residual power is less than the post-charging demand power, the post-charging power is determined according to the pre-charging residual power, so that the post-charging device can be charged and the charging capability supported by the data line can be fully utilized. Until the pre-charging residual power is greater than the post-charging demand power, the post-charging power is determined according to the post-charging demand power, so that the fastest charging power of the post-charging device is determined, and the charging mode is dynamically switched to the fastest charging power of the post-charging device, so as to guarantee the charging efficiency. Thus, the power distribution is dynamically adjusted according to the real-time power demand of the device end, so as to maintain the charging efficiency of the post-charging device.
[0084] In an optional embodiment, the post-charging device comprises a first post-charging device and a second post-charging device, the first post-charging device is connected to the data line earlier than the second post-charging device, and the first post-charging device and the second post-charging device are charged through different ports of the data line.
[0085] The first post-charging device and the second post-charging device both belong to the post-charging device, and the first post-charging device is connected to the data line earlier than the second post-charging device. Therefore, the first post-charging device is a post-charging device connected to the data line, and the second post-charging device can be a post-charging device not yet connected to the data line or a post-charging device connected to the data line.
[0086] For example, when the second post-charging device is not connected to the data line and the data line has been connected to N devices in time sequence, the first N-1 devices are pre-charging devices, the Nth device is the first post-charging device, and the N+1th device to be connected to the data line is the second post-charging device; wherein N is a positive integer greater than 2.
[0087] For example, when the first post-charging device and the second post-charging device are both connected to the data line, and the data line has been connected to M devices in time sequence, the first M-2 devices are pre-charging devices, the M-1th device is the first post-charging device, and the Mth device to be connected to the data line is the second post-charging device; wherein M is a positive integer greater than 3.
[0088] The charging power of the post-charging device is detected to obtain the post-charging demand power, comprising step 401; the post-charging power is determined according to the post-charging demand power, comprising step 402, step 403 and step 404, wherein:
[0089] Step 401, the charging power of the first post-charging device is detected to obtain the first post-charging demand power.
[0090] The first back-charge demand power is a power set according to a first back-charge device charging demand. In a case of charging according to the first back-charge device charging demand, the charging efficiency of the first back-charge device is relatively high, which is helpful for fast charging. Optionally, the first back-charge demand power is a maximum charging power of the first back-charge device.
[0091] In a case of charging according to the first back-charge demand power, the charging efficiency of the first back-charge device is relatively high, which is helpful for fast charging. Since the power supported by the data line is limited and the number of the first-charge devices is indefinite, the first-charge residual power and the first back-charge demand power are compared in size to adopt a suitable power for charging the first back-charge device.
[0092] In an optional embodiment, the first back-charge demand power is obtained by detecting the charging power of the first back-charge device, including: detecting a charging protocol of the first back-charge device, and performing numerical calculation on a charging parameter of the first back-charge device according to the charging protocol of the first back-charge device to obtain the first back-charge demand power.
[0093] In another optional embodiment, the first back-charge demand power is obtained by detecting the charging power of the first back-charge device, including: detecting a charging parameter value of the first back-charge device according to a preset frequency, the charging parameter of the first back-charge device being adapted to the charging protocol of the first back-charge device; and determining the first back-charge demand power according to the charging parameter value. The preset frequency can be 60 seconds / time or other frequencies. The charging parameter value includes but is not limited to voltage and current values set according to each charging protocol. The first back-charge demand power is determined in a fixed range of the charging parameter value. In a case where the charging parameter value is a real-time voltage and current of the first back-charge device charging, the real-time voltage and current of the preset detection times are respectively processed by mean value to obtain a voltage mean value and a current mean value. The first back-charge demand power is determined according to the voltage mean value and the current mean value.
[0094] Optionally, in a case where the first back-charge demand power is determined by the charging parameter value, there is no need to calculate based on the protocol adapted to the first back-charge device, which is helpful for improving timeliness.
[0095] In step 402, the back-charge residual power is determined according to the power difference between the first-charge residual power and the first back-charge demand power.
[0096] For the power difference between the first-charge residual power and the first back-charge demand power, the power difference can be a difference or a ratio between the first-charge residual power and the first back-charge demand power, or a difference or a ratio between the first-charge residual power and the first back-charge demand power in a case where the change value of the first back-charge demand power exceeds a range threshold value. The range threshold value can be determined based on filtered parameters or other related values.
[0097] The post-charging residual power is the residual power that the data line can be used to charge the second post-charging device under the condition that the first-charging device is charged with the highest priority and the first post-charging device is charged with the second highest priority. Alternatively, the power difference between the first-charging residual power and the first post-charging demand power can be taken as the post-charging residual power; the post-charging residual power can be obtained based on filtering the power difference between the first-charging residual power and the first post-charging demand power.
[0098] In step 403, when the first-charging residual power is greater than the first post-charging demand power, the post-charging power of the first post-charging device is determined according to the first post-charging demand power, and it is detected whether the data line is connected to the second post-charging device.
[0099] The post-charging power of the first post-charging device refers to the charging power allocated to the first post-charging device from the first-charging residual power. The post-charging power of the first post-charging device belongs to the actual charging power of the first post-charging device.
[0100] Alternatively, when the value of the first-charging residual power is greater than the value of the first post-charging demand power, the data line is in the condition that the first-charging residual power is greater than the first post-charging demand power; or when the difference between the first-charging residual power and the first post-charging demand power is greater than a certain threshold, the data line is in the condition that the first-charging residual power is greater than the first post-charging demand power.
[0101] In an optional embodiment, determining the post-charging power of the first post-charging device according to the first post-charging demand power comprises: taking the first post-charging demand power as the post-charging power of the first post-charging device.
[0102] In another optional embodiment, determining the post-charging power of the first post-charging device according to the first post-charging demand power comprises: adjusting the post-charging power of the first post-charging device in real time according to the first post-charging demand power that changes in real time.
[0103] In an optional embodiment, detecting whether the data line is connected to the second post-charging device comprises: detecting whether there is a device connected to the data line after the first post-charging device according to the protocol supported by the data line; if yes, the data line is connected to the second post-charging device; if no, there is no second post-charging device.
[0104] In another optional embodiment, detecting whether the data line is connected to the second post-charging device comprises: detecting whether there is a device connected to the data line after the first post-charging device according to the change of the power parameter supported by the data line; if yes, the data line is connected to the second post-charging device.
[0105] Thus, in the case that the first charging residual power is greater than the first charging demand power, on the one hand, the charging power of the first charging device is determined, and on the other hand, whether the data line is connected to the second charging device is detected, so that the detection scenario of the second charging device is limited, and the detection frequency of the second charging device is reduced.
[0106] In step 404, if the data line is connected to the second charging device, the charging power of the second charging device is determined based on the power difference between the charging residual power and the first charging demand power.
[0107] For the power difference between the charging residual power and the first charging demand power, the power difference can be a difference or a ratio between the charging residual power and the first charging demand power, or in the case that the change value of the first charging demand power exceeds the range threshold value, the difference or the ratio between the charging residual power and the first charging demand power. The range threshold value can be determined based on the filtered parameters or other related values.
[0108] The charging power of the second charging device is the power for charging the second charging device through the data line under the condition that the first charging device and the first charging device can be charged at their respective demand powers.
[0109] In an optional embodiment, based on the power difference between the charging residual power and the first charging demand power, the charging power of the second charging device is determined, including: based on the power difference between the charging residual power and the first charging demand power, judging the charging condition of the second charging device; determining the charging power calculation method of the second charging device according to the charging condition; and determining the charging power of the second charging device according to the charging power calculation method of the second charging device.
[0110] In this embodiment, from the perspective of the charging device, the charging power of the data line is refined, so that the charging power of the first charging device is detected to obtain the first charging demand power to judge the charging condition of the first charging device; on this basis, the charging residual power is determined according to the power difference between the first charging demand power and the first charging demand power, so that the residual power for the charging device is further refined; in the case that the first charging residual power is greater than the first charging demand power, the charging power of the first charging device is determined according to the first charging demand power to ensure the charging efficiency, and this condition is used as the condition for detecting the second charging device, so that the detection scenario of the second charging device is limited, and the detection frequency of the second charging device is reduced. In the case that the data line is connected to the second charging device, the charging power of the second charging device is determined based on the power difference between the charging residual power and the first charging demand power, so that the first charging device can be charged before the second charging device.
[0111] In an optional embodiment, the second charging power of the second charging device is determined based on a power difference between the remaining charging power and the first charging demand power, including: detecting the charging power of the second charging device to obtain the second charging demand power; in a case where the remaining charging power is greater than the second charging demand power, determining the second charging power of the second charging device according to the second charging demand power; in a case where the remaining charging power is less than or equal to the second charging demand power, determining the second charging power of the second charging device according to the remaining charging power.
[0112] The second charging demand power is a power set according to the charging demand of the second charging device. In a case of charging according to the charging demand of the second charging device, the charging efficiency of the second charging device is relatively high, which is helpful for fast charging. Optionally, the second charging demand power is the maximum charging power of the second charging device.
[0113] In a case of charging according to the second charging demand power, the charging efficiency of the second charging device is relatively high, which is helpful for fast charging. Since the power supported by the data line is limited and the number of the first charging devices is indefinite, the charging power of the first charging device is indefinite, and thus the size between the remaining charging power and the second charging demand power is compared to adopt appropriate power for charging the second charging device.
[0114] In an optional embodiment, the charging power of the second charging device is detected to obtain the second charging demand power, including: detecting the charging protocol of the second charging device, and performing numerical calculation on the charging parameters of the second charging device according to the charging protocol of the second charging device to obtain the second charging demand power.
[0115] In another optional embodiment, the charging power of the second charging device is detected to obtain the second charging demand power, including: performing numerical detection on the charging parameters of the second charging device according to a preset frequency to obtain a charging parameter value; the charging parameters of the second charging device are adapted to the charging protocol of the second charging device; and the second charging demand power is determined according to the charging parameter value. The preset frequency can be 60 seconds / time or other frequencies; the charging parameter value includes but is not limited to the voltage and current values set according to each charging protocol, and the second charging demand power is determined in a fixed range of the charging parameter value. In a case where the charging parameter value is the real-time voltage and current of the second charging device, the real-time voltage and current of the preset detection times are respectively subjected to mean value processing to obtain a voltage mean value and a current mean value; and the second charging demand power is determined according to the voltage mean value and the current mean value. Optionally, in a case where the second charging demand power is determined through the charging parameter value, there is no need to perform calculation based on the protocol adapted to the second charging device, which is helpful for improving timeliness.
[0116] Optionally, if the value of the post-charge residual power is greater than the value of the second post-charge demand power, the data line is in a case where the post-charge residual power is greater than the second post-charge demand power; otherwise, the data line is in a case where the post-charge residual power is less than or equal to the second post-charge demand power.
[0117] Optionally, if the difference between the post-charge residual power and the second post-charge demand power is greater than a certain threshold, the data line is in a case where the post-charge residual power is greater than the second post-charge demand power; otherwise, the data line is in a case where the post-charge residual power is less than or equal to the second post-charge demand power.
[0118] In an optional embodiment, determining the post-charge power of the second post-charge device according to the second post-charge demand power comprises: taking the second post-charge demand power as the post-charge power of the second post-charge device.
[0119] In another optional embodiment, determining the post-charge power of the second post-charge device according to the second post-charge demand power comprises: adjusting the post-charge power of the second post-charge device in real time according to the second post-charge demand power which changes in real time.
[0120] In an optional embodiment, determining the post-charge power of the second post-charge device according to the post-charge residual power comprises: taking the post-charge residual power as the post-charge power of the second post-charge device.
[0121] In another optional embodiment, determining the post-charge power of the second post-charge device according to the post-charge residual power comprises: charging the second post-charge device according to the post-charge residual power, and not charging a subsequent device of the second post-charge device; the subsequent device of the second post-charge device refers to a device which accesses the data line later than the second post-charge device.
[0122] In the embodiment, the charging power involved by the post-charge device is further refined to form the second post-charge demand power. The charging power of the second post-charge device is detected to obtain the second post-charge demand power, so as to judge the charging condition of the second post-charge device; on this basis, the charging power of the second post-charge device is adaptively adjusted according to the size condition between the post-charge residual power and the second post-charge demand power. In this way, the charging efficiency of the pre-charge device and the first post-charge device can be improved.
[0123] In an embodiment, determining the post-charge power according to the power difference between the power supported by the data line and the pre-charge power comprises step 501, and the method further comprises step 502, wherein:
[0124] Step 501, if the pre-charge power is less than the power supported by the data line, determining the post-charge power according to the power difference between the power supported by the data line and the pre-charge power.
[0125] Optionally, the first charging power can be determined to be less than the power supported by the data line by comparing the first charging power with the power supported by the data line. That is, when the first charging power is less than the power supported by the data line, the first charging power is less than the power supported by the data line; when the first charging power is equal to or greater than the power supported by the data line, the first charging power is not less than the power supported by the data line.
[0126] Optionally, the first charging power can be determined to be less than the power supported by the data line by comparing the power corresponding to the charging protocol supported by the first charging device with the power corresponding to the charging protocol supported by the data line. That is, when the power corresponding to the charging protocol supported by the first charging device is less than the power corresponding to the charging protocol supported by the data line, the first charging power is less than the power supported by the data line; when the power corresponding to the charging protocol supported by the first charging device is equal to or greater than the power corresponding to the charging protocol supported by the data line, the first charging power is not less than the power supported by the data line.
[0127] In step 502, if the first charging power is equal to the maximum power supported by the data line, the first charging power is maintained according to the power supported by the data line.
[0128] Optionally, for the case that the first charging power is equal to the maximum power supported by the data line, the case can be that the first charging power has the same or similar value as the maximum power supported by the data line; or the first charging power is greater than the power supported by the data line. When the first charging power is greater than the power supported by the data line, the data line can be abnormal. In order to ensure safety, the first charging power is set to the power supported by the data line, and the first charging device is charged.
[0129] In an optional embodiment, maintaining the first charging power according to the power supported by the data line comprises charging the first charging device according to the maximum power supported by the data line, and the second charging power is 0.
[0130] In an optional embodiment, maintaining the first charging power according to the power supported by the data line comprises charging the first charging device according to the maximum power supported by the data line under the data line support protocol, and the second charging power is 0.
[0131] In the embodiment, if the first charging power is less than the power supported by the data line, the second charging power is determined according to the power difference between the power supported by the data line and the first charging power, so that the second charging device can be charged on the premise of ensuring that the first charging device has high charging efficiency; if the first charging power is equal to the power supported by the data line, the first charging power is maintained according to the power supported by the data line, so that the charging efficiency of the first charging device is high.
[0132] In a specific embodiment, as shown in FIG. 6, a one-to-two data line is executed by the method shown in FIG. 7, only having a first device and a second device. Relative to the first device, the second device is a second charging device; relative to the second device, the first device is a first charging device.
[0133] In this case, step 201 comprises: step 701, the controller of the data line identifies that the first device is connected; step 702, it is judged whether the charging power of the first device reaches the maximum power supported by the data line, wherein the charging power of the first device refers to the power required by the first device, i.e. the maximum first charging power, and the maximum power supported by the data line refers to the maximum power that can be output by the data line.
[0134] In this case, step 202 comprises: step 703, if the charging power of the first device reaches the maximum power supported by the data line, the maximum power that can be output by the data line is provided to the first device to ensure full power charging of the first device until the power requirement changes in the device charging process.
[0135] In this case, step 203 comprises: if the charging power of the first device cannot reach the maximum power supported by the data line, step 704 is performed, i.e. the controller of the data line judges whether the second device is connected, if yes, step 705 is performed, i.e. the remaining power that can be provided by the data line is allocated to the second device.
[0136] In this case, the method further comprises: if the controller of the data line judges that the second device is not connected, the full power output of the first device is continued to be ensured;
[0137] In step 201, step 706 can be included, i.e. it is judged in real time whether the power requirement changes in the device charging process, and correspondingly, step 201 further comprises: step 707, the power distribution is dynamically adjusted according to the real-time power requirement of the first charging device until the charging is completed. In this process, the maximum fast charging power supported by the device is judged, and the total input power is dynamically distributed. For example: the maximum power supported by the first device is first satisfied, and the remaining power is distributed to the second device, when the power of the first device decreases, the power provided to the second device is adjusted in real time. Thus, as the charging of the first device gradually changes, the first charging power slowly decreases, at this time, more power can be allocated to the second device.
[0138] In a specific embodiment, when the data line is a one-to-three data line, the first post-charging device is the second device, and the second post-charging device is the third device. At this time, the method further comprises: when it is detected that the second device is connected, it is determined whether the remaining first-charging power that can be provided by the data line is less than the required power of the second device. If the remaining first-charging power that can be provided by the data line is less than the required power of the second device, the remaining first-charging power that can be output by the data line is provided to the second device to ensure full-power charging of the second device, and it is not detected whether the third device is connected. If the remaining first-charging power that can be provided by the data line is greater than the required power of the second device, the second device is charged according to the required power of the second device, and it is detected whether the third device is connected. If the charging power of the first device or the second device decreases, the charging power of the third post-charging device is increased.
[0139] It should be understood that, although each step in the flowchart involved in each embodiment described above is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0140] Based on the same inventive concept, the embodiments of the present application also provide a charging device for implementing the above-mentioned charging method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more charging device embodiments provided below can refer to the limitations of the charging method described above, which will not be described here.
[0141] In an exemplary embodiment, as shown in FIG. 8, a charging device is provided, comprising:
[0142] The first-charging power determination module 801 is configured to detect the charging power of the first-charging device when the first-charging device is charged through the data line, and obtain the first-charging power.
[0143] The post-charging power determination module 802 is configured to determine the post-charging power according to the power difference between the power supported by the data line and the first-charging power.
[0144] The charging module 803 is configured to charge the post-charging device according to the post-charging power through the data line; the pre-charging device is charged before the post-charging device, and the pre-charging device and the post-charging device are charged through different ports of the data line.
[0145] In one embodiment, the post-charging power determination module 802 is configured to:
[0146] determine the pre-charging residual power according to a power difference between the power supported by the data line and the pre-charging power;
[0147] detect the charging power of the post-charging device to obtain post-charging demand power;
[0148] determine the post-charging power according to the post-charging demand power in a case where the pre-charging residual power is greater than the post-charging demand power.
[0149] In one embodiment, the post-charging power determination module 802 is configured to:
[0150] detect the charging protocol of the post-charging device, and perform numerical calculation on the charging parameter of the post-charging device according to the charging protocol of the post-charging device to obtain post-charging demand power.
[0151] In one embodiment, the post-charging power determination module 802 is configured to:
[0152] perform numerical detection on the charging parameter of the post-charging device according to a preset frequency to obtain a charging parameter value; the charging parameter of the post-charging device is adapted to the charging protocol of the post-charging device;
[0153] determine the post-charging demand power according to the charging parameter value.
[0154] In one embodiment, the post-charging device includes a first post-charging device and a second post-charging device, the first post-charging device is connected to the data line before the second post-charging device, and the first post-charging device and the second post-charging device are charged through different ports of the data line;
[0155] The post-charging power determination module 802 is configured to:
[0156] detect the charging power of the first post-charging device to obtain first post-charging demand power;
[0157] determine the post-charging residual power according to a power difference between the pre-charging residual power and the first post-charging demand power;
[0158] In a case where the remaining power is greater than the first post-charge demand power, determining the post-charge power of the first post-charge device according to the first post-charge demand power, and detecting whether the data line is connected to the second post-charge device;
[0159] If the data line is connected to the second post-charge device, determining the post-charge power of the second post-charge device based on a power difference between the remaining power and the first post-charge demand power.
[0160] In one of the embodiments, the post-charge power determination module 802 is configured to:
[0161] detecting the charging power of the second post-charge device to obtain a second post-charge demand power;
[0162] In a case where the remaining power is greater than the second post-charge demand power, determining the post-charge power of the second post-charge device according to the second post-charge demand power;
[0163] In a case where the remaining power is less than or equal to the second post-charge demand power, determining the post-charge power of the second post-charge device according to the remaining power.
[0164] In one of the embodiments, the post-charge power determination module 802 is configured to:
[0165] detecting, according to a protocol supported by the data line, whether there is a device connected to the data line after the first post-charge device;
[0166] If yes, the data line is connected to the second post-charge device;
[0167] If no, the second post-charge device does not exist.
[0168] In one of the embodiments, the post-charge power determination module 802 is configured to:
[0169] In a case where the remaining power is less than the post-charge demand power, determining the post-charge power according to the remaining power until a case where the remaining power is greater than the post-charge demand power occurs, and determining the post-charge power according to the post-charge demand power.
[0170] In one of the embodiments, the post-charge power determination module 802 is configured to:
[0171] accumulating the pre-charge power of each pre-charge device to obtain a total power of the pre-charge devices;
[0172] determining the remaining power according to a difference between a power supported by the data line and the total power of the pre-charge devices.
[0173] In one of the embodiments, the post-charging power determination module 802 is configured to:
[0174] detect the charging protocol of the post-charging device, and perform numerical calculation on the charging parameters of the post-charging device according to the charging protocol of the post-charging device to obtain the post-charging demand power.
[0175] In one of the embodiments, the pre-charging power determination module 801 is configured to:
[0176] if the pre-charging power is less than the power supported by the data line, determine the post-charging power according to the power difference between the power supported by the data line and the pre-charging power;
[0177] if the pre-charging power is equal to the maximum power supported by the data line, maintain the pre-charging power according to the power supported by the data line.
[0178] The above modules in the charging device can be implemented by software, hardware, or a combination thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.
[0179] In an example embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in FIG. 9. The computer device includes a processor 910, a memory 920, an input / output interface 930, a communication interface 940, a display unit 950, and an input device 960. Among them, the processor 910, the memory 920, and the input / output interface 930 are connected through a system bus 970, and the communication interface 940, the display unit 950, and the input device 960 are connected to the system bus 970 through the input / output interface 930. Among them, the processor 910 of the computer device is configured to provide computing and control capabilities. The memory 920 of the computer device includes a non-volatile storage medium 921 and an internal memory 922. The non-volatile storage medium 921 stores an operating system 9211 and a computer program 9212. The internal memory 922 provides an environment for the operating system 9211 and the computer program 9212 in the non-volatile storage medium 921 to run. The input / output interface 930 of the computer device is configured to exchange information between the processor 910 and external devices. The communication interface 940 of the computer device is configured to perform wired or wireless communication with external terminals, and the wireless communication can be achieved through WIFI, mobile cellular network, near field communication (NFC), or other technologies. The computer program 9212 is executed by the processor 910 to implement a charging method. The display unit 950 of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device 960 of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0180] Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0181] In an example embodiment, as shown in FIG. 1, a data line is also provided, including a controller and a charging line. The controller implements the steps in the above method embodiments when executing a computer program, and the charging line includes an input electrical port 101 and an output charging port 102.
[0182] In an example embodiment, as shown in FIG. 10, a computer readable storage medium 1000 is provided, which stores a computer program 1001. The computer program 1001 is executed by a processor to implement the steps in the above method embodiments.
[0183] In an embodiment, as shown in FIG. 11, a computer program product 1100 is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above method embodiments.
[0184] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0185] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0186] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0187] The above embodiments only express several implementation ways of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation to the patent scope of the application. It should be pointed out that for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A charging method performed by a data line, the method comprising: detecting a charging power of a first charging device to obtain a first charging power; determining a second charging power based on a power difference between a power supported by the data line and the first charging power; and charging a second charging device through the data line according to the second charging power, wherein the first charging device is charged before the second charging device, and the first charging device and the second charging device are charged through different ports of the data line. 2.The method of claim 1, wherein the determining the second charging power based on the power difference between the power supported by the data line and the first charging power comprises: determining a first charging remaining power based on the power difference between the power supported by the data line and the first charging power; detecting a charging power of the second charging device to obtain a second charging demand power; and determining the second charging power based on the second charging demand power, if the first charging remaining power is greater than the second charging demand power. 3.The method of claim 2, wherein the second charging device comprises a first second charging device and a second second charging device, the first second charging device is connected to the data line before the second second charging device, and the first second charging device and the second second charging device are charged through different ports of the data line; the detecting the charging power of the second charging device to obtain the second charging demand power comprises: detecting a charging power of the first second charging device to obtain a first second charging demand power; and the determining the second charging power based on the second charging demand power comprises: determining a second charging remaining power based on a power difference between the first charging remaining power and the first second charging demand power; determining a second charging power of the first second charging device based on the first second charging demand power, and detecting whether the data line is connected to the second second charging device, if the second charging remaining power is greater than the first second charging demand power; and determining a second charging power of the second second charging device based on a power difference between the second charging remaining power and the first second charging demand power, if the data line is connected to the second second charging device. 4.The method of claim 3, wherein the determining the second charging power of the second second charging device based on the power difference between the second charging remaining power and the first second charging demand power comprises: detecting a charging power of the second second charging device to obtain a second second charging demand power; determining the second charging power of the second second charging device based on the second second charging demand power, if the second charging remaining power is greater than the second second charging demand power; and determining the second charging power of the second second charging device based on the second charging remaining power, if the second charging remaining power is less than or equal to the second second charging demand power. 5.The method of claim 3, wherein the detecting whether the data line is connected to the second second charging device comprises: detecting whether there is a device connected to the data line after the first second charging device according to a protocol supported by the data line; if yes, the data line is connected to the second second charging device; and if no, there is no second second charging device. 6. The charging method of claim 2, further comprising: determining the remaining charging power according to the first charging power and the power supported by the data line, when the remaining charging power is less than the required charging power; and determining the required charging power according to the required charging power, when the remaining charging power is greater than the required charging power.
7. The charging method of claim 2, wherein the determining the remaining charging power according to the power difference between the power supported by the data line and the first charging power comprises: accumulating the first charging power of each of the first charging devices to obtain a total first charging power; and determining the remaining charging power according to the difference between the power supported by the data line and the total first charging power.
8. The charging method of claim 2, wherein the detecting the charging power of the second charging device to obtain the required charging power comprises: detecting the charging protocol of the second charging device; and calculating the required charging power according to the charging parameters of the second charging device according to the charging protocol of the second charging device.
9. The charging method of claim 2, wherein the detecting the charging power of the second charging device to obtain the required charging power comprises: detecting the charging parameters of the second charging device according to a preset frequency to obtain a charging parameter value; the charging parameters of the second charging device being adapted to the charging protocol of the second charging device; and determining the required charging power according to the charging parameter value.
10. The charging method of claim 1, wherein the determining the required charging power according to the power difference between the power supported by the data line and the first charging power comprises: determining the required charging power according to the power difference between the power supported by the data line and the first charging power, when the first charging power is less than the power supported by the data line; and maintaining the first charging power according to the power supported by the data line, when the first charging power is equal to the maximum power supported by the data line.
11. The charging method of claim 1, wherein the detecting the charging power of the first charging device to obtain the first charging power comprises: detecting the charging parameters of the first charging device according to a preset frequency to obtain a charging parameter value; the charging parameters of the first charging device being adapted to the charging protocol of the first charging device; and determining the first charging power according to the charging parameter value.
12. A data line comprising a controller and a charging line, when a charging method is executed by the controller, the controller is used to: detect the charging power of the first charging device to obtain the first charging power; determine the required charging power according to the power difference between the power supported by the data line and the first charging power; and charge the second charging device through the data line according to the required charging power; the first charging device being charged before the second charging device, and the first charging device and the second charging device being charged through different ports of the data line.
13. The data line of claim 12, wherein the determining the required charging power according to the power difference between the power supported by the data line and the first charging power comprises: determining the remaining charging power according to the power difference between the power supported by the data line and the first charging power. detecting the charging power of the post-charging device to obtain a post-charging demand power; in a case where the pre-charging residual power is greater than the post-charging demand power, determining the post-charging power according to the post-charging demand power.
14. The data line of claim 13, wherein the post-charging device comprises a first post-charging device and a second post-charging device, the first post-charging device is connected to the data line earlier than the second post-charging device, and the first post-charging device and the second post-charging device are charged through different ports of the data line; the detecting the charging power of the post-charging device to obtain a post-charging demand power comprises: detecting the charging power of the first post-charging device to obtain a first post-charging demand power; the determining the post-charging power according to the post-charging demand power comprises: determining a post-charging residual power according to a power difference between the pre-charging residual power and the first post-charging demand power; in a case where the post-charging residual power is greater than the first post-charging demand power, determining the post-charging power of the first post-charging device according to the first post-charging demand power, and detecting whether the data line is connected to the second post-charging device; if the data line is connected to the second post-charging device, determining the post-charging power of the second post-charging device based on the power difference between the post-charging residual power and the first post-charging demand power.
15. The data line of claim 14, wherein the determining the post-charging power of the second post-charging device based on the power difference between the post-charging residual power and the first post-charging demand power comprises: in a case where the pre-charging residual power is less than the post-charging demand power, determining the post-charging power according to the pre-charging residual power until a case where the pre-charging residual power is greater than the post-charging demand power occurs, and determining the post-charging power according to the post-charging demand power.
16. The data line of claim 13, wherein the determining the pre-charging residual power according to a power difference between a power supported by the data line and the pre-charging power comprises: accumulating the pre-charging power of each of the pre-charging devices to obtain a total power of the pre-charging devices; determining the pre-charging residual power according to a difference between the power supported by the data line and the total power of the pre-charging devices.
17. The data line of claim 13, wherein the detecting the charging power of the post-charging device to obtain a post-charging demand power comprises: detecting a charging protocol of the post-charging device, and performing numerical calculation on a charging parameter of the post-charging device according to the charging protocol of the post-charging device to obtain the post-charging demand power.
18. The data line of claim 13, wherein the detecting the charging power of the post-charging device to obtain a post-charging demand power comprises: performing numerical detection on a charging parameter of the post-charging device at a preset frequency to obtain a charging parameter value; the charging parameter of the post-charging device is adapted to a charging protocol of the post-charging device; determining the post-charging demand power according to the charging parameter value.
19. The data line of claim 12, wherein the determining the post-charging power according to a power difference between a power supported by the data line and the pre-charging power comprises: if the pre-charging power is less than the power supported by the data line, determining a post-charging power according to a power difference between the power supported by the data line and the pre-charging power; the charging method further comprises: if the pre-charging power is equal to the maximum power supported by the data line, maintaining the pre-charging power according to the power supported by the data line. 20.A computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, causes the processor to: detect a charging power of a pre-charging device to obtain a pre-charging power; determine a post-charging power according to a power difference between a power supported by a data line and the pre-charging power; and charge a post-charging device through the data line according to the post-charging power, wherein the pre-charging device is charged prior to the post-charging device, and the pre-charging device and the post-charging device are charged through different ports of the data line.
Citation Information
Patent Citations
Power distribution method and charging equipment
CN112671055A
Double-Type-C-port shared charging power charger and intelligent output power distribution method thereof
CN113472043A
Multi-Type C interface dynamic power supply circuit and device and display equipment
CN114498825A
Dynamic power distribution method and system for multi-port charger and computer readable storage medium
CN117674359A
Multi-port power supply device and operation method thereof
US20220137688A1