A double-layer reconfigurable battery system capacity control method based on global graph optimization

By constructing a global energy flow routing matrix using the Floyd-Warshall algorithm, and combining a two-layer topology structure and graph theory model, the problems of poor capacity utilization and SOC consistency in battery systems are solved, achieving efficient, safe and reliable energy management of battery packs.

CN122371387APending Publication Date: 2026-07-10JIANGSU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU UNIV OF SCI & TECH
Filing Date
2026-03-18
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing reconfigurable battery system control strategies lack a global perspective, resulting in limited battery pack capacity utilization and poor SOC consistency. Traditional path planning algorithms cannot achieve the globally optimal path.

Method used

A two-layer reconfigurable battery system capacity control method based on global graph optimization is adopted. The energy flow routing matrix of the whole system is constructed by the Floyd-Warshall algorithm. Combined with the two-layer topology and graph theory model, the accurate utilization of high SOC cells and rapid isolation of faulty cells are achieved.

Benefits of technology

It significantly improves the capacity utilization of the battery pack, enhances SOC consistency, strengthens the safety and reliability of the system, enables rapid response and path reconstruction under multi-point failures, and extends battery life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122371387A_ABST
    Figure CN122371387A_ABST
Patent Text Reader

Abstract

The application discloses a kind of double-layer reconfigurable battery system capacity control methods based on global graph optimization, comprising: based on Thevenin equivalent circuit establishes battery mathematical model, and designs double-layer reconfigurable topological structure;Based on graph theory, construct weighted directed graph model, define the initial weight matrix between nodes;Floyd-Warshall algorithm is introduced to globally traverse and solve weighted directed graph model, and distance matrix and routing matrix are generated by triple-loop iteration update, the global optimal energy flow path from source node to sink node is parsed out;According to the global optimal energy flow path parsed out, send relay control instruction, close the relay between single body and cluster in path;Based on the distance matrix generated, path reconstruction and switching are carried out.The method of the application can effectively improve the capacity utilization of battery pack, improve SOC consistency, thereby significantly enhance the safety and reliability of system, and has wide application prospect in electric vehicle and energy storage power station and other scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electrical engineering and relates to control optimization technology for reconfigurable battery systems, specifically to a capacity control method for a two-layer reconfigurable battery system based on global graph optimization. Background Technology

[0002] In battery pack technology, capacity utilization is a core indicator for measuring system performance. Due to differences in manufacturing processes and the influence of the usage environment, inconsistencies in capacity and internal resistance are inevitable between individual battery cells. In traditional fixed series-parallel topologies, the usable capacity of a battery pack follows the "barrel theory," meaning it is limited by the worst-performing cell in terms of State of Charge (SOC). Once this cell reaches its discharge cutoff voltage, the entire system must cease operation, resulting in a large amount of residual energy remaining in the other high-SOC cells, severely reducing the actual usable capacity of the system.

[0003] To overcome this limitation, Reconfigurable Battery Systems (RBS) have emerged. However, existing RBS control strategies mostly employ local, rule-based equalization methods or single-path search algorithms. These methods have significant limitations: they often focus only on the current local optimum, lacking a global perspective on the energy distribution of the entire system. This short-sighted control strategy struggles to plan a globally optimal path that ensures all cells "simultaneously reach the cutoff voltage" at the end of discharge, thus failing to fundamentally achieve the optimal utilization of the battery pack capacity.

[0004] In view of this, the present invention proposes a capacity control method based on global graph optimization. The method constructs the energy flow routing matrix of the entire system through the Floyd-Warshall algorithm, plans the discharge path from a global perspective, and ensures that high SOC cells are used preferentially and accurately, thereby maximizing the capacity utilization of the battery pack. Summary of the Invention

[0005] Objective: To address the limitations of existing battery pack systems, such as fixed topologies leading to limited capacity utilization and poor State of Charge (SOC) consistency, and the insufficient optimization efficiency of traditional path planning algorithms due to a lack of multi-dimensional parameter coupling and global perspective, this invention provides a capacity control method for a two-layer reconfigurable battery system based on global graph optimization. This invention combines the dynamic reconfiguration flexibility of a two-layer topology with the decision-making advantages of graph-based global optimization algorithms to achieve precise control of battery pack energy flow. While effectively improving battery pack capacity utilization and SOC consistency, it significantly enhances system safety and reliability through a global graph path mechanism, showing broad application prospects in electric vehicles and energy storage power stations.

