Battery id code allocation method, device, controller and electric scooter

CN122957375APending Publication Date: 2026-10-23NINE INTELLIGENT CHANGZHOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510510307.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]当锂电池数量增加时,需要多个唤醒接口,会带来线束和电路板的成本增加,因此,需要一种新的电池ID编码分配方法

Benefits of technology

[0061]本申请提供一种电池ID编码分配方法、装置、控制器及电动代步车,该电池ID编码分配方法包括:向各个电池发送ID配置数据,所述ID配置数据用于使各个电池生成第一ID编码,根据针对各个电池发送的所述第一ID编码的接收情况,确定第一目标电池,并更新所述ID配置数据,向多个电池中的至少部分电池发送更新后的ID配置数据,以使除所述第一目标电池以外的各个电池根据更新后的ID配置数据生成第二ID编码,通过多次更新ID配置数据,实现为各个电池分配不同的ID编码,且对电池的唤醒接口的数量不做要求,可以在线束和电路板成本没有增加的条件下,为各个电池分配ID编码。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122957375A_ABST
    Figure CN122957375A_ABST
Patent Text Reader

Abstract

The battery ID code allocation method, device, controller and electric scooter provided by the application, the battery ID code allocation method comprises: sending ID configuration data to each battery, the ID configuration data is used to make each battery generate a first ID code, determining a first target battery according to the receiving condition of the first ID code sent to each battery, updating the ID configuration data, sending the updated ID configuration data to at least part of the plurality of batteries, so that each battery except the first target battery generates a second ID code according to the updated ID configuration data, and by updating the ID configuration data for multiple times, different ID codes are allocated to each battery, and the number of wake-up interfaces of the battery is not required, and the ID code can be allocated to each battery without increasing the cost of the online beam and the circuit board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery technology, and in particular to a battery ID coding allocation method, device, controller, and electric mobility scooter. Background Technology

[0002] The standard lithium battery interface for electric vehicles is 2+4, where 2 represents the positive and negative terminals of the battery, and 4 represents the control interface. The positive terminal of the battery is led out directly, while the negative terminal is led out through a relay. Two interfaces in the control interface are used for communication, and the other two interfaces are used for battery wake-up and ID (Identity Document) encoding.

[0003] At the interface between the wiring harness and the battery, if the positive terminal of the battery is connected to the wake-up interface (ID identification port), the battery will be woken up and its ID code will be 1. If the positive terminal of the battery is not connected to the wake-up interface, the battery will not be woken up and its ID code will be 0. When the battery is not connected to the vehicle, the default ID code is 0. When the vehicle has multiple batteries, multiple wake-up interfaces are required for waking up the batteries and for ID coding. The ID code is used to identify each battery, thereby enabling communication between the controller and the battery. For example, if the vehicle has three batteries, two wake-up interfaces are needed, and the battery IDs are configured as 01, 10, and 11 through the wiring harness.

[0004] As the number of lithium batteries increases, multiple wake-up interfaces are required, which increases the cost of wiring harnesses and circuit boards. Therefore, a new battery ID encoding and allocation method is needed. Summary of the Invention

[0005] This application provides a battery ID coding allocation method, device, controller, and electric mobility scooter, which can assign ID codes to each battery when there are a large number of batteries without increasing the cost of wiring harnesses and circuit boards.

[0006] In a first aspect, this application provides a battery ID encoding allocation method, applied to a controller in an electrical device, comprising:

[0007] Send ID configuration data to each battery; the ID configuration data is used to enable each battery to generate a first ID code;

[0008] Based on the reception of the first ID code sent to each battery, the first target battery is determined, and the ID configuration data is updated;

[0009] Updated ID configuration data is sent to at least some of the batteries in a plurality of batteries, so that each battery other than the first target battery generates a second ID code based on the updated ID configuration data.

[0010] Optionally, based on the reception of the first ID code sent for each battery, a first target battery is determined, and the ID configuration data is updated, including:

[0011] The battery that successfully sends the first ID code and battery identity information is identified as the first target battery;

[0012] Associate the first ID code with the battery identity information of the first target battery;

[0013] Update the ID configuration data according to the first ID code;

[0014] Accordingly, the method further includes:

[0015] The battery identity information is sent to each battery so that the first target battery is determined to have successfully assigned an ID code, and each battery other than the first target battery is determined to have failed to be assigned an ID code.

[0016] Optionally, updating the ID configuration data according to the first ID encoding includes:

[0017] Based on the first ID code, the first target battery is determined to correspond to the first target data bit in the ID configuration data;

[0018] Adjust the value of the first target data bit to the first value to obtain the updated ID configuration data.

[0019] Optionally, the method further includes:

[0020] When it is determined that the communication of the second target battery with the assigned ID code fails, the association between the battery identity information and the corresponding ID code of the second target battery is released, and the second target data bit in the current ID configuration data corresponding to the second target battery is determined;

[0021] The value of the second target data bit is adjusted to the second value to obtain the updated ID configuration data, so that the battery whose ID code was not successfully assigned can generate a third ID code according to the updated ID configuration data.

[0022] Optionally, the battery identification information is an SN serial number;

[0023] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0024] Secondly, this application provides a battery ID encoding allocation method, applied to a battery management system in a battery, comprising:

[0025] Receive ID configuration data sent by the controller, and generate a first ID code based on the ID configuration data;

[0026] The first ID code is sent to the controller so that the controller determines the first target battery based on the reception of the first ID code sent for each battery and updates the ID configuration data.

[0027] If it is determined that the ID encoding allocation is unsuccessful, a second ID encoding will be generated based on the updated ID configuration data.

[0028] Optionally, sending the first ID code to the controller includes:

[0029] Send the first ID code and battery identity information to the controller;

[0030] Accordingly, the method further includes:

[0031] Receive battery identification information sent by the controller;

[0032] When the received battery identity information matches its own battery identity information, the ID encoding allocation is determined to be successful.

[0033] And / or, if the received battery identity information is inconsistent with its own battery identity information, then the ID encoding allocation is determined to be unsuccessful.

