Multi-device dynamic charging control method and device and storage medium

By identifying device information and topology relationships, and using the ant colony algorithm for dynamic power allocation, the problem of uneven power scheduling in multi-device charging is solved, which improves charging efficiency and system stability, avoids port overload, and enhances user experience.

CN121923319APending Publication Date: 2026-04-24SHENZHEN XINGUODU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XINGUODU TECH
Filing Date
2025-12-09
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When multiple devices are charged simultaneously, existing technologies struggle to achieve reasonable power scheduling and power supply control based on the actual needs and connection relationships of the devices, resulting in some devices being undercharged or having low charging efficiency. This is especially true in complex connection structures where there are problems such as uneven power distribution, port overload, or decreased power utilization.

Method used

By identifying the device information of the charging port and the topology information of its cascaded devices, a charging demand dataset is constructed. The ant colony algorithm is used for iterative optimization to dynamically allocate charging power, generate a power allocation scheme, and achieve reasonable power supply status management through drive control commands.

Benefits of technology

It enables reasonable power scheduling based on the actual needs of the equipment, improves the utilization efficiency of the overall power supply system, reduces insufficient charging, enhances the user experience, and avoids overload or localized overheating of a single port, ensuring system stability and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121923319A_ABST
    Figure CN121923319A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-device dynamic charging control method and device and a storage medium. The method comprises the following steps: identifying equipment information of target equipment accessed to each charging port of the power supply equipment and topological information of cascade equipment of the target equipment; based on the device information and the topological information, determining charging demand information of each target device and the cascade device thereof; according to the charging demand information, performing dynamic allocation calculation on the total available charging power of the power supply equipment through a pre-configured allocation algorithm, and generating a power allocation scheme of each charging port; and controlling the power supply state of each charging port based on the power distribution scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to a method, apparatus and storage medium for dynamic charging control of multiple devices. Background Technology

[0002] With the widespread use of portable electronic devices and smart terminals, users' demand for charging multiple devices simultaneously is increasing. Common multi-port charging devices can meet the needs of scenarios requiring multiple devices to be connected to some extent, but some technical challenges still exist in actual use.

[0003] For example, when multiple devices are connected to the charging port simultaneously, different devices may have different battery capacities, charging protocols, and power requirements, making the allocation and scheduling of overall charging power complex. Some devices often use fixed allocation or simple priority allocation methods, which can easily lead to some devices being undercharged or having low charging efficiency when there are many devices and significant differences in power requirements.

[0004] The use of cascaded multiple devices is also gradually increasing, such as docking stations, series chargers, or multi-node charging systems in smart homes. In these applications, there are topological relationships and hierarchical differences between devices. If this topological information cannot be accurately identified and utilized, it may lead to unbalanced power distribution, or even port overload or decreased power utilization.

[0005] Therefore, how to achieve reasonable power scheduling and power supply control based on the actual needs and connection relationships of multiple devices when they are connected at the same time has become an urgent problem to be solved in multi-device charging technology. Summary of the Invention

[0006] To address the aforementioned technical problems, this application provides a method, apparatus, and storage medium for dynamic charging control of multiple devices.

[0007] The technical solution provided in this application is described below: The first aspect of this application provides a multi-device dynamic charging control method, including: Identify the device information of the target devices and the topology information of their cascaded devices at each charging port connected to the power supply equipment; Based on the device information and the topology information, the charging requirements of each target device and its cascaded devices are determined; Based on the charging demand information, the total available charging power of the power supply equipment is dynamically allocated and calculated using a pre-configured allocation algorithm, and a power allocation scheme for each charging port is generated. The power supply status of each charging port is controlled based on the power allocation scheme.

[0008] Optionally, the step of dynamically allocating and calculating the total available charging power of the power supply equipment based on the charging demand information using a pre-configured allocation algorithm, and generating a power allocation scheme for each of the charging ports, includes: A demand dataset is constructed based on the power demand parameters, device priority factors, battery status factors, and port temperature factors of each target device and its cascaded devices in the charging demand information. Based on the demand dataset, an allocation algorithm is established, which takes the total available charging power of the power supply equipment as a constraint and the allocated power value of each charging port as the objective. The power allocation value of each charging port is calculated through iterative optimization until a preset convergence condition is met or a preset number of iterations is reached. Based on the converged power allocation values, the power supply voltage and current parameters corresponding to each charging port are generated to obtain the power allocation scheme.

