Battery tab layer number calculation method, device and equipment based on linear programming
By processing and optimizing the electrode image using a linear programming method, the efficiency and accuracy issues of battery electrode layer number calculation were solved, achieving efficient and accurate calculation without physical contact.
Patent Information
- Application Number
- CN202511594904.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-31
AI Technical Summary
Existing technologies suffer from low efficiency and poor accuracy in calculating the number of battery tab layers, especially when dealing with deformation, scratches, and complex shapes caused by mechanical contact with soft tabs.
A linear programming-based approach is adopted. By performing semantic segmentation and regression processing on the electrode images, an undirected graph is constructed and converted into a directed graph. The linear programming model is then used for iterative optimization to determine the number of electrode layers.
It improves the efficiency and accuracy of battery tab layer calculation, avoids misjudgment under mechanical damage and complex morphology, and enhances the reliability and adaptability of the calculation.
Smart Images

Figure CN121505580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrode layer number calculation technology, and in particular to a method, apparatus and equipment for calculating the number of battery electrode layers based on linear programming. Background Technology
[0002] In the detection of defects in the tabs of new energy batteries, it is necessary to check the integrity of the number of stacked tabs. Since missing tabs cannot be directly shown in the image, it is necessary to indirectly determine whether there are missing tabs by accurately counting the number of stacked layers, thereby completing the defect identification.
[0003] Existing technologies generally rely on hardware mechanisms to manipulate the tabs to assist in counting. However, the tab material is soft, and mechanical contact can easily cause deformation, scratches, or even breakage, which not only damages the integrity of the material but may also affect the accuracy of the test results. Alternatively, the number of layers can be indirectly estimated by counting the number of tab endpoints, but this method not only struggles to handle the problem of endpoint adhesion but also cannot adapt to the complex morphology of tabs with multiple adhesions and branches within the field of view. This makes it impossible to accurately calculate the number of battery tab layers through global morphology analysis, and the calculation efficiency is also low.
[0004] Therefore, improving the efficiency and accuracy of battery tab layer calculation has become an urgent problem to be solved. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, and device for calculating the number of battery tab layers based on linear programming to address the aforementioned technical problems, which can improve the efficiency and accuracy of battery tab layer calculation.
[0006] In a first aspect, this application provides a method for calculating the number of battery tab layers based on linear programming, including: The target electrode image of the battery is processed to obtain semantic segmentation results and regression results; the semantic segmentation results are used to identify the electrode position; the regression results are used to identify the number of electrode layers. An undirected graph is constructed based on the semantic segmentation results; the undirected graph contains m edges; m is a positive integer. Based on the regression results, determine the number of m first-level tab layers and the number of m second-level tab layers corresponding to the m edges respectively; Based on the electrode placement direction corresponding to the target electrode image, the undirected graph is converted into a directed graph; Determine a directed acyclic graph from a directed graph; a directed acyclic graph has n edges; n is a positive integer less than or equal to m; Determine the number of n third-pole layers corresponding to n edges based on the directed acyclic graph; Based on the number of m first electrode layers, the number of m second electrode layers, the number of n third electrode layers, and the preset maximum number of electrode layers, determine the number of n reference electrode layers; By using a pre-defined first linear programming model and a second linear programming model, and performing iterative optimization operations based on a directed acyclic graph and n reference electrode layers, the target number of electrode layers for the battery is obtained.
[0007] Secondly, this application provides a battery tab layer number calculation device based on linear programming, comprising: The image processing module is used to process the target electrode image of the battery to obtain semantic segmentation results and regression results; the semantic segmentation results are used to calibrate the electrode position; the regression results are used to calibrate the number of electrode layers. The building module is used to construct an undirected graph based on the semantic segmentation results; the undirected graph includes m edges; m is a positive integer; The determination module is used to determine the number of m first electrode layers and m second electrode layers corresponding to m edges, based on the regression results; to convert the undirected graph into a directed graph according to the electrode placement direction corresponding to the target electrode image; to determine a directed acyclic graph (DAG) from the directed graph; the DAG includes n edges, where n is a positive integer less than or equal to m; to determine the number of n third electrode layers corresponding to the n edges from the DAG; and to determine the number of n reference electrode layers based on the number of m first electrode layers, m second electrode layers, n third electrode layers, and a preset maximum number of electrode layers. The linear programming module is used to perform iterative optimization operations based on a directed acyclic graph and n reference electrode layers using a preset first linear programming model and a second linear programming model to obtain the target number of electrode layers for the battery.
[0008] Thirdly, this application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the method described above.
[0009] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.
[0010] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described above.
[0011] The aforementioned method, apparatus, and device for calculating the number of battery tab layers based on linear programming first performs segmentation preprocessing on the target tab image to initially determine the tab position and the number of tab layers. Then, a graph structure is constructed based on the tab position and the number of tab layers, and an estimated number of tab layers is initially output. Finally, a linear programming model is used to iteratively optimize the estimated number of tab layers to obtain the target number of tab layers for the battery. Compared with existing technologies that rely on hardware to manipulate the tabs or only calculate the number of layers by counting endpoints, this method for calculating the number of battery tab layers does not require physical contact with the tabs. Furthermore, it can obtain tab features more accurately and construct a graph structure through image segmentation. Iterative optimization using a linear programming model effectively avoids endpoint recognition errors, thereby solving the problem of misjudgment under mechanically damaged tabs and complex shapes. While reducing hardware dependence and improving scene adaptability, it also improves the efficiency and accuracy of battery tab layer calculation. Attached Figure Description
[0012] Figure 1 An application environment diagram for a method for calculating the number of battery tab layers based on linear programming, provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for calculating the number of battery tab layers based on linear programming, provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the process of constructing an undirected graph, provided as an embodiment of this application; Figure 4 A flowchart illustrating the process of determining a directed acyclic graph provided in this application embodiment; Figure 5 A structural block diagram of a battery tab layer number calculation device based on linear programming is provided for embodiments of this application; Figure 6 An internal structural diagram of a computer device provided in an embodiment of this application; Figure 7 An internal structural diagram of another computer device provided in an embodiment of this application; Figure 8 This is an internal structural diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0014] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0015] Please see Figure 1 , Figure 1 This diagram illustrates an application environment for a linear programming-based method for calculating the number of battery tab layers, as provided in this embodiment. Terminal 102 communicates with server 104 via a communication network. A data storage system stores the data that server 104 needs to process. The data storage system can be integrated onto server 104 or hosted on a cloud or other network server. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0016] like Figure 2 As shown, Figure 2 This application provides a flowchart illustrating a method for calculating the number of battery tab layers based on linear programming, which is then applied to... Figure 1 The method will be illustrated using terminal 102 or server 104 as examples. It is understood that the computer device may include at least one of a terminal and a server. The method includes the following steps: S101. Process the target electrode image of the battery to obtain semantic segmentation results and regression results.
[0017] Specifically, the target electrode image of the battery can be processed using a preset deep learning image processing algorithm to obtain the semantic segmentation result M. seg and regression results M reg Semantic segmentation result M seg Used to calibrate the electrode location (the specific coordinates of all electrode pixels in the target electrode image), regression result M reg Used to calibrate the number of tab layers (each tab pixel corresponds to a preliminary number of tab layers).
[0018] S102. Construct an undirected graph based on the semantic segmentation results.
[0019] The undirected graph consists of m edges, where m is a positive integer.
[0020] like Figure 3 As shown in the figure, this application embodiment provides a flowchart for constructing an undirected graph. Step S102, constructing an undirected graph based on semantic segmentation results, includes: A1. Denoise the semantic segmentation results to obtain the target semantic segmentation results; A2. Extract the skeleton from the target semantic segmentation results to obtain the skeleton diagram; A3. Perform node identification on the skeleton graph to obtain the endpoint set and the intersection set; the endpoint set includes the start node and the end node. A4. Construct an undirected graph based on the set of endpoints and the set of intersections.
[0021] Among them, semantic segmentation result M seg The segmentation result may contain noise (such as isolated pixels or edge burrs). This noise can be removed through simple denoising operations such as small-area deletion or morphological opening, thus preserving the complete epitaxial body region and obtaining a cleaner target semantic segmentation result. Then, a pre-defined skeleton extraction algorithm (such as the Lee algorithm, thinning algorithm, or distance transform method) can be used to extract the skeleton from the target semantic segmentation result, resulting in a single-pixel-width skeleton map M. ske The skeleton can concisely express the overall shape of the pole ears (such as orientation and branching), filter out redundant area information, and retain only the core structural features.
[0022] Among them, the skeleton diagram M can be... ske Pixel-level analysis is performed to identify endpoints and intersections, resulting in endpoint and intersection sets. The endpoint set includes start and end nodes, corresponding to the start and end positions of the pole piece, respectively, with each endpoint having only one connected neighbor pixel. Each intersection in the intersection set corresponds to the meeting point of the pole piece branches and has at least three connected neighbor pixels. Then, using the points in the endpoint and intersection sets as vertices, the data is analyzed according to the skeleton graph M. ske The connectivity between nodes (i.e., two nodes are directly connected by continuous skeleton pixels and there are no other nodes in between) is used to establish edges between corresponding vertices, forming an undirected graph G1.
[0023] It is evident that by denoising and refining the semantic segmentation results of the pole ears, extracting the core skeleton, identifying key nodes, and constructing an undirected graph, the visual features of the pole ears can be transformed into a structured topological model, providing a clean, concise, and analyzable foundation for subsequent accurate calculation of the number of pole ear layers, effectively improving the accuracy and reliability of pole ear layer calculation.
[0024] S103. Based on the regression results, determine the number of m first tab layers and m second tab layers corresponding to the m edges.
[0025] In some embodiments, step S103, which combines the regression results to determine the number of m first tab layers and the number of m second tab layers corresponding to the m edges, includes: B1. Obtain the first pole ear region corresponding to the first edge in the target semantic segmentation result; the first edge is any edge among the m edges; B2. Obtain the maximum value in the first tabular region of the regression results to get the target maximum number of tabular layers; B3. Take the target maximum number of electrode layers as the number of the first electrode layers corresponding to the first side among the m first electrode layer numbers; B4. Along the direction parallel to the first side, set multiple measurement points on the first side at preset intervals; B5. Along the direction perpendicular to the first side, measure the width at each of the multiple measurement points to obtain multiple widths; B6. Determine the maximum value among multiple widths as the width of the first side of the first side; B7. Based on the preset width threshold and the width of the first side, determine the number of second tab layers corresponding to the first side among the m second tab layers; the preset width threshold is related to the battery specifications.
[0026] In this approach, any edge in the undirected graph G1 can be used as the first edge, and the actual pole piece region (i.e., the pole piece entity covered by the skeleton of the first edge) corresponding to this first edge in the target semantic segmentation result can be obtained. Then, the partial regression result M corresponding to the first pole piece region is used... reg In the process, the predicted layer number values of all pixels are filtered out, and the maximum value is taken to obtain the target maximum electrode layer number. Finally, the target maximum electrode layer number is directly used as the first electrode layer number corresponding to the first side of the m first electrode layer numbers.
[0027] It should be noted that the number of first electrode layers L1 = max(M) edge *M reg ), where M edge This represents the actual pole ear region corresponding to any side of the undirected graph G1 in the target semantic segmentation result.
[0028] In this process, multiple measurement points can be evenly set along the first side at preset intervals (e.g., every 2 pixels) parallel to the first side (to avoid the randomness of single-point measurements and ensure the representativeness of the width data). For each measurement point, the width is measured from one boundary of the tab region to the other boundary along a direction perpendicular to the edge (i.e., the stacking thickness direction of the tabs), thus obtaining the width corresponding to each measurement point. Next, the widths of all measurement points are filtered, and the maximum value is taken as the width of the first side. Finally, the width of the first side is divided by a preset width threshold and rounded up to obtain the number of second tab layers corresponding to the first side.
[0029] It should be noted that the preset width threshold is related to the battery specifications. Different battery specifications correspond to different preset width thresholds. For example, the preset width threshold for battery specification A is 2 pixels, and the preset width threshold for battery specification B is 3 pixels. No specific limitation is made here. The preset width threshold can be set to W1. If the width of any side in the undirected graph G1 is W, then the number of second tab layers L2 = W / W1. No specific limitation is made here.
[0030] It is evident that by extracting the target maximum number of tab layers from the regression results and converting the number of tab layers based on the physical width, a dual-dimensional reference for the number of tab layers is formed. This not only utilizes the predictive power of the regression model but also ensures that it conforms to reality through physical characteristic verification. This effectively reduces the error of a single judgment dimension, provides more comprehensive and reliable basic data for subsequent tab layer calculations, and improves the accuracy and rationality of the final results.
[0031] S104. Based on the electrode placement direction corresponding to the target electrode image, convert the undirected graph into a directed graph.
[0032] First, the overall extension trend of the electrode tabs can be determined (e.g., by the positional relationship between the starting and ending nodes of the endpoint set, or the direction of the main axis of the electrode tab in the target electrode tab image), thus clarifying the placement direction of the electrode tabs. For example, if the starting node is in the first position and the ending node is in the second position, then the placement direction of the electrode tabs is from the first position to the second position. Then, for each edge in the undirected graph G1, based on its position and direction in the overall electrode tab structure, the direction of each edge is determined according to the placement direction of the electrode tab, thereby obtaining the directed graph G2.
[0033] It is evident that by transforming an undirected graph that only represents connectivity into a directed graph that reflects the actual hierarchical progression of the electrodes, a directional constraint that conforms to physical reality is provided for the subsequent analysis of the transmission logic of the electrode layer number, ensuring that subsequent calculations are consistent with the actual electrode structure.
[0034] S105. Determine the directed acyclic graph based on the directed graph.
[0035] The directed acyclic graph consists of n edges, where n is a positive integer less than or equal to m.
[0036] like Figure 4 As shown in the figure, this application embodiment provides a flowchart for determining a directed acyclic graph, S105, determining a directed acyclic graph based on a directed graph, including: C1. When there are no cycles in a directed graph, treat the directed graph as a directed acyclic graph; or, when there are a cycles in a directed graph, compress each of the a cycles into a reference node to obtain a reference nodes; where a is a positive integer. C2. Replace the a-cycle structures in the directed graph with a-reference nodes to obtain a directed acyclic graph.
[0037] First, a cycle detection algorithm (such as Kosaraju's algorithm, depth-first search, or topological sorting) can be used to determine if a directed graph G2 contains a cycle. If no cycle is detected in G2, the original structure does not need to be modified, and G2 is directly identified as a directed acyclic graph G3. If *a* cycle structures are detected in G2, each of these *a* cycle structures is compressed into a reference node, resulting in *a* reference nodes, where *a* is a positive integer. Finally, G2 is traversed, and all nodes and internal edges of each cycle structure are deleted, replaced with the corresponding reference nodes, and the connection edges between the reference nodes and external nodes are updated, ultimately resulting in the directed acyclic graph G3. It should be noted that during the compression and replacement of a single cycle structure, all nodes contained in the single cycle structure can be identified first, and a new reference node can be used to replace all nodes of the cycle structure, abstracting the entire cycle structure into a single node while preserving the connection relationships between the cycle structure and external nodes.
[0038] It is evident that by processing the ring structure in the directed graph to obtain the directed acyclic graph, the computational obstacles can be eliminated and the complexity simplified while preserving the key topological information of the pole ears, providing a suitable graph model foundation for the subsequent accurate calculation of the number of pole ear layers.
[0039] S106. Determine the number of n third-pole layers corresponding to n edges based on the directed acyclic graph.
[0040] In some embodiments, S106, determining the number of n third-pole layers corresponding to the n edges based on the directed acyclic graph includes: D1. Obtain all simple paths in a directed acyclic graph, resulting in b simple paths. A simple path is a path in a directed acyclic graph from the starting node to the ending node, where all nodes are unique. b is a positive integer. D2. Traverse all edges contained in each of the b simple paths to obtain a set of b reference edges. D3. Integrate the b reference edge sets into the target edge set; D4. Obtain the number of times each of the n edges appears in the target edge set, resulting in n counts; D5. Determine the number of n third pole ear layers corresponding to n edges based on n times.
[0041] The depth-first search algorithm can be used to obtain all simple paths in the directed acyclic graph G3. For example, starting from the starting node S, all reachable nodes are recursively traversed and recorded. When the terminal node T is reached, the path is saved. If a visited node is encountered, the previous node is backtracked until all nodes have been visited, resulting in b simple paths, where b is a positive integer. A simple path in the directed acyclic graph G3 represents a path from the starting node to the terminal node where all nodes are unique.
[0042] This process involves traversing each simple path and recording the edges between nodes in path order, resulting in b sets of reference edges. Then, all reference edge sets are integrated to obtain the target edge set. The total number of times each edge appears in the target edge set is then counted, yielding n counts. Finally, these n counts can be used as the corresponding n third-level layer numbers L3.
[0043] It is evident that by statistically analyzing the occurrence counts of each edge in all simple paths within a directed acyclic graph and converting this count into the third pole ear layer number, we can quantify the coreness and necessity of each edge from the perspective of path coverage in the pole ear topology. This allows for a deep match between the layer number reference value and the overall pole ear structure, further enhancing the comprehensiveness, rationality, and fit with the actual structure in subsequent pole ear layer calculations.
[0044] S107. Based on the number of m first electrode layers, the number of m second electrode layers, the number of n third electrode layers, and the preset maximum number of electrode layers, determine the number of n reference electrode layers.
[0045] The preset maximum number of tab layers is related to the battery specifications.
[0046] In some embodiments, step S107, determining n reference electrode layers based on m first electrode layers, m second electrode layers, n third electrode layers, and a preset maximum electrode layer count, includes: E1. Obtain the n first-pole layer numbers and n second-pole layer numbers corresponding to the n edges in the m first-pole layer numbers and m second-pole layer numbers respectively; E2. Determine the reference first electrode layer number corresponding to the reference edge among the n first electrode layer numbers; the reference edge is any one of the n edges; E3. Determine the reference second pole ear layer number among the n second pole ear layer numbers as the reference second pole ear layer number; E4. Determine the reference third pole ear layer number among the n third pole ear layer numbers; E5. The minimum value among the number of reference first electrode layers, the number of reference second electrode layers, the number of reference third electrode layers, and the preset maximum number of electrode layers is the number of reference electrode layers corresponding to the reference edge among the n reference electrode layers.
[0047] Specifically, from m first tab layers and m second tab layers, n first tab layers and n second tab layers corresponding to n edges are selected respectively. The preset maximum number of tab layers represents the maximum number of layers in the entire material, that is, it does not exceed the maximum number of layers allowed by the battery specifications.
[0048] As can be seen, by extracting the layer reference of the edges from multiple dimensions and taking the minimum value in combination with the battery specifications to determine the final reference layer number, we can avoid single-dimensional errors through triple verification of regression results, width measurement, and topology path, ensuring that the reference value fits the actual situation of the tab. At the same time, we can limit the upper limit of the engineering by setting a preset maximum layer number to avoid exceeding the actual load-bearing capacity of the battery. Ultimately, this provides a rigorous constraint benchmark that combines accuracy, rationality, and engineering feasibility for subsequent linear programming optimization, effectively improving the reliability and practical value of the target tab layer number calculation.
[0049] S108. Using the preset first linear programming model and second linear programming model, iterative optimization is performed based on the directed acyclic graph and n reference electrode layers to obtain the target electrode layer number of the battery.
[0050] In some embodiments, step S108, using a preset first linear programming model and a second linear programming model, performs iterative optimization based on a directed acyclic graph and n reference electrode layer numbers to obtain the target electrode layer number of the battery, including: F1. Obtain the first constraint and the first objective function corresponding to the preset first linear programming model; the first constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than 1 and less than the number of reference pole ears corresponding to the edge in the n reference pole ear layers; the first objective function is used to minimize the total number of layers of the in-node with an in-degree of 0 in the directed acyclic graph. F2. Solve according to the preset simplex method, the first constraint condition and the first objective function to obtain the lower limit of the total number of layers and the lower limit of the number of layers with n edges; F3. Obtain the second constraint and the second objective function corresponding to the preset second linear programming model; the second constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than the lower limit of the number of edge layers corresponding to that edge among the lower limits of the number of edge layers in n edges; the second objective function is used to maximize the total number of layers of the in-degree nodes with an in-degree of 0 in the directed acyclic graph. F4. Solve using the simplex method, the second constraint condition, and the second objective function to obtain the upper limit of the total number of layers and the upper limit of the number of layers with n edges; F5. If the lower limit and upper limit of the total number of layers meet the preset conditions, the lower limit of the total number of layers is rounded up to obtain the target number of electrode layers of the battery; or, if the preset conditions are not met, the first constraint condition is updated according to the lower limit and upper limit of the n edge layers and the solution is performed again until the preset conditions are met.
[0051] The first linear programming model includes a first constraint and a first objective function. This model is used to determine the lower limit of the total number of pole piece layers while ensuring that the number of layers for each edge is within a reasonable range. The first constraint includes: the in-degree of the intermediate nodes in the directed acyclic graph G3 is equal to their out-degree, and the number of pole piece layers corresponding to each edge in G3 is greater than 1 and less than the number of reference pole piece layers corresponding to that edge among n reference pole piece layers. The first objective function is used to minimize the total number of layers for in-nodes with an in-degree of 0 in the directed acyclic graph G3.
[0052] One approach is to use a pre-defined simplex method (such as the classic linear programming algorithm) to transform the first constraint and the first objective function into standard form (such as inequality constraints and non-negative variables) and solve them to obtain the lower bound of the total number of layers and the lower bound of the number of layers with n edges.
[0053] The second linear programming model includes a second constraint and a second objective function. This model determines the upper limit of the total number of pole ears while ensuring that the number of layers for each edge is within a reasonable range. The second constraint includes: the in-degree of the intermediate nodes in the directed acyclic graph G3 equals their out-degree, and the number of pole ears corresponding to each edge in G3 is greater than the lower limit of the number of edge layers among the n lower limits of edge layers. The second objective function maximizes the total number of layers for in-nodes with an in-degree of 0 in the directed acyclic graph G3.
[0054] The simplex method can be used to transform the second constraint and the second objective function into standard form and solve them to obtain the upper limit of the total number of layers and the upper limit of the number of n edge layers. If the absolute value of the difference between the lower limit and the upper limit of the total number of layers is less than a preset threshold, the lower limit of the total number of layers can be rounded up or the upper limit of the total number of layers can be rounded down to obtain the target number of electrode layers of the battery, without specific limitations. If the absolute value of the difference between the lower limit and the upper limit of the total number of layers is greater than or equal to the preset threshold, the first constraint is updated according to the lower limit and the upper limit of the number of n edge layers, and the solution is repeated until the preset condition is met, that is, the absolute value of the difference between the lower limit and the upper limit of the total number of layers is less than the preset threshold.
[0055] It should be noted that the preset threshold can be a constant with a fixed value and a small magnitude, for example, 0.5, without specific limitations. During the iterative update process, the first constraint can be updated as follows: the in-degree of the intermediate nodes in the directed acyclic graph G3 equals the out-degree, and the number of pole layers corresponding to each edge in the directed acyclic graph G3 is greater than the lower limit of the number of edge layers among the n edge layers and less than the upper limit of the number of edge layers among the n edge layers.
[0056] It is evident that by iteratively solving and judging convergence using a bilinear programming model, a reasonable range for the number of tab layers can be accurately determined under multi-dimensional constraints, ensuring that the results conform to physical reality, topology, and battery specifications. This also efficiently solves the problem of calculating the number of layers in complex tab topologies, significantly improving the accuracy and reliability of the results.
[0057] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0058] Based on the same inventive concept, this application also provides a battery tab layer number calculation device based on linear programming. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more battery tab layer number calculation device embodiments based on linear programming provided below can be found in the limitations of the battery tab layer number calculation method based on linear programming above, and will not be repeated here.
[0059] like Figure 5 As shown, this application embodiment provides a battery tab layer number calculation device 500 based on linear programming, including: Image processing module 501 is used to process the target electrode image of the battery to obtain semantic segmentation results and regression results; the semantic segmentation results are used to calibrate the electrode position; the regression results are used to calibrate the number of electrode layers. Module 502 is used to construct an undirected graph based on the semantic segmentation results; the undirected graph includes m edges; m is a positive integer; The determination module 503 is used to determine the number of m first electrode layers and m second electrode layers corresponding to m edges based on the regression results; to convert the undirected graph into a directed graph according to the electrode placement direction corresponding to the target electrode image; to determine a directed acyclic graph (DAG) based on the directed graph; the DAG includes n edges; n is a positive integer less than or equal to m; to determine the number of n third electrode layers corresponding to the n edges based on the DAG; and to determine the number of n reference electrode layers based on the number of m first electrode layers, m second electrode layers, n third electrode layers, and a preset maximum electrode layer number. The linear programming module 504 is used to perform iterative optimization operations based on a directed acyclic graph and n reference electrode layers using a preset first linear programming model and a second linear programming model to obtain the target number of electrode layers for the battery.
[0060] In some embodiments, in constructing an undirected graph based on semantic segmentation results, the construction module 502 is specifically used for: The semantic segmentation result is denoised to obtain the target semantic segmentation result; The skeleton of the target semantic segmentation result is extracted to obtain a skeleton map; Node identification is performed on the skeleton graph to obtain the endpoint set and the intersection set; the endpoint set includes the start node and the end node. Construct an undirected graph based on the set of endpoints and the set of intersections.
[0061] In some embodiments, in determining the number of m first tab layers and m second tab layers corresponding to the m edges by combining regression results, the determining module 503 is specifically used for: Obtain the first pole ear region corresponding to the first edge in the target semantic segmentation result; the first edge is any edge among the m edges; Obtain the maximum value in the first tabular region of the regression results to obtain the target maximum number of tabular layers; The target maximum number of electrode layers is taken as the number of the first electrode layers corresponding to the first side among the m first electrode layer numbers; Multiple measurement points are set on the first side at preset intervals along a direction parallel to the first side. Along the direction perpendicular to the first side, the width is measured at each of the multiple measurement points to obtain multiple widths; Determine the maximum value among multiple widths as the width of the first side of the first side; Based on the preset width threshold and the width of the first side, determine the number of second tab layers corresponding to the first side among m second tab layers; the preset width threshold is related to the battery specifications.
[0062] In some embodiments, in determining a directed acyclic graph from a directed graph, the determining module 503 is specifically configured to: When there are no cycles in a directed graph, the directed graph is treated as a directed acyclic graph; or, When there are a cycles in a directed graph, each of the a cycles is compressed into a reference node, resulting in a reference nodes; where a is a positive integer. Replacing the a cycles in the directed graph with a reference nodes yields a directed acyclic graph.
[0063] In some embodiments, in determining the number of n third-pole layers corresponding to n edges based on a directed acyclic graph, the determining module 503 is specifically used for: Find all simple paths in a directed acyclic graph (DAG), resulting in b simple paths. A simple path is a path in the DAG from the starting node to the ending node, where all nodes are unique. b is a positive integer. Traverse all edges contained in each of the b simple paths to obtain a set of b reference edges; Integrate the b reference edge sets into the target edge set; Find the number of times each of the n edges appears in the target edge set, resulting in n counts; The number of n third pole ear layers corresponding to the n edges is determined by the number of n times.
[0064] In some embodiments, in determining the number of n reference electrode layers based on m first electrode layers, m second electrode layers, n third electrode layers, and a preset maximum electrode layer number, the determining module 503 is specifically used for: Obtain the n first-eave layers and n second-eave layers corresponding to the n edges in the m first-eave layers and m second-eave layers respectively; The reference first electrode layer number is determined by identifying the first electrode layer number corresponding to the reference edge among the n first electrode layer numbers; the reference edge is any edge among the n edges. Determine the reference second pole ear layer number as the second pole ear layer number among the n second pole ear layer numbers; Determine the reference third pole ear layer number as the third pole ear layer number among the n third pole ear layer numbers; The minimum value among the number of reference first electrode layers, the number of reference second electrode layers, the number of reference third electrode layers, and the preset maximum number of electrode layers is the number of reference electrode layers corresponding to the reference edge among the n reference electrode layers.
[0065] In some embodiments, in obtaining the target number of tab layers for the battery through iterative optimization operations based on a directed acyclic graph and n reference tab layers using a preset first linear programming model and a second linear programming model, the linear programming module 504 is specifically used for: Obtain the first constraint and the first objective function corresponding to the preset first linear programming model; the first constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than 1 and less than the number of reference pole ears corresponding to the edge among n reference pole ear layers; the first objective function is used to minimize the total number of layers of the in-node with an in-degree of 0 in the directed acyclic graph. Solve the problem using the preset simplex method, the first constraint condition, and the first objective function to obtain the lower limit of the total number of layers and the lower limit of the number of layers with n edges; Obtain the second constraint and the second objective function corresponding to the preset second linear programming model; the second constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than the lower limit of the number of edge layers corresponding to that edge among the lower limits of the number of edge layers of n edges; the second objective function is used to maximize the total number of layers of the in-degree nodes with an in-degree of 0 in the directed acyclic graph. Solving using the simplex method, the second constraint, and the second objective function yields the upper limit of the total number of layers and the upper limit of the number of layers with n edges. If the lower limit and upper limit of the total number of layers meet the preset conditions, then the lower limit of the total number of layers is rounded up to obtain the target number of electrode layers for the battery; or, If the preset conditions are not met, the first constraint condition is updated based on the lower limit of the number of n edge layers and the upper limit of the number of n edge layers, and the solution is repeated until the preset conditions are met.
[0066] Each module in the aforementioned linear programming-based battery tab layer number calculation device 500 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0067] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the battery tab layer number calculation method. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the aforementioned linear programming-based battery tab layer number calculation method.
[0068] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the steps in the above-described linear programming-based method for calculating the number of battery tab layers. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen; the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0069] Those skilled in the art will understand that Figure 6 or Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0070] In some embodiments, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0071] In some embodiments, such as Figure 8 The diagram shows the internal structure of a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the above-described method embodiments.
[0072] In some embodiments, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0073] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0074] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0075] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0076] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for calculating the number of battery tab layers based on linear programming, characterized in that, include: The target electrode image of the battery is processed to obtain semantic segmentation results and regression results; The semantic segmentation results are used to determine the position of the electrode tabs; The regression results are used to determine the number of tab layers; An undirected graph is constructed based on the semantic segmentation results; the undirected graph includes m edges; m is a positive integer. Based on the regression results, determine the number of m first tab layers and the number of m second tab layers corresponding to the m edges respectively; Based on the electrode placement direction corresponding to the target electrode image, the undirected graph is converted into a directed graph; A directed acyclic graph is determined based on the directed graph; the directed acyclic graph includes n edges; n is a positive integer less than or equal to m; The number of n third-pole layers corresponding to the n edges is determined based on the directed acyclic graph. Based on the m first electrode layers, the m second electrode layers, the n third electrode layers, and the preset maximum electrode layer number, determine the n reference electrode layers. By using a preset first linear programming model and a second linear programming model, and performing iterative optimization operations based on the directed acyclic graph and the n reference electrode layer numbers, the target electrode layer number of the battery is obtained.
2. The method according to claim 1, characterized in that, The step of constructing an undirected graph based on the semantic segmentation result includes: The semantic segmentation result is denoised to obtain the target semantic segmentation result; The skeleton of the target semantic segmentation result is extracted to obtain a skeleton graph; Node identification is performed on the skeleton graph to obtain an endpoint set and an intersection set; the endpoint set includes a start node and an end node. Construct an undirected graph based on the set of endpoints and the set of intersections.
3. The method according to claim 2, characterized in that, The determination of the number of m first tab layers and m second tab layers corresponding to the m edges, based on the regression results, includes: Obtain the first edge region corresponding to the first edge in the target semantic segmentation result; the first edge is any edge among the m edges; The maximum value in the first tab region of the regression result is obtained to determine the target maximum number of tab layers. The target maximum number of electrode layers is taken as the number of the first electrode layers corresponding to the first side in the m number of first electrode layers; Multiple measurement points are set on the first side at preset intervals along a direction parallel to the first side. Width is measured at each of the plurality of measurement points along a direction perpendicular to the first side to obtain multiple widths; The maximum value among the plurality of widths is determined as the width of the first side of the first side; Based on a preset width threshold and the width of the first side, the number of second tab layers corresponding to the first side among m second tab layers is determined; the preset width threshold is related to the specifications of the battery.
4. The method according to claim 1, characterized in that, The step of determining a directed acyclic graph based on the directed graph includes: When there are no cycles in the directed graph, the directed graph is considered a directed acyclic graph; or, When there are a ring structures in the directed graph, each of the a ring structures is compressed into a reference node, resulting in a reference nodes; where a is a positive integer; the a ring structures in the directed graph are replaced with the a reference nodes to obtain a directed acyclic graph.
5. The method according to claim 4, characterized in that, The step of determining the number of n third-pole layers corresponding to the n edges based on the directed acyclic graph includes: Obtain all simple paths in the directed acyclic graph, resulting in b simple paths; a simple path represents a path in the directed acyclic graph from the starting node to the ending node, where all nodes are unique; b is a positive integer; Traverse all edges contained in each of the b simple paths to obtain b reference edge sets; integrate the b reference edge sets into a target edge set; Obtain the number of times each of the n edges appears in the target edge set, resulting in n counts; The number of n third electrode layers corresponding to the n edges is determined based on the n times.
6. The method according to claim 5, characterized in that, The step of determining n reference electrode layers based on the m first electrode layers, the m second electrode layers, the n third electrode layers, and a preset maximum electrode layer count includes: Obtain the n first electrode layer numbers and n second electrode layer numbers corresponding to the n edges in the m first electrode layer numbers and the m second electrode layer numbers, respectively; The reference first electrode layer number is determined by the reference edge among the n first electrode layer numbers; the reference edge is any one of the n edges. The reference second electrode layer number is determined as the second electrode layer number corresponding to the reference edge among the n second electrode layer numbers; The reference third electrode layer number is determined as the third electrode layer number corresponding to the reference edge among the n third electrode layer numbers; The minimum value among the number of reference first electrode layers, the number of reference second electrode layers, the number of reference third electrode layers, and the preset maximum number of electrode layers is determined to be the number of reference electrode layers corresponding to the reference edge among the n reference electrode layer numbers.
7. The method according to any one of claims 1-6, characterized in that, The step involves iterative optimization using a preset first linear programming model and a second linear programming model, based on the directed acyclic graph and the n reference electrode layer numbers, to obtain the target electrode layer number of the battery, including: Obtain the first constraint and the first objective function corresponding to the preset first linear programming model; the first constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than 1 and less than the number of reference pole ears corresponding to the edge among the n reference pole ear numbers; the first objective function is used to minimize the total number of layers of the in-nodes with an in-degree of 0 in the directed acyclic graph; Solving the problem using the preset simplex method, the first constraint condition, and the first objective function yields the lower limit of the total number of layers and the lower limit of the number of layers with n edges. Obtain the second constraint and the second objective function corresponding to the preset second linear programming model; the second constraint includes: the number of pole ears corresponding to each edge in the directed acyclic graph is greater than the lower limit of the number of edge layers corresponding to that edge among the lower limits of the number of edge layers of n edges; the second objective function is used to maximize the total number of layers of the in-degree nodes with an in-degree of 0 in the directed acyclic graph; Solving the problem using the simplex method, the second constraint, and the second objective function yields the upper limit of the total number of layers and the upper limit of the number of n edge layers. If the lower limit and the upper limit of the total number of layers meet a preset condition, then the lower limit of the total number of layers is rounded up to obtain the target number of tab layers for the battery; or, If the preset conditions are not met, the first constraint conditions are updated according to the lower limit of the number of n edge layers and the upper limit of the number of n edge layers, and the solution is performed again until the preset conditions are met.
8. A battery tab layer number calculation device based on linear programming, characterized in that, include: The image processing module is used to process the target electrode image of the battery to obtain semantic segmentation results and regression results; The semantic segmentation results are used to determine the position of the electrode tabs; The regression results are used to determine the number of tab layers; The construction module is used to construct an undirected graph based on the semantic segmentation result; the undirected graph includes m edges; m is a positive integer; The determination module is used to determine the number of m first tab layers and the number of m second tab layers corresponding to the m edges, respectively, based on the regression results; Based on the electrode placement direction corresponding to the target electrode image, the undirected graph is converted into a directed graph; a directed acyclic graph is determined based on the directed graph; the directed acyclic graph includes n edges; n is a positive integer less than or equal to m; The n third electrode layer numbers corresponding to the n edges are determined according to the directed acyclic graph; the n reference electrode layer numbers are determined according to the m first electrode layer numbers, the m second electrode layer numbers, the n third electrode layer numbers and the preset maximum electrode layer number. The linear programming module is used to perform iterative optimization operations based on the directed acyclic graph and the n reference electrode layer numbers using a preset first linear programming model and a second linear programming model to obtain the target electrode layer number of the battery.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Traffic distribution method and system based on multi-source data
CN111105613A
Plane cutting method and device oriented to VLSI (Very Large Scale Integration) division, computer equipment and medium
CN118898229A
Equipment execution method and device based on directed graph and computer equipment
CN119537652A
Battery production index causal relationship detection method and device, equipment and medium
CN120579620A
Lithium ion battery equalizing charge control method and system based on BMS
CN120601576A