[0034] Optionally, the battery identification information is an SN serial number;

[0035] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0036] Optionally, generating a first ID code based on the ID configuration data includes:

[0037] The third target data bit in the ID configuration data is determined, and the first ID code is generated based on the third target data bit; the third target data bit is the lowest or highest data bit whose value is the second value.

[0038] Optionally, the method further includes:

[0039] Once the ID encoding allocation is confirmed to be successful, determine whether to establish communication with the controller within a preset time period;

[0040] If communication fails to be established, the battery will be turned off.

[0041] And / or, the method further includes:

[0042] If communication is successfully established, the communication status will be continuously monitored. If communication fails and the battery's wake-up interface is disconnected from the battery's target end, the battery will be turned off.

[0043] Thirdly, this application provides a battery ID encoding allocation device, applied to a controller in an electrical appliance, comprising:

[0044] The first sending module is used to send ID configuration data to each battery; the ID configuration data is used to enable each battery to generate a first ID code.

[0045] The processing module is used to determine the first target battery based on the reception status of the first ID code sent for each battery, and update the ID configuration data;

[0046] The first sending module is further configured to send updated ID configuration data to at least some of the batteries among the plurality of batteries, so that each battery other than the first target battery generates a second ID code according to the updated ID configuration data.

[0047] Fourthly, this application provides a battery ID coding allocation device, applied to a battery management system in a battery, comprising:

[0048] The generation module is used to receive ID configuration data sent by the controller and generate a first ID code based on the ID configuration data;

[0049] The second sending module is used to send the first ID code to the controller, so that the controller can determine the first target battery and update the ID configuration data based on the reception of the first ID code sent for each battery.

[0050] The generation module is also used to generate a second ID code based on the updated ID configuration data when it is determined that the ID code allocation is unsuccessful.

[0051] Fifthly, this application provides a controller, comprising: at least one processor and a memory;

[0052] The memory stores computer-executed instructions;

[0053] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any of the first aspects.

[0054] Sixthly, this application provides a battery management system, including: at least one processor and a memory;

[0055] The memory stores computer-executed instructions;

[0056] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any of the second aspects.

[0057] In a seventh aspect, this application provides a battery, including: a battery management system as described in the sixth aspect.

[0058] Eighthly, this application provides an electric mobility scooter, comprising: a controller as described in the fifth aspect, and a battery as described in the seventh aspect.

[0059] Ninthly, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method described in either the first or second aspect.

[0060] In a tenth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in either the first or second aspect.

[0061] This application provides a battery ID coding allocation method, apparatus, controller, and electric mobility scooter. The battery ID coding allocation method includes: sending ID configuration data to each battery, the ID configuration data being used to enable each battery to generate a first ID code; determining a first target battery based on the reception of the first ID codes sent to each battery, and updating the ID configuration data; sending updated ID configuration data to at least some of the batteries, so that each battery other than the first target battery generates a second ID code based on the updated ID configuration data; and achieving the allocation of different ID codes to each battery by updating the ID configuration data multiple times, without requiring a certain number of wake-up interfaces for the battery, and allocating ID codes to each battery without increasing the cost of wiring harnesses and circuit boards. Attached Figure Description

[0062] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0063] Figure 1 An application scenario diagram provided for an embodiment of this application;

[0064] Figure 2 A flowchart illustrating a battery ID encoding allocation method provided in an embodiment of this application;

[0065] Figure 3 A schematic diagram illustrating the connection relationship between a battery and a controller is provided in an embodiment of this application.

[0066] Figure 4 A schematic diagram illustrating the connection relationship between three batteries and a controller is provided in an embodiment of this application.

[0067] Figure 5 A flowchart illustrating another battery ID encoding allocation method provided in this application embodiment;

[0068] Figure 6 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 1 ;

[0069] Figure 7 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 2 ;

[0070] Figure 8 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 3 ;

[0071] Figure 9 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 4 ;

[0072] Figure 10 A flowchart illustrating yet another battery ID encoding allocation method provided in this application embodiment;

[0073] Figure 11 This is a schematic diagram of the structure of a battery ID encoding and allocation device provided in an embodiment of this application;

[0074] Figure 12 A schematic diagram of another battery ID encoding and allocation device provided in an embodiment of this application;

[0075] Figure 13 This is a schematic diagram of the hardware structure of a controller provided in an embodiment of this application.

[0076] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0077] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0078] Typically, electrical devices contain two or more batteries, such as electric mobility scooters and outdoor power supplies. The controller can obtain the status information of each battery. This acquisition can be achieved by the battery management system (BMS) within each battery reporting the status information to the controller. This reporting must be based on the battery's ID code, allowing the controller to differentiate the status information of each battery.

[0079] Figure 1 An application scenario diagram provided for an embodiment of this application, such as Figure 1 As shown, when there are n batteries, an ID code can be set for each battery so that the controller can distinguish the status information sent by each battery.

[0080] Currently, two wake-up interfaces can be set up. By varying the connection methods between the two wake-up interfaces and the positive terminal of each battery, the three batteries can be woken up and their IDs encoded. For example, the ID codes for the three batteries could be 01, 10, and 11. However, when there are more batteries, more wake-up interfaces are needed. A greater number of wake-up interfaces requires more wiring harnesses and more complex circuit boards, which increases costs.

[0081] To address the aforementioned issues, this application proposes setting up an ID configuration data set with multiple data bits. Each data bit can be assigned to a battery, and each battery can calculate an ID code based on its corresponding data bit. Since each battery has different data bits, the calculated ID code will be different, thus enabling the assignment of different ID codes to each battery. This method eliminates the need for multiple wake-up interfaces on each battery and allows for the assignment of different ID codes to each battery without increasing costs.

[0082] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0083] Figure 2This is a flowchart illustrating a battery ID encoding allocation method provided in an embodiment of this application. This method is applied to a controller in an electrical device, such as... Figure 2 As shown, it includes:

[0084] Step S201: Send ID configuration data to each battery; the ID configuration data is used to generate a first ID code for each battery.