[0006] Technical Solution: To achieve the above objectives, this invention provides a capacity control method for a two-layer reconfigurable battery system based on global graph optimization, comprising the following steps:

[0007] S1: A mathematical model of the battery is established based on the Thevenin equivalent circuit, and a two-layer reconfigurable topology consisting of an upper battery cluster and a lower battery cell layer is designed. At the same time, the SOC, current, voltage and fault status data of the battery cells are collected in real time.

[0008] S2: Based on the battery mathematical model and the two-layer reconfigurable topology, construct a weighted directed graph model based on graph theory and define the initial weight matrix between nodes;

[0009] S3: The Floyd-Warshall algorithm is introduced to perform a global traversal solution for the weighted directed graph model. The distance matrix and routing matrix containing the shortest path information of all node pairs are generated through triple loop iteration. The globally optimal energy flow path from the source node to the sink node is parsed based on the distance matrix and routing matrix.

[0010] S4: Send relay control commands based on the parsed global optimal energy flow path, between relays in individual units and clusters within the closed path; when a system state change or fault is detected, perform path reconstruction and switching based on the generated distance matrix.

[0011] Furthermore, the mathematical model of the battery in step S1 is expressed in the following form:

[0012] (1)

[0013] In equation (1), Output voltage; OCV is open-circuit voltage; This refers to the battery's internal resistance. For current; The polarization voltage is defined by equation (2):

[0014] (2)

[0015] In equation (2), Polarizing capacitor; The polarization voltage is OCV; the nonlinear relationship between OCV and SOC is expressed as a polynomial fitting function:

[0016] (3)

[0017] In equation (3), a i (i=0,1,2,3), b j (j=1,2) represents the coefficients of the OCV and SOC functions, where SOC is defined in ampere-hour integral form:

[0018] (4)

[0019] In equation (4), Let t be the total capacity and t be the integration time.

[0020] Furthermore, in the dual-layer reconfigurable topology of step S1, the upper physical structure divides the battery into several battery clusters, and the lower physical structure realizes flexible access, bypassing and isolation of individual batteries through independently configured relay arrays.

[0021] Furthermore, in step S2, the weighted directed graph model abstracts battery clusters and individual cells as cluster nodes and individual nodes in graph theory, respectively, and normalizes SOC consistency, relay operation loss cost and fault risk isolation cost and integrates them into edge weights to construct an initial adjacency weight matrix W.

[0022] Furthermore, the construction rule for the initial adjacency weight matrix W in step S2 is as follows:

[0023] The reachability relationships between nodes are described by an adjacency matrix A, defined as follows:

[0024] If node i and node j are physically directly connected, then

[0025] (5)

[0026] (6)

[0027] In equation (6), It represents the number of switches between node i and node j; The cost is the relay switching loss; if node i and node j are physically inaccessible or are the same node, then W ij Equals infinity; and It is a weight, satisfying + =1; The SOC or voltage fraction of the (i-1)th battery in the interval [-1, 1] is defined as:

[0028] (7)

[0029] Furthermore, the specific process of global traversal and solution by introducing the Floyd-Warshall algorithm in step S3 includes:

[0030] A1: Matrix initialization;

[0031] Initialize distance matrix D 0 and routing matrix P0 , making D 0 = W, for all directly connected node pairs (i, j), let Pij = j, otherwise Pij = null;

[0032] A2: Global relaxation iteration;

[0033] Introduce an intermediate node k, where k = 1 to N, and N is the total number of nodes. Iterate and update the distance matrix D N times. In the k-th iteration, for any pair of nodes (i, j), determine whether the state transition condition is satisfied:

[0034] (8)

[0035] A3: Status update;

[0036] If the state transition condition is met, then update the distance matrix elements. And update the routing matrix elements synchronously. This process continues until all nodes are traversed, yielding a converged global shortest path distance matrix D. N and the final routing matrix P N ;

[0037] A4: Path backtracking analysis;