[0009] Optionally, the allocation algorithm is an ant colony algorithm, wherein the step of calculating the allocated power value of each charging port through iterative optimization until a preset convergence condition is met or a preset number of iterations is reached includes: Each of the charging ports and the corresponding target devices and their cascaded devices are used as nodes of the ant colony algorithm. Each node includes a device ID, a target power requirement value, and status information, including device priority, battery power status, and port temperature. The power supply path impedance and power adaptability of each power supply path are used as edge weights. The power supply path is a logical connection representing the energy transfer relationship between the power supply device, the target device, and its cascaded devices. This logical connection path is determined by the device information and the topology information. During each iteration, the power requirement parameters of each target device and its cascaded devices are corrected using the device priority factor, battery status factor, and port temperature factor. Candidate power allocation schemes are generated based on the revised power demand parameters; The pheromone increment is calculated based on the candidate power allocation scheme, and the pheromone matrix of the corresponding path is updated based on the pheromone increment. When the preset convergence condition or the preset number of iterations is reached, the allocated power value of each of the charging ports is output.

[0010] Optionally, the power adaptability is either power margin or power satisfaction. The power margin = total available power - total allocated power; The power satisfaction rate = actual allocated power / charging demand power.

[0011] Optionally, the step of calculating the pheromone increment according to the candidate power allocation scheme and updating the pheromone matrix of the corresponding path according to the pheromone increment includes: Based on the candidate power allocation scheme, the corresponding operating performance indicators are determined; The pheromone increment is calculated based on the ratio of the aforementioned performance index to a preset benchmark value. In the current iteration, for each power supply path traversed, the corresponding pheromone matrix is ​​updated according to the pheromone increment.

[0012] Optionally, the identification of the device information of the target device and the topology information of its cascaded devices at each charging port of the power supply equipment includes: Initiate a topology probe request through the CC pin of the power supply device and obtain device information of the target devices directly connected to each charging port; Based on the device information, the target device and its cascaded devices' cascaded device information are obtained by calling a preset topology detection interface; Based on the device information and the cascaded device information, topology information is generated by calling a preset power policy interface.

[0013] Optionally, controlling the power supply status of each charging port based on the power allocation scheme includes: The target allocated power of each charging port in the power allocation scheme is converted into a corresponding drive control command; The drive control command controls the on / off state of the corresponding power switch to output the target power allocation.

[0014] A second aspect of this application provides a multi-device dynamic charging control device, comprising: The topology identification unit is used to identify the device information of the target device and the topology information of the cascaded devices at each charging port connected to the power supply equipment. A charging demand determination unit is used to determine the charging demand information of each target device and its cascaded devices based on the device information and the topology information. The dynamic calculation unit is used to dynamically calculate the total available charging power of the power supply equipment based on the charging demand information and through a pre-configured allocation algorithm, and generate a power allocation scheme for each of the charging ports. A charging control unit is used to control the power supply status of each of the charging ports based on the power distribution scheme.

[0015] A third aspect of this application provides a multi-device dynamic charging control device, the device comprising: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to execute the first aspect and any one of the optional methods in the first aspect.

[0016] A fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, performs the methods of the first aspect and any one of the first aspects.

[0017] As can be seen from the above technical solutions, this application has the following beneficial effects: 1. The dynamic allocation mechanism enables the limited total available power to be rationally scheduled according to the actual needs of different devices, avoiding idle ports or excessive power allocation, and improving the overall utilization efficiency of the power supply system.

[0018] 2. When multiple devices are connected at the same time, it can achieve differentiated allocation based on the power requirements and topology location of different devices, reducing the situation where some devices are undercharged for a long time, thereby improving the user experience.

[0019] 3. By introducing the identification of the topology relationship of cascaded devices, the solution is not only applicable to scenarios with multiple output ports of a single charger, but also adaptable to complex connection structures such as docking stations and series charging devices, thus expanding the application scope of the technical solution.

[0020] 4. By implementing the power distribution scheme and controlling the port power supply status, it is possible to effectively avoid single port overload or localized overheating, thereby improving the safety and stability of system operation. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic flowchart of an embodiment of the multi-device dynamic charging control method provided in this application; Figure 2 This is a schematic flowchart of an embodiment of step S103 in the multi-device dynamic charging control method provided in this application; Figure 3 This is a schematic flowchart of an embodiment of the multi-device dynamic charging control method provided in this application, which calculates the allocated power value using an allocation algorithm. Figure 4 This is a schematic flowchart of an embodiment of the multi-device dynamic charging control method for updating the pheromone matrix provided in this application. Figure 5 This is a schematic flowchart of an embodiment of step S101 in the multi-device dynamic charging control method provided in this application; Figure 6 This is a schematic diagram of an embodiment of the multi-device dynamic charging control device provided in this application; Figure 7 This is a schematic diagram of an embodiment of another multi-device dynamic charging control device provided in this application. Detailed Implementation

[0023] It should be noted that, in the embodiments of this application, the executing entity of the multi-device dynamic charging control method can be of various forms without limitation, such as, but not limited to: a power management controller implemented by hardware circuitry, firmware running on an embedded chip, software running on an independent processor or microcontroller unit, or control logic jointly executed by a cloud server and a local terminal. This application does not limit the executing entity of the method to a specific device or a specific software platform.