[0085] Let's take a vehicle as an example of an electrical device. The condition for assigning ID codes to each battery can be: after the vehicle is powered on, it broadcasts ID configuration data to the communication bus. After receiving the ID configuration data, the batteries connected to the vehicle can generate their first ID codes respectively.

[0086] Optionally, when the electrical device is a vehicle, the controller can be another communication node on the vehicle that communicates with the battery. It can be an instrument panel, VCU (Vehicle Control Unit), ECU (Electronic Control Unit), or TBOX (Telematics Box). The controller is used to process and store vehicle information. The controller can be a single component or a combination of multiple components mentioned above.

[0087] Optionally, the length of the ID configuration data is related to the number of batteries that can be configured in the vehicle. For example, when the vehicle can be configured with 8 batteries, the length of the ID configuration data can be 8, or a value greater than 8. The data length can be extended according to the actual situation. Optionally, when the ID configuration data contains 8 data bits, each data bit is bit0 to bit7.

[0088] When the ID configuration data is 8 bits, the ID configuration data is XXXXXXXX, where X can be 0 or 1. Taking bit 0 as an example, when bit 0 is 0, it means that the data bit has not been allocated to the battery; when bit 0 is 1, it means that the data bit has been allocated to the battery. After the vehicle is powered on, the ID configuration data is at its initial value, which can be 00000000.

[0089] The controller can send ID configuration data to each battery. When a battery is connected to the vehicle, it can receive this ID configuration data. After receiving the ID configuration data, the battery can generate a first ID code according to the corresponding algorithm. Optionally, if the algorithm for generating the ID code is set to be the same in all batteries, then all batteries can generate the same first ID code.

[0090] For example, after receiving the ID configuration data, each battery can generate a first ID code based on the data bit corresponding to the least significant bit being 0. Optionally, the battery can generate one or more first ID codes.

[0091] For example, the algorithm used by the battery can be: (Algorithm 1) ID encoding = 0x100 + n, where n represents the bit position where the lowest bit of the battery ID configuration data (data bits from right to left, from low to high) is 0. For example, when the ID configuration data is 00000111, n is 3, then the first ID encoding is 0x103.

[0092] Step S202: Based on the reception status of the first ID code sent to each battery, determine the first target battery and update the ID configuration data.

[0093] After each battery generates its first ID code, it can send the first ID code to the controller. The controller can successfully receive the first ID code sent by one of the batteries and identify that battery as the first target battery.

[0094] For example, when the newly connected vehicle has 3 batteries, the 3 batteries can generate a first ID code respectively, and these 3 first ID codes are the same. The 3 batteries can send the first ID code to the controller respectively. The controller can successfully receive the first ID code sent by one battery. If the controller receives the first ID code sent by battery 1, it will determine battery 1 as the first target battery.

[0095] Once the controller receives the first ID code, it indicates that a data bit in the ID configuration data has been assigned to a battery, and the ID configuration data can then be updated.

[0096] For example, if the ID configuration data is 00000111, and n is 3, then the first ID code is 0x103. This means that the lowest bit of the data bit that is 0, that is, the third bit, is allocated to the battery. This data bit needs to be modified to 1, and the updated ID configuration data is 00001111.

[0097] Step S203: Send updated ID configuration data to at least some of the batteries among the plurality of batteries, so that each battery other than the first target battery generates a second ID code according to the updated ID configuration data.

[0098] Once the controller updates the ID configuration data, it can send the updated ID configuration data to at least some of the multiple batteries.

[0099] In other words, when the controller sends updated ID configuration information to the batteries, it can send ID configuration data only to batteries that have not been assigned ID codes, so that each battery without an assigned ID code generates a second ID code. Alternatively, the controller can send ID configuration data to each battery connected to the vehicle, and batteries with assigned ID codes will not generate a second ID code after receiving the ID configuration data; only batteries without assigned ID codes will generate a second ID code after receiving the ID configuration data.

[0100] After generating a second ID code, each battery can send the second ID code to the controller. The controller then determines the target battery corresponding to the second ID code based on the reception of the second ID codes sent to each battery, updates the ID configuration data, and sends the updated ID configuration data to each battery. This process is repeated to assign different ID codes to the batteries of each connected vehicle.

[0101] For example, when a battery generates an ID code using Algorithm 1, the initial ID configuration data is 00000000. When there are three batteries connected to the vehicle, if battery 1 successfully sends the generated ID code 0x100 to the controller, the controller assigns the ID code 0x100 to battery 1. The controller updates the ID configuration data to 00000001 and then sends the ID configuration data 00000001 to battery 2 and battery 3. Battery 2 and battery 3 generate ID code 0x101. If battery 2 sends the generated ID code 0x101 to the controller, the controller assigns the ID code 0x101 to battery 2. The controller updates the ID configuration data to 00000011 and sends the ID configuration data 00000011 to battery 3. Battery 3 generates ID code 0x102 and sends ID code 0x102 to the controller. The controller assigns ID code 0x102 to battery 3, thus completing the allocation of ID codes for the three batteries.

[0102] Optionally, other algorithms can be used to generate the ID code. For example, the algorithm used can be: (Algorithm 2) ID code = 0x100 + 16*n ~ 0x100 + 16*n + 0xF. The initial ID configuration data is 00000000. When three batteries are connected to the vehicle, the generated ID codes are 0x100 ~ 0x10F, 0x110 ~ 0x11F, and 0x120 ~ 0x12F, respectively. Here, bit 0 can be considered as the 0th bit, meaning n equals 0.

[0103] Optionally, when the number of batteries is small, Algorithm 1 can be used to generate the ID code, and when the number of batteries is large, Algorithm 2 can be used to generate the ID code.

