Charging module dynamic distribution method based on graph model and improved breadth-first search

By constructing a graph model and using an improved breadth-first search algorithm, the problem of low efficiency in dynamic allocation of power resources in charging systems is solved, enabling flexible power module allocation and efficient system scheduling, thereby improving the system's adaptability and energy efficiency.

CN121707285APending Publication Date: 2026-03-20SHENZHEN SINEXCEL ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610111179.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing charging systems suffer from problems such as low efficiency in dynamic allocation of power resources, rigid scheduling strategies, poor topology adaptability, weak fault tolerance, and insufficient energy efficiency in scenarios with multiple charging guns sharing a common environment.

Method used

A dynamic allocation method for charging modules based on graph model and improved breadth-first search is adopted. The power modules in the charging system are abstracted as vertices in a directed graph, and the connecting contactors are abstracted as edges to construct a graph model G=(V,E). When the system state changes, the power scheduling process is triggered, and the improved breadth-first search algorithm is used for traversal allocation, responding to abnormal states in real time and dynamically updating the graph model.

Benefits of technology

It achieves efficient and flexible dynamic allocation of power modules, reduces computational overhead, adapts to any physical topology, supports differentiated scheduling strategies, improves power utilization and system efficiency, and meets the real-time scheduling requirements of multi-charging gun sharing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707285A_ABST
    Figure CN121707285A_ABST
Patent Text Reader

Abstract

The invention provides a charging module dynamic allocation method based on a graph model and improved breadth-first search, and the method comprises the following steps: S1, abstracting a power module in a charging system into a vertex set V in a directed graph, and respectively modeling the power module and a connection contactor into vertexes and edges in the directed graph, constructing a dynamic updatable graph model; triggering an event-driven scheduling process when the system state changes, adopting a multi-source step-by-step improved breadth-first search algorithm, combining charging gun activation control and a configurable priority strategy, and arbitrating and allocating a unique available power module round by round; meanwhile, abnormal conditions such as connection contactor adhesion, operation rejection and module faults are processed in real time, and a graph model is dynamically reconstructed to guarantee continuous operation of the system; and after basic requirements are met, an idle module is called based on a load rate threshold value, and the system energy efficiency is optimized. The method has the advantages of low calculation overhead, strong topology adaptability, flexible scheduling capability and high power utilization rate, and is suitable for a high-density intelligent charging scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electric vehicle charging control, more particularly, to a charging module dynamic allocation method based on a graph model and an improved breadth-first search. BACKGROUND

[0002] With the rapid popularization of new energy vehicles, the scale and complexity of electric vehicle charging infrastructure continue to increase. To meet the charging needs of multiple vehicles concurrently, high power and high efficiency, modern charging systems generally adopt modular design, dynamically combining multiple schedulable power modules to provide flexible power output for different charging terminals.

[0003] Currently, various power distribution and charging control schemes have been proposed in the industry. For example, the "charging module allocation method based on path optimization" proposed by some schemes attempts to construct a connection path graph between power modules and charging terminals, and to schedule modules with the shortest path or optimal weight. However, this scheme has obvious limitations: first, it only supports single-specification power modules, lacking compatibility for heterogeneous modules; second, in the event of adhesion failure of the connection contactor, the relevant modules will be completely disabled, and the system fault tolerance is poor; third, the computational complexity of the path optimization algorithm increases exponentially with the number of terminals and modules, making it difficult to support real-time scheduling needs in high-concurrency scenarios, especially when multiple charging guns are started simultaneously or the state changes suddenly, which can cause calculation delays and affect the timeliness of allocation.

[0004] Another scheme proposes a "charging control device based on power distribution" that supports multiple power topologies, but its adaptation relies on pre-configured settings and lacks dynamic adjustment capabilities. More importantly, this scheme assumes that all power modules have the same rated power (e.g., 30kW), and in practical scenarios where different specifications of modules (e.g., 30kW and 60kW coexist) are mixed, if the power accumulation logic is not manually modified, the allocation results will deviate significantly from the actual needs, leading to insufficient power supply for terminals or resource waste, limiting the scalability and engineering practicality of the system.