[0038] According to the final routing matrix P N Starting from the source node, the next node is searched recursively through the index until the sink node is reached, forming a complete globally optimal energy flow path.

[0039] Furthermore, step S4 specifically includes the following rapid fault response mechanism:

[0040] When a fault is detected in any battery cell node m, the system does not perform a full graph re-search. Instead, it performs a matrix masking operation, instantly setting all weight elements in the m-th row and m-th column of the global distance matrix D to infinity. This logically cuts off all connections between the node and the system at the data level, and achieves immediate isolation of the faulty node m at the physical level, while simultaneously connecting the backup path to ensure the continuity and safety of the battery pack's energy flow.

[0041] Furthermore, the method of the present invention also includes a time-triggered dynamic refresh mechanism: a system refresh period T is set, the SOC state is re-acquired every period T and the initial weight matrix in step S2 is updated, and step S3 is repeated to eliminate the accumulated error during battery operation and ensure continuous output of the globally optimal control strategy.

[0042] This invention combines the flexibility of a two-layer topology with the global optimization capability of the Floyd algorithm. Through multi-dimensional weight optimization and full-graph path calculation mechanism, it significantly improves the path reconstruction response speed and robustness of the system under multi-point faults while achieving priority discharge of high SOC cells, minimizing energy loss, and rapid isolation of faulty cells. The method of this invention can effectively improve the battery pack capacity utilization rate and improve SOC consistency, thereby significantly enhancing the safety and reliability of the system, and has broad application prospects in electric vehicles and energy storage power stations.

[0043] Beneficial Effects: Compared with existing technologies, this invention constructs the energy flow routing matrix of the entire system using the Floyd-Warshall algorithm, planning the discharge path from a global perspective to ensure that high-SOC cells are utilized preferentially and accurately, maximizing the capacity utilization of the battery pack. The method of this invention has the following advantages:

[0044] 1. By adopting a two-layer reconfigurable battery architecture combined with the Floyd global graph optimization algorithm, a full-system energy routing matrix was constructed, which significantly improved the global optimization capability, control accuracy and operating efficiency of the battery system.

[0045] 2. It achieves millisecond-level seamless isolation of faulty units and can dynamically adjust the topology connection based on the global view, thereby ensuring the safe and stable operation of the battery system under multi-point faults.

[0046] 3. By adopting a multi-dimensional coupled weight calculation model in conjunction with full-map path pre-calculation, the "barrel effect" caused by individual differences is broken, effectively solving the problems of low capacity utilization and poor SOC consistency in traditional systems.

[0047] 4. It can effectively extend the battery's lifespan and enhance system robustness, making it widely applicable to complex operating scenarios such as electric vehicles and energy storage power stations, and has significant practical value and application prospects. Attached Figure Description

[0048] Figure 1 A schematic diagram of the Thevenin equivalent circuit model of a battery cell;

[0049] Figure 2 This is a schematic diagram of the topology of a two-layer reconfigurable battery system.

[0050] Figure 3 The flowchart shows the global path optimization process based on the Floyd-Warshall algorithm.

[0051] Figure 4 The optimal energy path diagram for the battery pack is shown below, based on the Floyd-Warshall algorithm.

[0052] Figure 5This is a schematic diagram of path reconstruction based on matrix masking mechanism under fault conditions;

[0053] Figure 6 A heatmap of the global shortest path visualization matrix. Detailed Implementation

[0054] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0055] Example 1:

[0056] This embodiment provides a capacity control method for a two-layer reconfigurable battery system based on global graph optimization. The specific process is as follows:

[0057] S1: A mathematical model of the battery is established based on the Thevenin equivalent circuit, and a two-layer reconfigurable topology consisting of an upper battery cluster and a lower battery cell layer is designed. At the same time, the SOC, current, voltage and fault status data of the battery cells are collected in real time.

[0058] This embodiment uses the Thevenin equivalent circuit model to accurately characterize the dynamic electrical characteristics of the battery. This model, by abstracting the battery as a series combination of an ideal voltage source and a resistive-capacitive network, can simulate the battery's charging and discharging response and polarization effects under complex loads and different operating conditions. Based on Figure 1 Based on the equivalent circuit principle shown, the mathematical model expression for the battery is as follows:

