System, method, medium and product for upgrading software of battery pack
The system optimizes the distribution of remote refresh modules using algorithms to ensure efficient and synchronized software updates across battery packs, addressing the inefficiencies in current update methods by automating and balancing load across the network.
Patent Information
- Application Number
- CN202510401566.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-15
AI Technical Summary
The upgrade process of existing battery pack software requires manual intervention, which is inefficient and difficult to ensure the stability and consistency of the upgrade process.
Through the allocation scheme of remote refresh module and battery packs, Bayesian optimization and simulated annealing algorithm are used to optimize the connection, and the node coordination mechanism is combined to achieve load balancing and data synchronization, ensuring efficient and stable upgrade process.
It realizes an efficient and convenient process of battery pack software upgrade, ensures stable and consistent data transmission, avoids misoperation caused by manual intervention, and improves upgrade efficiency and success rate.
Smart Images

Figure CN120321672A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery packs, and more particularly, to a system, a method, a computer-readable storage medium, and a computer program product for upgrading the software of a battery pack. Background Art
[0002] Currently, with the rapid development of new energy vehicles, battery management systems (BMSs) and other related software often need to be updated and upgraded. In the traditional software upgrade and update process of battery packs, it is usually necessary for staff to manually trigger the upgrade program, then pair and connect the remote refresh module with the battery pack to be upgraded, and then transfer the upgraded software package to the built-in storage medium of the battery pack, so as to deploy and run the upgrade instruction file at the battery pack end. At the same time, during the upgrade process, it is necessary to closely monitor the progress and completion of the upgrade. When the upgrade is completed, necessary verification work and functional tests are immediately carried out to verify whether the performance of the battery pack maintains normal standards.
[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present application, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0004] To solve or at least mitigate one or more of the above problems, the following technical solutions are provided. Embodiments of the present application provide a system, a method, a computer-readable storage medium, and a computer program product for upgrading the software of a battery pack, so as to enable an efficient and convenient software upgrade and update process of the battery pack.
[0005] According to a first aspect of the present application, there is provided a system for upgrading the software of a battery pack, the system including a plurality of remote refresh modules, each remote refresh module being wirelessly connected to a plurality of battery packs; a controller communicatively coupled to the plurality of remote refresh modules, the controller including a memory storing instructions and a processor executing the instructions, the instructions including the following instructions: obtaining the positions of the battery pack to be upgraded and the plurality of remote refresh modules; generating an allocation scheme for the plurality of remote refresh modules and the battery pack to be upgraded based on the positions; optimizing and adjusting the allocation scheme; and performing software upgrade of the battery pack according to the adjusted allocation scheme, wherein during the process of performing the software upgrade, keeping the data between the plurality of remote refresh modules consistent and synchronized, and performing load balancing control according to the current status and capacity of the plurality of remote refresh modules.
[0006] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, the instructions further include the following instructions: monitor the version information of the software of the battery pack to determine the battery packs to be upgraded and the battery packs with successful upgrades.
[0007] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, in the allocation scheme, each battery pack to be upgraded is connected to a remote refresh module; and wherein, the distance between each remote refresh module and each battery pack connected to the remote refresh module does not exceed a threshold distance.
[0008] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, the Bayesian optimization algorithm is used to generate the allocation scheme; and wherein, the objective function of the Bayesian optimization algorithm is the sum of the distances between all remote refresh modules and battery packs that are connected to each other.
[0009] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, optimizing and adjusting the allocation scheme includes changing the remote refresh module to which one or more battery packs in the battery packs to be upgraded are connected.
[0010] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, the simulated annealing algorithm is used to optimize and adjust the allocation scheme; and wherein, the energy function of the simulated annealing algorithm is the sum of the distances between remote refresh modules and battery packs that are connected to each other under the current allocation scheme.
[0011] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, keeping the data between the multiple remote refresh modules consistent and synchronized includes: electing a leader node among the multiple remote refresh modules, and using the other remote refresh modules except the leader node as slave nodes; the leader node receives data from the controller and sends the data to the slave nodes.
[0012] As an alternative or supplement to the above solution, in the system according to an embodiment of the present application, load balancing control according to the current status and capacity of the multiple remote refresh modules includes: enabling each remote refresh module to share upgrade tasks and resources with other remote refresh modules; detecting whether the time of the upgrade tasks on the multiple remote refresh modules exceeds a threshold and whether they are evenly distributed; in response to determining that the time of the upgrade tasks exceeds the threshold or is not evenly distributed, adjusting the allocation scheme again.
[0013] According to a second aspect of the present application, there is provided a method for upgrading the software of a battery pack, the method comprising: obtaining the battery pack to be upgraded and the locations of a plurality of remote flashing modules; generating, based on the locations, an allocation scheme for the plurality of remote flashing modules and the battery pack to be upgraded; optimizing and adjusting the allocation scheme; and performing software upgrade of the battery pack according to the adjusted allocation scheme, wherein, during the process of performing the software upgrade, data between the plurality of remote flashing modules is kept consistent and synchronized, and load balancing control is performed according to the current status and capacity of the plurality of remote flashing modules.
[0014] As an alternative or supplement to the above solution, in the method according to an embodiment of the present application, a Bayesian optimization algorithm is used to generate the allocation scheme; and wherein, the objective function of the Bayesian optimization algorithm is the sum of the distances between all remotely connected flashing modules and the battery pack.
[0015] As an alternative or supplement to the above solution, in the method according to an embodiment of the present application, a simulated annealing algorithm is used to optimize and adjust the allocation scheme; and wherein, the energy function of the simulated annealing algorithm is the sum of the distances between all remotely connected flashing modules and the battery pack under the current allocation scheme.
[0016] According to a third aspect of the present application, there is provided a computer-readable storage medium, the computer-readable storage medium comprising instructions that, when running, execute any one of the methods described in the second aspect of the present application.
[0017] According to a fourth aspect of the present application, there is provided a computer program product, the computer program product comprising instructions that, when running, execute any one of the methods described in the second aspect of the present application.
[0018] The system for upgrading the software of a battery pack according to one or more embodiments of the present application connects a plurality of remote flashing modules and a plurality of battery packs according to an optimal allocation scheme of the remote flashing modules and the battery packs, so as to ensure stable and efficient data transmission during the upgrade process; through node coordination of the remote flashing modules during the upgrade process, the transmission capacity of the remote flashing modules can be maximally utilized, and it is ensured that the upgrade task is accurately and timely executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or other aspects and advantages of the present application will become clearer and easier to understand through the following descriptions of various aspects in conjunction with the accompanying drawings, in which the same or similar units are denoted by the same reference numerals. In the accompanying drawings:
[0020] Figure 1is a schematic diagram 100 of a system 102 for upgrading software of a battery pack according to an aspect of the present application;
[0021] Figure 2 is a flow chart of a method 200 for upgrading software of a battery pack according to an aspect of the present application;
[0022] Figure 3 According to one aspect of the present application, Figure 1 Schematic block diagram of controller 30 of controller 10 of system 102 . DETAILED DESCRIPTION
[0023] The description of the following specific embodiments is merely exemplary in nature and is not intended to limit the disclosed technology or the application and use of the disclosed technology. In addition, it is not intended to be bound by any express or implied theory presented in the aforementioned technical field, background technology or the following specific embodiments.
[0024] In the following detailed description of the embodiments, many specific details are set forth in order to provide a more thorough understanding of the disclosed technology. However, it is apparent to one of ordinary skill in the art that the disclosed technology can be practiced without these specific details. In other instances, well-known features are not described in detail to avoid unnecessarily complicating the description.
[0025] Terms such as "having" and "including" indicate that in addition to the units (modules) and steps that are directly and clearly stated in the specification and claims, the technical solution of the present application does not exclude the situation where there are other units (modules) and steps that are not directly or clearly stated. Terms such as "first" and "second" do not indicate the order of units in terms of time, space, size, etc., but are only used to distinguish each unit. Moreover, the steps in this article are not limited to being implemented in the order of writing, but the steps written later can also be implemented at the same time as the steps written earlier, or before the steps written earlier.
[0026] Figure 1 1 is a schematic diagram 100 of a system 102 for upgrading software of a battery pack according to one aspect of the present application. Figure 1As shown, the system 102 includes a controller 10 and a plurality of remote refresh modules 20A, 20B, and 20C (collectively referred to as remote refresh modules 20), and the controller 10 is communicatively coupled to the plurality of remote refresh modules 20. The controller 10 may include a memory storing instructions and a processor for executing the instructions. The controller may also include a communication circuit module for communicating with the plurality of remote refresh modules 20. When a software upgrade of the battery pack is required, the controller 10 may transfer the updated software to the storage medium of the battery pack through the plurality of remote refresh modules 20, so as to deploy and run the upgrade instruction file at the battery pack end. It should be understood that Figure 1 only 3 remote refresh modules 20 are illustrated as an example, and in other embodiments, the system 102 may include any number of remote refresh modules. Figure 1 A plurality of battery packs 40A, 40B, 40C, 40D, and 40E (collectively referred to as battery packs 40) are also illustrated. It should be understood that Figure 1 only 5 battery packs 40 are illustrated as an example, and in other embodiments, any number of battery packs 40 may be included. Each remote refresh module 20 may be wirelessly connected to one or more battery packs 40. For example, as Figure 1 illustrated, the remote refresh module 20A is wirelessly connected to the battery packs 40A and 40B, the remote refresh module 20B is connected to the battery packs 40C and 40D, and the remote refresh module 20C is wirelessly connected to the battery pack 40E. However, the number of battery packs 40 that each remote refresh module 20 can connect to is limited, and the range that each remote refresh module 20 can connect to is also limited. In other words, if the number of battery packs 40 connected to a certain remote refresh module 20 has reached the upper limit, then this remote refresh module 20 cannot establish a connection with other battery packs 40. In addition, if a certain battery pack 40 is outside the range of a certain remote refresh module 20, then this remote refresh module 20 cannot establish a connection with this battery pack 40. Generally, the strength of the wireless connection between the remote refresh module and the battery pack will decay as the distance between them increases. To ensure the stable and efficient operation of the system 102, it is necessary to determine the allocation scheme between them according to the positions of the plurality of remote refresh modules 20 and the battery packs 40.
[0027] Now refer to Figure 2 , Figure 2It is a flowchart of a method 200 for upgrading the software of a battery pack according to one aspect of the present application. In step 202, the locations of the battery pack to be upgraded and multiple remote refresh modules are obtained. For example, when the battery packs need to be upgraded in batches, the battery packs to be upgraded can be transported to a workshop where the battery pack upgrade system has been deployed. In some embodiments, the battery pack can be transported to a bracket in the workshop, and then, by scanning the QR code on the battery pack and the bracket, the battery pack can be associated with a specific location to determine the location of the battery pack. In other embodiments, the battery pack upgrade system can also obtain the location of the battery pack by other means, for example, by manual input, image recognition, or other positioning technologies. Similarly, the battery pack upgrade system can determine the location of the remote refresh module.
[0028] Then, in step 204, based on the locations of the battery pack to be upgraded and the multiple remote refresh modules, an allocation scheme of the multiple remote refresh modules and the battery pack to be upgraded is generated. As mentioned above, the allocation scheme of the remote refresh modules and the battery pack may affect the efficiency of the entire upgrade process. Therefore, by converting the establishment of the allocation scheme into a mathematical problem, designing an algorithm, and solving it to find the optimal solution, the efficiency of the battery pack upgrade process can be improved and possible failures that may occur during the upgrade process can be reduced.
[0029] The process of finding the optimal allocation scheme will be described in detail below. First, the problem of establishing the allocation scheme of battery packs and remote refresh modules needs to be converted into a mathematical problem. Assume that n battery packs and m remote refresh modules are deployed in the workshop, where E is the set of remote refresh modules, E = {e1, e2, ..., e m}, B is the set of battery packs, B={b1,b2,...,b n}. Remote refresh module i With battery pack b j The distance between them is expressed as d(e i ,b j ). As described above, the remote refresh module e i With battery pack b j The distance between i ,b j ) has an upper threshold D max . Battery pack b j The refresh task time is tu(b j ). Software flash device i The start time of the refresh task is Si, and the end time is Ci. The total execution time of all refresh tasks is the difference between the latest end time and the earliest start time among all software refresh devices, that is, Max(Ci)-Min(Si). i Is it connected to battery module b?j , we define a binary variable x ij : if connected, then x ij = 1; otherwise, x ij = 0. Under the above definition, the following constraint conditions also need to be satisfied:
[0030] Each battery pack b j must be connected to a remote refresh module e i :
[0031]
[0032] The distance between the remote refresh module e i and the battery pack b j shall not exceed the threshold distance:
[0033]
[0034] The task load of each remote refresh module e i shall not exceed its maximum task load:
[0035]
[0036] The refresh tasks should be evenly distributed among the various remote refresh modules:
[0037]
[0038] The time of the refresh tasks must be within the specified range:
[0039]
[0040] Then, after transforming it into a mathematical problem, algorithm design can be carried out.
[0041] First, use the Bayesian optimization algorithm to allocate remote refresh modules to battery packs to minimize the sum of the distances between all interconnected remote refresh modules and battery packs, that is:
[0042]
[0043] Bayesian optimization is an optimization technique based on probability models. It predicts the performance of the objective function by constructing surrogate models (such as Gaussian processes or random forests) and uses the acquisition function to balance exploration and exploitation, so as to efficiently find the global optimal solution.
[0044] Specifically, first, randomly generate a set of sample configurations X ij including N x IJ where Among them And evaluate the objective function for each sample. According to the above definition, in the present application, the objective function of Bayesian optimization can be expressed as: Where d(e i ,b j )
[0045] Then, use a Gaussian process to fit these samples to provide a predictive distribution for the objective function, which includes a mean Μ(X) and a variance Σ(X);
[0046] Next, select the next sample by maximizing the acquisition function, evaluate the objective function, update the Gaussian process model with the new sample, and repeat this process iteratively until the optimal solution is found. The acquisition function trades off between exploring high-uncertainty regions (high Σ(X)) and exploiting low predicted objective function value regions (low Μ(X)). The acquisition function is defined as:
[0047] a(x) = Μ(x) + KΣ(x)
[0048] Where K is a parameter that controls the trade-off between exploration and exploitation.
[0049] Finally, return the optimal solution allocation scheme X IJ .
[0050] Through the above steps, multiple allocation schemes for the remote refresh modules and the battery packs to be upgraded can be generated. In some embodiments, other algorithms may also be used to determine an allocation scheme that can minimize the sum of the distances between all interconnected remote refresh modules and battery packs.
[0051] Next, in step 206, optimize and adjust the allocation scheme to avoid the allocation scheme falling into a local optimum and further explore the global optimum solution of the allocation scheme. In some embodiments, optimizing and adjusting the allocation scheme includes changing the remote refresh module to which one or more of the battery packs to be upgraded are connected.
[0052] For example, a simulated annealing algorithm can be used to optimize and adjust the allocation scheme. The simulated annealing algorithm is a heuristic optimization algorithm based on the physical annealing process. Specifically, first, set the cooling rate A and the initial temperature T0; then, use the allocation scheme obtained in step 204 as the initial solution; next, in each iteration process, generate a new allocation scheme by making a small adjustment (neighborhood search) to the current allocation scheme, and determine whether to accept the new allocation scheme according to the following probability:
[0053]
[0054] Among them, the energy change ΔE is the difference between the energy function E of the new allocation scheme and the old allocation scheme. The energy function E is defined as the sum of the distances between all interconnected remote refresh modules and battery packs in the current allocation scheme:
[0055]
[0056] The temperature T gradually decreases from the initial temperature T0 according to the cooling plan:
[0057] T = T0·A k
[0058] where A is the cooling rate and k is the number of iterations. When the temperature T drops below the target temperature, the iterative process stops and the adjusted allocation scheme is returned.
[0059] Then, in step 208, the software upgrade of the battery pack is performed according to the adjusted allocation scheme. The controller of the software system establishes connections between multiple remote refresh modules and multiple battery packs according to the adjusted allocation scheme, and then transmits the upgrade file or data to the battery packs to be upgraded through the multiple remote refresh modules. During this process, the data between the multiple remote refresh modules needs to be kept consistent and synchronized to ensure that all battery packs to be upgraded can obtain the same version of the upgrade file or data in a timely manner during this upgrade process. In addition, during this process, load balancing control can also be performed on the multiple remote refresh modules to maximize the utilization of each remote refresh module and prevent a single module from being overloaded, thereby further improving the efficiency of the software upgrade.
[0060] Specifically, a node coordination mechanism can be used to ensure data consistency and synchronization between remote refresh modules and achieve load balancing control. The node coordination mechanism includes node data management and node task management. In some embodiments, the RAFT algorithm can be used for node data management to keep the data between multiple remote refresh modules consistent and synchronized. The RAFT algorithm is a distributed consensus protocol designed to solve the problems of data consistency and fault tolerance between multiple nodes in a distributed system. First, a leader node is elected among the multiple remote refresh modules, and the other remote refresh modules except the leader node are used as follower nodes; then, the leader node receives data from the controller and sends the data to the follower nodes to ensure that the data of each node is the same.
[0061] In some embodiments, a distributed cooperation model can be applied to complete node task management. For example, first, each remote refresh module shares upgrade tasks and resources with other remote refresh modules; for remote refresh module e i , the time of the k upgrade tasks assigned can be expressed as:
[0062] T i ={t1,t2,…,t k}
[0063] The optimization goal of node task management is to shorten the total execution time T as much as possible while balancing the load. This optimization goal can be expressed as the following objective function:
[0064]
[0065] As mentioned above, the objective function must also satisfy the following constraints:
[0066]
[0067]
[0068] Then, detect whether the time of the upgrade tasks on the multiple remote refresh modules exceeds the threshold and whether they are evenly distributed; in response to determining that the time of the upgrade tasks exceeds the threshold or is not evenly distributed, adjust the allocation plan again until the detection of all remote refresh modules is completed.
[0069] Through the above node coordination mechanism, dynamic adjustments can be made during the execution of battery pack software upgrades, which not only improves the overall performance of the system but also makes resource usage more efficient.
[0070] In some embodiments, before or after the process of upgrading the software of the battery pack, the version information of the software of the battery pack may also be monitored to determine the battery pack to be upgraded and the battery pack that has been successfully upgraded.
[0071] Reference now Figure 3 , Figure 3 According to one aspect of the present application, Figure 1 A schematic block diagram of a controller 30 of a controller 10 of a system 102 is shown in FIG. Figure 3 In the embodiment, the controller 30 includes a memory 310, a processor 320, and a computer program 330. The computer program 330 is stored in the memory 310 and can be executed by the processor 320. The execution of the computer program 330 enables the following Figure 2 In some embodiments, the controller 30 further includes an output device (e.g., a display) to output the Figure 2 In some embodiments, the memory 310 may be an external storage medium connected to the controller 30 through an interface, such as a computer-readable storage device in various forms such as a disk (e.g., a magnetic disk, an optical disk, etc.), a card (e.g., a memory card, an optical card, etc.), a semiconductor memory (e.g., a ROM, a non-volatile memory, etc.), a tape (e.g., a magnetic tape, a cassette tape, etc.), etc.
[0072] Software in accordance with the present application (such as program code and / or data) can be stored on one or more computer-readable storage media. It is also contemplated that one or more general-purpose and / or special-purpose computers and / or computer systems, networked and / or otherwise, can be used to implement the software identified herein. Where applicable, the order of the various steps described herein can be altered, combined into composite steps, and / or divided into sub-steps to provide the features described herein.
[0073] Embodiments and examples are provided herein to best illustrate embodiments in accordance with the present application and its specific applications, and thereby enable those skilled in the art to implement and use the present application. However, those skilled in the art will recognize that the above description and examples are provided for purposes of illustration and example only. The presented description is not intended to cover every aspect of the present application or to limit the present application to the precise form disclosed.
Claims
1. A system for upgrading the software of a battery pack, comprising a plurality of remote refresh modules, each remote refresh module being wirelessly connected to a plurality of battery packs; a controller communicatively coupled to the plurality of remote refresh modules, the controller including a memory storing instructions and a processor executing the instructions, the instructions including the following instructions: obtaining the positions of the battery packs to be upgraded and the plurality of remote refresh modules; generating an allocation scheme for the plurality of remote refresh modules and the battery packs to be upgraded based on the positions; optimally adjusting the allocation scheme; performing software upgrade of the battery packs according to the adjusted allocation scheme, wherein during the process of performing the software upgrade, keeping the data between the plurality of remote refresh modules consistent and synchronized, and performing load balancing control according to the current status and capacity of the plurality of remote refresh modules.
2. The system according to claim 1, wherein The instructions further include the following instructions: monitoring the version information of the software of the battery packs to determine the battery packs to be upgraded and the battery packs with successful upgrades.
3. The system according to claim 1, wherein, In the allocation scheme, each battery pack to be upgraded is connected to one remote refresh module; and wherein the distance between each remote refresh module and each battery pack connected to the remote refresh module does not exceed a threshold distance.
4. The system according to claim 1, wherein using a Bayesian optimization algorithm to generate the allocation scheme; and wherein the objective function of the Bayesian optimization algorithm is the sum of the distances between all the remote refresh modules and battery packs that are connected to each other.
5. The system according to claim 1, wherein, Optimally adjusting the allocation scheme includes changing the remote refresh module to which one or more of the battery packs to be upgraded are connected.
6. The system according to claim 1, wherein, using a simulated annealing algorithm to optimally adjust the allocation scheme; and wherein the energy function of the simulated annealing algorithm is the sum of the distances between the remote refresh modules and battery packs that are connected to each other under the current allocation scheme.
7. The system according to claim 1, wherein, Keeping the data between the plurality of remote refresh modules consistent and synchronized includes: electing a leader node among the plurality of remote refresh modules and taking the other remote refresh modules except the leader node as slave nodes; the leader node receiving data from the controller and sending the data to the slave nodes.
8. The system according to claim 1, wherein Performing load balancing control according to the current status and capacity of the plurality of remote refresh modules includes: enabling each remote refresh module to share upgrade tasks and resources with other remote refresh modules; detecting whether the time of the upgrade tasks on the plurality of remote refresh modules exceeds a threshold and whether they are evenly distributed; in response to determining that the time of the upgrade tasks exceeds the threshold or is not evenly distributed, readjusting the allocation scheme.
9. A method for upgrading the software of a battery pack, the method comprising: obtaining the positions of the battery packs to be upgraded and a plurality of remote refresh modules; generating an allocation scheme for the plurality of remote refresh modules and the battery packs to be upgraded based on the positions; optimally adjusting the allocation scheme; Execute the software upgrade of the battery pack according to the adjusted allocation scheme. During the execution of the software upgrade, keep the data among the multiple remote refresh modules consistent and synchronized, and perform load balancing control according to the current status and capacity of the multiple remote refresh modules.
10. The method according to claim 9, wherein, Use the Bayesian optimization algorithm to generate the allocation scheme; and among them, the objective function of the Bayesian optimization algorithm is the sum of the distances between all the remotely connected refresh modules and the battery pack.
11. The method according to claim 9, wherein, Use the simulated annealing algorithm to optimize and adjust the allocation scheme; and among them, the energy function of the simulated annealing algorithm is the sum of the distances between the remotely connected refresh modules and the battery pack under the current allocation scheme.
12. A computer-readable storage medium, the computer-readable storage medium includes instructions, and the instructions execute the method according to any one of claims 9-11 when running.
13. A computer program product, the computer program product includes instructions, and the instructions execute the method according to any one of claims 9-11 when running.