[0104] The battery ID encoding allocation method provided in this application includes: sending ID configuration data to each battery, wherein the ID configuration data is used to enable each battery to generate a first ID code; determining a first target battery based on the reception of the first ID code sent to each battery, and updating the ID configuration data; sending updated ID configuration data to at least some of the batteries among a plurality of batteries, so that each battery other than the first target battery generates a second ID code based on the updated ID configuration data; and achieving the allocation of different ID codes to each battery by updating the ID configuration data multiple times, without requiring a certain number of wake-up interfaces for the battery, and allocating ID codes to each battery without increasing the cost of the wiring harness and circuit board.

[0105] Figure 3 This application provides a schematic diagram illustrating the connection relationship between a battery and a controller, as shown in the embodiment. Figure 3 As shown, P+ and P- represent the positive and negative terminals of the battery, respectively. The wake-up interface is used to detect whether the battery is connected to the vehicle, and the communication interface is used for data exchange between the battery and the vehicle. Each battery is equipped with one wake-up interface, which is used only for battery wake-up.

[0106] Figure 4 This is a schematic diagram illustrating the connection relationship between three batteries and a controller, provided as an embodiment of this application. Figure 4 As shown, when the battery is connected to the vehicle, the wake-up interface is connected to P+. At this time, the battery closes the negative terminal switch K to supply power to the vehicle. The battery can establish communication with the controller within a set time X after the negative terminal is closed. If the communication is established successfully, the battery wakes up successfully and enters normal working state. If the communication fails, the battery will disconnect the negative terminal, and the battery wake-up will fail. Before establishing communication, the above method can be used to assign codes to each battery, and then communication between the battery and the controller is achieved based on the assigned ID codes.

[0107] Furthermore, if a communication failure occurs or the wake-up interface disconnects from P+ after a successful battery wake-up, the BMS will not disconnect switch K at the negative terminal. Both communication failure and the disconnection of the wake-up interface from P+ must be met simultaneously for switch K at the negative terminal to be disconnected. After the battery disconnects switch K, it must be disconnected from the vehicle and then reconnected to the vehicle before the above wake-up process can be executed.

[0108] Abnormal battery use refers to manually connecting the battery's positive terminal to the wake-up interface when the battery is not connected to the vehicle, which can wake the battery and poses a safety hazard. The methods described above can prevent abnormal battery use and avoid battery power loss when communication with the vehicle fails, thereby reducing battery usage risks.

[0109] Figure 5 A flowchart illustrating another battery ID encoding allocation method provided in this application embodiment is shown below. Figure 5 As shown, the controller can send ID configuration data to each battery. After receiving the ID configuration data, the battery can generate an ID code and send the ID code and SN serial number to the controller. After receiving the ID code, the controller can update the ID configuration data and send the received SN serial number to each battery. Each battery can compare the received SN serial number with its own SN serial number to determine whether it has been successfully assigned an ID code. The above process is repeated to assign ID codes to each battery.

[0110] Optionally, based on the reception of the first ID code sent for each battery, a first target battery is determined, and the ID configuration data is updated, including:

[0111] The battery that successfully sends the first ID code and battery identity information is identified as the first target battery;

[0112] Associate the first ID code with the battery identity information of the first target battery;

[0113] Update the ID configuration data according to the first ID code;

[0114] Accordingly, the method further includes:

[0115] The battery identity information is sent to each battery so that the first target battery is determined to have successfully assigned an ID code, and each battery other than the first target battery is determined to have failed to be assigned an ID code.

[0116] After generating a first ID code, each battery can send the first ID code and its own battery identification information to the controller. The controller can successfully receive the first ID code and corresponding battery identification information sent by a battery. Optionally, the battery identification information must be unique to distinguish each battery.

[0117] After receiving the first ID code and battery identity information, the controller can associate the first ID code and battery identity information to determine which first ID code to assign to the first target battery.

[0118] After determining the ID code of the first target battery, the ID configuration data can be updated, and the updated ID configuration data can then be sent to batteries that have not been assigned ID codes, so that batteries that have not been assigned ID codes can continue to generate ID codes.

[0119] The controller associates the first ID code with the received battery identification information, enabling it to assign the first ID code to the first target battery. Similarly, the battery needs to determine whether it has successfully been assigned the ID code, which can be done based on its battery identification information.

[0120] Optionally, the controller can send the received battery identity information to each battery. Each battery can compare its own battery identity information with the received battery identity information. If the two match, it means that it is the first target battery, that is, its own ID code is the first ID code. If the two do not match, it means that it is not the first target battery, and its own ID code has not been successfully assigned.

[0121] For example, after generating the same first ID code, battery 1 can send the first ID code and battery identity information 1 to the controller, and battery 2 can send the first ID code and battery identity information 2 to the controller. If the controller successfully receives the first ID code and battery identity information 1, it will associate the two and send battery identity information 1 to both battery 1 and battery 2. If battery 1 determines that the received battery identity information is its own battery identity information, it will determine that its ID code is the first ID code. If battery 2 determines that the received battery identity information is not its own battery identity information, it will determine that its ID code has not been successfully assigned.

[0122] By transmitting identity information, the controller can determine which battery is currently assigned an ID code, and each battery can determine whether it has been successfully assigned an ID code.

[0123] Optionally, updating the ID configuration data according to the first ID encoding includes:

[0124] Based on the first ID code, the first target battery is determined to correspond to the first target data bit in the ID configuration data;

[0125] Adjust the value of the first target data bit to the first value to obtain the updated ID configuration data.

[0126] When updating ID configuration data, the first ID code can be used to determine the first target data bits allocated to the battery. Optionally, an algorithm corresponding to the ID encoding algorithm can also be set on the controller side to determine the first target data bits allocated to the battery.

[0127] For example, when the algorithm for generating the ID code is set at the battery end as ID code = 0x100 + n, the algorithm set at the controller end can be n = ID code - 0x100, so that the first target data bit can be determined based on the received ID code.

[0128] For example, when the received ID encoding is 0x103, the first target data bit (i.e., n) can be determined to be 3, thereby adjusting the value of the 3rd bit in the ID configuration data to obtain the updated ID configuration data.

[0129] Optionally, the first value can be 1. For example, when the value of a data bit in the ID configuration data is 0, it means that the data bit has not been allocated to the battery. If the value is 1, it means that the data bit has been allocated to the battery. In this case, the ID configuration data is 00000111 before the update and 00001111 after the update.