[0059] (1)

[0060] In equation (1), Output voltage; OCV is open-circuit voltage; This refers to the battery's internal resistance. For current; The polarization voltage is defined by equation (2):

[0061] (2)

[0062] In equation (2), Polarizing capacitor; The polarization voltage is OCV; the nonlinear relationship between OCV and SOC is expressed as a polynomial fitting function:

[0063] (3)

[0064] In equation (3), a i(i=0,1,2,3), b j (j=1,2) represents the coefficients of the OCV and SOC functions, where SOC is defined in ampere-hour integral form:

[0065] (4)

[0066] In equation (4), Let t be the total capacity and t be the integration time.

[0067] like Figure 2 As shown, this embodiment constructs a hierarchical two-layer reconfigurable topology, which includes two control dimensions: an upper-layer module level and a lower-layer cell level.

[0068] S2: Based on the battery mathematical model and the two-layer reconfigurable topology, construct a weighted directed graph model based on graph theory and define the initial weight matrix between nodes;

[0069] In this embodiment, a weighted directed graph model is constructed using graph theory, realizing the topological mapping from the physical architecture to the mathematical space. A multi-dimensional coupled weight calculation system is constructed, which quantifies and integrates the SOC consistency cost reflecting capacity balance requirements and the relay loss cost reflecting energy efficiency optimization, defining them as the weights of the connecting edges in the graph model, thereby establishing the multi-dimensional total cost objective function as shown in formula (6).

[0070] The reachability relationships between nodes are described by an adjacency matrix A, defined as follows:

[0071] If node i and node j are physically directly connected, then

[0072] (5)

[0073] (6)

[0074] In equation (6), It represents the number of switches between node i and node j; The cost is the relay switching loss; if node i and node j are physically inaccessible or are the same node, then W ij Equals infinity; and It is a weight, satisfying + =1; The SOC or voltage fraction of the (i-1)th battery in the interval [-1, 1] is defined as:

[0075] (7)

[0076] S3: The Floyd-Warshall algorithm is introduced to perform a global traversal solution on the weighted directed graph model. The distance matrix and routing matrix containing the shortest path information of all node pairs are generated through triple loop iteration. Based on the distance matrix and routing matrix, the globally optimal energy flow path from the source node to the sink node is parsed.

[0077] The Floyd-Warshall algorithm is a global traversal strategy based on dynamic programming theory. Through triple loop iteration and state transition of the weight matrix, it systematically constructs the shortest path matrix of all node pairs, aiming to resolve the globally optimal energy flow covering all potential topological connections of the system in one go.

[0078] like Figure 3 As shown, the process of solving the weighted directed graph model by introducing the Floyd-Warshall algorithm includes:

[0079] A1: Matrix initialization;

[0080] Initialize distance matrix D 0 and routing matrix P 0 , making D 0 = W, for all directly connected node pairs (i, j), let Pij = j, otherwise Pij = null.

[0081] A2: Global relaxation iteration;

[0082] Introduce intermediate nodes k (k = 1 to N, where N is the total number of nodes), and perform N iterations to update the distance matrix D; in the k-th iteration, for any pair of nodes (i, j), determine whether the state transition condition is satisfied:

[0083] (8)

[0084] A3: Status update;

[0085] If the state transition condition is met, then update the distance matrix elements. And update the routing matrix elements synchronously. This process continues until all nodes are traversed, yielding a converged global shortest path distance matrix D. N and the final routing matrix P N .

[0086] A4: Path backtracking analysis;

[0087] According to the final routing matrix P N Starting from the source node, the next node is searched recursively through the index until the sink node is reached, forming a complete globally optimal energy flow path.

[0088] S4: Based on the parsed globally optimal energy flow path, relay control commands are sent. The relays between individual cells and clusters within the closed path are then solved to determine... Figure 4 The optimal energy path for the battery pack shown;

[0089] When a system state change or fault is detected, path reconstruction and switching are performed based on the generated distance matrix, specifically as follows: Figure 5 As shown.