[0024] The method described in this application is applicable to various types of power supply equipment or scenarios, such as, but not limited to: desktop adapters with multiple output interfaces, in-vehicle multi-port charging devices, cascading docking stations, smart home power management systems, industrial power distribution terminals, and even energy management systems that require dynamic power scheduling for multiple loads. By implementing the method described in this application in the aforementioned devices, efficient, balanced, and safe charging power distribution and control can be achieved when multiple devices are connected.

[0025] The embodiments provided in this application are described below: Please see Figure 1 This application first provides an embodiment of a multi-device dynamic charging control method, which includes: S101. Identify the device information of the target device and the topology information of its cascaded devices at each charging port of the power supply equipment. In step S101, the presence of a target device can be identified by detecting the connection status of each charging port. When a device is detected connected to a charging port, the device information, such as device identifier, interface type, and power capability, can be further read. For target devices that support cascading, the connection relationship between the target device and its cascaded devices can be obtained through a preset topology detection protocol or interface command, thereby obtaining complete topology information. Through the above operations, topology information reflecting the connection relationship between each charging port, the target device, and its cascaded devices can be established.

[0026] S102. Based on device information and topology information, determine the charging demand information of each target device and its cascaded devices; This step analyzes the charging status and charging demand information of each device based on device and topology information. For example, it can obtain the battery level, power input capacity, and current power request status of each device. Simultaneously, it can combine device identification, user-defined priorities, or system policies to generate corresponding power demand parameters for each device. These power demand parameters can include power output, as well as requirements for power supply stability, response speed, etc. Through this method, a dataset of charging demand information for all connected devices can be obtained.

[0027] In another alternative embodiment, step S102 may include: By using a preset protocol isolation strategy, an independent protocol logic environment is established for each charging port; the charging demand information generated by each charging port in the protocol logic environment is uniformly mapped to a preset intermediate representation format.