[0005] Another scheme proposes a "power distribution method for charging equipment" that introduces a periodic dynamic adjustment mechanism, but it has a response lag problem when dealing with instantaneous power demand changes. When the number of vehicles changes, it is forced to switch to the "average distribution" mode, which simplifies the transition logic but ignores the differences in battery status, charging phase, and user needs of each vehicle, resulting in a decrease in charging efficiency in the short term. In addition, this scheme does not introduce user priority or personalized strategies, making it unable to support VIP users, emergency power replenishment, and other differentiated service scenarios, limiting flexibility and intelligence. SUMMARY

[0006] The technical problems solved by the present application are that, in view of the deficiencies of the above technical solutions, a charging module dynamic allocation method based on a graph model and an improved breadth-first search is provided to solve the problems of low power resource dynamic allocation efficiency, rigid scheduling strategy, poor topology adaptability, weak abnormal fault tolerance capability, and insufficient energy efficiency utilization rate in a multi-charging gun shared charging system.

[0007] The present application provides a charging module dynamic allocation method based on a graph model and an improved breadth-first search, which comprises the following steps: S1, abstract the power modules in the charging system as a vertex set V in a directed graph, each vertex having a capacity value representing its output power; abstract the connection contactors connecting between the power modules or between the power modules and the charging guns as an edge set E in the directed graph, thereby constructing a graph model G=(V,E); S2, when it is detected that a charging gun receives a charging request, the state of any power module changes, the state of any connection contactor abnormally changes, or the topology structure of the charging system changes, trigger a power scheduling process; S3, take one or more charging guns associated with the vertices as root vertices, and use a multi-source step improved breadth-first search algorithm to perform traversal allocation operations in the graph model G=(V,E), including the following iteration process: (a0) According to the preset charging gun activation configuration, determine the set of charging guns participating in traversal in the current round, and the charging guns not activated do not participate in the selection of candidate vertices in this round; (a1) For each charging gun participating in traversal and not yet meeting the power demand, take the current vertex of the charging gun as the starting point, and in the adjacent vertices reachable by the charging gun, select a candidate vertex according to the preset scheduling priority strategy; (b) From all candidate vertices, determine a unique target vertex for allocation according to the scheduling priority strategy, add the capacity value of the target vertex to the allocated power of the corresponding charging gun, and mark the vertex as occupied to prevent it from being allocated by other charging guns; (c) According to the gap between the current power demand and the allocated power of each charging gun, dynamically adjust the priority order of each charging gun in the subsequent round; (d) Repeat steps (a0) to (c), allocate only one vertex per round, until the power demand of all charging guns is met, or there is no vertex that can be allocated in the system; The scheduling priority strategy is configured based on at least one of the following: contactor number, charging gun priority, power module priority, user-defined rules, or the current power deficit ratio of each charging gun. S4, during the traversal process, responds in real time to abnormal system states and dynamically updates the graph model G=(V,E), including: If adhesion is detected in the connecting contactor, the two vertices connected to the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and their adjacent edge relationships are merged accordingly. If a failure to operate is detected in the connecting contactor, the edge corresponding to the connecting contactor is disconnected in the graphical model G=(V,E); If a power module malfunction is detected, the capability value of its corresponding vertex is set to zero. S5, after the basic power requirements of all charging guns are met, if the ratio of the current total input power of the system to the sum of the rated power of all allocated power modules is less than a preset load rate threshold, then idle power modules will continue to be called to make the power modules operate in the optimal energy efficiency range; wherein, the load rate threshold is a preset lower limit of power utilization rate used to trigger energy efficiency optimization.

[0008] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention; in step S1, the capability value is the rated output power or currently available output power of the corresponding power module, and the capability values ​​of different vertices are independent of each other and are allowed to take different values; the graph model G=(V,E) adapts to any physical connection topology, and the arbitrary physical connection topology includes at least one of full matrix type, ring type and tree type.