[0130] By updating the ID configuration data based on the first target data bit, accurate updates to the ID configuration data can be achieved, thereby improving the accuracy of the ID codes subsequently assigned to each battery.

[0131] Optionally, the method further includes:

[0132] When it is determined that the communication of the second target battery with the assigned ID code fails, the association between the battery identity information and the corresponding ID code of the second target battery is released, and the second target data bit in the current ID configuration data corresponding to the second target battery is determined;

[0133] The value of the second target data bit is adjusted to the second value to obtain the updated ID configuration data, so that the battery whose ID code was not successfully assigned can generate a third ID code according to the updated ID configuration data.

[0134] When communication with the second target battery of the access vehicle fails, the controller can first disconnect the association between the battery identity information and the corresponding ID code of the second target battery, so as to release the ID code and then allocate the ID code to other batteries.

[0135] In addition, when communication with the second target battery of the access vehicle fails, the ID configuration data also needs to be updated so that batteries without assigned ID codes, or batteries of newly accessed vehicles, can generate ID codes based on the updated ID configuration data.

[0136] Optionally, the second value can be 0. Optionally, the second target data bit in the current ID configuration data corresponding to the second target battery can be determined first. For example, when the algorithm for generating the ID code set at the battery end is: ID code = 0x100 + n, then the algorithm set at the controller end can be n = ID code - 0x100. If the ID code of the second target battery is 0x103, then the second target data bit (that is, n) is equal to 3. If the current ID configuration data is 00001111, then the updated ID configuration data is 00000111, so as to release the third data bit.

[0137] Optionally, when the second target battery successfully communicates again, the current ID configuration data is sent to the successfully communicating second target battery so that the second target battery generates a new ID code.

[0138] As can be seen, when battery communication fails and then succeeds, the ID code can be regenerated to dynamically assign ID codes to each battery.

[0139] This application does not restrict the values ​​of the first and second numerical values.

[0140] By releasing the corresponding data bits in the ID configuration data when battery communication fails, the ID code can be dynamically assigned to each battery. In other words, the ID code of each battery is not fixed and can change dynamically according to the battery's condition in the vehicle.

[0141] Optionally, the battery identification information is an SN serial number;

[0142] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0143] Optionally, the battery identification information can be unique, and can use a serial number (SN), which is a unique identifier used to verify the legitimate identity of the product.

[0144] Based on the above analysis, when battery communication fails and then succeeds again, the corresponding ID codes may be inconsistent. It is possible to dynamically assign ID codes to each battery, meaning that the relationship between each battery and each data bit in the ID configuration data is not fixed.

[0145] For example, when battery 1 is connected to the vehicle for the first time, the data bit in the corresponding ID configuration data is the 3rd data bit. If communication fails, the 3rd data bit is released. If battery 2 is connected to the vehicle at this time, the 3rd data bit may be assigned to battery 2. If battery 1 is connected to the vehicle again, other data bits can be assigned to battery 1.

[0146] The reason for regenerating the ID code after communication is restored is to take into account battery replacement. For example, if a battery has an ID code of 0x100 on this vehicle, and it is replaced in another vehicle, the other vehicle may have already assigned the same ID code to a different battery, which will cause a conflict.

[0147] Because the correspondence between each battery and each data bit in the ID configuration data is not fixed, batteries can be freely added to and removed from the vehicle system, and the ID code can be dynamically updated.

[0148] The following will illustrate this with specific examples. For example... Figure 4The diagram illustrates a vehicle system with three batteries. The internal GND of batteries 1 through 3 is connected to P- via K (a relay or other electronic switch). When a battery is successfully woken up, switch K closes; if the battery fails to wake up or wake-up fails, K opens. The interfaces for the wiring harness that connect to the batteries are: P+, P-, Wake-up, and Communication.

[0149] For example, the controller sets the ID configuration data to 8 bits. When batteries 1 through 3 are connected to the vehicle and all are successfully woken up in sequence, the ID configuration data is updated to 00000111, indicating that three batteries are connected to the vehicle and are working normally. Battery 1 corresponds to bit 0, battery 2 corresponds to bit 1, and battery 3 corresponds to bit 2. This explanation uses the example of determining the ID code of a battery based on the data bit corresponding to the least significant bit being 0.

[0150] Figure 6 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 1 , Figure 7 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 2 , Figure 8 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 3 , Figure 9 A schematic diagram illustrating the relationship between data bits of battery and ID configuration data provided in an embodiment of this application. Figure 4 .

[0151] See Figure 6 If battery 1 fails to communicate, the ID configuration data will be updated to 00000110. At this time, the controller can issue an alarm message indicating that the battery communication has failed. At this time, battery 1 will be released from bit 0 data.

[0152] See Figure 7 If communication with battery 1 fails to return to normal and communication with battery 3 fails again, the ID configuration data will be updated to 00000010. At this time, the controller can continuously issue alarm information. At this time, battery 3 will be released from the data bit 2 and the data bit 0 will be in an idle position.

[0153] See Figure 8 If communication with battery 3 is restored to normal first, the ID configuration data will be updated to 00000011, at which point the controller can continuously issue alarm information.

[0154] See Figure 9Finally, when communication with battery 1 returns to normal, the ID configuration data is updated to 00000111, and the controller no longer issues alarm messages. The ID configuration data is 00000111, with battery 1 corresponding to bit 2, battery 2 to bit 1, and battery 3 to bit 0.

[0155] The ID coding allocation method in this application is a dynamic allocation method, which can assign ID codes to all batteries connected to the vehicle. The battery ID code is not fixed; it changes dynamically according to the battery's status in the vehicle. Furthermore, batteries can be freely added to and removed from the vehicle system, and the ID code can be dynamically updated.

[0156] The aforementioned ID encoding allocation method does not depend on the number of wiring harnesses and wake-up interfaces. The number of batteries can be expanded by adjusting the length of the battery ID configuration data. Compared with configuring ID encoding through wake-up interfaces, the ID encoding allocation method of this application can support ID encoding for a larger number of batteries and can simplify and unify the design of external wiring harnesses and interfaces for batteries.