[0028] Specifically, after identifying the target device and its cascaded devices, an independent protocol logic environment is established for each charging port through a preset protocol isolation strategy. In other words, each port independently performs communication, handshake, and charging request negotiation with the connected device within its own logic environment, thereby avoiding mutual interference between different protocols. For example, when one port is connected to a mobile phone (using the manufacturer's proprietary fast charging protocol) and another port is connected to a game console (using the standard PD protocol), each charging port maintains normal communication within its independent logic environment.

[0029] After completing independent protocol interactions, the charging demand information generated by each charging port within its protocol logic environment is uniformly mapped to a preset intermediate representation format. This intermediate representation format can be used to mask the differences between different protocols, including but not limited to: target power demand value, expected voltage level, expected current upper limit, charging stage status parameters, etc. In this way, the charging demand information of different devices can be normalized, allowing subsequent allocation algorithms to perform power allocation calculations at a unified data level.

[0030] S103. Based on the charging demand information, the total available charging power of the power supply equipment is dynamically allocated and calculated using a pre-configured allocation algorithm, and a power allocation scheme for each charging port is generated. Constraints are set based on the total available charging power provided by the current power supply equipment. Then, the charging demand information obtained in step S102 is input into a pre-configured allocation algorithm for calculation. The allocation algorithm can be based on mathematical optimization or intelligent search methods, such as linear programming, heuristic algorithms, or genetic growth algorithms. Its core objective is to allocate reasonable power values ​​to each charging port while satisfying the total power constraint. After calculation, a power allocation scheme is obtained, indicating the target power level of each charging port and the corresponding voltage and current parameters. This power allocation scheme can be dynamically updated as the device state changes, thereby achieving real-time optimization of the charging process.

[0031] S104. Control the power supply status of each charging port based on the power allocation scheme.

[0032] The target power in the power allocation scheme is converted into corresponding control commands and sent to the drive circuit. Specifically, this can be achieved by controlling the on / off state of the power switching transistors and adjusting the operating state of the drive devices, so that the voltage and current output by each charging port conform to the set values ​​in the power allocation scheme. If an overload, overheating, or device removal occurs at a charging port during operation, the output parameters of the corresponding charging port can be adjusted, and the power allocation calculation can be re-executed.

[0033] In one optional implementation, step S104 may specifically include: The power supply status of each charging port is controlled based on a power allocation scheme, and the on / off state of the corresponding power switches is controlled by gallium nitride (GaN) driver devices to output the target allocated power. By utilizing the high-frequency driving characteristics and low conduction losses of GaN devices, dynamic power allocation is achieved while improving energy conversion efficiency, reducing device heat generation, and enhancing the overall system's power response speed and stability.

[0034] Based on the above embodiments, this application further provides a typical application scenario to help those skilled in the art better understand the applicability and technical effects of this method. It should be understood that the following application scenario is merely illustrative and does not constitute a limitation on the scope of protection of this application.

[0035] In a specific application scenario, when a user is performing rendering operations on a laptop, the power load suddenly rises to 100W. Under a traditional fixed power allocation scheme, insufficient power allocation may cause the processor to throttle, thus affecting the user experience.

[0036] In this embodiment, by monitoring the power demand information of the charging port in real time, a sudden increase in the power demand of the charging port corresponding to the laptop is identified. At this time, 20W of allocated power is automatically recovered from the charging port corresponding to the mobile phone, which is in a low-load state. At the same time, the internal energy storage capacitor is further activated to compensate for the instantaneous power gap of 5W, thereby ensuring that the laptop port can obtain a power supply close to its actual needs. Through this process, the laptop continues to operate normally during high-load rendering, avoiding performance fluctuations caused by insufficient power.

[0037] In an optional embodiment, to more clearly illustrate the implementation of step S103, this application provides a specific embodiment. This embodiment, by quantitatively collecting the demand information of each device and combining it with a preset allocation algorithm and iterative optimization strategy, can reasonably determine the power supply parameters of each charging port when the total available power is limited. This not only improves the accuracy and adaptability of power allocation but also maintains the stability of the charging system in complex multi-device scenarios.

[0038] See Figure 2 The following is a specific embodiment of step S103, which includes: S1031. Construct a demand dataset based on the power demand parameters, device priority factors, battery state factors, and port temperature factors of each target device and its cascaded devices in the charging demand information. In this step, power demand information is collected for each device connected to the charging port. This information may include the device's current power demand parameters, battery state of charge (SOC), port temperature, and device priority. Corresponding factors are then determined, including a device priority factor, a battery state of charge factor, and a port temperature factor. These parameters are compiled into a unified demand dataset, with each device corresponding to a set of parameters, for subsequent allocation calculations. This demand dataset can be represented in matrix or tabular form.

[0039] Specifically, the above factors are used to reflect the importance of the target device during the charging process, the urgency of the current energy demand, and the safety of the port operating environment.

[0040] Specifically, the battery state factor can be calculated using the following formula: ; in, The battery state factor is represented by exp, the natural exponential function is represented by k, the slope parameter is represented by 10, the threshold parameter is represented by θ, and SOC represents the state of charge.

[0041] S1032. Based on the demand dataset, establish an allocation algorithm. The allocation algorithm takes the total available power of the power supply equipment as a constraint and the allocated power value of each charging port as the objective. Based on the demand dataset obtained in step S1031, a power allocation algorithm is established. The allocation algorithm uses the total available power of the power supply equipment as a constraint and the allocated power value of each charging port as the objective. Various parameters (device priority, battery capacity, port temperature, etc.) can be processed through weighting or other methods to achieve reasonable power allocation. The algorithm can be mathematical programming, iterative optimization, or other suitable computational methods, with the goal of balancing the charging needs of each device with the constraints.

[0042] S1033. Calculate the power allocation value of each charging port through iterative optimization until the preset convergence condition is met or the preset number of iterations is reached. The power allocation scheme is iteratively optimized. Each iteration adjusts the power allocation based on the deviation between the current power value and the constraints until the preset convergence condition is met or the maximum number of iterations is reached. Through iterative optimization, the power requirements of each device can be met as much as possible under the condition of limited total available power, while taking into account device priority and the safety of charging ports.

[0043] S1034. Generate the power supply voltage and current parameters corresponding to each charging port based on the converged power allocation value to obtain the power allocation scheme.

[0044] Based on the results of iterative optimization, a power allocation scheme for each charging port is generated, including the corresponding supply voltage and current parameters. The power allocation scheme is then sent to the drive circuit to realize the actual power supply to the charging port. If load changes, device connection issues, or abnormal temperatures are detected during operation, steps S1031 to S1034 can be re-executed to achieve dynamic adjustment.

[0045] Based on the above embodiments, the allocation algorithm can further be the ant colony algorithm, see [reference]. Figure 3 The implementation of this allocation algorithm may include the following specific sub-steps: S201. Each charging port and its corresponding target device are used as nodes of the ant colony algorithm. Each node contains device ID, target power requirement value, and status information. The status information includes device priority, battery power status, and port temperature. In implementation, each charging port and its corresponding target device are abstracted as nodes in the ant colony algorithm. Each node includes a device identifier (ID), a target power requirement, and status information, which at least includes device priority, battery power status, and port temperature. In this way, the actual charging needs of the devices are transformed into modeling objects that can be processed by the ant colony algorithm.

[0046] S202. Use the power supply path impedance and power adaptability of each power supply path as edge weights. Between each node, edge weights are set based on the characteristics of the power supply path. These weights include the power supply path impedance and power adaptability. The power supply path is a logical connection representing the energy transfer relationship between the power supply equipment and the target equipment and its cascaded devices; this logical connection path is determined by device information and topology information. The power supply path impedance characterizes energy loss during transmission, and the power adaptability measures the degree to which the power supply path meets power requirements. By setting these edge weights, the algorithm can comprehensively consider the actual path characteristics and power supply effect during iteration.

[0047] In one possible implementation, power fit can be characterized by power margin or power satisfaction.

[0048] The power margin represents the available power remaining after the current allocation is completed, and it is calculated as follows: Power margin = Total available power - Total allocated power; When a device suddenly generates a high power demand (such as a laptop rendering task or running a high-performance game), by assessing the power margin, it can be quickly determined whether there is additional allocation space, and the remaining power can be prioritized to avoid the loaded device from throttling or lag. When multiple devices are connected simultaneously, the power margin can represent the remaining capacity after the overall power allocation, making it easy to dynamically allocate power to subsequent connected devices based on the remaining capacity.

[0049] Power satisfaction is used to represent the degree of matching between the actual power allocated to each charging port and its charging demand power. It is calculated as follows: Power satisfaction = Actual allocated power / Charging demand power.

[0050] When both high-priority and low-priority devices need to be served simultaneously, power sufficiency can intuitively reflect the demand satisfaction of each device, thus providing an allocation basis for optimization algorithms and ensuring that critical devices receive the required power first. When devices with different protocols (such as fast-charging phones and game consoles) are connected simultaneously, power sufficiency calculation can quantify the power supply satisfaction of each device, preventing any device from being completely unable to obtain power.

[0051] S203. In each iteration, the power demand parameters of each target device and its cascaded devices are corrected by the device priority factor, battery status factor and port temperature factor. In each iteration, the system dynamically adjusts the power demand parameters of each device based on the factors in step S201. For example, when a device has a higher priority or a lower battery level, its weight can be increased; when the port temperature exceeds a threshold, its weight can be decreased accordingly. This adjustment process ensures the rationality of power allocation under multi-dimensional constraints.

[0052] S204. Generate candidate power allocation schemes based on the corrected power demand parameters; Based on the revised power demand parameters, several candidate power allocation schemes are generated. Each candidate allocation scheme represents a set of possible power allocation values, which are used for subsequent pheromone calculation and updates.

[0053] S205. Calculate the pheromone increment based on the candidate power allocation scheme, and update the pheromone matrix of the corresponding path based on the pheromone increment.

[0054] The pheromone increment is calculated based on the candidate power allocation schemes and then updated in the pheromone matrix of the corresponding power supply path. The pheromone increment reflects the merits of the candidate power allocation schemes in terms of efficiency and matching degree. The update of the pheromone matrix can guide the ant colony algorithm to be more inclined to choose the better power supply path in subsequent iterations.

[0055] See Figure 4 Furthermore, in one specific implementation, in step S205, the pheromone matrix can be updated in the following way: S2051. Based on the candidate power allocation scheme, determine the corresponding operating performance indicators; Based on the candidate power allocation schemes, the corresponding operating performance indicators are determined; the operating performance indicators may include power satisfaction, power margin, port temperature stability indicators, or other parameters that can reflect the rationality of the allocation.

[0056] S2052. Calculate the pheromone increment based on the ratio of the operating performance index to the preset benchmark value; The pheromone increment is calculated based on the ratio of the operating performance index to the preset benchmark value; where the preset benchmark value can be the performance index value of the historical best allocation scheme or the target performance threshold set by the system.

[0057] Specifically, the pheromone increment is calculated as follows: Δτ = γ × (η_act / η_max); Where Δτ represents the pheromone increment, γ is the adjustment factor, η_act represents the actual transmission efficiency under the power allocation scheme, and η_max represents the theoretical maximum efficiency; The pheromone matrix is ​​updated as follows: τ=M / N; Where τ represents the pheromone matrix, M represents the difference between the current total available power and the allocated power, and N represents the number of power supply paths.

[0058] S2053. In the current iteration, update the corresponding pheromone matrix for each power supply path traversed based on the pheromone increment.

[0059] In the current iteration, the pheromone matrix is ​​updated for each power supply path traversed based on the pheromone increment. The pheromone content of power supply paths corresponding to candidate power allocation schemes with superior performance is enhanced, thereby increasing their probability of being selected in subsequent iterations. Through this implementation, the probability distribution of pheromones can be dynamically adjusted during the iteration process, causing the power allocation results to gradually converge towards a direction that better meets device requirements and system constraints.

[0060] S206. When the preset convergence condition or the preset number of iterations is reached, output the power distribution value of each charging port.

[0061] When the preset number of iterations is reached or the preset convergence condition is met, the iteration terminates, and the allocated power value for each charging port is output. This output result serves as the final power allocation scheme, which is further converted into drive commands to control the actual power supply circuit.

[0062] Based on the foregoing embodiments, a specific practical example is provided below for illustration: In one possible application scenario, assume the system's total available power is 120W, and three types of devices are connected simultaneously: a laptop, a smartphone, and a tablet.

[0063] In step S1031, the power demand information of each device is first collected. The current demand of the laptop is 90W, the battery status is 30%, and the device priority factor is high; the demand of the smartphone is 30W, the battery status is 10%, and the battery status factor is medium; the demand of the tablet is 25W, the battery status is 70%, and the battery status factor is low. Simultaneously, the port temperatures of the laptop and mobile phone are within the normal range, while the port temperature of the tablet is close to the upper limit. The resulting demand dataset reflects the power demands, priorities, and constraints of the three types of devices.

[0064] In step S1032, an allocation algorithm is established based on the demand dataset. The algorithm uses a total available power of 120W as a constraint, aiming to allocate appropriate power values ​​to each device without exceeding the power limit. At this point, priority is given to the high demand and high priority of laptops and mobile phones, while power allocation to tablet ports is limited to prevent further temperature increases.

[0065] In step S1033, an iterative optimization method is used for calculation. The initial allocation might be 90W for the laptop, 20W for the mobile phone, and 10W for the tablet, totaling 120W. After multiple iterations and adjustments, it was found that the tablet's port temperature exceeded the limit at a higher risk. Therefore, the power allocation for the tablet was gradually reduced, while the power allocation for the mobile phone was moderately increased to better meet its needs. The final converged power allocation scheme is: 85W for the laptop, 25W for the mobile phone, and 10W for the tablet, totaling 120W.

[0066] In step S1034, based on the final converged power allocation value, corresponding output parameters are generated, such as 20V / 4.25A output for the laptop port, 5V / 5A output for the mobile phone port, and 5V / 2A output for the tablet port. After this scheme is sent to the driver circuit, each device enters a stable charging state. If the laptop load increases or the tablet temperature returns to normal during operation, steps S1031 to S1034 can be re-executed to dynamically adjust the power allocation in real time.

[0067] In another alternative embodiment, this application provides an implementation method for detecting the topology information of the connected device via the CC pin. See also... Figure 5 In this embodiment, step S101 may include the following sub-steps: S1011. Initiate a topology probe request through the CC pin of the power supply device and obtain device information of the target devices directly connected to each charging port; The topology probe request is initiated through the CC pin of the power supply device, and the device information of the target devices directly connected to each charging port is obtained. The device information may include device identifier, power supply role information, supported power supply protocol types such as PD2.0 and PD3.0, and maximum power capability.

[0068] After the target device is connected to the port, a topology probe request is initiated via the CC pin. Specifically, the impedance changes of the CC pin under different connection states can be detected, and the type of the connected device can be identified based on the impedance characteristic value.

[0069] Specifically, when the detected impedance change value is within the preset threshold range of the direct connection mode, the port can be determined to be connected to a single target device; when the detected impedance change value matches the preset Hub mode characteristic value, the port is determined to be connected to a Hub device, and the Hub level is determined according to the difference in impedance levels, such as a first-level Hub, a second-level Hub, etc.

[0070] S1012. Based on device information, obtain the cascade device information of the target device and its cascaded devices by calling the preset topology detection interface; Based on the device information, the cascading information of the target device can be further obtained by calling the preset topology detection interface. The cascading information can be fed back by the target device or obtained by parsing the link topology structure, and is used to identify the cascading devices connected downstream of the target device.

[0071] In an optional embodiment, step S1012 may specifically include: after acquiring the basic information of the target device, calling a preset topology detection interface through the charging port to send a topology detection request to the target device using the TDP (Topology Discovery Protocol). When the target device is a Hub-type device, it can return the device information of its downstream ports after receiving the topology detection request. The device information may include the device identifier, power requirement parameters, power supply capability parameters, and protocol compatibility information of the downstream device.

[0072] Furthermore, based on the returned device information, topology probing can be performed level by level on lower-level cascaded devices. In this way, the system can recursively acquire information on multi-level cascaded devices, thereby constructing a hierarchical topology. In one scenario, it can support the identification of four levels of cascaded devices.

[0073] S1013. Based on device information and cascaded device information, generate topology information by calling the preset power policy interface.

[0074] Based on device information and cascaded device information, topology information is generated by calling a preset power policy interface. The topology information describes the connection relationship, power supply direction and available power capacity between devices, providing input data for subsequent power allocation.

[0075] In this embodiment, the topology information identification process can be implemented through a decoupled design between the hardware layer and the protocol layer. Specifically, at the hardware level, communication is completed through the CC pin of the standard Type-C interface, which is not dependent on a specific main control chip, making the method portable and universal across different hardware platforms. At the protocol level, a layered architecture design can be adopted, dividing the topology detection process into a physical layer, a protocol parsing layer, and an application layer. The core topology detection can be implemented through three preset API interfaces: TDP_ScanTopology(): Used to initiate a topology scan request; TDP_GetDeviceInfo() (the aforementioned topology detection interface): used to obtain attribute information of the target device and its cascaded devices; TDP_SetPowerPolicy() (the aforementioned power policy interface): is used to configure the corresponding power supply policy based on topology information and device attributes.

[0076] For example, in a typical application scenario, a docking station device is detected via the CC pin. This docking station, acting as the target device, is directly connected to the power supply and reports its device identifier and maximum power requirement of 60W. Further, a topology probe request reveals that a laptop (90W requirement) and a mobile phone (30W requirement) are cascaded below this docking station. The resulting topology information is: "Host Port → Docking Station → {Laptop, Mobile Phone}", recording the power requirement parameters and power supply role of each node. This topology information is then passed as input to the power allocation algorithm for subsequent allocation calculations and power control.

[0077] The foregoing embodiments have described in detail the method provided in this application. The embodiments of the apparatus provided in this application are described below.

[0078] See Figure 6 This application provides an embodiment of a multi-device dynamic charging control device, comprising: Topology identification unit 601 is used to identify the device information of the target device and the topology information of the cascaded devices of each charging port connected to the power supply equipment. The charging demand determination unit 602 is used to determine the charging demand information of each target device and its cascaded devices based on device information and topology information. The dynamic calculation unit 603 is used to dynamically calculate the total available charging power of the power supply equipment based on the charging demand information and through a pre-configured allocation algorithm, and generate a power allocation scheme for each charging port. The charging control unit 604 is used to control the power supply status of each charging port based on the power distribution scheme.

[0079] Optionally, the dynamic computing unit 603 is specifically used for: A demand dataset is constructed based on the power demand parameters, device priority factors, battery status factors, and port temperature factors of each target device and its cascaded devices in the charging demand information. Based on the demand dataset, an allocation algorithm is established. The allocation algorithm takes the total available charging power of the power supply equipment as a constraint and the allocated power value of each charging port as the objective. The power allocation value of each charging port is calculated through iterative optimization until the preset convergence condition is met or the preset number of iterations is reached. Based on the converged power allocation values, the power supply voltage and current parameters corresponding to each charging port are generated to obtain the power allocation scheme.

[0080] Optionally, the dynamic computing unit 603 is specifically used for: Each charging port and its corresponding target device and cascaded devices are used as nodes of the ant colony algorithm. Each node contains device ID, target power requirement value, and status information, including device priority, battery power status, and port temperature. The power supply path impedance and power adaptability of each power supply path are used as edge weights. A power supply path is a logical connection representing the energy transfer relationship between the power supply equipment, the target equipment, and its cascaded devices. This logical connection path is determined by equipment information and topology information. During each iteration, the power requirement parameters of each target device and its cascaded devices are corrected by the device priority factor, battery status factor and port temperature factor. Candidate power allocation schemes are generated based on the revised power demand parameters; The pheromone increment is calculated based on the candidate power allocation scheme, and the pheromone matrix of the corresponding path is updated based on the pheromone increment. When the preset convergence condition or the preset number of iterations is reached, the power allocation value of each charging port is output.

[0081] Optionally, power adaptability can be defined as power margin or power satisfaction. Power margin = Total available power - Total allocated power; Power satisfaction = Actual allocated power / Charging demand power.

[0082] Optionally, the pheromone increment is calculated based on the candidate power allocation scheme, and the pheromone matrix of the corresponding path is updated based on the pheromone increment, including: Based on the candidate power allocation schemes, the corresponding operating performance indicators are determined; The pheromone increment is calculated based on the ratio of the operating performance index to the preset benchmark value. In the current iteration, the corresponding pheromone matrix is ​​updated according to the pheromone increment for each power supply path traversed.

[0083] Optionally, the topology identification unit 601 is specifically used for: Initiate a topology probe request through the CC pin of the power supply device and obtain device information of the target devices directly connected to each charging port; Based on device information, the target device and its cascaded devices information are obtained by calling a preset topology detection interface; Based on device information and cascaded device information, topology information is generated by calling a preset power policy interface.

[0084] Optionally, the charging control unit 604 is specifically used for: The target power allocation for each charging port in the power allocation scheme is converted into corresponding drive control commands. The on / off state of the corresponding power switch is controlled by drive control commands to output the target power.

[0085] Please see Figure 7 This application also provides a multi-device dynamic charging control device, comprising: Processor 701, memory 702, input / output unit 703, bus 704; The processor 701 is connected to the memory 702, the input / output unit 703, and the bus 704; The memory 702 stores a program, and the processor 701 calls the program to execute any of the methods described above.

[0086] This application also relates to a computer-readable storage medium on which a program is stored, which, when run on a computer, causes the computer to perform any of the methods described above.

[0087] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0088] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0089] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0090] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0091] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A multi-device dynamic charging control method, characterized in that, The method includes: Identify the device information of the target devices and the topology information of their cascaded devices at each charging port connected to the power supply equipment; Based on the device information and the topology information, the charging demand information of each target device and its cascaded devices is determined; Based on the charging demand information, the total available charging power of the power supply equipment is dynamically allocated and calculated using a pre-configured allocation algorithm, and a power allocation scheme for each charging port is generated. The power supply status of each charging port is controlled based on the power allocation scheme.