[0090] When a fault is detected in any battery cell node m, the system does not perform a full graph re-search. Instead, it performs a matrix masking operation, instantly setting all weight elements in the m-th row and m-th column of the global distance matrix D to infinity. This logically cuts off all connections between the node and the system at the data level, and achieves immediate isolation of the faulty node m at the physical level, while simultaneously connecting the backup path to ensure the continuity and safety of the battery pack's energy flow.

[0091] The method of this invention includes a time-triggered dynamic refresh mechanism: a system refresh period T is set, and the SOC state is re-acquired and the initial weight matrix in step S2 is updated every T period. Step S3 is repeated to eliminate accumulated errors during battery operation, ensuring continuous output of the globally optimal control strategy, and ultimately obtaining... Figure 6 The image shows a heatmap of the global shortest path visualization matrix.

[0092] As can be seen, the capacity control strategy based on global graph optimization proposed in this invention aims to overcome the limitations of local optimization and establish a multi-dimensional objective system that is guided by improving capacity utilization while taking into account SOC consistency and system safety. By constructing a closed-loop control flow—from topology modeling to multi-dimensional parameter quantization, then to path calculation and control command issuance at all nodes, and finally to dynamic updates through a matrix masking mechanism—the global optimality and maximum capacity release of the battery system under complex operating conditions are fundamentally guaranteed.

[0093] Example 2:

[0094] To verify the effectiveness of the capacity control method based on global graph optimization proposed in this invention, a complete two-layer reconfigurable battery system model was built in the Simulink simulation environment. The core parameters were configured as follows: the simulation object contains six lithium-ion battery cells (numbered Node1 to Node6). Based on the two-layer topology architecture of this invention, it is divided into two independent battery modules, each containing three battery cells. Module 1 contains Nodes 1 to 3, and Module 2 contains Nodes 4 to 6. The system is equipped with a complete relay array, supporting flexible series-parallel switching and fault isolation between modules and individual cells. At the initial simulation moment, the state of charge distribution of each battery cell was set as follows: Node1=0.7, Node2=0.5, Node3=0.9, Node4=0.75, Node5=0.6, Node6=0.8.

[0095] Global path optimization verification under normal operating conditions. Based on the above parameters, a graph theory-based system was constructed with 6... A weighted directed graph model of type 6 is presented. Since this invention aims to maximize capacity utilization, the edge weights are defined as a cost function inversely proportional to the State of Computation (SOC). The Floyd-Warshall algorithm is introduced to perform a global traversal of this weighted graph, generating a matrix of shortest paths to all node pairs.

[0096] Assuming the load requirement is the output of four series-connected cells, the algorithm directly analyzes the matrix and locks the globally optimal energy flow path as Node1 (0.7) → Node3 (0.9) → Node4 (0.75) → Node6 (0.8). Simulation results show that the Floyd algorithm successfully avoids the low-SOC Node2 (0.5) and Node5 (0.6) and accurately selects the four cells with the highest SOC in the current system. This result is in complete agreement with the theoretical analysis, verifying the ability of the algorithm of this invention to achieve priority discharge of high-SOC cells through global cost calculation, thereby effectively ensuring the maximization of battery pack capacity utilization.

[0097] To verify the system's robustness under sudden failures, the following simulation scenario was set up: After 500 seconds of normal system discharge, an internal short-circuit fault was triggered in Node3 (SOC=0.9, in working state) via the fault injection module, triggering the system's fault tolerance mechanism. The system immediately triggered the matrix masking mechanism to reset the row and column weights related to Node3 in the global distance matrix to infinity, severing its connection at the logic layer. Simulation waveforms show that the entire path switching process was smooth and uninterrupted, verifying that the matrix masking mechanism based on the Floyd algorithm has millisecond-level fault isolation speed and adaptive topology reconstruction capability, ensuring that the system can still maintain safe operation under single-point failures.

Claims