[0157] Figure 10 This is a flowchart illustrating another battery ID encoding allocation method provided in an embodiment of this application, as shown below. Figure 10 As shown, this method is applied to the BMS (Battery Management System) in a battery, including:

[0158] Step S1001: Receive ID configuration data sent by the controller, and generate a first ID code based on the ID configuration data.

[0159] On the battery side, the execution entity can be the BMS in the battery. The BMS connected to any battery in the vehicle can receive the ID configuration data sent by the controller and generate the first ID code based on the ID configuration data.

[0160] Optionally, the algorithm for generating ID codes can be set in the BMS. Optionally, if the algorithm for generating ID codes is set to be the same in all batteries, then all batteries can generate the same first ID code.

[0161] Step S1002: Send the first ID code to the controller so that the controller can determine the first target battery based on the reception of the first ID code sent for each battery and update the ID configuration data.

[0162] After generating the first ID code, each battery in the connected vehicle can send the first ID code to the controller. The controller can successfully receive the first ID code sent by one of the batteries and identify that battery as the first target battery.

[0163] For example, when the newly connected vehicle has 3 batteries, the 3 batteries can generate a first ID code respectively, and these 3 first ID codes are the same. The 3 batteries can send the first ID code to the controller respectively. The controller can successfully receive the first ID code sent by one battery. If the controller receives the first ID code sent by battery 1, it will determine battery 1 as the first target battery.

[0164] Upon receiving the first ID code, the controller indicates that a data bit in the ID configuration data has been assigned to a battery, and thus the ID configuration data can be updated. The process of the controller updating the ID configuration data will not be detailed here.

[0165] After updating the ID configuration data, the controller can also send the updated ID configuration data to each battery.

[0166] Step S1003: If it is determined that the ID code allocation is unsuccessful, then generate a second ID code based on the updated ID configuration data.

[0167] When a battery determines that its own ID code allocation is unsuccessful, it can continue to generate a second ID code based on the updated ID configuration data and send the second ID code to the controller so that the controller can determine to allocate the second ID code to a battery. The above process is repeated until each battery determines its own ID code.

[0168] The battery ID encoding allocation method provided in this application includes: receiving ID configuration data sent by a controller; generating a first ID code based on the ID configuration data; sending the first ID code to the controller; so that the controller determines a first target battery based on the reception of the first ID code sent for each battery and updates the ID configuration data; when it is determined that the ID encoding allocation is unsuccessful, generating a second ID code based on the updated ID configuration data; and through the ID configuration data updated multiple times by the controller, different ID codes can be assigned to each battery, and there is no requirement for the number of wake-up interfaces of the battery. It is possible to assign ID codes to each battery without increasing the cost of the wiring harness and circuit board.

[0169] Optionally, sending the first ID code to the controller includes:

[0170] Send the first ID code and battery identity information to the controller;

[0171] Accordingly, the method further includes:

[0172] Receive battery identification information sent by the controller;

[0173] When the received battery identity information matches its own battery identity information, the ID encoding allocation is determined to be successful.

[0174] And / or, if the received battery identity information is inconsistent with its own battery identity information, then the ID encoding allocation is determined to be unsuccessful.

[0175] After generating a first ID code, each battery can send the first ID code and its own battery identification information to the controller. The controller can successfully receive the first ID code and corresponding battery identification information sent by a battery. Optionally, the battery identification information must be unique to distinguish each battery.

[0176] The controller can associate the received first ID code with the battery identity information to determine which first ID code to assign to the first target battery.

[0177] For the battery side, it is also necessary to determine whether it has been successfully assigned the ID code, which can be determined based on the battery's identity information.

[0178] Optionally, the controller can send the received battery identity information to each battery. Each battery can compare its own battery identity information with the received battery identity information. If the two match, it means that it is the first target battery, that is, its own ID code is the first ID code. If the two do not match, it means that it is not the first target battery, and its own ID code has not been successfully assigned.

[0179] By transmitting identity information, the controller can determine which battery is currently assigned an ID code, and each battery can determine whether it has been successfully assigned an ID code.

[0180] Optionally, the battery identification information is an SN serial number;

[0181] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0182] Optionally, the battery identification information can be unique, and can use a serial number (SN), which is a unique identifier used to verify the legitimate identity of the product.

[0183] The correspondence between each battery and each data bit in the ID configuration data is not fixed. Please refer to the aforementioned embodiments, which will not be repeated here.

[0184] Optionally, generating a first ID code based on the ID configuration data includes:

[0185] The third target data bit in the ID configuration data is determined, and the first ID code is generated based on the third target data bit; the third target data bit is the lowest or highest data bit whose value is the second value.

[0186] When generating the first ID code based on the ID configuration data, the third target data bit can be determined first.

[0187] Optionally, the second value can be 0. For example, after each battery receives the ID configuration data, it can generate a first ID code based on either the data bit corresponding to the least significant bit being 0, or the data bit corresponding to the most significant bit being 0. The data bit corresponding to the least significant bit being 0, or the data bit corresponding to the most significant bit being 0, is the third target data bit.

[0188] For example, the algorithm used by the battery can be: (Algorithm 1) ID encoding = 0x100 + n, where n represents the bit position where the lowest bit of the battery ID configuration data (data bits from right to left, from low to high) is 0. For example, when the ID configuration data is 00000111, n is 3, then the first ID encoding is 0x103.

[0189] Alternatively, other algorithms can be used to generate the ID code. For example, the algorithm used can be: (Algorithm 2) ID code = 0x100 + 16*n ~ 0x100 + 16*n + 0xF. Here, the data bit 0 can be considered as the 0th bit, that is, n equals 0.

[0190] By determining the third target data bit, the first ID code can be accurately generated based on the third target data bit, thus realizing the correspondence between the data bit and the ID code.

[0191] Optionally, the method further includes:

