A battery grouping method, system, device and medium based on a multi-stage cascading strategy
By employing a multi-level cascading strategy and a multi-dimensional matching mechanism, combined with working time and voltage values, intelligent and automated battery pairing is achieved. This solves the problems of low pairing power and resource waste in existing technologies, and improves the capacity consistency and safety of battery packs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU COLLABORATIVE INNOVATION INTELLIGENT MFG EQUIP CO LTD
- Filing Date
- 2026-04-18
- Publication Date
- 2026-07-28
AI Technical Summary
Existing battery pairing technologies suffer from low pairing success rates, significant resource waste, and an inability to flexibly adjust pairing standards to adapt to different battery types and application scenarios, failing to effectively utilize the spatial information of batteries on testing equipment.
A multi-level cascaded strategy is adopted, which combines single-path grouping, same-slot grouping, same-layer grouping and mixed grouping with a multi-dimensional matching mechanism based on working time and dual voltage to realize intelligent and automated battery grouping. It uses multi-source data fusion and feature extraction algorithms for accurate grouping, and monitors the grouping process in real time through anomaly detection and hierarchical alarm mechanisms.
It significantly improves the success rate and quality of battery pairing, ensures the capacity consistency and safety of battery packs, reduces system maintenance costs, and achieves efficient utilization and flexible adaptability of battery resources.
Smart Images