[0009] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention; in step S2, the state of the power module changes, including switching between enabled, disabled, or fault states; the state of the connecting contactor becomes abnormal, including sticking or refusing to operate; the topology of the charging system changes, including adding or removing power modules, changing the physical connection relationship of the connecting contactor, or adjusting the connection relationship between the charging gun and the power module.

[0010] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, in step S3, the improved breadth-first search algorithm prioritizes the shortest electrical path during traversal to minimize the number of contactor actions and the power transmission path length.

[0011] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, in the sub-step (a0) of step S3, the system dynamically adjusts the activation state of each charging gun according to a preset scheduling strategy, so that high-priority charging guns are configured to continuously participate in multiple rounds of traversal, and low-priority charging guns are intermittently disabled.

[0012] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, the reachable adjacent vertex in sub-step (a1) of step S3 refers to a vertex that meets the following conditions: it is connected to the current vertex through a connecting contactor that has not failed to move, has not been disconnected, and has not failed due to adhesion, and is not marked as occupied.

[0013] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, in sub-step (b) of step S3, when multiple candidate vertices have the same priority, the vertex with the largest capability value is selected as the target vertex for allocation.

[0014] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, the dynamic adjustment of the priority order of each charging gun in subsequent rounds in sub-step (c) of step S3 includes: increasing the priority weight of charging guns with larger power gap ratios in subsequent traversals according to the power gap ratio of each charging gun.

[0015] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, when adhesion of the connecting contactor is detected in step S4, the two vertices connected by the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and its set of adjacent edges is the union of the adjacent edges of the original two vertices. Self-loop edges and duplicate edges generated by merging are removed.

[0016] In the dynamic allocation method for charging modules based on graph model and improved breadth-first search described in this invention, the load rate threshold in step S5 is a value between 0.6 and 0.9, which is used to enable the power module to operate in the optimal energy efficiency range.

[0017] The dynamic allocation method for charging modules based on a graph model and an improved breadth-first search in this invention abstracts power modules as vertices in a directed graph and connecting contactors as edges, constructing a graph model G=(V,E). When a charging request, power module state change, connecting contactor malfunction, or system topology change is detected, a power scheduling process is triggered. Using one or more vertices associated with charging guns as root vertices, a multi-source, step-by-step improved breadth-first search algorithm is used to perform traversal allocation: in each round, charging guns participating in the traversal are selected according to a preset charging gun activation configuration. A unique target vertex is determined from all candidate vertices based on a configurable scheduling priority strategy (including connecting contactor number, charging gun priority, power module priority, user-defined rules, or power gap ratio) for allocation, and this vertex is marked as occupied. Simultaneously, the priority order of subsequent rounds is dynamically adjusted according to the power gap of each charging gun. During the traversal process, real-time responses are made to anomalies such as connecting contactor adhesion (merging corresponding vertices), refusal to operate (disconnecting corresponding edges), or power module failure (setting vertex capability values ​​to zero), dynamically updating the graph model accordingly. After meeting the basic power requirements of all charging guns, if the system load rate is lower than a preset threshold, idle power modules are invoked to ensure the system operates within its optimal energy efficiency range. This application offers advantages such as low computational overhead, adaptability to arbitrary physical topologies, support for differentiated scheduling strategies, and high power utilization, making it suitable for intelligent charging systems with multiple charging guns sharing a power pool. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating an embodiment of the dynamic allocation method for charging modules based on a graph model and an improved breadth-first search according to the present invention.