[0192] Once the ID encoding allocation is confirmed to be successful, determine whether to establish communication with the controller within a preset time period;

[0193] If communication fails to be established, the battery will be turned off.

[0194] And / or, the method further includes:

[0195] If communication is successfully established, the communication status will be continuously monitored. If communication fails and the battery's wake-up interface is disconnected from the battery's target end, the battery will be turned off.

[0196] When the battery is connected to the vehicle, the wake-up interface connects to P+. At this time, the battery closes the negative terminal switch K, supplying power to the vehicle to initially wake up the battery. After the initial wake-up, the battery's ID code can be determined. Subsequently, communication with the controller is conducted based on the ID code, and the decision to shut down the battery is then determined based on the communication status.

[0197] Optionally, the battery can establish communication with the controller within a preset time (set time X) after the negative terminal is closed. If the communication is established successfully, the battery is considered to have been successfully woken up and enters normal working state. If the communication fails, the battery will disconnect the negative terminal, which means the battery will be turned off, and the battery wake-up will fail. Before establishing communication, the above method can be used to assign codes to each battery, and then communication between the battery and the controller can be achieved based on the assigned ID codes.

[0198] Furthermore, after successful battery wake-up, i.e., after confirming successful ID code allocation, and establishing communication with the controller within a preset time period, if a communication failure occurs or the wake-up interface disconnects from P+ (target terminal), the BMS will not disconnect the switch K at the negative terminal. The switch K at the negative terminal will only be disconnected when both communication failure and the wake-up interface disconnecting from P+ (target terminal) are simultaneously satisfied.

[0199] Optionally, after the battery disconnect switch K is activated, the connection to the vehicle must be disconnected and then reconnected before the above wake-up process can be executed.

[0200] The battery wake-up method uses a dual determination of hard-wired connection and communication identification, which improves the reliability and safety of the battery.

[0201] By using the methods described above, abnormal battery use can be avoided, and battery power loss can be prevented when communication between the battery and the vehicle fails, thereby reducing the risk of battery use.

[0202] Figure 11 This application provides a schematic diagram of a battery ID encoding and allocation device, applied to a controller in an electrical appliance, comprising:

[0203] The first sending module 1101 is used to send ID configuration data to each battery; the ID configuration data is used to enable each battery to generate a first ID code.

[0204] Processing module 1102 is used to determine the first target battery based on the reception status of the first ID code sent for each battery, and update the ID configuration data;

[0205] The first sending module 1101 is further configured to send updated ID configuration data to at least some of the batteries among the plurality of batteries, so that each battery other than the first target battery generates a second ID code according to the updated ID configuration data.

[0206] Optionally, when the processing module 1102 determines the first target battery and updates the ID configuration data based on the reception of the first ID code sent for each battery, it is specifically used for:

[0207] The battery that successfully sends the first ID code and battery identity information is identified as the first target battery;

[0208] Associate the first ID code with the battery identity information of the first target battery;

[0209] Update the ID configuration data according to the first ID code;

[0210] Accordingly, the device also includes:

[0211] The battery identity information is sent to each battery so that the first target battery is determined to have successfully assigned an ID code, and each battery other than the first target battery is determined to have failed to be assigned an ID code.

[0212] Optionally, updating the ID configuration data according to the first ID encoding includes:

[0213] Based on the first ID code, the first target battery is determined to correspond to the first target data bit in the ID configuration data;

[0214] Adjust the value of the first target data bit to the first value to obtain the updated ID configuration data.

[0215] Optionally, the method further includes:

[0216] When it is determined that the communication of the second target battery with the assigned ID code fails, the association between the battery identity information and the corresponding ID code of the second target battery is released, and the second target data bit in the current ID configuration data corresponding to the second target battery is determined;

[0217] The value of the second target data bit is adjusted to the second value to obtain the updated ID configuration data, so that the battery whose ID code was not successfully assigned can generate a third ID code according to the updated ID configuration data.

[0218] Optionally, the battery identification information is an SN serial number;

[0219] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0220] The battery ID encoding allocation device provided in this application embodiment can achieve the above-mentioned... Figure 2 The battery ID encoding allocation method shown in the embodiment has a similar implementation principle and technical effect, and will not be described again here.

[0221] Figure 12 This application provides a schematic diagram of another battery ID encoding and allocation device, applied to a BMS in a battery, comprising:

[0222] The generation module 1201 is used to receive ID configuration data sent by the controller and generate a first ID code based on the ID configuration data;

[0223] The second sending module 1202 is used to send the first ID code to the controller, so that the controller can determine the first target battery and update the ID configuration data based on the reception of the first ID code sent for each battery.

[0224] The generation module 1201 is also used to generate a second ID code based on the updated ID configuration data when it is determined that the ID code allocation is unsuccessful.

[0225] Optionally, when the second sending module 1202 sends the first ID code to the controller, it is specifically used for:

[0226] Send the first ID code and battery identity information to the controller;

[0227] Accordingly, the device further includes: a judgment module, used for:

[0228] Receive battery identification information sent by the controller;

[0229] When the received battery identity information matches its own battery identity information, the ID encoding allocation is determined to be successful.

[0230] And / or, if the received battery identity information is inconsistent with its own battery identity information, then the ID encoding allocation is determined to be unsuccessful.

[0231] Optionally, the battery identification information is an SN serial number;

[0232] And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

[0233] Optionally, when generating the first ID code based on the ID configuration data, the generation module 1201 is specifically used for:

[0234] The third target data bit in the ID configuration data is determined, and the first ID code is generated based on the third target data bit; the third target data bit is the lowest or highest data bit whose value is the second value.

[0235] Optionally, the device further includes: a control module, used for:

[0236] Once the ID encoding allocation is confirmed to be successful, determine whether to establish communication with the controller within a preset time period;

[0237] If communication fails to be established, the battery will be turned off.

[0238] And / or, the control module is further configured to:

[0239] If communication is successfully established, the communication status will be continuously monitored. If communication fails and the battery's wake-up interface is disconnected from the battery's target end, the battery will be turned off.