2. The multi-device dynamic charging control method according to claim 1, characterized in that, The step of dynamically allocating and calculating the total available charging power of the power supply equipment based on the charging demand information using a pre-configured allocation algorithm, and generating a power allocation scheme for each charging port, includes: A demand dataset is constructed based on the power demand parameters, device priority factors, battery status factors, and port temperature factors of each target device and its cascaded devices in the charging demand information. Based on the demand dataset, an allocation algorithm is established, which takes the total available charging power of the power supply equipment as a constraint and the allocated power value of each charging port as the objective. The power allocation value of each charging port is calculated through iterative optimization until a preset convergence condition is met or a preset number of iterations is reached. Based on the converged power allocation values, the power supply voltage and current parameters corresponding to each charging port are generated to obtain the power allocation scheme.

3. The multi-device dynamic charging control method according to claim 2, characterized in that, The allocation algorithm is an ant colony algorithm. The step of calculating the allocated power value for each charging port through iterative optimization until a preset convergence condition is met or a preset number of iterations is reached includes: Each of the charging ports and the corresponding target devices and their cascaded devices are used as nodes of the ant colony algorithm. Each node includes a device ID, a target power requirement value, and status information, including device priority, battery power status, and port temperature. The power supply path impedance and power adaptability of each power supply path are used as edge weights. The power supply path is a logical connection path that represents the energy transfer relationship between the power supply equipment and the target equipment and its cascaded equipment. The logical connection path is determined by the equipment information and the topology information. During each iteration, the power requirement parameters of each target device and its cascaded devices are corrected using the device priority factor, battery status factor, and port temperature factor. Candidate power allocation schemes are generated based on the revised power demand parameters; The pheromone increment is calculated based on the candidate power allocation scheme, and the pheromone matrix of the corresponding path is updated based on the pheromone increment. When the preset convergence condition or the preset number of iterations is reached, the allocated power value of each of the charging ports is output.