[0019] Figure 2 This is a schematic diagram of the mapping between the physical topology of the charging system and the graph model in the dynamic allocation method for charging modules based on graph model and improved breadth-first search of this invention; Figure 3 This is a schematic diagram of the dynamic update of the graph model under the fault of the connecting contactor adhesion in the dynamic allocation method of charging module based on graph model and improved breadth-first search of the present invention. Figure 4 This is a schematic diagram of the multi-round power module allocation process in the dynamic allocation method for charging modules based on graph models and improved breadth-first search of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] like Figures 1-4 As shown, Figure 1 This is a flowchart illustrating an embodiment of a dynamic charging module allocation method based on a graph model and an improved breadth-first search according to the present invention. The method provides a dynamic charging module allocation method based on a graph model and an improved breadth-first search, the method comprising the following steps: In step S1, the power modules in the charging system are abstracted as a set of vertices V in a directed graph, each vertex having a capability value that represents its output power; the connecting contactors that connect the power modules or the power modules and the charging gun are abstracted as a set of edges E in the directed graph, thereby constructing a graph model G=(V,E). In step S2, when a charging gun receives a charging request, the state of any power module changes, the state of any connecting contactor becomes abnormal, or the topology of the charging system changes, the power scheduling process is triggered. In step S3, using the vertices associated with one or more charging guns that initiated charging requests as root vertices, a multi-source, step-by-step improved breadth-first search algorithm is used to perform a traversal and allocation operation in the graph model G=(V,E), including the following iterative process: (a0) Based on the preset charging gun activation configuration, determine the set of charging guns that participate in the traversal in the current round. Unactivated charging guns do not participate in the candidate vertex selection in this round. (a1) For each charging gun that participates in the traversal and whose power demand has not yet been met, starting from the vertex where the charging gun is currently located, select a candidate vertex from the adjacent vertices that the charging gun can reach, according to a preset scheduling priority strategy. (b) From all candidate vertices, determine a unique target vertex for allocation according to the scheduling priority strategy, add the capability value of the target vertex to the allocated power of the corresponding charging gun, and mark the vertex as occupied, prohibiting it from being allocated by other charging guns; (c) Based on the gap between the current power demand of each charging gun and the allocated power, dynamically adjust the priority order of each charging gun in subsequent rounds; (d) Repeat steps (a0) to (c), assigning only one vertex per round, until the power requirements of all charging guns are met, or there are no vertices to be assigned in the system; The scheduling priority strategy is configured based on at least one of the following: contactor number, charging gun priority, power module priority, user-defined rules, or the current power shortage ratio of each charging gun is occupied and cannot be allocated by other charging guns. In step S4, during the traversal process, the system responds to abnormal states in real time and dynamically updates the graph model G=(V,E), including: If adhesion is detected in the connecting contactor, the two vertices connected to the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and their adjacent edge relationships are merged accordingly. If a failure to operate is detected in the connecting contactor, the edge corresponding to the connecting contactor is disconnected in the graphical model G=(V,E); If a power module malfunction is detected, the capability value of its corresponding vertex is set to zero. In step S5, after the basic power requirements of all charging guns are met, if the ratio of the current total input power of the system to the sum of the rated power of all allocated power modules is less than a preset load rate threshold, then idle power modules will continue to be called to make the power modules operate in the optimal energy efficiency range; wherein, the load rate threshold is a preset lower limit of power utilization rate used to trigger energy efficiency optimization.

[0023] In one embodiment, the capability value in step S1 is the rated output power or currently available output power of the corresponding power module, and the capability values ​​of different vertices are independent of each other and are allowed to take different values; the graph model G=(V,E) adapts to any physical connection topology, and the arbitrary physical connection topology includes at least one of full matrix type, ring type and tree type.

[0024] In one embodiment, the change in the state of the power module in step S2 includes switching between enabled, disabled, or faulty states; the abnormal state of the connection contactor includes sticking or refusing to operate; the change in the topology of the charging system includes adding or removing power modules, changing the physical connection relationship of the connection contactor, or adjusting the connection relationship between the charging gun and the power module.

[0025] In one embodiment, the improved breadth-first search algorithm in step S3 prioritizes the selection of the shortest electrical path during traversal to minimize the number of contactor actuations and the power transmission path length.