Figure CN122474741A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cascaded battery packing technology, and in particular to a battery packing method, system, device and medium based on a multi-level cascaded strategy. Background Technology
[0002] With the rapid development of new energy vehicles and the energy storage industry, the performance consistency of battery packs has become a key factor affecting product quality and safety. Battery packing refers to the process of combining individual cells with similar performance parameters into a battery pack, which directly affects the capacity, lifespan, and safety of the battery pack.
[0003] Existing patents disclose a method for capacity grading and grouping lithium-ion batteries, including initial grouping, secondary grouping, and final grouping. Initial grouping is based on discharge energy and charging constant current ratio at different temperatures; secondary grouping is based on the self-discharge K-value at high temperatures; and final grouping is based on voltage and internal resistance at room temperature. This invention incorporates temperature and self-discharge K-value into the grouping process through three capacity grading stages, three charging stages, high-temperature aging, and three grouping stages. This ensures that the performance indicators of lithium-ion batteries within the same group are more similar after final grouping. This not only reduces the impact of temperature on lithium-ion batteries but also improves charging efficiency at different temperatures. Furthermore, it mitigates the impact of increasing voltage differences due to longer battery life and varying temperatures, thereby ensuring battery consistency and extending battery lifespan.
[0004] The existing technical solutions mentioned above have the following drawbacks: 1. They usually adopt a single matching standard. For batteries with dispersed performance parameters, the matching power is low, resulting in a large number of batteries not being used effectively and causing a waste of resources; 2. In actual production, the physical location of batteries on the testing equipment (such as the same test line, the same slot, or the same level) has a significant impact on the grouping efficiency, but the existing system has failed to effectively utilize this spatial information; 3. The pairing parameters and rules are usually hard-coded in the system, making it impossible to flexibly adjust the pairing standards according to different battery types and application scenarios, resulting in poor adaptability. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the purpose of this application is to provide a battery grouping method, system, device, and medium based on a multi-level cascading strategy. Through a four-level cascading strategy of single-path grouping, same-cell grouping, same-layer grouping, and mixed grouping, combined with a multi-dimensional matching mechanism of working time and dual voltage, the power output of battery grouping is maximized and the grouping quality is intelligently graded and managed.
[0006] This was achieved using the following technical solutions: In a first aspect, this application provides a battery packing method based on a multi-level cascade strategy, comprising: Multidimensional acquisition and analysis of battery information to extract battery operating parameters and battery deployment parameters; Based on the preset multi-level cascaded matching mechanism, combined with battery operating parameters and battery deployment parameters, batteries are matched at multiple levels to form a battery pack list. Monitor the battery grouping process of the multi-level cascaded grouping mechanism, and determine the grouping abnormality level by combining the preset abnormality detection alarm mechanism, and record and display abnormal grouping events.
[0007] By adopting the above technical solutions, battery operation and deployment parameters are obtained based on multi-source data fusion and feature extraction algorithms. Multi-level cascaded matching algorithms (such as clustering or decision trees) are used to achieve precise battery grouping. Anomaly detection and hierarchical alarm mechanisms (such as statistical models and threshold judgment) are used to monitor the grouping process in real time, realizing intelligent, automated and highly reliable battery grouping, and significantly improving grouping efficiency and consistency.
[0008] This application is further configured to: collect and analyze battery information in multiple dimensions, and extract battery operating parameters and battery deployment parameters, including: Perform serial port parsing on all batteries, extract all available serial ports of the batteries, and establish a data transmission channel by combining the baud rate and data bits; The battery information query command is encapsulated according to the preset communication protocol and transmitted to the target battery in conjunction with the data transmission channel; The serial port buffer data of the target battery is received and verified to obtain the original battery data packet; The original battery data packet is matched, parsed, and denoised according to the protocol header to obtain a noise-free battery data packet. The noiseless battery data packet is deconstructed according to the data format to extract battery operating parameters including channel real-time voltage value, open circuit voltage value, termination voltage value and cumulative working time; The target battery is located to obtain battery deployment parameters including the battery rack number and the actual line number.
[0009] By adopting the above technical solution, a data transmission channel is established based on serial communication and protocol parsing algorithms. The original battery data packets are obtained through command encapsulation and verification denoising. The operating parameters and positioning information are extracted using structured deconstruction technology, which realizes automated and highly reliable acquisition and parsing of battery information, significantly improving the accuracy and efficiency of data acquisition.
[0010] This application is further configured to: based on a preset multi-level cascaded matching mechanism combined with battery operating parameters and battery deployment parameters, multi-level matching of batteries is performed to form a battery pack list, including: Based on the preset multi-level cascaded grouping mechanism, the battery operating parameters and battery deployment parameters are associated and sorted to obtain the batch number of the group to be matched. Based on the batch number of the group to be matched and the host circuit number, the actual circuit number of the target battery is identified to determine the battery with the same circuit. Based on the cumulative working time and real-time voltage value, perform single-channel matching for batteries on the same line; If a single-path match is successful, then construct a single-path battery pack and mark the single-path outlier battery. No, then the slot matching for a single out-of-system battery is performed based on the battery rack number and the actual line number; If a matching cell is successful, a cell group is constructed and outlier cells in the same cell are marked. No, then perform same-layer matching for outlier batteries in the same slot according to the logic layer number; If a matching is successful within the same layer, then construct the same-layer battery pack and mark the outlier battery within the same layer. No, then based on the preset time interval rules and the cumulative working time, a loose matching is performed on the outlier batteries in the same layer; If the loose matching is successful, a mixed battery pack is constructed, a mixed pack identifier is assigned, and the unmixed batteries are extracted. No, then mark the unmixed batteries and assign them a separate storage tag to be verified; Based on the grouping level and the mixed group identification, single-channel battery groups, same-slot battery groups, same-layer battery groups and mixed battery groups are merged to form a battery group list.
[0011] By adopting the above technical solution, based on hierarchical clustering and rule matching algorithms, batteries are matched step by step through lines, slots, layers and time tolerances, realizing intelligent battery grouping in multi-level cascade, which significantly improves the grouping accuracy, flexibility and system adaptability.
[0012] This application further includes: performing single-channel matching of batteries on the same circuit based on cumulative operating time and real-time voltage value, including: The batteries on the same circuit are sorted in ascending order based on their cumulative working time, and the median value of the time interval is extracted. The difference between the cumulative working time and the median of the time interval is calculated based on the termination voltage value to obtain the time difference. If the time difference is less than the preset error threshold, the current battery on the same line and the battery on the same line corresponding to the median of the time interval are combined to construct a preliminary battery pack. No, then the battery on the current line is determined to be a single-path outlier battery; Arrange the cells in the initial battery pack in ascending order based on the open-circuit voltage value, determine the median of the voltage range, and calculate the corresponding voltage difference. If the voltage difference is within the preset voltage difference range, it is determined that the current battery on the same line is successfully matched with the battery on the same line corresponding to the midpoint of the voltage range, and a single battery pack is generated.
[0013] By adopting the above technical solution, based on a dual-layer threshold comparison algorithm of median duration and median voltage, batteries on the same line are sorted, differences are calculated, and intervals are checked, realizing automated single-line grouping from initial grouping to fine matching, which significantly improves the accuracy and consistency of grouping.
[0014] This application further specifies a multi-level cascading group mechanism, including: The battery information is statistically analyzed and verified to determine the target battery information, calculate the number of target batteries, and compare it with the preset trigger number threshold. If the number of target batteries is greater than the first trigger number threshold, the battery grouping rules are matched and filled according to the task identifier to obtain the cascaded grouping rules. The cascaded grouping rules are decomposed and reconstructed to determine the single-path rule branches and grouping standard parameters for different levels; The target battery information is matched according to the single-path rule branch, and the battery pack sequence is determined by combining the grouping standard parameters, and the number of outlier batteries in a single path is counted. If the number of out-of-line batteries in a single channel is greater than the second trigger threshold, then the same-slot rule branch in the cascaded matching rule is extracted, the out-of-line batteries in a single channel are matched, and added to the battery group sequence, and the number of out-of-line batteries in the same slot is counted. If the number of outlier batteries in the same slot is greater than the third trigger threshold, then extract the same-layer rule branch from the cascaded matching rule, match the outlier batteries in the same slot, add them to the battery group sequence, and count the number of outlier batteries in the same layer. If the number of outlier batteries in the same layer is greater than the fourth trigger number threshold, then the mixing rule branch in the cascaded matching rule is extracted, the outlier batteries in the same layer are matched, and added to the battery group sequence, and the unmatched batteries are marked.
[0015] By adopting the above technical solution, based on threshold triggering and hierarchical rule matching algorithm, and through a progressive matching mechanism of single-path, same-slot, same-layer, and mixed matching, the battery grouping of different scales is adaptively processed, which significantly improves the grouping efficiency and resource utilization.
[0016] This application is further configured to: monitor the battery grouping process of the multi-level cascaded grouping mechanism, and determine the grouping abnormality level in conjunction with a preset abnormality detection alarm mechanism, and record abnormal grouping events, including: The battery pairing process and operating status are monitored separately, and pairing monitoring channels and status monitoring channels are created. The multi-level cascaded grouping mechanism is divided into levels according to the grouping monitoring channel, the key link layer is determined, and corresponding anomaly detection points are set. Anomalies are detected in the pairing process based on anomaly detection points to capture abnormal pairing data and locate abnormal pairing links. The abnormal pairing data is graded based on the anomaly type and context information to determine the anomaly level of the pairing; The abnormal pairing process, target battery information, and pairing abnormality level are correlated to generate abnormal pairing events; The battery's operating status is detected through the status monitoring channel, and battery operating parameters are collected. The battery operating parameters are detected based on the preset battery life cycle model to determine the battery state level; If the battery status level is dangerous, the corresponding target battery information is removed from the battery pack sequence, and an abnormal pairing event is generated and visualized. Based on the abnormal grouping level, strategy matching is performed on abnormal grouping events to determine abnormal grouping control strategies; If the grouping anomaly level is Level 1, the current grouping process will be interrupted, the task status will be marked as failed, and related resources will be released. If the grouping anomaly level is level 2, it will automatically retry, record the number of retries until the limit threshold is reached, and then upgrade to level 1 anomaly. If the grouping anomaly level is three, record the warning and continue execution, and mark the abnormal grouping data.
[0017] By adopting the above technical solution, based on hierarchical monitoring and anomaly detection algorithms, detection points are set at key stages of battery pairing to capture abnormal data. Combined with a full life cycle model to evaluate battery status, intelligent monitoring and self-healing of the pairing process are achieved through multi-level anomaly judgment and differentiated control strategies (interruption, retry, warning), which significantly improves pairing reliability, automation level and anomaly response efficiency.
[0018] Secondly, this application also provides a battery packing system based on a multi-level cascade strategy, employing the following technical solution: A battery grouping system based on a multi-level cascading strategy, used to implement a battery grouping method, includes: The data acquisition module is used for multi-dimensional acquisition and analysis of battery information, extracting battery operating parameters and battery deployment parameters; the data acquisition module includes a serial communication layer for parsing the battery's communication protocol; The battery pack engine module is used to match batteries at multiple levels and form a battery pack list based on a preset multi-level cascaded battery packing mechanism combined with battery operating parameters and battery deployment parameters. The monitoring and display module is used to monitor the battery grouping process of the multi-level cascaded grouping mechanism, and to determine the grouping abnormality level in combination with the preset abnormality detection alarm mechanism, and to record and visualize abnormal grouping events; the monitoring and display module includes the equipment management layer, which is used to manage the picking and putting of all batteries and the addition and removal of batteries from the battery group list. The data storage module is used to store abnormal pairing events based on battery identifiers.
[0019] By adopting the above technical solutions, battery operation and deployment parameters are collected based on serial communication and protocol parsing algorithms. Multi-level cascaded matching algorithms (such as hierarchical clustering and rule recursion) are used to realize intelligent battery grouping. The grouping process and battery status are monitored in real time through anomaly detection and hierarchical alarm mechanisms, forming an automated system from data collection and grouping decision to closed-loop monitoring, which significantly improves battery grouping efficiency, accuracy and system reliability.
[0020] Thirdly, this application also provides an electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.
[0021] Fourthly, this application also provides a storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the battery grouping method based on the multi-level cascading strategy as described above.
[0022] In summary, the beneficial technical effects of this application are as follows: By using a cascaded process of single-path → same-slot → same-layer → mixed-assembly, the power output of battery assembly is maximized and the quality is automatically graded. For the first time, spatial location information (line, slot, layer) is combined with performance parameter matching, which solves the problems of low battery assembly power output and resource waste. By using operating time as the primary matching parameter, the actual capacity of the battery is reflected; through the dual constraints of time interval and error range, accurate capacity matching is achieved; the operating time sorting and interval matching algorithm ensures a high degree of consistency in the capacity of batteries in the same group. Key parameters such as time intervals, error ranges, route combinations, and group identifiers are all configured through a database and support dynamic adjustments. Grouping strategies can be optimized without modifying the code, reducing system maintenance costs. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the overall process of the battery grouping method in this application; Figure 2 This is a flowchart illustrating the multi-level cascading grouping mechanism in this application; Figure 3 This is a schematic diagram of the battery packing system in this application. Detailed Implementation
[0024] The present application will be further described in detail below with reference to the accompanying drawings.
[0025] Reference Figure 1 This application discloses a battery grouping method based on a multi-level cascading strategy, comprising: S1: Multi-dimensional acquisition and analysis of battery information, extraction of battery operating parameters and battery deployment parameters; S2: Based on the preset multi-level cascaded matching mechanism and combined with battery operating parameters and battery deployment parameters, multi-level matching of batteries is performed to form a battery pack list; S3: Monitors the battery grouping process of the multi-level cascaded grouping mechanism, and determines the grouping abnormality level in combination with the preset abnormality detection alarm mechanism, and records and displays abnormal grouping events.
[0026] In this embodiment, the battery management system (BMS) and IoT data acquisition terminal are used to collect and analyze information from lead-acid batteries from different batches and suppliers. Battery operating parameters, including cycle life, internal resistance, open circuit voltage, and temperature characteristics, as well as battery deployment parameters, such as installation location, deployment time, and maintenance records, are extracted.
[0027] Subsequently, according to the preset multi-level cascaded matching mechanism—the first level is for initial screening based on battery brand and nominal capacity; the second level is for matching based on internal resistance difference ≤5% and voltage platform consistency; and the third level is for fine screening based on the overlap of discharge curves under simulated operating conditions—batteries that meet the consistency requirements are matched level by level to form a battery pack list containing 8 groups with a total of 128 batteries, ensuring that the performance difference between batteries in each group is minimized. During the matching process, the system continuously monitors the real-time data of each matching level. When the internal resistance fluctuation of a battery exceeds the set threshold (dynamic internal resistance deviation ≥8%) during the second-level matching, the system determines the event as a "level two anomaly" based on the preset anomaly detection alarm mechanism, immediately records the abnormal matching event, and displays the abnormal battery number, deviation parameters, and impact range through a visual interface. At the same time, an alarm is triggered to prompt maintenance personnel to replace the battery, thereby ensuring that the final battery pack has balanced charge and discharge characteristics when running in parallel, avoiding the degradation of the entire pack's lifespan due to individual cell differences.
[0028] Preferably, step S1 includes: Perform serial port parsing on all batteries, extract all available serial ports of the batteries, and establish a data transmission channel by combining the baud rate and data bits; The battery information query command is encapsulated according to the preset communication protocol and transmitted to the target battery in conjunction with the data transmission channel; The serial port buffer data of the target battery is received and verified to obtain the original battery data packet; The original battery data packet is matched, parsed, and denoised according to the protocol header to obtain a noise-free battery data packet. The noiseless battery data packet is deconstructed according to the data format to extract battery operating parameters including channel real-time voltage value, open circuit voltage value, termination voltage value and cumulative working time; The target battery is located to obtain battery deployment parameters including the battery rack number and the actual line number.
[0029] In this embodiment, all available serial ports are enumerated using SerialPortUtil.findPort(), and the serial port of the target host is located according to the correspondence between hostNumber and serialPort configured in the htm_host table. Then, SerialPortUtil.openPort() is called to open the corresponding serial port, set parameters such as baud rate and data bits, and establish a physical communication link with the battery testing equipment.
[0030] CommandManager assembles data query commands for specific hosts, racks, and lines according to a preset communication protocol. The commands contain fields such as target host number, rack number, and line mask. After being encapsulated into a protocol packet, the command is sent to the test device by calling SerialPortUtil.sendToPort() through CommunicationManager.
[0031] SerialPortUtil.readFromPort() continuously reads data from the serial port buffer until a complete data packet is received. CommandMatcher matches and parses the raw binary stream according to rules such as protocol headers and length checksums, removing noisy data to ensure the integrity and correctness of the data packet.
[0032] The verified data packets are deconstructed according to a predefined format to extract battery operating parameters such as real-time voltage values (v1 to v20), open-circuit voltages (openV1 to openV20), and cumulative working time (workTime1 to workTime20) for each channel. These parameters reflect the current electrical performance status of the battery and the progress of the test.
[0033] Based on the host (hostNumber) corresponding to the current communication, the system queries the mac_machine_rack table to obtain the rack information (machineNumber) under that host, and then establishes the binding relationship between the rack and the line through the mac_machine_line_bind table, obtaining the logical number (lineNumber) and actual physical number (realLineNumber) of each test line. At the same time, the unique identifier ID of the host and rack is recorded as the basis for associating deployment parameters and operational data.
[0034] Preferably, step S2 includes: Based on the preset multi-level cascaded grouping mechanism, the battery operating parameters and battery deployment parameters are associated and sorted to obtain the batch number of the group to be matched. Based on the batch number of the group to be matched and the host circuit number, the actual circuit number of the target battery is identified to determine the battery with the same circuit. Based on the cumulative working time and real-time voltage value, perform single-channel matching for batteries on the same line; If a single-path match is successful, then construct a single-path battery pack and mark the single-path outlier battery. No, then the slot matching for a single out-of-system battery is performed based on the battery rack number and the actual line number; If a matching cell is successful, a cell group is constructed and outlier cells in the same cell are marked. No, then perform same-layer matching for outlier batteries in the same slot according to the logic layer number; If a matching is successful within the same layer, then construct the same-layer battery pack and mark the outlier battery within the same layer. No, then based on the preset time interval rules and the cumulative working time, a loose matching is performed on the outlier batteries in the same layer; If the loose matching is successful, a mixed battery pack is constructed, a mixed pack identifier is assigned, and the unmixed batteries are extracted. No, then mark the unmixed batteries and assign them a separate storage tag to be verified; Based on the grouping level and the mixed group identification, single-channel battery groups, same-slot battery groups, same-layer battery groups and mixed battery groups are merged to form a battery group list.
[0035] In this embodiment, single-channel matching of batteries on the same line is performed based on cumulative working time and real-time voltage value, including: The batteries on the same circuit are sorted in ascending order based on their cumulative working time, and the median value of the time interval is extracted. The difference between the cumulative working time and the median of the time interval is calculated based on the termination voltage value to obtain the time difference. If the time difference is less than the preset error threshold, the current battery on the same line and the battery on the same line corresponding to the median of the time interval are combined to construct a preliminary battery pack. No, then the battery on the current line is determined to be a single-path outlier battery; Arrange the cells in the initial battery pack in ascending order based on the open-circuit voltage value, determine the median of the voltage range, and calculate the corresponding voltage difference. If the voltage difference is within the preset voltage difference range, it is determined that the current battery on the same line is successfully matched with the battery on the same line corresponding to the midpoint of the voltage range, and a single battery pack is generated.
[0036] In this embodiment, the MatchOrchestrator initiates the grouping process and creates a MatchContext object. It loads the test batch data to be grouped from the database (associated via startRecordId), obtains allDataRecords (a list of all battery test data), and loads endVoltageMap (termination voltage mapping) and openVoltageMap (open-circuit voltage mapping) as grouping references. It initializes previousFailedGroups to empty, preparing to hold the list of failed batteries passed through each stage.
[0037] MatchOrchestrator invokes a single-path grouping strategy. The system iterates through the 20 battery slots on each test line, identifying batteries within the same line based on lineNumber (host line number) and realLineNumber (actual line number). Precise matching is performed based on working time (workTime1-workTime20) and voltage parameters (v1-v20), grouping batteries with high parameter consistency into initial groups.
[0038] The battery test data list for the current line is read from the MatchContext. Each line corresponds to a set of batteries, typically 20 battery slots. The data for each battery is encapsulated as a MachineRackBatteryInfo object, containing machineNumber (rack number), realLineNumber (actual line number), batteryNumber (battery slot number), workTime (working duration), batteryVoltage (voltage value), and voltageType (voltage type, such as termination voltage or open circuit voltage). A unique identifier, "rack number@line number@battery slot number," is generated using the generateBatteryIndex method to ensure precise location of each battery.
[0039] The `machineRackBatteryWorkTimeSort` method is called to sort all batteries on the current line in ascending order based on their operating time. The sorted battery list serves as the basis for subsequent grouping.
[0040] Retrieves the preset time interval rules of the current grouping plan from the MatchGroupPlanSingle table, including the lower time limit (timeLowerLimitMinute, timeLowerLimitSecond), the upper time limit (timeUpperLimitMinute, timeUpperLimitSecond), and the allowed error range (timeErrorMinute, timeErrorSecond). These configurations define the grouping criteria and tolerances for work duration.
[0041] The EndVoltageProcessingStrategy is employed to iterate through the sorted battery list and group them according to time intervals. The algorithm calculates the difference between the operating time of each battery and the midpoint of the current interval (interval midpoint = (lower limit + upper limit) / 2). If the difference is less than a set error range, the battery is assigned to the current interval group; otherwise, a new interval is opened or it is marked as pending. This process continues until all batteries have been processed.
[0042] Several battery packs are initially matched based on their operating time. The operating time of the batteries in each pack falls within the same time interval and meets the error requirements. Batteries that do not meet any interval requirements are marked as "single-path grouping failure" and added to the failedGroups list.
[0043] Read the system parameter hasOpenVolt. If this parameter is false, the current operating duration is grouped as the final single-channel grouping result; if it is true, further filtering is performed within each group based on the open-circuit voltage.
[0044] For each working duration group generated in the previous step, the `OpenVoltageProcessingStrategy` is invoked. First, the open-circuit voltage value (openV1-openV20) for each battery within the group is retrieved from the context and distinguished by `voltageType`. Then, the `machineRackBatteryVoltageSort` method is called to sort the batteries in ascending order of open-circuit voltage. Next, the `VoltageGroupProcessor` is used to further group the batteries within the group based on voltage difference: the voltage difference between adjacent batteries is calculated; if the difference is within a preset allowable range (configurable via system parameters), they are grouped into the same subgroup; otherwise, they are separated. Ultimately, the batteries within each subgroup simultaneously meet the dual conditions of consistent working duration and similar open-circuit voltage.
[0045] Subgroups that meet the criteria are marked as successful groups and stored in successGroups; batteries within the same group that fail to meet voltage consistency are classified into failedGroups. The final list of successful battery groups and the list of failed batteries are encapsulated into MatchStrategyResult objects. SuccessGroups contains all successfully matched battery groups (including rack number, line number, battery tag number, etc. of the batteries in each group), while failedGroups contains information about the individual batteries that failed to match.
[0046] MatchOrchestrator retrieves the failedGroups passed from the previous level and invokes the same-slot grouping strategy. The system identifies batteries belonging to the same physical slot based on machineNumber (rack number) and realLineNumber (actual line number) (usually, adjacent lines in the same rack correspond to different levels in the same slot). Within the same slot range, batteries that failed to group on a single path undergo secondary matching, prioritizing the use of proximity in deployment parameters to improve the grouping rate.
[0047] Newly generated successful groups are appended to successGroups, while batteries that still cannot be matched remain in failedGroups, and the context is updated.
[0048] MatchOrchestrator passes the failedGroups from the parent level to the matching strategy within the same level. The system identifies batteries at a specified level (logical line) based on the configured lineNumber parameter (e.g., "1, 2, 3"), ignoring the slot in which they reside. Within the same level, failed batteries are matched across slots, expanding the candidate range and further improving the grouping rate.
[0049] Successful groups are added to successGroups, and the remaining failed batteries continue to be passed on.
[0050] MatchOrchestrator takes all batteries from the first three levels of failedGroups as input and calls the mixing and grouping strategy. The system queries the preset time interval rules in the matchGroupPlanRule table and reads parameters such as timeLowerLimitMinute, timeLowerLimitSecond, timeUpperLimitMinute, and timeUpperLimitSecond. The remaining batteries are then loosely grouped according to the time intervals in which their operating time falls, and each group is assigned a corresponding matchGroupMark identifier.
[0051] All batteries that can be grouped by time interval are stored in successGroups. A very small number of batteries that still cannot be matched (such as those with abnormal data) can be marked as "pending manual processing" or stored separately.
[0052] MatchOrchestrator aggregates successful groups from each successGroup level to form a complete list of battery groups. Each battery group record includes: a list of battery IDs within the group, matching criteria (such as average voltage, operating time range), the grouping level (single-channel / same-slot / same-layer / mixed), and the matchGroupMark identifier for the mixed-matching stage.
[0053] Reference Figure 2 Preferably, the multi-level cascaded grouping mechanism includes: The battery information is statistically analyzed and verified to determine the target battery information, calculate the number of target batteries, and compare it with the preset trigger number threshold. If the number of target batteries is greater than the first trigger number threshold, the battery grouping rules are matched and filled according to the task identifier to obtain the cascaded grouping rules. The cascaded grouping rules are decomposed and reconstructed to determine the single-path rule branches and grouping standard parameters for different levels; The target battery information is matched according to the single-path rule branch, and the battery pack sequence is determined by combining the grouping standard parameters, and the number of outlier batteries in a single path is counted. If the number of out-of-line batteries in a single channel is greater than the second trigger threshold, then the same-slot rule branch in the cascaded matching rule is extracted, the out-of-line batteries in a single channel are matched, and added to the battery group sequence, and the number of out-of-line batteries in the same slot is counted. If the number of outlier batteries in the same slot is greater than the third trigger threshold, then extract the same-layer rule branch from the cascaded matching rule, match the outlier batteries in the same slot, add them to the battery group sequence, and count the number of outlier batteries in the same layer. If the number of outlier batteries in the same layer is greater than the fourth trigger number threshold, then the mixing rule branch in the cascaded matching rule is extracted, the outlier batteries in the same layer are matched, and added to the battery group sequence, and the unmatched batteries are marked.
[0054] In this embodiment, a grouping request is initiated, and a MatchResultCreateParam object is passed in, which includes the grouping scheme IDs at each level (singlePlanId, slotPlanId, floorPlanId, mixPlanId) and a flag indicating whether open-circuit voltage is enabled (hasOpenVolt).
[0055] MatchGroupPlanService loads basic scheme information from the mat_group_plan table based on the scheme ID, confirms that matchPlanType matches the passed-in cascading level, and ensures correct configuration.
[0056] MatchGroupPlanSingleService reads all time interval rules for the given plan from the mat_group_plan_single table based on the singlePlanId. Each rule includes a lower time limit (timeLowerLimitMinute / Second), an upper time limit (timeUpperLimitMinute / Second), and a time error (timeErrorMinute / Second). The system sorts these rules chronologically to form a multi-tiered grouping standard.
[0057] EndVoltageProcessingStrategy and OpenVoltageProcessingStrategy work together to match batteries within each line according to the loaded rules (see "Single Line Matching" for details). Successfully grouped batteries are stored in successGroups, and failed batteries are entered into failedGroups.
[0058] During the matching process, the system associates the battery deployment parameters (rack number, line number, battery tag number) with the MachineRackBatteryInfo object to ensure traceability of the results.
[0059] If a battery fails after single-line pairing, MatchOrchestrator calls MatchGroupPlanLineNumberService based on slotPlanId or floorPlanId. This service reads the line number combination field (lineNumber, in the format "1, 2, 3") from the mat_group_plan_line_number table and parses it into a deduplicated and sorted list of integers.
[0060] Same-slot grouping: Using the parsed list of line numbers, combined with machineNumber and realLineNumber, batteries in the same slot are identified (usually adjacent lines correspond to different levels of the same slot).
[0061] Same-layer grouping: Ignore the slot and filter the batteries of the specified layer only by the line number list to perform cross-slot matching.
[0062] The same-slot grouping strategy and the same-level grouping strategy are called sequentially to match the failedGroups passed from the upper level. After each match, the newly successful batteries are appended to successGroups, and the remaining failed batteries are updated to failedGroups and passed to the next level.
[0063] All intermediate results are maintained through the MatchContext object, including previousFailedGroups, allDataRecords, etc., to ensure data consistency.
[0064] If there are still failed batteries, MatchGroupPlanRuleService loads all matching rules from the mat_group_plan_rule table based on mixPlanId. The rules are arranged in order (usually by priority or time range), and each rule contains upper and lower time limits and a matchGroupMark field (such as "Level A", "Level B").
[0065] The mixing rules adopt a more lenient time range and implement group quality classification through matchGroupMark, allowing batteries to be assigned to different grade groups.
[0066] Iterate through the remaining batteries and match them according to the loaded mixing rules. Batteries whose operating time falls within the time range of a certain rule are assigned to that group and given the corresponding matchGroupMark. Successfully matched batteries are added to successGroups, while the very few batteries that still cannot be matched are marked as "unmatched" or enter the manual processing flow.
[0067] All successful groups (including all levels) are merged into a final battery pack list. Each group records its matching level (single-channel / same-slot / same-layer / mixed matching) and the classification identifier of the mixing stage.
[0068] Preferably, step S3 includes: The battery pairing process and operating status are monitored separately, and pairing monitoring channels and status monitoring channels are created. The multi-level cascaded grouping mechanism is divided into levels according to the grouping monitoring channel, the key link layer is determined, and corresponding anomaly detection points are set. Anomalies are detected in the pairing process based on anomaly detection points to capture abnormal pairing data and locate abnormal pairing links. The abnormal pairing data is graded based on the anomaly type and context information to determine the anomaly level of the pairing; The abnormal pairing process, target battery information, and pairing abnormality level are correlated to generate abnormal pairing events; The battery's operating status is detected through the status monitoring channel, and battery operating parameters are collected. The battery operating parameters are detected based on the preset battery life cycle model to determine the battery state level; If the battery status level is dangerous, the corresponding target battery information is removed from the battery pack sequence, and an abnormal pairing event is generated and visualized. Based on the abnormal grouping level, strategy matching is performed on abnormal grouping events to determine abnormal grouping control strategies; If the grouping anomaly level is Level 1, the current grouping process will be interrupted, the task status will be marked as failed, and related resources will be released. If the grouping anomaly level is level 2, it will automatically retry, record the number of retries until the limit threshold is reached, and then upgrade to level 1 anomaly. If the grouping anomaly level is three, record the warning and continue execution, and mark the abnormal grouping data.
[0069] In this embodiment, anomaly detection logic is embedded in key stages of the grouping process, including: Serial communication layer: When opening the serial port, sending commands, and reading data, SerialPortUtil captures exceptions such as SerialPortInvalidPortException and pushes the exception information (port number, error type, stack trace) to the alarmRecordQueue queue through the recordSerialPortOpenAlarm method.
[0070] Protocol parsing layer: When parsing data packets, if CommandMatcher finds illegal bytes, invalid length, checksum errors, or invalid protocol packets, it records the exception types PROTOCOL_PACKET_ILLEGAL, PROTOCOL_PACKET_LEN_INVALID, PROTOCOL_PACKET_XOR_INVALID, and PROTOCOL_PACKET_INVALID respectively, and generates an AlarmRecordEvent.
[0071] Data integrity layer: Before grouping calculation, the validateOpenVoltageData method checks whether the working time and corresponding voltage fields of all batteries are empty according to the hasOpenVolt parameter. If they are missing, an ApiException is thrown to prevent the grouping process.
[0072] Grouping logic layer: When executing grouping strategies at each level, if key parameters are missing, rule configuration is incorrect, or the calculation process is abnormal, the abnormality is also reported through the event mechanism.
[0073] First, independent matching and status monitoring channels are created for each batch of power batteries to be matched. The multi-level cascaded matching mechanism is hierarchically divided, with "initial capacity screening," "internal resistance fine matching," and "temperature rise consistency testing" identified as key links. Corresponding anomaly detection points are set at each link (e.g., capacity deviation threshold of 10%, internal resistance fluctuation threshold of 8%, and temperature rise difference threshold of 2℃). During the matching process, when the internal resistance of a battery cell exceeds the threshold range in the second-level internal resistance fine matching link, the anomaly detection point captures the abnormal matching data and locates the link. Based on the anomaly type (internal resistance anomaly) and context information (this battery is the third cell in the same batch with a similar deviation), it is judged as a second-level anomaly. An anomaly is detected, and the anomaly process, target battery information, and anomaly level are associated to generate an anomaly pairing event. Simultaneously, the status monitoring channel continuously collects the battery's charge / discharge curves and self-discharge rate, comparing them with a preset battery lifecycle model. When the capacity decay of a battery exceeds 60%, it is determined to be in a dangerous state. The system immediately removes it from the battery pack sequence and visualizes the anomaly event. According to the second-level anomaly matching automatic retry strategy, the system records the number of retries. If it still fails after the limit number of retries (3 times), it is upgraded to a first-level anomaly, interrupting the current pairing process and releasing related resources to ensure that the final battery pack meets the tiered utilization standard in terms of consistency, safety, and reliability.
[0074] Reference Figure 3 A battery grouping system based on a multi-level cascade strategy, applied to a battery grouping method, includes: The data acquisition module is used for multi-dimensional acquisition and analysis of battery information, extracting battery operating parameters and battery deployment parameters; the data acquisition module includes a serial communication layer for parsing the battery's communication protocol; The battery pack engine module is used to match batteries at multiple levels and form a battery pack list based on a preset multi-level cascaded battery packing mechanism combined with battery operating parameters and battery deployment parameters. The monitoring and display module is used to monitor the battery grouping process of the multi-level cascaded grouping mechanism, and to determine the grouping abnormality level in combination with the preset abnormality detection alarm mechanism, and to record and visualize abnormal grouping events; the monitoring and display module includes the equipment management layer, which is used to manage the picking and putting of all batteries and the addition and removal of batteries from the battery group list. The data storage module is used to store abnormal pairing events based on battery identifiers. Example
[0075] First, each of the 20 battery slots (v1-v20) on each test line is individually matched, with precise matching based on working time (workTime1-workTime20) and voltage parameters. Batteries that fail to be matched individually automatically enter the same-slot matching stage. The system identifies batteries in the same slot using machineNumber (rack number) and realLineNumber (actual line number), and performs secondary matching of batteries of different levels in the same slot. Batteries that fail to be matched in the same slot continue to enter the same-level matching stage. The system matches batteries of the specified level across slots according to the configured lineNumber parameters (e.g., "1, 2, 3"). Finally, all batteries that fail to be matched in the first three levels enter the mixed matching stage. They are grouped according to the time interval rules (timeLowerLimitMinute, timeLowerLimitSecond, timeUpperLimitMinute, timeUpperLimitSecond) configured in the matchGroupPlanRule table, and assigned a corresponding matchGroupMark identifier.
[0076] The MatchOrchestrator orchestrates the execution order of strategies at each level. The grouping results at each level are passed through a MatchStrategyResult object, containing two lists: successGroups and failedGroups. The system uses a MatchContext object to pass data between strategies at each level, including key information such as createParam (grouping parameters), allDataRecords (all test data), endVoltageMap (termination voltage mapping), openVoltageMap (open-circuit voltage mapping), and previousFailedGroups (list of failed batteries from the previous level), ensuring the continuity of the grouping process and data consistency.
[0077] The system simultaneously collects the termination voltage (v1-v20), open-circuit voltage (openV1-openV20), and corresponding working time (workTime1-workTime20) for each battery. The open-circuit voltage matching mode is enabled or disabled via the hasOpenVolt parameter.
[0078] During the voltage matching termination phase, the system employs the EndVoltageProcessingStrategy, sorting batteries by their operating time (machineRackBatteryWorkTimeSort method) and grouping them according to the time intervals (timeLowerLimitMinute / Second, timeUpperLimitMinute / Second) and error ranges (timeErrorMinute / Second) configured in the MatchGroupPlanSingle table. The algorithm calculates the difference between the operating time of each battery and the midpoint of the interval; a successful match is determined when the difference is less than the set error.
[0079] During the open-circuit voltage matching stage, the system employs the OpenVoltageProcessingStrategy. After terminating voltage grouping, it sorts the batteries within each group by their open-circuit voltage values (using the machineRackBatteryVoltageSort method) to further filter batteries whose voltage differences are within the allowable range. The system uses the VoltageGroupProcessor to process the voltage grouping results uniformly, marking batteries that simultaneously meet both the operating time and open-circuit voltage conditions as successfully matched. The remaining batteries proceed to the next stage of the matching process.
[0080] The data organization uses a MachineRackBatteryInfo object to encapsulate information about a single battery, including attributes such as machineNumber (rack number), realLineNumber (line number), batteryNumber (battery tag number), workTime (working duration), batteryVoltage (voltage value), and voltageType (voltage type). A unique identifier, "rack number@line number@battery tag number," is generated using the generateBatteryIndex method to achieve precise battery location and data association.
[0081] The mat_group_plan table manages the grouping schemes. Each scheme contains a planName (scheme name) and a matchPlanType (scheme type: 1-single path, 2-same slot, 3-same floor, 4-mixed).
[0082] For single-path grouping, the system configures the time interval and error range through the `mat_group_plan_single` table. Each rule includes a `planId` (associated plan ID), a lower time limit (`timeLowerLimitMinute / Second`), an upper time limit (`timeUpperLimitMinute / Second`), and a time error (`timeErrorMinute / Second`). The system supports configuring multiple rules for a single plan, enabling fine-grained grouping at various levels.
[0083] For slot- and floor-level groupings, the system configures the combination of line numbers participating in the grouping through the `mat_group_plan_line_number` table. The `lineNumber` field uses a comma-separated format for Chinese characters (e.g., "1, 2, 3"), supporting flexible combinations of any line. The system parses this field at runtime, extracts the list of line numbers, removes duplicates, and sorts them to ensure the accuracy of the grouping logic.
[0084] For mixed battery packs, the system configures the time range and group identifier through the mat_group_plan_rule table. Each rule, in addition to the upper and lower time limits, also includes a matchGroupMark field to identify the packing level (e.g., "Level A", "Level B", "Level C"). The system matches the rules sequentially, assigning batteries to the corresponding levels, thus achieving hierarchical management of packing quality.
[0085] Grouping parameters are passed through the MatchResultCreateParam object, including parameters such as singlePlanId (single-path scheme ID), slotPlanId (same-slot scheme ID), floorPlanId (same-floor scheme ID), mixPlanId (mixed-path scheme ID), and hasOpenVolt (whether open-circuit voltage is enabled). Before grouping, the corresponding grouping rules are loaded through service classes such as MatchGroupPlanService, MatchGroupPlanSingleService, MatchGroupPlanLineNumberService, and MatchGroupPlanRuleService to achieve dynamic configuration and hot updates of the rules.
[0086] Serial communication is implemented using the jSerialComm library. The SerialPortUtil utility class encapsulates core functions such as port discovery (findPort), port opening (openPort), data sending (sendToPort), and data reading (readFromPort).
[0087] The system supports hierarchical device management across multiple hosts (htm_host table), multiple racks (mac_machine_rack table), and multiple lines (mac_machine_line_bind table). Each host is identified by hostNumber and associated with a serialPort (serial port number). Each rack is identified by machineNumber and associated with multiple test lines. Each line is dual-numbered using lineNumber (host line number) and realLineNumber (actual line number), supporting flexible mapping between logical and physical lines.
[0088] Data acquisition is achieved through the collaborative efforts of the CommunicationManager and CommandManager. The system transmits data using protocol packets, and the CommandMatcher parses the received data packets to extract test parameters such as voltage and operating time. The acquired data is stored in the dat_record and dat_record_battery tables. The dat_record table records line-level information (machineId, lineNumber, collectTime, etc.), while the dat_record_battery table records detailed battery-level data (v1-v20, openV1-openV20, workTime1-workTime20, etc.).
[0089] The system records the test start time (startCollectTime) of each line through the mac_machine_line_start_record table, and associates the test batches through startRecordId to achieve batch management of data. During group calculation, the system queries the test data of the specified batch through the DataRecordService service class, assembles it into a list of DataRecordDTO objects, and passes it to the grouping engine for processing.
[0090] The IndexWebSocketServlet and MonitorWebSocketServlet are two WebSocket service endpoints used to handle real-time data pushes to the main interface and monitoring interface, respectively.
[0091] Monitoring data is encapsulated in MonitorDataDTO objects, containing device information such as serialPort (serial port number), hostNumber (host number), machineNumber (rack number), and lineNumber (line number), as well as real-time collected test data such as voltage and temperature. The system manages the monitoring data through a MonitorDataBuffer buffer, enabling batch data push and flow control.
[0092] The pairing results are stored in the mat_match_result and mat_match_result_info tables. The mat_match_result_info table records the overall information of the pairing task, including matchParam (pairing parameters in JSON format) and matchTime (pairing time). The mat_match_result table records the pairing result for each battery, associated with the pairing task through matchResultInfoId, and includes machineNumber (rack number), realLineNumber (line number), dataType (data type: 1-battery position number, 2-working duration, 3-termination voltage, 4-open circuit voltage, 5-group number), and data1-data22 (22 data fields, supporting result storage for up to 22 battery positions).
[0093] The system saves the matching results using the `saveMatchResult` method of the `MatchResultService` class. Reflection is used to dynamically set the field values of the `MatchResult` object, and the matching information in the `BatteryGroupInfo` list is stored according to `dataType`. For voltage data, the system uses a combined format of "operating duration - voltage value" (e.g., "3600-3.75") to achieve a compact representation of the data.
[0094] Matching results support Excel export functionality. The system integrates the EasyExcel library, providing an export interface through the MatchResultController. Users can query and export matching results by matching task ID, facilitating subsequent data analysis and quality traceability.
[0095] All exception events are recorded in the alarm_record table, which includes type (exception type), content (exception content JSON), recordPosition (exception position), and recordTime (exception time).
[0096] At the data acquisition level, the system uses the SerialPortUtil utility class to detect serial port anomalies. When a serial port fails to open, the system catches a SerialPortInvalidPortException exception and records the exception information, including the port number, exception stack trace, and handling suggestions, using the recordSerialPortOpenAlarm method. The system uses an alarmRecordQueue queue to cache alarm information and implements asynchronous alarm processing through AlarmRecordEvent and AlarmRecordListener listeners to avoid blocking the main process.
[0097] At the protocol parsing level, the system detects protocol packet anomalies using the CommandMatcher. The system defines several exception types, including PROTOCOL_PACKET_ILLEGAL (illegal byte), PROTOCOL_PACKET_LEN_INVALID (invalid length), PROTOCOL_PACKET_XOR_INVALID (checksum error), and PROTOCOL_PACKET_INVALID (invalid protocol packet). When an anomaly is detected, the system publishes the exception information via an AlarmRecordEvent, which is then processed and stored in the database by the AlarmRecordListener.
[0098] At the grouping calculation level, the system verifies data integrity using the `validateOpenVoltageData` method. When `hasOpenVolt` is true, the system checks if the `workTime` and `openVolt` fields of all batteries are empty; when `hasOpenVolt` is false, the system checks the `workTime` and `termination voltage` fields. If missing data is found, the system throws an `ApiException` to prevent grouping calculation and ensure the accuracy of the grouping results.
[0099] The system uses the DefaultEventMulticaster event multicaster to achieve unified management and distribution of events. In the initApplicationListener method of the Application startup class, the system registers the mapping relationship between AlarmRecordEvent and AlarmRecordListener to achieve automatic event routing and processing.
[0100] An electronic device, comprising: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement any of the methods in the above scheme.
[0101] A storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the battery packing method as described above.
[0102] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A battery packing method based on a multi-level cascade strategy, characterized in that, include: Multidimensional acquisition and analysis of battery information to extract battery operating parameters and battery deployment parameters; Based on the preset multi-level cascaded matching mechanism, combined with the battery operating parameters and the battery deployment parameters, batteries are matched at multiple levels to form a battery pack list. The system monitors the battery pairing process of the multi-level cascaded pairing mechanism, and determines the pairing abnormality level by combining it with a preset abnormality detection alarm mechanism, and records and displays abnormal pairing events.
2. The battery grouping method based on a multi-level cascade strategy according to claim 1, characterized in that, The multi-dimensional acquisition and analysis of battery information, extracting battery operating parameters and battery deployment parameters, includes: Perform serial port parsing on all batteries, extract all available serial ports of the batteries, and establish a data transmission channel by combining the baud rate and data bits; The battery information query command is encapsulated according to a preset communication protocol and transmitted to the target battery in conjunction with the data transmission channel. The serial port buffer data of the target battery is received and verified to obtain the original battery data packet; The original battery data packet is matched, parsed, and denoised according to the protocol header to obtain a noise-free battery data packet. The noiseless battery data packet is deconstructed according to the data format to extract battery operating parameters including channel real-time voltage value, open circuit voltage value, termination voltage value and cumulative working time; The target battery is located to obtain battery deployment parameters including the battery rack number and the actual line number.
3. The battery grouping method based on a multi-level cascade strategy according to claim 1, characterized in that, The process of matching batteries at multiple levels according to a preset multi-level cascaded matching mechanism, combined with the battery operating parameters and the battery deployment parameters, to form a battery pack list includes: Based on the preset multi-level cascaded grouping mechanism, the battery operating parameters and battery deployment parameters are associated and sorted to obtain the batch number of the group to be matched. Based on the batch number of the group to be matched and the host circuit number, the actual circuit number of the target battery is identified to determine the battery with the same circuit. Based on the cumulative working time and real-time voltage value, the batteries on the same line are matched individually. If a single-path match is successful, then construct a single-path battery pack and mark the single-path outlier battery. No, then the slot matching is performed on the single-channel out-of-systems battery according to the battery rack number and the actual line number; If a matching cell is successful, a cell group is constructed and outlier cells in the same cell are marked. No, then the out-of-cell batteries in the same slot are matched at the same layer according to the logical layer number; If a matching is successful within the same layer, then construct the same-layer battery pack and mark the outlier battery within the same layer. No, then based on the preset time interval rules and the cumulative working time, a loose matching is performed on the outlier batteries in the same layer; If the loose matching is successful, a mixed battery pack is constructed, a mixed pack identifier is assigned, and the unmixed batteries are extracted. No, then the unmixed batteries are marked and assigned a separate storage tag for verification; Based on the grouping level and the mixed group identifier, the single-channel battery group, the same-slot battery group, the same-layer battery group, and the mixed battery group are merged to form a battery group list.
4. The battery packing method based on a multi-level cascade strategy according to claim 3, characterized in that, The step of performing single-channel matching of the batteries on the same line based on the cumulative working time and real-time voltage value includes: The batteries on the same circuit are sorted in ascending order based on their cumulative working time, and the median value of the time interval is extracted. The difference between the accumulated working time and the median of the time interval is calculated based on the termination voltage value to obtain the time difference. If the time difference is less than a preset error threshold, the current battery on the same line and the battery on the same line corresponding to the median of the time interval are combined to construct a preliminary battery pack. No, then the battery on the current line is determined to be a single-path outlier battery; The cells in the initial battery pack are arranged in ascending order according to their open-circuit voltage values, the median of the voltage range is determined, and the corresponding voltage difference is calculated. If the voltage difference is within a preset voltage difference range, it is determined that the current battery on the same line is successfully matched with the battery on the same line corresponding to the midpoint of the voltage range, and a single battery pack is generated.
5. The battery packing method based on a multi-level cascade strategy according to claim 1 or 3, characterized in that, The multi-level cascading grouping mechanism includes: The battery information is statistically analyzed and verified to determine the target battery information, calculate the number of target batteries, and compare it with the preset trigger number threshold. If the number of target batteries is greater than the first trigger number threshold, the battery grouping rules are matched and filled according to the task identifier to obtain the cascaded grouping rules. The cascaded grouping rules are decomposed and reconstructed to determine the single-path rule branches and grouping standard parameters for different levels; The target battery information is matched according to the single-path rule branch, and the battery group sequence is determined by combining the grouping standard parameters, and the number of outlier batteries in a single path is counted. If the number of out-of-line batteries in a single channel is greater than the second trigger number threshold, then the same-slot rule branch in the cascaded matching rule is extracted, the out-of-line batteries in a single channel are matched, and added to the battery group sequence, and the number of out-of-line batteries in the same slot is counted. If the number of out-of-cell batteries in the same slot is greater than the third trigger number threshold, then extract the same-layer rule branch in the cascaded matching rule, match the out-of-cell batteries in the same slot, add them to the battery pack sequence, and count the number of out-of-cell batteries in the same layer. If the number of outlier batteries in the same layer is greater than the fourth trigger number threshold, then the mixing rule branch in the cascaded matching rule is extracted, the outlier batteries in the same layer are matched, and added to the battery pack sequence, and the unmatched batteries are marked.
6. The battery packing method based on a multi-level cascade strategy according to claim 1, characterized in that, The monitoring mechanism monitors the battery grouping process of the multi-level cascaded grouping mechanism, and determines the grouping abnormality level in conjunction with a preset abnormality detection and alarm mechanism, and records abnormal grouping events, including: The battery pairing process and operating status are monitored separately, and pairing monitoring channels and status monitoring channels are created. The multi-level cascaded grouping mechanism is divided into levels according to the grouping monitoring channel, the key link layer is determined, and corresponding anomaly detection points are set. Based on the aforementioned anomaly detection points, anomalies are detected in the pairing process to capture abnormal pairing data and locate abnormal pairing links. The abnormal pairing data is graded based on the abnormality type and context information to determine the abnormality level of the pairing; The abnormal pairing process, the target battery information, and the abnormal pairing level are correlated to generate an abnormal pairing event.
7. The battery packing method based on a multi-level cascade strategy according to claim 6, characterized in that, The monitoring of the multi-level cascaded battery grouping mechanism for battery grouping, combined with a preset anomaly detection and alarm mechanism to determine the level of grouping anomaly, and recording abnormal grouping events, also includes... The battery's operating status is detected through the status monitoring channel, and battery operating parameters are collected. The battery operating parameters are detected based on a preset battery life cycle model to determine the battery state level; If the battery state level is dangerous, the corresponding target battery information is removed from the battery pack sequence, and an abnormal battery pack event is generated and visualized. Based on the abnormal grouping level, the abnormal grouping event is matched with a strategy to determine the abnormal grouping control strategy. If the grouping anomaly level is Level 1, then the current grouping process is interrupted, the task status is marked as failed, and the relevant resources are released. If the grouping anomaly level is level two, it will automatically retry, record the number of retries until the limit threshold is reached, and then upgrade to level one anomaly. If the grouping anomaly level is level three, then record the warning and continue execution, and mark the abnormal grouping data.
8. A battery packing system based on a multi-level cascade strategy, used to implement the method as described in any one of claims 1-7, characterized in that, include: The data acquisition module is used to collect and analyze battery information in multiple dimensions, and extract battery operating parameters and battery deployment parameters; The battery grouping engine module is used to match batteries at multiple levels and form a battery group list based on a preset multi-level cascaded battery grouping mechanism, combined with the battery operating parameters and the battery deployment parameters. The monitoring and display module is used to monitor the battery grouping process of the multi-level cascaded grouping mechanism, and determine the grouping abnormality level in combination with the preset abnormality detection alarm mechanism, and record and visualize abnormal grouping events. The data storage module is used to store abnormal pairing events based on battery identifiers.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the battery packing method as described in any one of claims 1 to 7.
10. A storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the battery packing method as claimed in any one of claims 1 to 7.