4. The multi-device dynamic charging control method according to claim 3, characterized in that, The power adaptability refers to the power margin or the power satisfaction. The power margin = total available power - total allocated power; The power satisfaction rate = actual allocated power / charging demand power.

5. The multi-device dynamic charging control method according to claim 3, characterized in that, The step of calculating the pheromone increment based on the candidate power allocation scheme and updating the pheromone matrix of the corresponding path based on the pheromone increment includes: Based on the candidate power allocation scheme, the corresponding operating performance indicators are determined; The pheromone increment is calculated based on the ratio of the aforementioned performance index to a preset benchmark value. In the current iteration, for each power supply path traversed, the corresponding pheromone matrix is ​​updated according to the pheromone increment.

6. The multi-device dynamic charging control method according to any one of claims 1 to 5, characterized in that, The identification of the target device information and the topology information of its cascaded devices at each charging port of the power supply equipment includes: Initiate a topology probe request through the CC pin of the power supply device and obtain device information of the target devices directly connected to each charging port; Based on the device information, the target device and its cascaded devices' cascaded device information are obtained by calling a preset topology detection interface; Based on the device information and the cascaded device information, topology information is generated by calling a preset power policy interface.

7. The multi-device dynamic charging control method according to any one of claims 1 to 5, characterized in that, The control of the power supply status of each charging port based on the power allocation scheme includes: The target allocated power of each charging port in the power allocation scheme is converted into a corresponding drive control command; The drive control command controls the on / off state of the corresponding power switch to output the target power allocation.

8. A multi-device dynamic charging control device, characterized in that, include: The topology identification unit is used to identify the device information of the target device and the topology information of the cascaded devices at each charging port connected to the power supply equipment. A charging demand determination unit is used to determine the charging demand information of each target device and its cascaded devices based on the device information and the topology information. The dynamic calculation unit is used to dynamically calculate the total available charging power of the power supply equipment based on the charging demand information and through a pre-configured allocation algorithm, and generate a power allocation scheme for each of the charging ports. A charging control unit is used to control the power supply status of each of the charging ports based on the power distribution scheme.

9. A multi-device dynamic charging control device, characterized in that, The device includes: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed on a computer, performs the method as described in any one of claims 1 to 7.