[0026] In one embodiment, in the sub-step (a0) of step S3, the system dynamically adjusts the activation state of each charging gun according to a preset scheduling strategy, so that high-priority charging guns are configured to continuously participate in multiple rounds of traversal, and low-priority charging guns are intermittently disabled.

[0027] In one embodiment, the reachable adjacent vertex in sub-step (a1) of step S3 refers to a vertex that meets the following conditions: it is connected to the current vertex by a connection contactor that has not failed to move, has not been disconnected, and has not failed due to adhesion, and has not been marked as occupied.

[0028] In one embodiment, in sub-step (b) of step S3, when multiple candidate vertices have the same priority, the vertex with the largest ability value is selected as the target vertex for allocation.

[0029] In one embodiment, the dynamic adjustment of the priority order of each charging gun in subsequent rounds in sub-step (c) of step S3 includes: increasing the priority weight of the charging gun with a larger power deficit ratio in subsequent traversals based on the power deficit ratio of each charging gun.

[0030] In one embodiment, when adhesion of the connecting contactor is detected in step S4, the two vertices connected by the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and its set of adjacent edges is the union of the adjacent edges of the original two vertices. Self-loop edges and repeated edges generated by the merging are removed.

[0031] In one embodiment, the load rate threshold in step S5 is a value between 0.6 and 0.9, used to enable the power module to operate in the optimal energy efficiency range. Specifically, the charging system in this embodiment includes 9 power modules (M1–M9) and 12 connecting contactors (KM1–KM12). Each power module has a default rated power of 30kW (heterogeneous configurations are also supported, such as M4=60kW). The charging gun G is connected to the end of the system. The above physical structure can be abstracted into a graphical model G=(V,E), where: The vertex set V = {v1, v2, v3, v4, v5, v6, v7, v8, v9}, where each vertex vi corresponds to a power module Mi, and its "capacity value" is the currently available output power of the power module (initially rated at 30kW); the edge set E consists of 12 pairs of directed edges, each pair corresponding to a contactor. KM1:<v1,v2> ,<v2,v1> ;

[0032] KM2:<v2,v3> , v3,v2>; KM3:<v1,v4> , v4,v1>; KM4:<v2,v5> ,<v5,v2> ; KM5:<v3,v6> ,<v6,v3> ; KM6:<v4,v5> ,<v5,v4> ; KM7:<v5,v6> , v6,v5>;

[0033] KM8:<v4,v7> ,<v7,v4> ;

[0034] KM11:<v5,v8> ,<v8,v5> ;

[0035] KM10:<v6,v9> ,<v9,v6> ;

[0036] KM11:<v7,v8> ,<v8,v7> ;

[0037] KM12:<v8,v9> ,<v9,v8> .

[0038] Charging gun binding relationship: The charging gun G7 is fixedly connected to the vertex v7; The charging gun G9 is fixedly connected to the vertex v9. This modeling approach transforms the power-sharing problem into a value-collection problem on a graph, providing a mathematical foundation for subsequent algorithms. The system monitors status changes in real time through a central controller. For example: when an electric vehicle plugs into charging gun G7, it requests 120kW; when it plugs into charging gun G9, it requests 20kW. When a power module malfunctions, for example, M5 enters a fault state due to overheating, the capability value of its corresponding vertex v5 is set to zero. The contactor malfunctions, for example, KM4 fails to operate, disconnecting the terminals v4 and v5; Operations by maintenance personnel can cause changes to the system topology, such as KM11 being permanently connected, which is equivalent to vertex v7 and v8 being connected in parallel.

[0039] When any of the above events occurs, the power scheduling process is immediately triggered. This event-driven mechanism reflects the scheduling characteristics of on-demand computation. Example of concurrent allocation of multiple charging guns G: Taking charging gun G7 (root vertex v7, power requirement 120kW, load rate threshold 0.8, total rated power of modules to be allocated ≥150kW) and charging gun G9 (root vertex v9, power requirement 20kW, total rated power ≥25kW) as examples, a multi-source step-by-step traversal allocation operation is performed in the graph model G=(V,E). The scheduling priority strategy adopts the ascending order of the connection contactor numbers.