1. A capacity control method for a two-layer reconfigurable battery system based on global graph optimization, characterized in that, Includes the following steps: S1: A mathematical model of the battery is established based on the Thevenin equivalent circuit, and a two-layer reconfigurable topology consisting of an upper battery cluster and a lower battery cell layer is designed. At the same time, the SOC, current, voltage and fault status data of the battery cells are collected in real time. S2: Based on the battery mathematical model and the two-layer reconfigurable topology, a weighted directed graph model is constructed based on graph theory, and the initial weight matrix between nodes is defined; S3: The Floyd-Warshall algorithm is introduced to perform a global traversal solution for the weighted directed graph model. The distance matrix and routing matrix containing the shortest path information of all node pairs are generated through triple loop iteration. The globally optimal energy flow path from the source node to the sink node is parsed based on the distance matrix and routing matrix. S4: Send relay control commands based on the parsed global optimal energy flow path, between relays in individual units and clusters within the closed path; when a system state change or fault is detected, perform path reconstruction and switching based on the generated distance matrix.

2. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 1, characterized in that, The mathematical model of the battery in step S1 is expressed in the following form: (1); In equation (1), Output voltage; OCV is open-circuit voltage; This refers to the battery's internal resistance. For current; The polarization voltage is defined by equation (2): (2); In equation (2), Polarizing capacitor; The polarization voltage is OCV; the nonlinear relationship between OCV and SOC is expressed as a polynomial fitting function: (3); In equation (3), a i (i=0,1,2,3), b j (j=1,2) represents the coefficients of the OCV and SOC functions, where SOC is defined in ampere-hour integral form: (4); In equation (4), Let t be the total capacity and t be the integration time.

3. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 2, characterized in that, In the dual-layer reconfigurable topology of step S1, the upper physical structure divides the battery into several battery clusters, and the lower physical structure realizes flexible access, bypassing and isolation of individual batteries through independently configured relay arrays.

4. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 3, characterized in that, In step S2, the weighted directed graph model abstracts battery clusters and individual cells as cluster nodes and individual nodes in graph theory, respectively. After normalizing the SOC consistency, relay operation loss cost, and fault risk isolation cost, it integrates them into edge weights to construct the initial adjacency weight matrix W.

5. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 4, characterized in that, The construction rule for the initial adjacency weight matrix W in step S2 is as follows: The reachability relationships between nodes are described by an adjacency matrix A, defined as follows: If node i and node j are physically directly connected, then (5); (6); In equation (6), It represents the number of switches between node i and node j; This is due to the cost of relay switching losses; If node i and node j are physically unreachable or are the same node, then W ij Equals infinity; and It is a weight, satisfying + =1; The SOC or voltage fraction of the (i-1)th battery in the interval [-1, 1] is defined as: (7)。 6. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 5, characterized in that, The specific process of global traversal and solution by introducing the Floyd-Warshall algorithm in step S3 includes: A1: Matrix initialization; Initialize distance matrix D 0 and routing matrix P 0 , making D 0 = W, for all directly connected node pairs (i, j), let Pij = j, otherwise Pij = null; A2: Global relaxation iteration; Introduce an intermediate node k, where k = 1 to N, and N is the total number of nodes. Iterate and update the distance matrix D N times. In the k-th iteration, for any pair of nodes (i, j), determine whether the state transition condition is satisfied: (8); A3: Status update; If the state transition condition is met, then update the distance matrix elements. And update the routing matrix elements synchronously. This process continues until all nodes are traversed, yielding a converged global shortest path distance matrix D. N and the final routing matrix P N ; A4: Path backtracking analysis; According to the final routing matrix P N Starting from the source node, the next node is searched recursively through the index until the sink node is reached, forming a complete globally optimal energy flow path.

7. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 6, characterized in that, Step S4 specifically includes the following rapid fault response mechanism: When a fault is detected in any battery cell node m, the system does not perform a full graph re-search. Instead, it performs a matrix masking operation, instantly setting all weight elements in the m-th row and m-th column of the global distance matrix D to infinity. This logically cuts off all connections between the node and the system at the data level, and achieves immediate isolation of the faulty node m at the physical level, while simultaneously connecting the backup path to ensure the continuity and safety of the battery pack's energy flow.

8. The capacity control method for a two-layer reconfigurable battery system based on global graph optimization according to claim 1, characterized in that, It also includes a time-triggered dynamic refresh mechanism: set a system refresh cycle T, re-collect the SOC status and update the initial weight matrix in step S2 every cycle T, and repeat step S3 to eliminate the accumulated error during battery operation and ensure continuous output of the globally optimal control strategy.