[0240] The battery ID encoding allocation device provided in this application embodiment can achieve the above-mentioned... Figure 10 The battery ID encoding allocation method shown in the embodiment has a similar implementation principle and technical effect, and will not be described again here.

[0241] Figure 13 This is a schematic diagram of the hardware structure of a controller provided in an embodiment of this application. Figure 13 As shown, the controller provided in this embodiment includes at least one processor 1301 and a memory 1302. The processor 1301 and the memory 1302 are connected via a bus 1303.

[0242] In the specific implementation process, at least one processor 1301 executes computer execution instructions stored in memory 1302, causing at least one processor 1301 to execute the method in the method embodiment corresponding to the controller side described above.

[0243] The specific implementation process of processor 1301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0244] In the above Figure 13 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0245] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.

[0246] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0247] This application embodiment also provides a battery management system, including: at least one processor and a memory; the memory stores computer-executable instructions;

[0248] The at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to execute the method in the method embodiment corresponding to the BMS side described above.

[0249] This application also provides a battery, including: a battery management system as described in the foregoing embodiments.

[0250] This application also provides an electric mobility scooter, including: a controller as described in the foregoing embodiments, and a battery as described in the foregoing embodiments.

[0251] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in the above-described method embodiments.

[0252] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the above method embodiments.

[0253] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0254] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0255] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0256] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

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

[0258] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A battery ID encoding allocation method, characterized in that, Controllers used in electrical equipment include: Send ID configuration data to each battery; the ID configuration data is used to enable each battery to generate a first ID code; Based on the reception of the first ID code sent to each battery, the first target battery is determined, and the ID configuration data is updated; Updated ID configuration data is sent to at least some of the batteries in a plurality of batteries, so that each battery other than the first target battery generates a second ID code based on the updated ID configuration data.

2. The method according to claim 1, characterized in that, Based on the reception of the first ID code sent to each battery, the first target battery is determined, and the ID configuration data is updated, including: The battery that successfully sends the first ID code and battery identity information is identified as the first target battery; Associate the first ID code with the battery identity information of the first target battery; Update the ID configuration data according to the first ID code; Accordingly, the method further includes: The battery identity information is sent to each battery so that the first target battery is determined to have successfully assigned an ID code, and each battery other than the first target battery is determined to have failed to be assigned an ID code.

3. The method according to claim 2, characterized in that, Updating the ID configuration data according to the first ID code includes: Based on the first ID code, the first target battery is determined to correspond to the first target data bit in the ID configuration data; Adjust the value of the first target data bit to the first value to obtain the updated ID configuration data.

4. The method according to claim 2 or 3, characterized in that, The method further includes: When it is determined that the communication of the second target battery with the assigned ID code fails, the association between the battery identity information and the corresponding ID code of the second target battery is released, and the second target data bit in the current ID configuration data corresponding to the second target battery is determined; The value of the second target data bit is adjusted to the second value to obtain the updated ID configuration data, so that the battery whose ID code was not successfully assigned can generate a third ID code according to the updated ID configuration data.

5. The method according to claim 2 or 3, characterized in that, The battery identification information is the SN serial number; And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

6. A battery ID encoding allocation method, characterized in that, Battery management systems used in batteries include: Receive ID configuration data sent by the controller, and generate a first ID code based on the ID configuration data; The first ID code is sent to the controller so that the controller determines the first target battery based on the reception of the first ID code sent for each battery and updates the ID configuration data. If it is determined that the ID encoding allocation is unsuccessful, a second ID encoding will be generated based on the updated ID configuration data.

7. The method according to claim 6, characterized in that, Sending the first ID code to the controller includes: Send the first ID code and battery identity information to the controller; Accordingly, the method further includes: Receive battery identification information sent by the controller; When the received battery identity information matches its own battery identity information, the ID encoding allocation is determined to be successful. And / or, if the received battery identity information is inconsistent with its own battery identity information, then the ID encoding allocation is determined to be unsuccessful.

8. The method according to claim 7, characterized in that, The battery identification information is the SN serial number; And / or, the correspondence between each battery and each data bit in the ID configuration data is not fixed.

9. The method according to any one of claims 6-8, characterized in that, Generate a first ID code based on the ID configuration data, including: The third target data bit in the ID configuration data is determined, and the first ID code is generated based on the third target data bit; the third target data bit is the lowest or highest data bit whose value is the second value.

10. The method according to any one of claims 6-8, characterized in that, The method further includes: Once the ID encoding allocation is confirmed to be successful, determine whether to establish communication with the controller within a preset time period; If communication fails to be established, the battery will be turned off. And / or, the method further includes: If communication is successfully established, the communication status will be continuously monitored. If communication fails and the battery's wake-up interface is disconnected from the battery's target end, the battery will be turned off.

11. A battery ID encoding and allocation device, characterized in that, Controllers used in electrical equipment include: The first sending module is used to send ID configuration data to each battery; the ID configuration data is used to enable each battery to generate a first ID code. The processing module is used to determine the first target battery based on the reception status of the first ID code sent for each battery, and update the ID configuration data; The first sending module is further configured to send updated ID configuration data to at least some of the batteries among the plurality of batteries, so that each battery other than the first target battery generates a second ID code according to the updated ID configuration data.

12. A battery ID encoding and allocation device, characterized in that, Battery management systems used in batteries include: The generation module is used to receive ID configuration data sent by the controller and generate a first ID code based on the ID configuration data; The second sending module is used to send the first ID code to the controller, so that the controller can determine the first target battery and update the ID configuration data based on the reception of the first ID code sent for each battery. The generation module is also used to generate a second ID code based on the updated ID configuration data when it is determined that the ID code allocation is unsuccessful.

13. A controller, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 1 to 5.

14. A battery management system, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method as described in any one of claims 6 to 10.

15. A battery, characterized in that, include: The battery management system as described in claim 14.

16. An electric mobility scooter, characterized in that, include: The controller as claimed in claim 13, and the battery as claimed in claim 15.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1 to 10.

18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 10.