[0040] First iteration: (Execute steps a0–d) (a0) In the preset activation configuration, charging guns G7 and G9 are always enabled, so they participate in this round of traversal; (a1) The charging gun G7 starts from the root vertex v7 and prioritizes allocating its own root vertex v7. Charging gun G9 starts from the root vertex v9 and similarly prioritizes its own allocation; (b) The charging gun G7 is assigned vertex v7 (M7, 30kW), v7 is marked as occupied, and the vertices v4 and v8 of the next layer of v7 are added to the candidate set in ascending order of the connected contactors. Therefore, the candidate set of G7 is {v4, v8}. The charging gun G9 is assigned vertex v9 (M9, 30kW), v9 is marked as occupied, and the vertices v6 and v8 of the next layer of v9 are added to the candidate set in ascending order of the connected contactors. Therefore, the candidate set of G9 is {v6, v8}. (c) Charging gun G7 cumulative power = 30kW, shortfall = 90kW; The cumulative power of the charging gun G9 is 30kW ≥ 25kW, which meets the demand, so it is removed from the subsequent scheduling. The G7 charging gun will continue to participate in the next round.

[0041] Second iteration: (Execute steps a0–c) (a0) Only charging gun G7 is activated, charging gun G9 is deactivated; (b) Select the first vertex v4 from the candidate set of charging gun G7; assign v4 (M4, 30kW), mark it as occupied, and add the unoccupied vertices v1 and v5 around v4 to the candidate set in ascending order of the connected contactors. Therefore, the candidate set is = {v8, v1, v5}. (c) The cumulative power of the charging gun G7 is 60kW, and the shortfall is 60kW.

[0042] Third iteration: (Execute steps a0–c) (a0) Only charging gun G7 is activated, charging gun G9 is deactivated; (b) Select the first vertex v8 from the G7 candidate set, assign vertex v8 (M8, 30kW), mark it as occupied, and add the unoccupied vertices v5 around v8 to the candidate set in ascending order of the connected contactors. However, v5 is already in the candidate set and does not need to be added again. Therefore, the candidate set is = {v1, v5,}. (c)G7 cumulative = 90kW; Fourth iteration: (Execute steps a0–c) (a0) Only activated for charging gun G7.

[0043] (b) Continue to allocate the first vertex v1 in the candidate set of v7 from the charging gun G7, allocate vertex v1 (M1, 30kW), mark it as occupied, and add the unoccupied vertices v2 around v1 to the candidate set in ascending order of the connected contactors. Therefore, the candidate set is = {v5, v2}.

[0044] (c) The cumulative power of charging gun G7 is 120kW, which meets the basic requirements; the system temporarily suspends the further allocation of charging gun G7 and enters the energy efficiency assessment stage.

[0045] Fifth iteration (supplementary traversal for energy efficiency optimization) (a0) Charging gun G7 was reactivated because the load rate did not meet the standard; (a1) The system detects that the current allocated power is 120kW < 150kW (load rate threshold requirement 0.8), triggering optimization; (b) Charging gun G7 continues to allocate the first vertex v5 in the candidate set of v7, allocates vertex v5 (M5, 30kW), marks it as occupied, and adds the unoccupied vertices v2 and v6 around v5 to the candidate set in ascending order of the contactors. Therefore, the candidate set is = {v2, v6}; (c) The cumulative power of the charging gun G7 distribution module is 150kW, maintaining an actual output of 120kW; The new load factor = 120 / 150 = 0.8, reaching the preset threshold; (d) The charging gun G7 meets the "basic requirements + energy efficiency requirements" and is completely removed from the scheduling process.

[0046] Throughout the process: Only one vertex is allocated per round; traversal of the same level is sorted according to the scheduling priority strategy (here, the contactor number is used for connection); if configured with user-defined rules such as "intermediate module priority", the strategy type can be switched; when multiple charging guns G are running concurrently, each charging gun G proposes candidates, and a unique target is determined globally according to the strategy to avoid conflicts.

[0047] During the traversal, the system responds to anomalies in real time and updates the graph model G=(V,E). If the connecting contactors are stuck together (e.g., KM10 is stuck together), then vertices v6 and v9 are merged into a new vertex v69, with a capacity value of 30+30=60kW; the set of adjacent edges is the original union, and self-loop edges and duplicate edges are removed; If the contactor fails to operate (e.g., KM6 fails to operate), remove it from edge set E.<v4,v5> ,<v5,v4> ; If the power module fails (e.g., M5 fails), the capability value of vertex v5 will be set to zero. However, if its connected contactors KM5 and KM7 are normal, v5 can still be used as the path vertex. This invention abstracts the charging system as a graph model G=(V,E) and combines it with an improved breadth-first search algorithm to achieve efficient and flexible dynamic allocation of power modules. Compared with existing technologies, it has the following technical advantages: This application triggers the scheduling process only when the system state changes (such as charging request, power module failure, abnormal connection contactor or topology change), avoiding periodic reallocation; the algorithm has a time complexity of O(|V|+|E|), which can complete the allocation in milliseconds and meet the real-time requirements.

[0048] The power module's capacity can be configured independently (e.g., 30kW / 60kW hybrid), and the graph model G=(V,E) is applicable to various physical connection structures such as full matrix, ring, and tree, without the need to redesign the algorithm for a specific topology.

[0049] By activating the configuration through the charging gun G, the number of rounds each gun participates in can be controlled, thus achieving resource allocation (e.g., VIP vehicles participate continuously, while ordinary vehicles are disabled intermittently). The scheduling priority strategy can be configured as needed, such as the contactor number, charging gun priority, and power shortage ratio, taking into account both fairness and service quality.

[0050] After meeting basic requirements, if the load rate is lower than the preset threshold, idle modules are automatically called to increase the total output, so that the power modules operate in the optimal energy efficiency range. The measured system efficiency has increased by more than 3%.

[0051] The improved breadth-first search algorithm naturally generates the shortest electrical path, minimizing the number of contactor closures and power transmission distance, thus reducing mechanical wear and line losses. It responds in real-time to anomalies such as contactor sticking (vertex merging), failure to operate (edge ​​disconnection), and module failure (capacity value set to zero), dynamically updating the graph model G=(V,E) to ensure effective allocation even under partial fault conditions.

[0052] A multi-source, step-by-step competition mechanism is adopted: each round of global arbitration uses a unique target vertex to prevent multiple charging guns from occupying the same module simultaneously, ensuring the legality and consistency of the allocation results. The algorithm is encapsulated as a standard interface, requiring only the input graph model G=(V,E) and scheduling parameters to run, facilitating integration into charging control systems from different manufacturers.

[0053] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0054] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0055] Therefore, the above description is only a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A dynamic allocation method for charging modules based on a graph model and an improved breadth-first search, characterized in that, The method includes the following steps: S1, abstract the power modules in the charging system as a set of vertices V in a directed graph, each vertex having a capability value representing its output power; abstract the connecting contactors between the power modules or between the power modules and the charging gun as a set of edges E in the directed graph, thereby constructing a graph model G=(V,E). S2, when the charging gun receives a charging request, the state of any power module changes, the state of any connection contactor becomes abnormal, or the topology of the charging system changes, the power scheduling process is triggered. S3, using the vertices associated with one or more charging guns that initiated charging requests as the root vertex, employs a multi-source, step-by-step improved breadth-first search algorithm to perform traversal and allocation operations in the graph model G=(V,E), including the following iterative process: (a0) Based on the preset charging gun activation configuration, determine the set of charging guns that participate in the traversal in the current round. Unactivated charging guns do not participate in the candidate vertex selection in this round. (a1) For each charging gun that participates in the traversal and whose power demand has not yet been met, starting from the vertex where the charging gun is currently located, select a candidate vertex from the adjacent vertices that the charging gun can reach, according to a preset scheduling priority strategy. (b) From all candidate vertices, determine a unique target vertex for allocation according to the scheduling priority strategy, add the capability value of the target vertex to the allocated power of the corresponding charging gun, and mark the vertex as occupied, prohibiting it from being allocated by other charging guns; (c) Based on the gap between the current power demand of each charging gun and the allocated power, dynamically adjust the priority order of each charging gun in subsequent rounds; (d) Repeat steps (a0) to (c), assigning only one vertex per round, until the power requirements of all charging guns are met, or there are no vertices to be assigned in the system; The scheduling priority strategy is configured based on at least one of the following: contactor number, charging gun priority, power module priority, user-defined rules, or the current power deficit ratio of each charging gun. S4, during the traversal process, responds in real time to abnormal system states and dynamically updates the graph model G=(V,E), including: If adhesion is detected in the connecting contactor, the two vertices connected to the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and their adjacent edge relationships are merged accordingly. If a failure to operate is detected in the connecting contactor, the edge corresponding to the connecting contactor is disconnected in the graphical model G=(V,E); If a power module malfunction is detected, the capability value of its corresponding vertex is set to zero. S5, after the basic power requirements of all charging guns are met, if the ratio of the current total input power of the system to the sum of the rated power of all allocated power modules is less than a preset load rate threshold, then idle power modules will continue to be called to make the power modules operate in the optimal energy efficiency range; wherein, the load rate threshold is a preset lower limit of power utilization rate used to trigger energy efficiency optimization.

2. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In step S1, the capability value is the rated output power or the currently available output power of the corresponding power module, and the capability values ​​of different vertices are independent of each other and are allowed to take different values; the graph model G=(V,E) adapts to any physical connection topology, and the arbitrary physical connection topology includes at least one of full matrix type, ring type and tree type.

3. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In step S2, the state of the power module changes, including switching between enabled, disabled, or faulty states; the state of the connection contactor becomes abnormal, including sticking or refusing to operate; the topology of the charging system changes, including adding or removing power modules, changing the physical connection relationship of the connection contactor, or adjusting the connection relationship between the charging gun and the power module.

4. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In step S3, the improved breadth-first search algorithm generates the shortest electrical path to minimize the number of contactor operations and the power transmission path length.

5. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In the sub-step (a0) of step S3, the system dynamically adjusts the activation state of each charging gun according to the preset scheduling strategy, so that high-priority charging guns are configured to continuously participate in multiple rounds of traversal, and low-priority charging guns are intermittently disabled.

6. The dynamic allocation method for charging modules based on graph model and improved breadth-first search according to claim 1, characterized in that, In sub-step (a1) of step S3, the reachable adjacent vertex refers to a vertex that meets the following conditions: it is connected to the current vertex through a connection contactor that has not failed to operate, has not been disconnected, and has not failed due to adhesion, and has not been marked as occupied.

7. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In sub-step (b) of step S3, when multiple candidate vertices have the same priority, the vertex with the largest ability value is selected as the target vertex for allocation.

8. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, The dynamic adjustment of the priority order of each charging gun in subsequent rounds in sub-step (c) of step S3 includes: increasing the priority weight of the charging gun with a larger power deficit ratio in subsequent traversals based on the power deficit ratio of each charging gun.

9. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In step S4, when adhesion of the connecting contactor is detected, the two vertices connected by the connecting contactor are merged into a new vertex. The capability value of the new vertex is the sum of the capability values ​​of the original two vertices, and its adjacent edge set is the union of the adjacent edges of the original two vertices. Self-loop edges and duplicate edges generated by the merging are removed.

10. The dynamic allocation method for charging modules based on graph models and improved breadth-first search according to claim 1, characterized in that, In step S5, the load rate threshold is a value between 0.6 and 0.9, which is used to make the power module operate in the optimal energy efficiency range.